]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdbserver/ChangeLog
gdbsupport: replace AC_TRY_COMPILE in ptrace.m4
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * configure: Re-generate.
4
5 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
6
7 * configure: Re-generate.
8
9 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
10
11 * configure.ac: Modernize.
12 * configure: Re-generate.
13
14 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
15
16 * configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
17 AC_CANONICAL_SYSTEM.
18 * configure: Re-generate.
19
20 2020-10-26 Pedro Alves <pedro@palves.net>
21
22 * netbsd-low.cc (netbsd_waitpid, netbsd_process_target::kill)
23 (netbsd_qxfer_libraries_svr4): Use gdb::handle_eintr without
24 explicit type.
25
26 2020-10-25 Simon Marchi <simon.marchi@polymtl.ca>
27
28 * acinclude.m4: Update ptrace.m4 path.
29
30 2020-10-24 Simon Marchi <simon.marchi@polymtl.ca>
31
32 * config.in: Re-generate.
33 * configure: Re-generate.
34
35 2020-10-21 Simon Marchi <simon.marchi@polymtl.ca>
36
37 * server.cc (handle_general_set): Don't use sprintf with
38 argument overlapping buffer.
39
40 2020-10-20 Tom Tromey <tromey@adacore.com>
41
42 PR gdb/26742:
43 * inferiors.cc (remove_thread): Clear current_thread before
44 freeing the thread.
45
46 2020-10-13 Kamil Rytarowski <n54@gmx.com>x
47
48 * netbsd-low.cc (netbsd_tdesc): Remove.
49 (netbsd_add_process): Likewise.
50 (netbsd_process_target::create_inferior): Update.
51
52 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
53
54 * linux-arc-low.cc (arc_linux_read_description): Release the
55 unique_ptr returned from arc_create_target_description.
56
57 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
58
59 * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
60 or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
61
62 2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
63
64 * linux-low.cc (linux_process_target::handle_extended_wait):
65 Release the unique_ptr returned from allocate_target_description.
66 * linux-riscv-low.cc (riscv_target::low_arch_setup): Likewise.
67 * linux-x86-low.cc (tdesc_amd64_linux_no_xml): Change type.
68 (tdesc_i386_linux_no_xml): Change type.
69 (x86_linux_read_description): Borrow pointer from unique_ptr
70 object.
71 (x86_target::get_ipa_tdesc_idx): Likewise.
72 (initialize_low_arch): Likewise.
73 * tdesc.cc (allocate_target_description): Update return type.
74
75 2020-10-07 Tom Tromey <tromey@adacore.com>
76
77 * server.cc (handle_search_memory): Remove dead code.
78
79 2020-10-07 Tom Tromey <tromey@adacore.com>
80
81 * server.cc (handle_search_memory_1): Remove.
82 (handle_search_memory): Use simple_search_memory.
83
84 2020-10-07 Simon Marchi <simon.marchi@efficios.com>
85
86 * Makefile.in (COMPILE): Add CXXFLAGS.
87 (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
88 (gdbserver$(EXEEXT)): Add CXXFLAGS.
89 (gdbreplay$(EXEEXT)): Add CXXFLAGS.
90 ($(IPA_LIB)): Add CXXFLAGS.
91 (IPAGENT_COMPILE): Add CXXFLAGS.
92
93 2020-10-07 Anton Kolesov <anton.kolesov@synopsys.com>
94
95 * configure.srv: Support ARC architecture.
96 * Makefile.in: Add linux-arc-low.cc and arch/arc.o.
97 * linux-arc-low.cc: New file.
98
99 2020-10-07 Kamil Rytarowski <n54@gmx.com>
100
101 * netbsd-low.cc (get_dynamic, get_r_debug, read_one_ptr)
102 (netbsd_qxfer_libraries_svr4): Remove "target" argument and update.
103 (netbsd_process_target::qxfer_libraries_svr4): Update.
104
105 2020-10-07 Kamil Rytarowski <n54@gmx.com>
106
107 * netbsd-low.cc: Fix whitespace formatting.
108 * netbsd-amd64-low.cc: Likewise.
109
110 2020-10-07 Kamil Rytarowski <n54@gmx.com>
111
112 * netbsd-low.cc (netbsd_process_target::read_memory)
113 (netbsd_process_target::write_memory): Update.
114
115 2020-10-07 Kamil Rytarowski <n54@gmx.com>
116
117 * netbsd-aarch64-low.cc: Add.
118 * Makefile.in (SFILES): Register "netbsd-aarch64-low.c".
119 * configure.srv: Add aarch64*-*-netbsd*.
120
121 2020-10-06 Shahab Vahedi <shahab@synopsys.com>
122
123 * regcache.cc (register_data): Remove unused "fetch" argument.
124
125 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
126
127 * server.cc (handle_monitor_command): Handle "set
128 debug-event-loop".
129 (captured_main): Handle "--debug-event-loop".
130 (monitor_show_help): Mention new setting.
131 (gdbserver_usage): Mention new flag.
132
133 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
134
135 * linux-low.cc (linux_process_target::async): Pass name to
136 add_file_handler.
137 * remote-utils.cc (handle_accept_event): Likewise.
138 (remote_open): Likewise.
139
140 2020-10-01 Kamil Rytarowski <n54@gmx.com>
141
142 * netbsd-i386-low.cc: Add.
143 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
144 * configure.srv: Add i[34567]86-*-netbsd*.
145
146 2020-10-01 Kamil Rytarowski <n54@gmx.com>
147
148 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
149 (netbsd_target_regsets): Now const.
150 (the_low_target): Remove.
151 (class netbsd_amd64_target, the_netbsd_amd64_target)
152 (the_netbsd_target): Add.
153 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
154 low_arch_setup ().
155 (netbsd_process_target::fetch_registers)
156 (netbsd_process_target::store_registers, initialize_low): Update.
157 (the_netbsd_target): Remove.
158 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
159 (the_low_target, netbsd_tdesc): Remove.
160 (netbsd_process_target::get_regs_info)
161 (netbsd_process_target::low_arch_setup): Add.
162
163 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
164
165 * win32-low.cc: Remove local wow64_process variable.
166 * win32-low.h: Remove local wow64_process variable.
167
168 2020-09-18 Tom Tromey <tromey@adacore.com>
169
170 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
171 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
172 (netbsd_process_target::wait): Change type of target_options.
173 * win32-low.h (class win32_process_target) <wait>: Update.
174 * win32-low.cc (win32_process_target::wait): Update.
175 * target.h (class process_stratum_target) <wait>: Update.
176 (mywait): Update.
177 * target.cc (mywait, target_wait): Change type of "options".
178 * linux-low.h (class linux_process_target) <wait, wait_1>:
179 Update.
180 * linux-low.cc (linux_process_target::wait)
181 (linux_process_target::wait_1): Update.
182
183 2020-09-15 Tom Tromey <tromey@adacore.com>
184
185 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
186 (xmltarget_amd64_linux_no_xml): Now arrays.
187
188 2020-09-14 Tom Tromey <tromey@adacore.com>
189
190 * tracepoint.cc (eval_result_names): Now const.
191 * ax.cc (gdb_agent_op_names): Now const.
192
193 2020-09-10 Kamil Rytarowski <n54@gmx.com>
194
195 * netbsd-low.cc: Add.
196 * netbsd-low.h: Likewise.
197 * netbsd-amd64-low.cc: Likewise.
198 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
199 "netbsd-amd64-low.cc".
200 * configure.srv: Add x86_64-*-netbsd*.
201
202 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
203
204 * server.cc (captured_main): Accept multiple `--selftest=`
205 options. Pass all `--selftest=` arguments to run_tests.
206
207 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
208
209 * configure, config.in: Regenerate.
210
211 2020-07-26 Eli Zaretskii <eliz@gnu.org>
212
213 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
214 When checking whether socklen_t type is defined, use ws2tcpip.h if
215 it is available and sys/socket.h isn't.
216 * configure: Regenerate.
217 * config.in: Regenerate.
218
219 2020-07-22 Pedro Alves <pedro@palves.net>
220
221 * inferiors.cc (switch_to_process): New, moved here from
222 thread-db.cc, and made extern.
223 * inferiors.h (switch_to_process): Declare.
224 * server.cc: Include "gdbsupport/scoped_restore.h".
225 (handle_qxfer_threads_proper): Now returns bool. Prepare to
226 access memory around target calls.
227 (handle_qxfer_threads): Handle errors.
228 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
229
230 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
231
232 * linux-low.cc (stopped_pids): Make static.
233
234 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
235
236 * tdesc.cc (allocate_target_description): Add header comment.
237 (target_desc_deleter::operator()): New function.
238 * tdesc.h (struct target_desc): Declare as final.
239
240 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
241
242 * server.cc (handle_query): Use std::vector of
243 std::string for `qsupported` vector. Use separate
244 vector for unknowns.
245 * target.h (class process_stratum_target) <process_qsupported>:
246 Change parameters to array_view of const char *.
247 (target_process_qsupported): Remove `count` parameter.
248 * target.cc (process_stratum_target::process_qsupported): Change
249 parameters to array_view of const char *.
250 * linux-x86-low.cc (class x86_target) <process_qsupported>:
251 Likewise.
252
253 2020-06-29 Tom de Vries <tdevries@suse.de>
254
255 * ax.h: Include gdbsupport/debug_agent.h.
256
257 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
258
259 * tdesc.cc (struct tdesc_compatible_info): New struct.
260 (tdesc_compatible_info_list): New function.
261 (tdesc_compatible_info_arch_name): New function.
262
263 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
264
265 Use std::list to stop pending signal instead of manually-created
266 linked list.
267 * linux-low.h: Include <list>.
268 (struct pending_signal): Move here from linux-low.cc.
269 (struct lwp_info) <pending_signals>
270 <pending_signals_to_report>: Update the type.
271 * linux-low.cc (struct pending_signals): Remove.
272 (linux_process_target::delete_lwp)
273 (linux_process_target::add_lwp)
274 (enqueue_one_deferred_signal)
275 (dequeue_one_deferred_signal)
276 (enqueue_pending_signal)
277 (linux_process_target::resume_one_lwp_throw)
278 (linux_process_target::thread_needs_step_over)
279 (linux_process_target::resume_one_thread)
280 (linux_process_target::proceed_one_lwp): Update the use of pending
281 signal list.
282
283 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
284
285 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
286 Remove.
287
288 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
289
290 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
291 * configure.srv: Remove mingw32ce cases.
292 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
293 * win32-low.h (to_back_slashes): Remove.
294 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
295
296 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
297
298 * Makefile.in (SFILES): linux-tile-low.cc.
299 * configure.srv: Remove tilegx case.
300 * linux-tile-low.cc: Remove.
301
302 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
303
304 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
305 * configure.srv: Remove m32r case.
306 * linux-m32r-low.cc: Remove.
307
308 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
309
310 * Makefile.in (SFILES): Remove linux-cris-low.c.
311 * configure.srv: Remove cris cases.
312 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
313
314 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
315
316 * Makefile.in (SFILES): Remove linux-bfin-low.c.
317 * configure.srv: Remove bfin case.
318 * linux-bfin-low.cc: Remove.
319 * linux-low.cc: Remove BFIN-conditional code.
320
321 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
322
323 * configure: Re-generate.
324 * configure.ac: Remove srv_qnx test.
325 * configure.srv: Remove nto case.
326 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
327 * remote-utils.c: Remove __QNX__-guarded code.
328
329 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
330
331 * configure: Re-generate.
332 * configure.ac: Remove srv_lynxos test.
333 * configure.srv: Remove lynxos cases.
334 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
335 Remove.
336
337 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
338
339 * README: Fix a few outdated or incoherent things.
340
341 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
342
343 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
344 (win32_clear_inferiors): Use open_process_used.
345 (get_child_debug_event): Likewise.
346
347 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
348
349 PR gdbserver/25893
350 * linux-low.cc (linux_process_target::create_inferior),
351 lynx-low.cc (lynx_process_target::create_inferior),
352 win32-low.cc (win32_process_target::create_inferior): Use
353 construct_inferior_arguments instead of stringify_argv
354 to get string representation which properly escapes
355 special characters.
356 * server.cc (handle_v_run): Just pass empty program arg
357 as such, since any further processing is now handled via
358 construct_inferior_arguments.
359
360 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
361
362 * nto-low.cc (nto_process_target::create_inferior): Pass
363 argv to spawnp function as char **.
364
365 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
366
367 * server.cc (captured_main), (handle_v_run): No longer
368 insert extra NULL element to args vector.
369
370 2020-05-23 Pedro Alves <palves@redhat.com>
371
372 * gdb-safe-ctype.h: New.
373
374 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
375
376 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
377 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
378 (ia64_target::low_breakpoint_at): Ditto.
379
380 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
381
382 * win32-i386-low.cc (i386_supports_z_point_type): Handle
383 Z_PACKET_HW_BP z_type.
384 (i386_insert_point): Handle raw_bkpt_type type.
385 (i386_remove_point): Likewise.
386
387 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
388
389 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
390 Add arch/i386.o.
391 * win32-arm-low.cc (arm_num_regs): New function.
392 (struct win32_target_ops): Use arm_num_regs.
393 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
394 processes.
395 (i386_get_thread_context): Likewise.
396 (i386_prepare_to_resume): Likewise.
397 (i386_thread_added): Likewise.
398 (i386_single_step): Likewise.
399 (i386_fetch_inferior_register): Likewise.
400 (i386_store_inferior_register): Likewise.
401 (i386_arch_setup): Likewise.
402 (i386_win32_num_regs): New function.
403 (struct win32_target_ops): Use i386_win32_num_regs.
404 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
405 processes.
406 (win32_require_context): Likewise.
407 (child_add_thread): Likewise.
408 (do_initial_child_stuff): Likewise.
409 (continue_one_thread): Likewise.
410 (win32_process_target::resume): Likewise.
411 (load_psapi): Likewise.
412 (win32_add_all_dlls): Likewise.
413 (maybe_adjust_pc): Likewise.
414 (win32_process_target::qxfer_siginfo): Likewise.
415 (initialize_low): Likewise.
416 * win32-low.h (struct win32_target_ops): Change num_regs to
417 callback function.
418
419 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
420
421 * configure.ac: Remove check for fs_base/gs_base in
422 user_regs_struct.
423 * configure: Re-generate.
424 * config.in: Re-generate.
425 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
426 x86_store_gregset): Adjust.
427
428 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
429
430 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
431 comparison.
432
433 2020-04-16 Tom Tromey <tromey@adacore.com>
434
435 * win32-low.cc (windows_nat::handle_access_violation): New
436 function.
437
438 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
439
440 * win32-low.cc (get_child_debug_event): Fix format string warning.
441
442 2020-04-13 Tom Tromey <tom@tromey.com>
443
444 * server.h (gdb_fildes_t): Remove typedef.
445 * remote-utils.c (remote_desc, list_desc): Now int.
446 (INVALID_DESCRIPTOR): Remove.
447 (gdb_connected, remote_close)
448 (check_remote_input_interrupt_request): Update.
449 * utils.h (pfildes): Don't declare.
450 * utils.c (pfildes): Remove.
451
452 2020-04-13 Tom Tromey <tom@tromey.com>
453
454 * server.h (handle_serial_event, handle_target_event): Update.
455 * server.c: Don't call initialize_event_loop.
456 (keep_processing_events): New global.
457 (handle_serial_event): Return void. Set keep_processing_events.
458 (handle_target_event): Return void.
459 (start_event_loop): Move from event-loop.c. Rewrite.
460 * remote-utils.c (handle_accept_event): Return void.
461 (reset_readchar): Use delete_timer.
462 (process_remaining): Return void.
463 (reschedule): Use create_timer.
464 * event-loop.h: Remove.
465 * event-loop.cc: Remove.
466 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
467
468 2020-04-13 Tom Tromey <tom@tromey.com>
469
470 * server.c (invoke_async_signal_handlers)
471 (check_async_event_handlers, flush_streams, gdb_select): New
472 functions.
473
474 2020-04-13 Tom Tromey <tom@tromey.com>
475
476 * configure: Rebuild.
477 * config.in: Rebuild.
478
479 2020-04-08 Tom Tromey <tromey@adacore.com>
480
481 PR gdb/22992
482 * win32-low.c (child_continue): Call matching_pending_stop.
483 (get_child_debug_event): Call fetch_pending_stop. Push pending
484 stop when needed.
485
486 2020-04-08 Tom Tromey <tromey@adacore.com>
487
488 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
489 (win32_process_target::supports_stopped_by_sw_breakpoint):
490 Declare.
491 * win32-low.c (win32_supports_z_point_type): Always handle
492 Z_PACKET_SW_BP.
493 (win32_insert_point): Call insert_memory_breakpoint when needed.
494 (win32_remove_point): Call remove_memory_breakpoint when needed.
495 (win32_process_target::stopped_by_sw_breakpoint)
496 (win32_process_target::supports_stopped_by_sw_breakpoint): New
497 methods.
498 (win32_target_ops): Update.
499 (maybe_adjust_pc): New function.
500 (win32_wait): Call maybe_adjust_pc.
501
502 2020-04-08 Tom Tromey <tromey@adacore.com>
503
504 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
505 field.
506 * win32-i386-low.c (the_low_target): Update.
507 * win32-arm-low.c (the_low_target): Update.
508
509 2020-04-08 Tom Tromey <tromey@adacore.com>
510
511 * win32-low.h (win32_process_target::read_pc)
512 (win32_process_target::write_pc): Declare.
513 * win32-low.c (win32_process_target::read_pc)
514 (win32_process_target::write_pc): New methods.
515 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
516 functions.
517 (the_low_target): Update.
518 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
519 functions.
520 (the_low_target): Update.
521
522 2020-04-08 Tom Tromey <tromey@adacore.com>
523
524 * win32-low.c (win32_kill, get_child_debug_event): Use
525 wait_for_debug_event.
526
527 2020-04-08 Tom Tromey <tromey@adacore.com>
528
529 * win32-low.c (child_continue): Call continue_last_debug_event.
530
531 2020-04-08 Tom Tromey <tromey@adacore.com>
532
533 * win32-low.c (handle_exception): Remove.
534 (windows_nat::handle_ms_vc_exception): New function.
535 (get_child_debug_event): Add "continue_status" parameter.
536 Update.
537 (win32_wait): Update.
538
539 2020-04-08 Tom Tromey <tromey@adacore.com>
540
541 * win32-low.c (windows_nat::handle_load_dll): Rename from
542 handle_load_dll. No longer static.
543 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
544 No longer static.
545
546 2020-04-08 Tom Tromey <tromey@adacore.com>
547
548 * win32-low.c (handle_output_debug_string): Add parameter. Change
549 return type.
550 (win32_kill, get_child_debug_event): Update.
551
552 2020-04-08 Tom Tromey <tromey@adacore.com>
553
554 * win32-low.c (current_process_handle, current_process_id)
555 (main_thread_id, last_sig, current_event, siginfo_er): Move to
556 nat/windows-nat.c.
557
558 2020-04-08 Tom Tromey <tromey@adacore.com>
559
560 * win32-low.c (get_image_name): Remove.
561 (handle_load_dll): Update.
562
563 2020-04-08 Tom Tromey <tromey@adacore.com>
564
565 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
566 No longer static. Change parameters.
567 (child_add_thread, child_fetch_inferior_registers)
568 (child_store_inferior_registers, win32_resume)
569 (win32_get_tib_address): Update.
570
571 2020-04-08 Tom Tromey <tromey@adacore.com>
572
573 * win32-low.h (struct win32_target_ops): Use qualified names where
574 needed.
575 * win32-i386-low.c: Add "using namespace".
576 * win32-low.c: Add "using namespace".
577 * win32-arm-low.c: Add "using namespace".
578
579 2020-04-08 Tom Tromey <tromey@adacore.com>
580
581 * win32-low.c (delete_thread_info): Don't call CloseHandle.
582
583 2020-04-08 Tom Tromey <tromey@adacore.com>
584
585 * win32-low.c (win32_require_context, suspend_one_thread): Use
586 windows_thread_info::suspend.
587 (continue_one_thread): Use windows_thread_info::resume.
588 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
589
590 2020-04-08 Tom Tromey <tromey@adacore.com>
591
592 * win32-i386-low.c (update_debug_registers)
593 (i386_prepare_to_resume, i386_thread_added): Update.
594
595 2020-04-08 Tom Tromey <tromey@adacore.com>
596
597 * win32-low.c (child_add_thread): Use new.
598 (delete_thread_info): Use delete.
599
600 2020-04-08 Tom Tromey <tromey@adacore.com>
601
602 * win32-low.h (struct windows_thread_info): Remove.
603
604 2020-04-08 Tom Tromey <tromey@adacore.com>
605
606 * win32-low.h (struct windows_thread_info): Rename from
607 win32_thread_info. Remove typedef.
608 (struct win32_target_ops, win32_require_context): Update.
609 * win32-low.c (win32_get_thread_context)
610 (win32_set_thread_context, win32_prepare_to_resume)
611 (win32_require_context, thread_rec, child_add_thread)
612 (delete_thread_info, continue_one_thread)
613 (child_fetch_inferior_registers, child_store_inferior_registers)
614 (win32_resume, suspend_one_thread, win32_get_tib_address):
615 Update.
616 * win32-i386-low.c (update_debug_registers)
617 (win32_get_current_dr, i386_get_thread_context)
618 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
619 (i386_fetch_inferior_register, i386_store_inferior_register):
620 Update.
621 * win32-arm-low.c (arm_get_thread_context)
622 (arm_fetch_inferior_register, arm_store_inferior_register):
623 Update.
624
625 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
626
627 * linux-low.h (struct linux_target_ops): Remove.
628 (the_low_target): Remove.
629 * linux-x86-low.cc (the_low_target): Remove.
630 * linux-aarch64-low.cc (the_low_target): Ditto.
631 * linux-arm-low.cc (the_low_target): Ditto.
632 * linux-bfin-low.cc (the_low_target): Ditto.
633 * linux-cris-low.cc (the_low_target): Ditto.
634 * linux-crisv32-low.cc (the_low_target): Ditto.
635 * linux-ia64-low.cc (the_low_target): Ditto.
636 * linux-m32r-low.cc (the_low_target): Ditto.
637 * linux-m68k-low.cc (the_low_target): Ditto.
638 * linux-mips-low.cc (the_low_target): Ditto.
639 * linux-nios2-low.cc (the_low_target): Ditto.
640 * linux-ppc-low.cc (the_low_target): Ditto.
641 * linux-riscv-low.cc (the_low_target): Ditto.
642 * linux-s390-low.cc (the_low_target): Ditto.
643 * linux-sh-low.cc (the_low_target): Ditto.
644 * linux-sparc-low.cc (the_low_target): Ditto.
645 * linux-tic6x-low.cc (the_low_target): Ditto.
646 * linux-tile-low.cc (the_low_target): Ditto.
647 * linux-xtensa-low.cc (the_low_target): Ditto.
648
649 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
650
651 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
652 linux target define the op by overriding the declaration in
653 process_stratum_target.
654
655 * linux-low.h (struct linux_target_ops): Remove the op.
656 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
657 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
658 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
659 (x86_get_ipa_tdesc_idx): Turn into...
660 (x86_target::get_ipa_tdesc_idx): ...this.
661 (the_low_target): Remove the op field.
662 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
663 (ppc_get_ipa_tdesc_idx): Turn into...
664 (ppc_target::get_ipa_tdesc_idx): ...this.
665 (the_low_target): Remove the op field.
666 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
667 (s390_get_ipa_tdesc_idx): Turn into...
668 (s390_target::get_ipa_tdesc_idx): ...this.
669 (the_low_target): Remove the op field.
670
671 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
672
673 Turn the 'get_syscall_trapinfo' linux target op into a method
674 of process_stratum_target.
675
676 * linux-low.h (struct linux_target_ops): Remove the op.
677 (class linux_process_target) <get_syscall_trapinfo>
678 <gdb_catch_this_syscall>
679 <low_supports_catch_syscall>
680 <low_get_syscall_trapinfo>: Declare.
681 * linux-low.cc (get_syscall_trapinfo): Turn into...
682 (linux_process_target::get_syscall_trapinfo): ...this.
683 (linux_process_target::low_get_syscall_trapinfo): Define.
684 (gdb_catch_this_syscall_p): Turn into...
685 (linux_process_target::gdb_catch_this_syscall): ...this.
686 (linux_process_target::low_supports_catch_syscall): Define.
687
688 Update the callers below.
689
690 (linux_process_target::wait_1)
691 (linux_process_target::supports_catch_syscall)
692
693 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
694 <low_get_syscall_trapinfo>: Declare.
695 (x86_target::low_supports_catch_syscall): Define.
696 (x86_get_syscall_trapinfo): Turn into...
697 (x86_target::low_get_syscall_trapinfo): ...this.
698 (the_low_target): Remove the op field.
699 * linux-aarch64-low.cc (class aarch64_target)
700 <low_supports_catch_syscall>
701 <low_get_syscall_trapinfo>: Declare.
702 (aarch64_target::low_supports_catch_syscall): Define.
703 (aarch64_get_syscall_trapinfo): Turn into...
704 (aarch64_target::low_get_syscall_trapinfo): ...this.
705 (the_low_target): Remove the op field.
706 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
707 <low_get_syscall_trapinfo>: Declare.
708 (arm_target::low_supports_catch_syscall): Define.
709 (arm_get_syscall_trapinfo): Turn into...
710 (arm_target::low_get_syscall_trapinfo): ...this.
711 (the_low_target): Remove the op field.
712 * linux-ppc-low.cc (the_low_target): Remove the op field.
713 * linux-s390-low.cc (the_low_target): Remove the op field.
714
715 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
716
717 Remove the 'supports_hardware_single_step' linux target op and
718 override the process_stratum_target's op definition in
719 linux_process_target to return true.
720
721 * linux-low.h (struct linux_target_ops): Remove the op.
722 (class linux_process_target) <finish_step_over>
723 <maybe_hw_step>: Declare.
724 * linux-low.cc (can_hardware_single_step): Remove.
725 (maybe_hw_step): Turn into...
726 (linux_process_target::maybe_hw_step): ...this.
727 (finish_step_over): Turn into...
728 (linux_process_target::finish_step_over): ...this.
729 (linux_process_target::supports_hardware_single_step): Update
730 to return true.
731
732 Update the callers below.
733
734 (linux_process_target::single_step)
735 (linux_process_target::resume_one_lwp_throw)
736
737 * linux-arm-low.cc (class arm_target)
738 <supports_hardware_single_step>: Declare.
739 (arm_supports_hardware_single_step): Turn into...
740 (arm_target::supports_hardware_single_step): ...this.
741 (the_low_target): Remove the op field.
742 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
743 (the_low_target): Remove the op field.
744 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
745 Remove.
746 (the_low_target): Remove the op field.
747 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
748 (the_low_target): Remove the op field.
749 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
750 (the_low_target): Remove the op field.
751 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
752 (the_low_target): Remove the op field.
753 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
754 (the_low_target): Remove the op field.
755 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
756 (the_low_target): Remove the op field.
757 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
758 (the_low_target): Remove the op field.
759 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
760 (the_low_target): Remove the op field.
761 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
762 (the_low_target): Remove the op field.
763 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
764 (the_low_target): Remove the op field.
765 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
766 Remove.
767 (the_low_target): Remove the op field.
768
769 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
770
771 Turn the 'supports_range_stepping' linux target op into a method
772 of linux_process_target.
773
774 * linux-low.h (struct linux_target_ops): Remove the op.
775 (class linux_process_target) <low_supports_range_stepping>: Declare.
776 * linux-low.cc (linux_process_target::low_supports_range_stepping):
777 Define.
778 (linux_process_target::supports_range_stepping): Update the call
779 site.
780 * linux-x86-low.cc (class x86_target)
781 <low_supports_range_stepping>: Declare.
782 (x86_supports_range_stepping): Turn into...
783 (x86_target::low_supports_range_stepping): ...this.
784 (the_low_target): Remove the op field.
785 * linux-aarch64-low.cc (class aarch64_target)
786 <low_supports_range_stepping>: Declare.
787 (aarch64_supports_range_stepping): Turn into...
788 (aarch64_target::low_supports_range_stepping): ...this.
789 (the_low_target): Remove the op field.
790 * linux-arm-low.cc (the_low_target): Remove the op field.
791 * linux-bfin-low.cc (the_low_target): Ditto.
792 * linux-crisv32-low.cc (the_low_target): Ditto.
793 * linux-m32r-low.cc (the_low_target): Ditto.
794 * linux-m68k-low.cc (the_low_target): Ditto.
795 * linux-ppc-low.cc (the_low_target): Ditto.
796 * linux-s390-low.cc (the_low_target): Ditto.
797 * linux-sh-low.cc (the_low_target): Ditto.
798 * linux-tic6x-low.cc (the_low_target): Ditto.
799 * linux-tile-low.cc (the_low_target): Ditto.
800 * linux-xtensa-low.cc (the_low_target): Ditto.
801
802 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
803
804 Remove the 'emit_ops' linux target ops and let the concrete
805 linux target define the op by overriding the declaration of
806 process_stratum_target.
807
808 * linux-low.h (struct linux_target_ops): Remove the op.
809 (class linux_process_target) <emit_ops>: Remove.
810 * linux-low.cc (linux_process_target::emit_ops): Remove.
811 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
812 (x86_emit_ops): Turn into...
813 (x86_target::emit_ops): ...this.
814 (the_low_target): Remove the op field.
815 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
816 (aarch64_emit_ops): Turn into...
817 (aarch64_target::emit_ops): ...this.
818 (the_low_target): Remove the op field.
819 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
820 (ppc_emit_ops): Turn into...
821 (ppc_target::emit_ops): ...this.
822 (the_low_target): Remove the op field.
823 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
824 (s390_emit_ops): Turn into...
825 (s390_target::emit_ops): ...this.
826 (the_low_target): Remove the op field.
827 * linux-arm-low.cc (the_low_target): Remove the op field.
828 * linux-bfin-low.cc (the_low_target): Ditto.
829 * linux-crisv32-low.cc (the_low_target): Ditto.
830 * linux-m32r-low.cc (the_low_target): Ditto.
831 * linux-m68k-low.cc (the_low_target): Ditto.
832 * linux-sh-low.cc (the_low_target): Ditto.
833 * linux-tic6x-low.cc (the_low_target): Ditto.
834 * linux-tile-low.cc (the_low_target): Ditto.
835 * linux-xtensa-low.cc (the_low_target): Ditto.
836
837 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
838
839 Remove the 'install_fast_tracepoint_jump_pad' and
840 'get_min_fast_tracepoint_insn_len' linux target ops to let the
841 concrete linux target define the ops by overriding the declarations
842 of process_stratum_target.
843
844 * linux-low.h (struct linux_target_ops): Remove the ops.
845 (class linux_process_target) <supports_fast_tracepoints>
846 <install_fast_tracepoint_jump_pad>
847 <get_min_fast_tracepoint_insn_len>: Remove.
848 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
849 (linux_process_target::install_fast_tracepoint_jump_pad)
850 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
851 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
852 <install_fast_tracepoint_jump_pad>
853 <get_min_fast_tracepoint_insn_len>: Declare.
854 (x86_target::supports_fast_tracepoints): Define.
855 (x86_install_fast_tracepoint_jump_pad): Turn into...
856 (x86_target::install_fast_tracepoint_jump_pad): ...this.
857 (x86_get_min_fast_tracepoint_insn_len): Turn into...
858 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
859 (the_low_target): Remove the op fields.
860 * linux-aarch64-low.cc (class aarch64_target)
861 <supports_fast_tracepoints>
862 <install_fast_tracepoint_jump_pad>
863 <get_min_fast_tracepoint_insn_len>: Declare.
864 (aarch64_target::supports_fast_tracepoints): Define.
865 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
866 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
867 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
868 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
869 (the_low_target): Remove the op fields.
870 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
871 <install_fast_tracepoint_jump_pad>
872 <get_min_fast_tracepoint_insn_len>: Declare.
873 (ppc_target::supports_fast_tracepoints): Define.
874 (ppc_install_fast_tracepoint_jump_pad): Turn into...
875 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
876 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
877 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
878 (the_low_target): Remove the op fields.
879 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
880 <install_fast_tracepoint_jump_pad>
881 <get_min_fast_tracepoint_insn_len>: Declare.
882 (s390_target::supports_fast_tracepoints): Define.
883 (s390_install_fast_tracepoint_jump_pad): Turn into...
884 (s390_target::install_fast_tracepoint_jump_pad): ...this.
885 (s390_get_min_fast_tracepoint_insn_len): Turn into...
886 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
887 (the_low_target): Remove the op fields.
888 * linux-arm-low.cc (the_low_target): Remove the op fields.
889 * linux-bfin-low.cc (the_low_target): Ditto.
890 * linux-crisv32-low.cc (the_low_target): Ditto.
891 * linux-m32r-low.cc (the_low_target): Ditto.
892 * linux-m68k-low.cc (the_low_target): Ditto.
893 * linux-sh-low.cc (the_low_target): Ditto.
894 * linux-tic6x-low.cc (the_low_target): Ditto.
895 * linux-tile-low.cc (the_low_target): Ditto.
896 * linux-xtensa-low.cc (the_low_target): Ditto.
897
898 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
899
900 Turn the 'get_thread_area' linux target op into a method of
901 process_stratum_target.
902
903 * linux-low.h (struct linux_target_ops): Remove the op.
904 (class linux_process_target) <stuck_in_jump_pad>
905 <linux_fast_tracepoint_collecting>
906 <low_get_thread_area>: Declare.
907 * linux-low.cc (supports_fast_tracepoints): Remove.
908 (linux_fast_tracepoint_collecting): Turn into...
909 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
910 (linux_process_target::low_get_thread_area): Define.
911 (stuck_in_jump_pad_callback): Turn into...
912 (linux_process_target::stuck_in_jump_pad): ...this.
913
914 Update the caller below.
915
916 (linux_process_target::stabilize_threads)
917
918 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
919 Declare.
920 (x86_get_thread_area): Turn into...
921 (x86_target::low_get_thread_area): ...this.
922 (the_low_target): Remove the op field.
923 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
924 Declare.
925 (aarch64_get_thread_area): Turn into...
926 (aarch64_target::low_get_thread_area): ...this.
927 (the_low_target): Remove the op field.
928 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
929 Declare.
930 (ppc_get_thread_area): Turn into...
931 (ppc_target::low_get_thread_area): ...this.
932 (the_low_target): Remove the op field.
933 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
934 Declare.
935 (s390_get_thread_area): Turn into...
936 (s390_target::low_get_thread_area): ...this.
937 (the_low_target): Remove the op field.
938 * linux-arm-low.cc (the_low_target): Remove the op field.
939 * linux-bfin-low.cc (the_low_target): Ditto.
940 * linux-crisv32-low.cc (the_low_target): Ditto.
941 * linux-m32r-low.cc (the_low_target): Ditto.
942 * linux-m68k-low.cc (the_low_target): Ditto.
943 * linux-sh-low.cc (the_low_target): Ditto.
944 * linux-tic6x-low.cc (the_low_target): Ditto.
945 * linux-tile-low.cc (the_low_target): Ditto.
946 * linux-xtensa-low.cc (the_low_target): Ditto.
947
948 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
949
950 Remote the 'supports_tracepoints' linux target op and let the
951 concrete linux target define it by overriding the op declared in
952 process_stratum_target.
953
954 * linux-low.h (struct linux_target_ops): Remove the op.
955 (class linux_process_target) <supports_tracepoints>: Remove.
956 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
957 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
958 Declare.
959 (x86_supports_tracepoints): Turn into...
960 (x86_target::supports_tracepoints): ...this.
961 (the_low_target): Remove the op field.
962 * linux-aarch64-low.cc (class aarch64_target)
963 <supports_tracepoints>: Declare.
964 (aarch64_supports_tracepoints): Turn into...
965 (aarch64_target::supports_tracepoints): ...this.
966 (the_low_target): Remove the op field.
967 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
968 Declare.
969 (ppc_supports_tracepoints): Turn into...
970 (ppc_target::supports_tracepoints): ...this.
971 (the_low_target): Remove the op field.
972 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
973 Declare.
974 (s390_supports_tracepoints): Turn into...
975 (s390_target::supports_tracepoints): ...this.
976 (the_low_target): Remove the op field.
977 * linux-arm-low.cc (the_low_target): Remove the op field.
978 * linux-bfin-low.cc (the_low_target): Ditto.
979 * linux-crisv32-low.cc (the_low_target): Ditto.
980 * linux-m32r-low.cc (the_low_target): Ditto.
981 * linux-m68k-low.cc (the_low_target): Ditto.
982 * linux-sh-low.cc (the_low_target): Ditto.
983 * linux-tic6x-low.cc (the_low_target): Ditto.
984 * linux-tile-low.cc (the_low_target): Ditto.
985 * linux-xtensa-low.cc (the_low_target): Ditto.
986
987 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
988
989 Remove the 'process_qsupported' linux target op and let a concrete
990 linux target define the op by overriding the op declaration in
991 process_stratum_target.
992
993 * linux-low.h (struct linux_target_ops): Remove the op.
994 (class linux_process_target) <process_qsupported>: Remove.
995 * linux-low.cc (linux_process_target::process_qsupported): Remove.
996 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
997 (x86_linux_process_qsupported): Turn into...
998 (x86_target::process_qsupported): ...this.
999 (the_low_target): Remove the op field.
1000 * linux-aarch64-low.cc (the_low_target): Remove the op
1001 field.
1002 * linux-arm-low.cc (the_low_target): Ditto.
1003 * linux-bfin-low.cc (the_low_target): Ditto.
1004 * linux-crisv32-low.cc (the_low_target): Ditto.
1005 * linux-m32r-low.cc (the_low_target): Ditto.
1006 * linux-m68k-low.cc (the_low_target): Ditto.
1007 * linux-ppc-low.cc (the_low_target): Ditto.
1008 * linux-s390-low.cc (the_low_target): Ditto.
1009 * linux-sh-low.cc (the_low_target): Ditto.
1010 * linux-tic6x-low.cc (the_low_target): Ditto.
1011 * linux-tile-low.cc (the_low_target): Ditto.
1012 * linux-xtensa-low.cc (the_low_target): Ditto.
1013
1014 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1015
1016 Turn the 'prepare_to_resume' linux target op into a method of
1017 linux_process_target.
1018
1019 * linux-low.h (struct linux_target_ops): Remove the op.
1020 (class linux_process_target) <low_prepare_to_resume>: Declare.
1021 * linux-low.cc (linux_process_target::low_prepare_to_resume):
1022 Define.
1023
1024 Update the callers below:
1025
1026 (linux_process_target::resume_one_lwp_throw)
1027 (linux_process_target::low_prepare_to_resume)
1028
1029 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
1030 Declare.
1031 (x86_target::low_prepare_to_resume): Define.
1032 (the_low_target): Remove the op field.
1033 * linux-aarch64-low.cc (class aarch64_target)
1034 <low_prepare_to_resume>: Declare.
1035 (aarch64_target::low_prepare_to_resume): Define.
1036 (the_low_target): Remove the op field.
1037 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
1038 Declare.
1039 (arm_prepare_to_resume): Turn into...
1040 (arm_target::low_prepare_to_resume): ...this.
1041 (the_low_target): Remove the op field.
1042 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
1043 Declare.
1044 (mips_linux_prepare_to_resume): Turn into...
1045 (mips_target::low_prepare_to_resume): ...this.
1046 (the_low_target): Remove the op field.
1047 * linux-bfin-low.cc (the_low_target): Remove the op field.
1048 * linux-crisv32-low.cc (the_low_target): Ditto.
1049 * linux-m32r-low.cc (the_low_target): Ditto.
1050 * linux-m68k-low.cc (the_low_target): Ditto.
1051 * linux-ppc-low.cc (the_low_target): Ditto.
1052 * linux-s390-low.cc (the_low_target): Ditto.
1053 * linux-sh-low.cc (the_low_target): Ditto.
1054 * linux-tic6x-low.cc (the_low_target): Ditto.
1055 * linux-tile-low.cc (the_low_target): Ditto.
1056 * linux-xtensa-low.cc (the_low_target): Ditto.
1057
1058 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1059
1060 Turn the 'new_process', 'delete_process', 'new_thread',
1061 'delete_thread', and 'new_fork' linux target ops into methods
1062 of linux_process_target.
1063
1064 * linux-low.h (struct linux_target_ops): Remove the ops.
1065 (class linux_process_target) <add_linux_process>
1066 <add_lwp>
1067 <delete_lwp>
1068 <attach_lwp>
1069 <detach_one_lwp>
1070 <check_zombie_leaders>
1071 <filter_exit_event>
1072 <low_new_process>
1073 <low_delete_process>
1074 <low_new_thread>
1075 <low_delete_thread>
1076 <low_new_fork>: Declare.
1077 * linux-low.cc (delete_lwp): Turn into...
1078 (linux_process_target::delete_lwp): ...this.
1079 (linux_process_target::low_delete_thread): Define.
1080 (linux_add_process): Turn into...
1081 (linux_process_target::add_linux_process): ...this.
1082 (linux_process_target::low_new_process): Define.
1083 (linux_process_target::low_delete_process): Define.
1084 (linux_process_target::low_new_fork): Define.
1085 (add_lwp): Turn into...
1086 (linux_process_target::add_lwp): ...this.
1087 (linux_process_target::low_new_thread): Define.
1088 (linux_attach_lwp): Turn into...
1089 (linux_process_target::attach_lwp): ...this.
1090 (linux_detach_one_lwp): Turn into...
1091 (linux_process_target::detach_one_lwp): ...this.
1092 (linux_detach_lwp_callback): Remove and inline...
1093 (linux_process_target::detach): ...here.
1094 (check_zombie_leaders): Turn into...
1095 (linux_process_target::check_zombie_leaders): ...this.
1096 (filter_exit_event): Turn into...
1097 (linux_process_target::filter_exit_event): ...this.
1098
1099 Update the callers below.
1100
1101 (linux_process_target::handle_extended_wait)
1102 (linux_process_target::create_inferior)
1103 (attach_proc_task_lwp_callback)
1104 (linux_process_target::attach)
1105 (linux_process_target::detach)
1106 (linux_process_target::mourn)
1107 * thread-db.cc (attach_thread)
1108
1109 * linux-x86-low.cc (class x86_target) <low_new_process>
1110 <low_delete_process>
1111 <low_new_thread>
1112 <low_delete_thread>
1113 <low_new_fork>: Declare.
1114 (x86_linux_new_process): Turn into...
1115 (x86_target::low_new_process): ...this.
1116 (x86_linux_delete_process): Turn into...
1117 (x86_target::low_delete_process): ...this.
1118 (x86_target::low_new_thread): Define.
1119 (x86_target::low_delete_thread): Define.
1120 (x86_linux_new_fork): Turn into...
1121 (x86_target::low_new_fork): ...this.
1122 (the_low_target): Remove the op fields.
1123 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
1124 <low_delete_process>
1125 <low_new_thread>
1126 <low_delete_thread>
1127 <low_new_fork>: Declare.
1128 (aarch64_linux_new_process): Turn into...
1129 (aarch64_target::low_new_process): ...this.
1130 (aarch64_linux_delete_process): Turn into...
1131 (aarch64_target::low_delete_process): ...this.
1132 (aarch64_target::low_new_thread): Define.
1133 (aarch64_target::low_delete_thread): Define.
1134 (aarch64_linux_new_fork): Turn into...
1135 (aarch64_target::low_new_fork): ...this.
1136 (the_low_target): Remove the op fields.
1137 * linux-arm-low.cc (class arm_target) <low_new_process>
1138 <low_delete_process>
1139 <low_new_thread>
1140 <low_delete_thread>
1141 <low_new_fork>: Declare.
1142 (arm_new_process): Turn into...
1143 (arm_target::low_new_process): ...this.
1144 (arm_delete_process): Turn into...
1145 (arm_target::low_delete_process): ...this.
1146 (arm_new_thread): Turn into...
1147 (arm_target::low_new_thread): ...this.
1148 (arm_delete_thread): Turn into...
1149 (arm_target::low_delete_thread): ...this.
1150 (arm_new_fork): Turn into...
1151 (arm_target::low_new_fork): ...this.
1152 (the_low_target): Remove the op fields.
1153 * linux-mips-low.cc (class mips_target) <low_new_process>
1154 <low_delete_process>
1155 <low_new_thread>
1156 <low_delete_thread>
1157 <low_new_fork>: Declare.
1158 (mips_linux_new_process): Turn into...
1159 (mips_target::low_new_process): ...this.
1160 (mips_linux_delete_process): Turn into...
1161 (mips_target::low_delete_process): ...this.
1162 (mips_linux_new_thread): Turn into...
1163 (mips_target::low_new_thread): ...this.
1164 (mips_linux_delete_thread): Turn into...
1165 (mips_target::low_delete_thread): ...this.
1166 (mips_linux_new_fork): Turn into...
1167 (mips_target::low_new_fork): ...this.
1168 (the_low_target): Remove the op fields.
1169 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1170 * linux-crisv32-low.cc (the_low_target): Ditto.
1171 * linux-m32r-low.cc (the_low_target): Ditto.
1172 * linux-m68k-low.cc (the_low_target): Ditto.
1173 * linux-ppc-low.cc (the_low_target): Ditto.
1174 * linux-s390-low.cc (the_low_target): Ditto.
1175 * linux-sh-low.cc (the_low_target): Ditto.
1176 * linux-tic6x-low.cc (the_low_target): Ditto.
1177 * linux-tile-low.cc (the_low_target): Ditto.
1178 * linux-xtensa-low.cc (the_low_target): Ditto.
1179
1180 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1181
1182 Turn the 'siginfo_fixup' linux target op into a method of
1183 linux_process_target.
1184
1185 * linux-low.h (struct linux_target_ops): Remove the op.
1186 (class linux_process_target) <siginfo_fixup>
1187 <low_siginfo_fixup>: Declare.
1188 * linux-low.cc (siginfo_fixup): Turn into...
1189 (linux_process_target::siginfo_fixup): ...this.
1190 (linux_process_target::low_siginfo_fixup): Define.
1191 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1192 (x86_siginfo_fixup): Turn into...
1193 (x86_target::low_siginfo_fixup): ...this.
1194 (the_low_target): Remove the op field.
1195 * linux-aarch64-low.cc (class aarch64_target):
1196 <low_siginfo_fixup>: Declare.
1197 (aarch64_linux_siginfo_fixup): Turn into...
1198 (aarch64_target::low_siginfo_fixup): ...this.
1199 (the_low_target): Remove the op field.
1200 * linux-arm-low.cc (the_low_target): Remove the op field.
1201 * linux-bfin-low.cc (the_low_target): Ditto.
1202 * linux-crisv32-low.cc (the_low_target): Ditto.
1203 * linux-m32r-low.cc (the_low_target): Ditto.
1204 * linux-m68k-low.cc (the_low_target): Ditto.
1205 * linux-mips-low.cc (the_low_target): Ditto.
1206 * linux-ppc-low.cc (the_low_target): Ditto.
1207 * linux-s390-low.cc (the_low_target): Ditto.
1208 * linux-sh-low.cc (the_low_target): Ditto.
1209 * linux-tic6x-low.cc (the_low_target): Ditto.
1210 * linux-tile-low.cc (the_low_target): Ditto.
1211 * linux-xtensa-low.cc (the_low_target): Ditto.
1212
1213 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1214
1215 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1216 linux target ops into methods of linux_process_target.
1217
1218 * linux-low.h (struct linux_target_ops): Remove the ops.
1219 (class linux_process_target) <low_collect_ptrace_register>
1220 <low_store_ptrace_register>: Declare.
1221 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1222 (linux_process_target::low_supply_ptrace_register): Define.
1223
1224 Update the callers below.
1225
1226 (linux_process_target::fetch_register)
1227 (linux_process_target::store_register)
1228
1229 * linux-x86-low.cc (the_low_target): Remove the op fields.
1230 * linux-aarch64-low.cc (the_low_target): Ditto.
1231 * linux-arm-low.cc (the_low_target): Ditto.
1232 * linux-bfin-low.cc (the_low_target): Ditto.
1233 * linux-crisv32-low.cc (the_low_target): Ditto.
1234 * linux-m32r-low.cc (the_low_target): Ditto.
1235 * linux-m68k-low.cc (the_low_target): Ditto.
1236 * linux-sh-low.cc (the_low_target): Ditto.
1237 * linux-sparc-low.cc (the_low_target): Ditto.
1238 * linux-tic6x-low.cc (the_low_target): Ditto.
1239 * linux-tile-low.cc (the_low_target): Ditto.
1240 * linux-xtensa-low.cc (the_low_target): Ditto.
1241 * linux-mips-low.cc (class mips_target)
1242 <low_collect_ptrace_register>
1243 <low_supply_ptrace_register>: Declare.
1244 (mips_collect_ptrace_register): Turn into ...
1245 (mips_target::low_collect_ptrace_register): ...this.
1246 (mips_supply_ptrace_register): Turn into...
1247 (mips_target::low_supply_ptrace_register): ...this.
1248 (the_low_target): Remove the op fields.
1249 * linux-ppc-low.cc (class ppc_target)
1250 <low_collect_ptrace_register>
1251 <low_supply_ptrace_register>: Declare.
1252 (ppc_collect_ptrace_register): Turn into ...
1253 (ppc_target::low_collect_ptrace_register): ...this.
1254 (ppc_supply_ptrace_register): Turn into ...
1255 (ppc_target::low_supply_ptrace_register): ...this.
1256 (ppc_fill_gregset): Update for the calls to
1257 low_collect_ptrace_register.
1258 (the_low_target): Remove the op fields.
1259 * linux-s390-low.cc (class s390_target)
1260 <low_collect_ptrace_register>
1261 <low_supply_ptrace_register>: Declare.
1262 (s390_collect_ptrace_register): Turn into ...
1263 (s390_target::low_collect_ptrace_register): ...this.
1264 (s390_supply_ptrace_register): Turn into ...
1265 (s390_target::low_supply_ptrace_register): ...this.
1266 (s390_fill_gregset): Update for the calls to
1267 low_collect_ptrace_register.
1268 (the_low_target): Remove the op fields.
1269
1270 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1271
1272 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1273 target ops into methods of linux_process_target.
1274
1275 * linux-low.h (struct linux_target_ops): Remove the ops.
1276 (class linux_process_target) <check_stopped_by_watchpoint>
1277 <low_stopped_by_watchpoint>
1278 <low_stopped_data_address>: Declare.
1279 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1280 (linux_process_target::check_stopped_by_watchpoint): ...this.
1281 (linux_process_target::low_stopped_by_watchpoint): Define.
1282 (linux_process_target::low_stopped_data_address): Define.
1283 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1284 <low_stopped_data_address>: Declare.
1285 (x86_stopped_by_watchpoint): Turn into...
1286 (x86_target::low_stopped_by_watchpoint): ...this.
1287 (x86_stopped_data_address): Turn into...
1288 (x86_target::low_stopped_data_address): ...this.
1289 (the_low_target): Remove the op fields.
1290 * linux-aarch64-low.cc (class aarch64_target)
1291 <low_stopped_by_watchpoint>
1292 <low_stopped_data_address>: Declare.
1293 (aarch64_stopped_by_watchpoint): Turn into...
1294 (aarch64_target::low_stopped_by_watchpoint): ...this.
1295 (aarch64_stopped_data_address): Turn into...
1296 (aarch64_target::low_stopped_data_address): ...this.
1297 (the_low_target): Remove the op fields.
1298 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1299 <low_stopped_data_address>: Declare.
1300 (arm_stopped_by_watchpoint): Turn into...
1301 (arm_target::low_stopped_by_watchpoint): ...this.
1302 (arm_stopped_data_address): Turn into...
1303 (arm_target::low_stopped_data_address): ...this.
1304 (the_low_target): Remove the op fields.
1305 * linux-crisv32-low.cc (class crisv32_target)
1306 <low_stopped_by_watchpoint>
1307 <low_stopped_data_address>: Declare.
1308 (cris_stopped_by_watchpoint): Turn into...
1309 (crisv32_target::low_stopped_by_watchpoint): ...this.
1310 (cris_stopped_data_address): Turn into...
1311 (crisv32_target::low_stopped_data_address): ...this.
1312 (the_low_target): Remove the op fields.
1313 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1314 <low_stopped_data_address>: Declare.
1315 (mips_stopped_by_watchpoint): Turn into...
1316 (mips_target::low_stopped_by_watchpoint): ...this.
1317 (mips_stopped_data_address): Turn into...
1318 (mips_target::low_stopped_data_address): ...this.
1319 (the_low_target): Remove the op fields.
1320 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1321 * linux-m32r-low.cc (the_low_target): Ditto.
1322 * linux-m68k-low.cc (the_low_target): Ditto.
1323 * linux-ppc-low.cc (the_low_target): Ditto.
1324 * linux-s390-low.cc (the_low_target): Ditto.
1325 * linux-sh-low.cc (the_low_target): Ditto.
1326 * linux-sparc-low.cc (the_low_target): Ditto.
1327 * linux-tic6x-low.cc (the_low_target): Ditto.
1328 * linux-tile-low.cc (the_low_target): Ditto.
1329 * linux-xtensa-low.cc (the_low_target): Ditto.
1330
1331 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1332
1333 Turn the 'insert_point' and 'remove_point' linux target ops into
1334 methods of linux_process_target.
1335
1336 * linux-low.h (struct linux_target_ops): Remove the ops.
1337 (class linux_process_target) <low_insert_point>
1338 <low_remove_point>: Declare.
1339 * linux-low.cc (linux_process_target::low_insert_point)
1340 (linux_process_target::low_remove_point): Define.
1341 (linux_process_target::insert_point)
1342 (linux_process_target::remove_point): Update for calls to
1343 low_insert_point and low_remove_point.
1344 * linux-x86-low.cc (class x86_target) <low_insert_point>
1345 <low_remove_point>: Declare.
1346 (x86_insert_point): Turn into...
1347 (x86_target::low_insert_point): ...this.
1348 (x86_remove_point): Turn into...
1349 (x86_target::low_remove_point): ...this.
1350 (the_low_target): Remove the op fields.
1351 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1352 <low_remove_point>: Declare.
1353 (aarch64_insert_point): Turn into...
1354 (aarch64_target::low_insert_point): ...this.
1355 (aarch64_remove_point): Turn into...
1356 (aarch64_target::low_remove_point): ...this.
1357 (the_low_target): Remove the op fields.
1358 * linux-arm-low.cc (class arm_target) <low_insert_point>
1359 <low_remove_point>: Declare.
1360 (arm_insert_point): Turn into...
1361 (arm_target::low_insert_point): ...this.
1362 (arm_remove_point): Turn into...
1363 (arm_target::low_remove_point): ...this.
1364 (the_low_target): Remove the op fields.
1365 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1366 <low_remove_point>: Declare.
1367 (crisv32_insert_point): Turn into...
1368 (crisv32_target::low_insert_point): ...this.
1369 (crisv32_remove_point): Turn into...
1370 (crisv32_target::low_remove_point): ...this.
1371 (the_low_target): Remove the op fields.
1372 * linux-mips-low.cc (class mips_target) <low_insert_point>
1373 <low_remove_point>: Declare.
1374 (mips_insert_point): Turn into...
1375 (mips_target::low_insert_point): ...this.
1376 (mips_remove_point): Turn into...
1377 (mips_target::low_remove_point): ...this.
1378 (the_low_target): Remove the op fields.
1379 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1380 <low_remove_point>: Declare.
1381 (ppc_insert_point): Turn into...
1382 (ppc_target::low_insert_point): ...this.
1383 (ppc_remove_point): Turn into...
1384 (ppc_target::low_remove_point): ...this.
1385 (the_low_target): Remove the op fields.
1386 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1387 * linux-m32r-low.cc (the_low_target): Ditto.
1388 * linux-m68k-low.cc (the_low_target): Ditto.
1389 * linux-s390-low.cc (the_low_target): Ditto.
1390 * linux-sh-low.cc (the_low_target): Ditto.
1391 * linux-sparc-low.cc (the_low_target): Ditto.
1392 * linux-tic6x-low.cc (the_low_target): Ditto.
1393 * linux-tile-low.cc (the_low_target): Ditto.
1394 * linux-xtensa-low.cc (the_low_target): Ditto.
1395
1396 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1397
1398 Remove the 'supports_z_point_type' linux target op and let the
1399 concrete linux target define it by overriding the op declared in
1400 process_stratum_target.
1401
1402 * linux-low.cc (linux_process_target::supports_z_point_type):
1403 Remove.
1404 * linux-low.h (struct linux_target_ops): Remove the op.
1405 (class linux_process_target) <supports_z_point_type>: Remove.
1406 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1407 Declare.
1408 (x86_supports_z_point_type): Turn into...
1409 (x86_target::supports_z_point_type): ...this.
1410 (the_low_target): Remove the op field.
1411 * linux-aarch64-low.cc (class aarch64_target)
1412 <supports_z_point_type>: Declare.
1413 (aarch64_supports_z_point_type): Turn into...
1414 (aarch64_target::supports_z_point_type): ...this.
1415 (the_low_target): Remove the op field.
1416 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1417 Declare.
1418 (arm_supports_z_point_type): Turn into...
1419 (arm_target::supports_z_point_type): ...this.
1420 (the_low_target): Remove the op field.
1421 * linux-crisv32-low.cc (class crisv32_target)
1422 <supports_z_point_type>: Declare.
1423 (cris_supports_z_point_type): Turn into...
1424 (crisv32_target::supports_z_point_type): ...this.
1425 (the_low_target): Remove the op field.
1426 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1427 Declare.
1428 (mips_supports_z_point_type): Turn into...
1429 (mips_target::supports_z_point_type): ...this.
1430 (the_low_target): Remove the op field.
1431 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1432 Declare.
1433 (ppc_supports_z_point_type): Turn into...
1434 (ppc_target::supports_z_point_type): ...this.
1435 (the_low_target): Remove the op field.
1436 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1437 Declare.
1438 (s390_supports_z_point_type): Turn into...
1439 (s390_target::supports_z_point_type): ...this.
1440 (the_low_target): Remove the op field.
1441 * linux-bfin-low.cc (the_low_target): Remove the op field.
1442 * linux-m32r-low.cc (the_low_target): Ditto.
1443 * linux-m68k-low.cc (the_low_target): Ditto.
1444 * linux-sh-low.cc (the_low_target): Ditto.
1445 * linux-sparc-low.cc (the_low_target): Ditto.
1446 * linux-tic6x-low.cc (the_low_target): Ditto.
1447 * linux-tile-low.cc (the_low_target): Ditto.
1448 * linux-xtensa-low.cc (the_low_target): Ditto.
1449
1450 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1451
1452 Turn the 'breakpoint_at' linux target op into a method of
1453 linux_process_target.
1454
1455 * linux-low.h (struct linux_target_ops): Remove the op.
1456 (class linux_process_target) <low_breakpoint_at>: Declare.
1457
1458 Update the callers below:
1459
1460 * linux-low.cc (linux_process_target::save_stop_reason)
1461 (linux_process_target::thread_still_has_status_pending)
1462 (linux_process_target::wait_1)
1463
1464 * linux-x86-low.cc (class x86_target)
1465 <low_breakpoint_at>: Declare.
1466 (x86_breakpoint_at): Turn into...
1467 (x86_target::low_breakpoint_at): ...this.
1468 (the_low_target): Remove the op field.
1469 * linux-aarch64-low.cc (class aarch64_target)
1470 <low_breakpoint_at>: Declare.
1471 (aarch64_breakpoint_at): Turn into...
1472 (aarch64_target::low_breakpoint_at): ...this.
1473 (the_low_target): Remove the op field.
1474 * linux-arm-low.cc (class arm_target)
1475 <low_breakpoint_at>: Declare.
1476 (arm_target::low_breakpoint_at): Define.
1477 (the_low_target): Remove the op field.
1478 * linux-bfin-low.cc (class bfin_target)
1479 <low_breakpoint_at>: Declare.
1480 (bfin_breakpoint_at): Turn into...
1481 (bfin_target::low_breakpoint_at): ...this.
1482 (the_low_target): Remove the op field.
1483 * linux-cris-low.cc (class cris_target)
1484 <low_breakpoint_at>: Declare.
1485 (cris_breakpoint_at): Turn into...
1486 (cris_target::low_breakpoint_at): ...this.
1487 (the_low_target): Remove the op field.
1488 * linux-crisv32-low.cc (class crisv32_target)
1489 <low_breakpoint_at>: Declare.
1490 (crisv32_breakpoint_at): Turn into...
1491 (crisv32_target::low_breakpoint_at): ...this.
1492 (the_low_target): Remove the op field.
1493 * linux-ia64-low.cc (class ia64_target)
1494 <low_breakpoint_at>: Declare.
1495 (ia64_target::low_breakpoint_at): Define.
1496 * linux-m32r-low.cc (class m32r_target)
1497 <low_breakpoint_at>: Declare.
1498 (m32r_breakpoint_at): Turn into...
1499 (m32r_target::low_breakpoint_at): ...this.
1500 (the_low_target): Remove the op field.
1501 * linux-m68k-low.cc (class m68k_target)
1502 <low_breakpoint_at>: Declare.
1503 (m68k_breakpoint_at): Turn into...
1504 (m68k_target::low_breakpoint_at): ...this.
1505 (the_low_target): Remove the op field.
1506 * linux-mips-low.cc (class mips_target)
1507 <low_breakpoint_at>: Declare.
1508 (mips_breakpoint_at): Turn into...
1509 (mips_target::low_breakpoint_at): ...this.
1510 (the_low_target): Remove the op field.
1511 * linux-nios2-low.cc (class nios2_target)
1512 <low_breakpoint_at>: Declare.
1513 (nios2_breakpoint_at): Turn into...
1514 (nios2_target::low_breakpoint_at): ...this.
1515 (the_low_target): Remove the op field.
1516 * linux-ppc-low.cc (class ppc_target)
1517 <low_breakpoint_at>: Declare.
1518 (ppc_breakpoint_at): Turn into...
1519 (ppc_target::low_breakpoint_at): ...this.
1520 (the_low_target): Remove the op field.
1521 * linux-riscv-low.cc (class riscv_target)
1522 <low_breakpoint_at>: Declare.
1523 (riscv_breakpoint_at): Turn into...
1524 (riscv_target::low_breakpoint_at): ...this.
1525 (the_low_target): Remove the op field.
1526 * linux-s390-low.cc (class s390_target)
1527 <low_breakpoint_at>: Declare.
1528 (s390_breakpoint_at): Turn into...
1529 (s390_target::low_breakpoint_at): ...this.
1530 (the_low_target): Remove the op field.
1531 * linux-sh-low.cc (class sh_target)
1532 <low_breakpoint_at>: Declare.
1533 (sh_breakpoint_at): Turn into...
1534 (sh_target::low_breakpoint_at): ...this.
1535 (the_low_target): Remove the op field.
1536 * linux-sparc-low.cc (class sparc_target)
1537 <low_breakpoint_at>: Declare.
1538 (sparc_breakpoint_at): Turn into...
1539 (sparc_target::low_breakpoint_at): ...this.
1540 (the_low_target): Remove the op field.
1541 * linux-tic6x-low.cc (class tic6x_target)
1542 <low_breakpoint_at>: Declare.
1543 (tic6x_breakpoint_at): Turn into...
1544 (tic6x_target::low_breakpoint_at): ...this.
1545 (the_low_target): Remove the op field.
1546 * linux-tile-low.cc (class tile_target)
1547 <low_breakpoint_at>: Declare.
1548 (tile_breakpoint_at): Turn into...
1549 (tile_target::low_breakpoint_at): ...this.
1550 (the_low_target): Remove the op field.
1551 * linux-xtensa-low.cc (class xtensa_target)
1552 <low_breakpoint_at>: Declare.
1553 (xtensa_breakpoint_at): Turn into...
1554 (xtensa_target::low_breakpoint_at): ...this.
1555 (the_low_target): Remove the op field.
1556
1557 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1558
1559 Turn the 'decr_pc_after_break' linux_target_ops field into
1560 a method of linux_process_target.
1561
1562 * linux-low.h (struct linux_target_ops)
1563 <decr_pc_after_break>: Remove.
1564 (class linux_process_target) <low_decr_pc_after_break>: New method
1565 declaration.
1566 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1567 New method implementation.
1568
1569 Update the users below.
1570
1571 (linux_process_target::save_stop_reason)
1572 (linux_process_target::wait_1)
1573 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1574 New declaration.
1575 (x86_target::low_decr_pc_after_break): New method implementation.
1576 (the_low_target): Remove the field.
1577 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1578 New declaration.
1579 (bfin_target::low_decr_pc_after_break): New method implementation.
1580 (the_low_target): Remove the field.
1581 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1582 New declaration.
1583 (m68k_target::low_decr_pc_after_break): New method implementation.
1584 (the_low_target): Remove the field.
1585 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1586 New declaration.
1587 (s390_target::low_decr_pc_after_break): New method implementation.
1588 (the_low_target): Remove the field.
1589 * linux-aarch64-low.cc (the_low_target): Remove the field.
1590 * linux-arm-low.cc (the_low_target): Remove the field.
1591 * linux-cris-low.cc (the_low_target): Remove the field.
1592 * linux-crisv32-low.cc (the_low_target): Remove the field.
1593 * linux-m32r-low.cc (the_low_target): Remove the field.
1594 * linux-mips-low.cc (the_low_target): Remove the field.
1595 * linux-nios2-low.cc (the_low_target): Remove the field.
1596 * linux-ppc-low.cc (the_low_target): Remove the field.
1597 * linux-riscv-low.cc (the_low_target): Remove the field.
1598 * linux-sh-low.cc (the_low_target): Remove the field.
1599 * linux-sparc-low.cc (the_low_target): Remove the field.
1600 * linux-tic6x-low.cc (the_low_target): Remove the field.
1601 * linux-tile-low.cc (the_low_target): Remove the field.
1602 * linux-xtensa-low.cc (the_low_target): Remove the field.
1603
1604 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1605
1606 Remove the 'supports_software_single_step' linux target op and let
1607 the concrete linux target define it by overriding the op in
1608 process_stratum_target.
1609 Turn the 'get_next_pcs' linux target op into a method of
1610 linux_process_target.
1611
1612 * linux-low.h (struct linux_target_ops): Remove the ops.
1613 (class linux_process_target) <supports_software_single_step>:
1614 Remove.
1615 <low_get_next_pcs>: Declare.
1616 * linux-low.cc (can_software_single_step): Remove.
1617 (linux_process_target::low_get_next_pcs): Define.
1618 (linux_process_target::supports_software_single_step): Remove.
1619
1620 Update the callers below.
1621
1622 (linux_process_target::handle_extended_wait)
1623 (linux_process_target::wait_1)
1624 (linux_process_target::install_software_single_step_breakpoints)
1625 (linux_process_target::single_step)
1626 (linux_process_target::thread_needs_step_over)
1627 (linux_process_target::proceed_one_lwp)
1628 (linux_process_target::supports_range_stepping)
1629
1630 * linux-x86-low.cc (the_low_target): Remove the op field.
1631 * linux-aarch64-low.cc (the_low_target): Ditto.
1632 * linux-bfin-low.cc (the_low_target): Ditto.
1633 * linux-cris-low.cc (the_low_target): Ditto.
1634 * linux-crisv32-low.cc (the_low_target): Ditto.
1635 * linux-m32r-low.cc (the_low_target): Ditto.
1636 * linux-m68k-low.cc (the_low_target): Ditto.
1637 * linux-mips-low.cc (the_low_target): Ditto.
1638 * linux-nios2-low.cc (the_low_target): Ditto.
1639 * linux-ppc-low.cc (the_low_target): Ditto.
1640 * linux-riscv-low.cc (the_low_target): Ditto.
1641 * linux-s390-low.cc (the_low_target): Ditto.
1642 * linux-sh-low.cc (the_low_target): Ditto.
1643 * linux-sparc-low.cc (the_low_target): Ditto.
1644 * linux-tic6x-low.cc (the_low_target): Ditto.
1645 * linux-tile-low.cc (the_low_target): Ditto.
1646 * linux-xtensa-low.cc (the_low_target): Ditto.
1647 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1648 <supports_software_single_step>: Declare.
1649 (arm_target::supports_software_single_step): Define.
1650 (arm_gdbserver_get_next_pcs): Turn into...
1651 (arm_target::low_get_next_pcs): ...this.
1652 (the_low_target): Remove the op field.
1653
1654 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1655
1656 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1657 the concrete linux target define it by overriding the op
1658 in process_stratum_target.
1659
1660 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1661 Remove.
1662 * linux-low.h (struct linux_target_ops): Remove the op.
1663 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1664 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1665 Declare.
1666 (x86_sw_breakpoint_from_kind): Turn into...
1667 (x86_target::sw_breakpoint_from_kind): ...this.
1668 (the_low_target): Remove the op field.
1669 * linux-aarch64-low.cc (class aarch64_target)
1670 <sw_breakpoint_from_kind>: Declare.
1671 (aarch64_sw_breakpoint_from_kind): Turn into...
1672 (aarch64_target::sw_breakpoint_from_kind): ...this.
1673 (the_low_target): Remove the op field.
1674 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1675 Declare.
1676 (arm_target::sw_breakpoint_from_kind): Define.
1677 (the_low_target): Remove the op field.
1678 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1679 Declare.
1680 (bfin_sw_breakpoint_from_kind): Turn into...
1681 (bfin_target::sw_breakpoint_from_kind): ...this.
1682 (the_low_target): Remove the op field.
1683 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1684 Declare.
1685 (cris_sw_breakpoint_from_kind): Turn into...
1686 (cris_target::sw_breakpoint_from_kind): ...this.
1687 (the_low_target): Remove the op field.
1688 * linux-crisv32-low.cc (class crisv32_target)
1689 <sw_breakpoint_from_kind>: Declare.
1690 (cris_sw_breakpoint_from_kind): Turn into...
1691 (crisv32_target::sw_breakpoint_from_kind): ...this.
1692 (the_low_target): Remove the op field.
1693 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1694 Declare.
1695 (ia64_target::sw_breakpoint_from_kind): Define.
1696 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1697 Declare.
1698 (m32r_sw_breakpoint_from_kind): Turn into...
1699 (m32r_target::sw_breakpoint_from_kind): ...this.
1700 (the_low_target): Remove the op field.
1701 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1702 Declare.
1703 (m68k_sw_breakpoint_from_kind): Turn into...
1704 (m68k_target::sw_breakpoint_from_kind): ...this.
1705 (the_low_target): Remove the op field.
1706 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1707 Declare.
1708 (mips_sw_breakpoint_from_kind): Turn into...
1709 (mips_target::sw_breakpoint_from_kind): ...this.
1710 (the_low_target): Remove the op field.
1711 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1712 Declare.
1713 (nios2_sw_breakpoint_from_kind): Turn into...
1714 (nios2_target::sw_breakpoint_from_kind): ...this.
1715 (the_low_target): Remove the op field.
1716 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1717 Declare.
1718 (ppc_sw_breakpoint_from_kind): Turn into...
1719 (ppc_target::sw_breakpoint_from_kind): ...this.
1720 (the_low_target): Remove the op field.
1721 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1722 Declare.
1723 (riscv_sw_breakpoint_from_kind): Turn into...
1724 (riscv_target::sw_breakpoint_from_kind): ...this.
1725 (the_low_target): Remove the op field.
1726 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1727 Declare.
1728 (s390_sw_breakpoint_from_kind): Turn into...
1729 (s390_target::sw_breakpoint_from_kind): ...this.
1730 (the_low_target): Remove the op field.
1731 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1732 Declare.
1733 (sh_sw_breakpoint_from_kind): Turn into...
1734 (sh_target::sw_breakpoint_from_kind): ...this.
1735 (the_low_target): Remove the op field.
1736 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1737 Declare.
1738 (sparc_sw_breakpoint_from_kind): Turn into...
1739 (sparc_target::sw_breakpoint_from_kind): ...this.
1740 (the_low_target): Remove the op field.
1741 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1742 Declare.
1743 (tic6x_sw_breakpoint_from_kind): Turn into...
1744 (tic6x_target::sw_breakpoint_from_kind): ...this.
1745 (the_low_target): Remove the op field.
1746 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1747 Declare.
1748 (tile_sw_breakpoint_from_kind): Turn into...
1749 (tile_target::sw_breakpoint_from_kind): ...this.
1750 (the_low_target): Remove the op field.
1751 * linux-xtensa-low.cc (class xtensa_target)
1752 <sw_breakpoint_from_kind>: Declare.
1753 (xtensa_sw_breakpoint_from_kind): Turn into...
1754 (xtensa_target::sw_breakpoint_from_kind): ...this.
1755 (the_low_target): Remove the op field.
1756
1757 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1758
1759 Remove the 'breakpoint_kind_from_pc' and
1760 'breakpoint_kind_from_current_state' linux target ops, and let the
1761 concrete linux target define them by overriding the ops of
1762 process_stratum_target.
1763
1764 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1765 Remove.
1766 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1767 * linux-low.h (struct linux_target_ops): Remove ops.
1768 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1769 <breakpoint_kind_from_current_state>: Remove.
1770 * linux-x86-low.cc (the_low_target): Remove the op fields.
1771 * linux-bfin-low.cc (the_low_target): Ditto.
1772 * linux-cris-low.cc (the_low_target): Ditto.
1773 * linux-crisv32-low.cc (the_low_target): Ditto.
1774 * linux-m32r-low.cc (the_low_target): Ditto.
1775 * linux-m68k-low.cc (the_low_target): Ditto.
1776 * linux-mips-low.cc (the_low_target): Ditto.
1777 * linux-nios2-low.cc (the_low_target): Ditto.
1778 * linux-ppc-low.cc (the_low_target): Ditto.
1779 * linux-s390-low.cc (the_low_target): Ditto.
1780 * linux-sh-low.cc (the_low_target): Ditto.
1781 * linux-sparc-low.cc (the_low_target): Ditto.
1782 * linux-tic6x-low.cc (the_low_target): Ditto.
1783 * linux-tile-low.cc (the_low_target): Ditto.
1784 * linux-xtensa-low.cc (the_low_target): Ditto.
1785 * linux-aarch64-low.cc (class aarch64_target)
1786 <breakpoint_kind_from_pc>
1787 <breakpoint_kind_from_current_state>: Declare.
1788 (aarch64_breakpoint_kind_from_pc): Turn into...
1789 (aarch64_target::breakpoint_kind_from_pc): ...this.
1790 (aarch64_breakpoint_kind_from_current_state): Turn into...
1791 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1792 (the_low_target): Remove the op fields.
1793 * linux-arm-low.cc (class arm_target):
1794 <breakpoint_kind_from_pc>
1795 <breakpoint_kind_from_current_state>: Declare.
1796 (arm_target::breakpoint_kind_from_pc): Define.
1797 (arm_target::breakpoint_kind_from_current_state): Define.
1798 (the_low_target): Remove the op fields.
1799 * linux-riscv-low.cc (class riscv_target):
1800 <breakpoint_kind_from_pc>: Declare.
1801 (riscv_breakpoint_kind_from_pc): Turn into...
1802 (riscv_target::breakpoint_kind_from_pc): ...this.
1803 (the_low_target): Remove the op fields.
1804
1805 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1806
1807 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1808 of linux_process_target.
1809
1810 * linux-low.h (struct linux_target_ops): Remove the ops.
1811 (class linux_process_target) <low_supports_breakpoints>
1812 <low_get_pc>
1813 <low_set_pc>: Declare.
1814 * linux-low.cc (supports_breakpoints): Turn into...
1815 (linux_process_target::low_supports_breakpoints): ...this.
1816 (linux_process_target::low_get_pc): Define.
1817 (linux_process_target::low_set_pc): Define.
1818
1819 Update the callers below.
1820
1821 (linux_process_target::get_pc)
1822 (linux_process_target::save_stop_reason)
1823 (linux_process_target::maybe_move_out_of_jump_pad)
1824 (linux_process_target::wait_1)
1825 (linux_process_target::resume_one_lwp_throw)
1826 (linux_process_target::resume)
1827 (linux_process_target::proceed_all_lwps)
1828 (linux_process_target::read_pc)
1829 (linux_process_target::write_pc)
1830
1831 * linux-x86-low.cc (class linux_process_target)
1832 <low_supports_breakpoints>
1833 <low_get_pc>
1834 <low_set_pc>: Declare.
1835 (x86_target::low_supports_breakpoints): Define.
1836 (x86_get_pc): Turn into...
1837 (x86_target::low_get_pc): ...this.
1838 (x86_set_pc): Turn into...
1839 (x86_target::low_set_pc): ...this.
1840 (the_low_target): Remove the op fields.
1841 * linux-arm-low.cc (class arm_target)
1842 <low_supports_breakpoints>
1843 <low_get_pc>
1844 <low_set_pc>: Declare.
1845 (arm_target::low_supports_breakpoints)
1846 (arm_target::low_get_pc)
1847 (arm_target::low_set_pc): Define.
1848 (the_low_target): Remove the op fields.
1849 * linux-bfin-low.cc (class bfin_target)
1850 <low_supports_breakpoints>
1851 <low_get_pc>
1852 <low_set_pc>: Declare.
1853 (bfin_target::low_supports_breakpoints)
1854 (bfin_target::low_get_pc)
1855 (bfin_target::low_set_pc): Define.
1856 (the_low_target): Remove the op fields.
1857 * linux-cris-low.cc (class cris_target)
1858 <low_supports_breakpoints>
1859 <low_get_pc>
1860 <low_set_pc>: Declare.
1861 (cris_target::low_supports_breakpoints)
1862 (cris_target::low_get_pc)
1863 (cris_target::low_set_pc): Define.
1864 (the_low_target): Remove the op fields.
1865 * linux-crisv32-low.cc (class crisv32_target)
1866 <low_supports_breakpoints>
1867 <low_get_pc>
1868 <low_set_pc>: Declare.
1869 (crisv32_target::low_supports_breakpoints)
1870 (crisv32_target::low_get_pc)
1871 (crisv32_target::low_set_pc): Define.
1872 (the_low_target): Remove the op fields.
1873 * linux-m32r-low.cc (class m32r_target)
1874 <low_supports_breakpoints>
1875 <low_get_pc>
1876 <low_set_pc>: Declare.
1877 (m32r_target::low_supports_breakpoints)
1878 (m32r_target::low_get_pc)
1879 (m32r_target::low_set_pc): Define.
1880 (the_low_target): Remove the op fields.
1881 * linux-m68k-low.cc (class m68k_target)
1882 <low_supports_breakpoints>
1883 <low_get_pc>
1884 <low_set_pc>: Declare.
1885 (m68k_target::low_supports_breakpoints)
1886 (m68k_target::low_get_pc)
1887 (m68k_target::low_set_pc): Define.
1888 (the_low_target): Remove the op fields.
1889 * linux-nios2-low.cc (class nios2_target)
1890 <low_supports_breakpoints>
1891 <low_get_pc>
1892 <low_set_pc>: Declare.
1893 (nios2_target::low_supports_breakpoints)
1894 (nios2_target::low_get_pc)
1895 (nios2_target::low_set_pc): Define.
1896 (the_low_target): Remove the op fields.
1897 * linux-sh-low.cc (class sh_target)
1898 <low_supports_breakpoints>
1899 <low_get_pc>
1900 <low_set_pc>: Declare.
1901 (sh_target::low_supports_breakpoints)
1902 (sh_target::low_get_pc)
1903 (sh_target::low_set_pc): Define.
1904 (the_low_target): Remove the op fields.
1905 * linux-xtensa-low.cc (class xtensa_target)
1906 <low_supports_breakpoints>
1907 <low_get_pc>
1908 <low_set_pc>: Declare.
1909 (xtensa_target::low_supports_breakpoints)
1910 (xtensa_target::low_get_pc)
1911 (xtensa_target::low_set_pc): Define.
1912 (the_low_target): Remove the op fields.
1913 * linux-sparc-low.cc (class sparc_target)
1914 <low_supports_breakpoints>
1915 <low_get_pc>: Declare.
1916 (sparc_target::low_supports_breakpoints)
1917 (sparc_target::low_get_pc): Define.
1918 (the_low_target): Remove the op fields.
1919 * linux-tile-low.cc (class tile_target)
1920 <low_supports_breakpoints>
1921 <low_get_pc>
1922 <low_set_pc>: Declare.
1923 (tile_target::low_supports_breakpoints)
1924 (tile_target::low_get_pc)
1925 (tile_target::low_set_pc): Define.
1926 (the_low_target): Remove the op fields.
1927 * linux-aarch64-low.cc (class aarch64_target)
1928 <low_supports_breakpoints>
1929 <low_get_pc>
1930 <low_set_pc>: Declare.
1931 (aarch64_target::low_supports_breakpoints): Define.
1932 (aarch64_get_pc): Turn into...
1933 (aarch64_target::low_get_pc): ...this.
1934 (aarch64_set_pc): Turn into...
1935 (aarch64_target::low_set_pc): ...this.
1936 (the_low_target): Remove the op fields.
1937 * linux-mips-low.cc (class mips_target)
1938 <low_supports_breakpoints>
1939 <low_get_pc>
1940 <low_set_pc>: Declare.
1941 (mips_target::low_supports_breakpoints): Define.
1942 (mips_get_pc): Turn into...
1943 (mips_target::low_get_pc): ...this.
1944 (mips_set_pc): Turn into...
1945 (mips_target::low_set_pc): ...this.
1946 (the_low_target): Remove the op fields.
1947 * linux-ppc-low.cc (class ppc_target)
1948 <low_supports_breakpoints>
1949 <low_get_pc>
1950 <low_set_pc>: Declare.
1951 (ppc_target::low_supports_breakpoints): Define.
1952 (ppc_get_pc): Turn into...
1953 (ppc_target::low_get_pc): ...this.
1954 (ppc_set_pc): Turn into...
1955 (ppc_target::low_set_pc): ...this.
1956 (the_low_target): Remove the op fields.
1957 * linux-riscv-low.cc (class riscv_target)
1958 <low_supports_breakpoints>
1959 <low_get_pc>
1960 <low_set_pc>: Declare.
1961 (riscv_target::low_supports_breakpoints): Define.
1962 (riscv_get_pc): Turn into...
1963 (riscv_target::low_get_pc): ...this.
1964 (riscv_set_pc): Turn into...
1965 (riscv_target::low_set_pc): ...this.
1966 (the_low_target): Remove the op fields.
1967 * linux-s390-low.cc (class s390_target)
1968 <low_supports_breakpoints>
1969 <low_get_pc>
1970 <low_set_pc>: Declare.
1971 (s390_target::low_supports_breakpoints): Define.
1972 (s390_get_pc): Turn into...
1973 (s390_target::low_get_pc): ...this.
1974 (s390_set_pc): Turn into...
1975 (s390_target::low_set_pc): ...this.
1976 (the_low_target): Remove the op fields.
1977 * linux-tic6x-low.cc (class tic6x_target)
1978 <low_supports_breakpoints>
1979 <low_get_pc>
1980 <low_set_pc>: Declare.
1981 (tic6x_target::low_supports_breakpoints): Define.
1982 (tic6x_get_pc): Turn into...
1983 (tic6x_target::low_get_pc): ...this.
1984 (tic6x_set_pc): Turn into...
1985 (tic6x_target::low_set_pc): ...this.
1986 (the_low_target): Remove the op fields.
1987
1988 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1989
1990 Turn some more static methods in linux-low into private methods
1991 of linux_process_target.
1992
1993 * linux-low.cc (get_pc): Turn into...
1994 (linux_process_target::get_pc): ...this.
1995 (save_stop_reason): Turn into...
1996 (linux_process_target::save_stop_reason): ...this.
1997 (thread_still_has_status_pending_p): Turn into...
1998 (linux_process_target::thread_still_has_status_pending): ...this.
1999 (status_pending_p_callback): Turn into...
2000 (linux_process_target::status_pending_p_callback): ...this.
2001 (resume_stopped_resumed_lwps): Turn into...
2002 (linux_process_target::resume_stopped_resumed_lwps): ...this.
2003 (install_software_single_step_breakpoints): Turn into...
2004 (linux_process_target::install_software_single_step_breakpoints):
2005 ...this.
2006 (single_step): Turn into...
2007 (linux_process_target::single_step): ...this.
2008 (linux_resume_one_lwp_throw): Turn into...
2009 (linux_process_target::resume_one_lwp_throw): ...this.
2010 (linux_resume_one_lwp): Turn into...
2011 (linux_process_target::resume_one_lwp): ...this.
2012 (resume_status_pending_p): Turn into...
2013 (linux_process_target::resume_status_pending): ...this.
2014 (need_step_over_p): Turn into...
2015 (linux_process_target::thread_needs_step_over): ...this.
2016 (linux_resume_one_thread): Turn into...
2017 (linux_process_target::resume_one_thread): ...this.
2018 (proceed_one_lwp): Turn into...
2019 (linux_process_target::proceed_one_lwp): ...this.
2020 (unsuspend_and_proceed_one_lwp): Turn into...
2021 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
2022
2023 Update the calls/references to the above functions below.
2024
2025 (linux_process_target::handle_extended_wait)
2026 (linux_process_target::filter_event)
2027 (linux_process_target::wait_for_event_filtered)
2028 (linux_process_target::wait_1)
2029 (linux_process_target::move_out_of_jump_pad)
2030 (linux_process_target::start_step_over)
2031 (linux_process_target::resume)
2032 (linux_process_target::proceed_all_lwps)
2033 (regsets_store_inferior_registers)
2034 (linux_process_target::store_register)
2035
2036 * linux-low.h (class linux_process_target)
2037 <get_pc>
2038 <save_stop_reason>
2039 <thread_still_has_status_pending>
2040 <status_pending_p_callback>
2041 <resume_stopped_resumed_lwps>
2042 <install_software_single_step_breakpoints>
2043 <single_step>
2044 <resume_one_lwp_throw>
2045 <resume_one_lwp>
2046 <resume_status_pending>
2047 <thread_needs_step_over>
2048 <resume_one_thread>
2049 <proceed_one_lwp>
2050 <unsuspend_and_proceed_one_lwp>: Declare.
2051
2052 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2053
2054 Turn the 'fetch_register' linux target op into a method of
2055 linux_process_target.
2056
2057 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
2058 (class linux_process_target) <low_fetch_register>: Declare.
2059 * linux-x86-low.cc (the_low_target)
2060 * linux-aarch64-low.cc (the_low_target)
2061 * linux-arm-low.cc (the_low_target)
2062 * linux-bfin-low.cc (the_low_target)
2063 * linux-cris-low.cc (the_low_target)
2064 * linux-crisv32-low.cc (the_low_target)
2065 * linux-m32r-low.cc (the_low_target)
2066 * linux-m68k-low.cc (the_low_target)
2067 * linux-nios2-low.cc (the_low_target)
2068 * linux-ppc-low.cc (the_low_target)
2069 * linux-s390-low.cc (the_low_target)
2070 * linux-sh-low.cc (the_low_target)
2071 * linux-sparc-low.cc (the_low_target)
2072 * linux-tic6x-low.cc (the_low_target)
2073 * linux-tile-low.cc (the_low_target)
2074 * linux-xtensa-low.cc (the_low_target): Remove the op field.
2075 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
2076 Declare.
2077 (ia64_fetch_register): Turn into...
2078 (ia64_target::low_fetch_register): ...this.
2079 (the_low_target): Remove the op field.
2080 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
2081 Declare.
2082 (mips_fetch_register): Turn into...
2083 (mips_target::low_fetch_register): ...this.
2084 (the_low_target): Remove the op field.
2085 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
2086 Declare.
2087 (riscv_fetch_register): Turn into...
2088 (riscv_target::low_fetch_register): ...this.
2089 (the_low_target): Remove the op field.
2090
2091 Update the callers below.
2092
2093 * linux-low.cc (linux_process_target::fetch_registers)
2094 (linux_process_target::low_fetch_register)
2095
2096 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2097
2098 Turn the 'cannot_fetch_register' and 'cannot_store_register'
2099 linux target ops into methods of linux_process_target.
2100
2101 * linux-low.h (struct linux_target_ops): Remove the low target ops.
2102 (class linux_process_target) <fetch_register>
2103 <store_register>
2104 <usr_fetch_inferior_registers>
2105 <usr_store_inferior_registers>
2106 <low_cannot_fetch_register>
2107 <low_cannot_fetch_register> Declare.
2108 * linux-low.cc (fetch_register): Turn into...
2109 (linux_process_target::fetch_register): ...this.
2110 (store_register): Turn into ...
2111 (linux_process_target::store_register): ...this.
2112 (usr_fetch_inferior_registers): Turn into...
2113 (linux_process_target::usr_fetch_inferior_registers): ...this.
2114 (usr_store_inferior_registers): Turn into...
2115 (linux_process_target::usr_store_inferior_registers): ...this.
2116 * linux-x86-low.cc (class x86_target)
2117 <low_cannot_fetch_register>
2118 <low_cannot_store_register>: Declare.
2119 (x86_cannot_store_register): Turn into...
2120 (x86_target::low_cannot_store_register): ...this.
2121 (x86_cannot_fetch_register): Turn into...
2122 (x86_target::low_cannot_fetch_register): ...this.
2123 (the_low_target): Remove the target op fields.
2124 * linux-aarch64-low.cc (class aarch64_target)
2125 <low_cannot_fetch_register>
2126 <low_cannot_store_register>: Declare.
2127 (aarch64_target::low_cannot_fetch_register)
2128 (aarch64_target::low_cannot_store_register): Define.
2129 (the_low_target): Remove the op fields.
2130 * linux-arm-low.cc (class arm_target)
2131 <low_cannot_fetch_register>
2132 <low_cannot_store_register>: Declare.
2133 (arm_cannot_fetch_register): Turn into...
2134 (arm_target::low_cannot_fetch_register): ...this.
2135 (arm_cannot_store_register): Turn into...
2136 (arm_target::low_cannot_store_register): ...this.
2137 (the_low_target): Remove the op fields.
2138 * linux-bfin-low.cc (class bfin_target)
2139 <low_cannot_fetch_register>
2140 <low_cannot_store_register>: Declare.
2141 (bfin_cannot_fetch_register): Turn into...
2142 (bfin_target::low_cannot_fetch_register): ...this.
2143 (bfin_cannot_store_register): Turn into...
2144 (bfin_target::low_cannot_store_register): ...this.
2145 (the_low_target): Remove the op fields.
2146 * linux-cris-low.cc (class cris_target)
2147 <low_cannot_fetch_register>
2148 <low_cannot_store_register>: Declare.
2149 (cris_cannot_fetch_register): Turn into...
2150 (cris_target::low_cannot_fetch_register): ...this.
2151 (cris_cannot_store_register): Turn into...
2152 (cris_target::low_cannot_store_register): ...this.
2153 (the_low_target): Remove the op fields.
2154 * linux-crisv32-low.cc (class crisv32_target)
2155 <low_cannot_fetch_register>
2156 <low_cannot_store_register>: Declare.
2157 (crisv32_target::low_cannot_fetch_register)
2158 (crisv32_target::low_cannot_store_register): Define.
2159 (the_low_target): Remove the op fields.
2160 * linux-ia64-low.cc (class ia64_target)
2161 <low_cannot_fetch_register>
2162 <low_cannot_store_register>: Declare.
2163 (ia64_cannot_fetch_register): Turn into...
2164 (ia64_target::low_cannot_fetch_register): ...this.
2165 (ia64_cannot_store_register): Turn into...
2166 (ia64_target::low_cannot_store_register): ...this.
2167 (the_low_target): Remove the op fields.
2168 * linux-m32r-low.cc (class m32r_target)
2169 <low_cannot_fetch_register>
2170 <low_cannot_store_register>: Declare.
2171 (m32r_cannot_fetch_register): Turn into...
2172 (m32r_target::low_cannot_fetch_register): ...this.
2173 (m32r_cannot_store_register): Turn into...
2174 (m32r_target::low_cannot_store_register): ...this.
2175 (the_low_target): Remove the op fields.
2176 * linux-m68k-low.cc (class m68k_target)
2177 <low_cannot_fetch_register>
2178 <low_cannot_store_register>: Declare.
2179 (m68k_cannot_fetch_register): Turn into...
2180 (m68k_target::low_cannot_fetch_register): ...this.
2181 (m68k_cannot_store_register): Turn into...
2182 (m68k_target::low_cannot_store_register): ...this.
2183 (the_low_target): Remove the op fields.
2184 * linux-mips-low.cc (class mips_target)
2185 <low_cannot_fetch_register>
2186 <low_cannot_store_register>: Declare.
2187 (mips_cannot_fetch_register): Turn into...
2188 (mips_target::low_cannot_fetch_register): ...this.
2189 (mips_cannot_store_register): Turn into...
2190 (mips_target::low_cannot_store_register): ...this.
2191 (get_usrregs_info): Inline at the call sites in
2192 low_cannot_fetch_register and low_cannot_store_register,
2193 and remove.
2194 (the_low_target): Remove the op fields.
2195 * linux-nios2-low.cc (class nios2_target)
2196 <low_cannot_fetch_register>
2197 <low_cannot_store_register>: Declare.
2198 (nios2_cannot_fetch_register): Turn into...
2199 (nios2_target::low_cannot_fetch_register): ...this.
2200 (nios2_cannot_store_register): Turn into...
2201 (nios2_target::low_cannot_store_register): ...this.
2202 (the_low_target): Remove the op fields.
2203 * linux-ppc-low.cc (class ppc_target)
2204 <low_cannot_fetch_register>
2205 <low_cannot_store_register>: Declare.
2206 (ppc_cannot_fetch_register): Turn into...
2207 (ppc_target::low_cannot_fetch_register): ...this.
2208 (ppc_cannot_store_register): Turn into...
2209 (ppc_target::low_cannot_store_register): ...this.
2210 (the_low_target): Remove the op fields.
2211 * linux-riscv-low.cc (class riscv_target)
2212 <low_cannot_fetch_register>
2213 <low_cannot_store_register>: Declare.
2214 (riscv_target::low_cannot_fetch_register)
2215 (riscv_target::low_cannot_store_register): Define.
2216 (the_low_target): Remove the op fields.
2217 * linux-s390-low.cc (class s390_target)
2218 <low_cannot_fetch_register>
2219 <low_cannot_store_register>: Declare.
2220 (s390_cannot_fetch_register): Turn into...
2221 (s390_target::low_cannot_fetch_register): ...this.
2222 (s390_cannot_store_register): Turn into...
2223 (s390_target::low_cannot_store_register): ...this.
2224 (the_low_target): Remove the op fields.
2225 * linux-sh-low.cc (class sh_target)
2226 <low_cannot_fetch_register>
2227 <low_cannot_store_register>: Declare.
2228 (sh_cannot_fetch_register): Turn into...
2229 (sh_target::low_cannot_fetch_register): ...this.
2230 (sh_cannot_store_register): Turn into...
2231 (sh_target::low_cannot_store_register): ...this.
2232 (the_low_target): Remove the op fields.
2233 * linux-sparc-low.cc (class sparc_target)
2234 <low_cannot_fetch_register>
2235 <low_cannot_store_register>: Declare.
2236 (sparc_cannot_fetch_register): Turn into...
2237 (sparc_target::low_cannot_fetch_register): ...this.
2238 (sparc_cannot_store_register): Turn into...
2239 (sparc_target::low_cannot_store_register): ...this.
2240 (the_low_target): Remove the op fields.
2241 * linux-tic6x-low.cc (class tic6x_target)
2242 <low_cannot_fetch_register>
2243 <low_cannot_store_register>: Declare.
2244 (tic6x_cannot_fetch_register): Turn into...
2245 (tic6x_target::low_cannot_fetch_register): ...this.
2246 (tic6x_cannot_store_register): Turn into...
2247 (tic6x_target::low_cannot_store_register): ...this.
2248 (the_low_target): Remove the op fields.
2249 * linux-tile-low.cc (class tile_target)
2250 <low_cannot_fetch_register>
2251 <low_cannot_store_register>: Declare.
2252 (tile_cannot_fetch_register): Turn into...
2253 (tile_target::low_cannot_fetch_register): ...this.
2254 (tile_cannot_store_register): Turn into...
2255 (tile_target::low_cannot_store_register): ...this.
2256 (the_low_target): Remove the op fields.
2257 * linux-xtensa-low.cc (class xtensa_target)
2258 <low_cannot_fetch_register>
2259 <low_cannot_store_register>: Declare.
2260 (xtensa_target::low_cannot_fetch_register)
2261 (xtensa_target::low_cannot_store_register): Define.
2262 (the_low_target): Remove the op fields.
2263
2264 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2265
2266 Turn the 'regs_info' linux target op into a method of
2267 linux_process_target.
2268
2269 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2270 (class linux_process_target) <get_regs_info>: Define.
2271
2272 Update the callers below.
2273
2274 * linux-low.cc (linux_process_target::fetch_registers)
2275 (linux_process_target::store_registers)
2276 * proc-service.cc (gregset_info)
2277
2278 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2279 (x86_linux_regs_info): Turn into ...
2280 (x86_target::get_regs_info): ...this.
2281 (the_low_target): Remove the op field.
2282 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2283 Declare.
2284 (aarch64_regs_info): Turn into ...
2285 (aarch64_target::get_regs_info): ...this.
2286 (the_low_target): Remove the op field.
2287 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2288 (arm_regs_info): Turn into ...
2289 (arm_target::get_regs_info): ...this.
2290 (the_low_target): Remove the op field.
2291 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2292 (bfin_regs_info): Turn into ...
2293 (bfin_target::get_regs_info): ...this.
2294 (the_low_target): Remove the op field.
2295 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2296 (cris_regs_info): Turn into ...
2297 (cris_target::get_regs_info): ...this.
2298 (the_low_target): Remove the op field.
2299 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2300 Declare.
2301 (crisv32_regs_info): Turn into ...
2302 (crisv32_target::get_regs_info): ...this.
2303 (the_low_target): Remove the op field.
2304 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2305 (ia64_regs_info): Turn into ...
2306 (ia64_target::get_regs_info): ...this.
2307 (the_low_target): Remove the op field.
2308 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2309 (m32r_regs_info): Turn into ...
2310 (m32r_target::get_regs_info): ...this.
2311 (the_low_target): Remove the op field.
2312 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2313 (m68k_regs_info): Turn into ...
2314 (m68k_target::get_regs_info): ...this.
2315 (the_low_target): Remove the op field.
2316 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2317 (mips_regs_info): Turn into ...
2318 (mips_target::get_regs_info): ...this.
2319 (the_low_target): Remove the op field.
2320 (get_usrregs_info): Update the call to the op.
2321 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2322 (nios2_regs_info): Turn into ...
2323 (nios2_target::get_regs_info): ...this.
2324 (the_low_target): Remove the op field.
2325 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2326 (ppc_regs_info): Turn into ...
2327 (ppc_target::get_regs_info): ...this.
2328 (the_low_target): Remove the op field.
2329 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2330 (riscv_regs_info): Turn into ...
2331 (riscv_target::get_regs_info): ...this.
2332 (the_low_target): Remove the op field.
2333 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2334 (s390_regs_info): Turn into ...
2335 (s390_target::get_regs_info): ...this.
2336 (the_low_target): Remove the op field.
2337 (s390_collect_ptrace_register)
2338 (s390_supply_ptrace_register)
2339 (s390_fill_gregset): Update the call to the op.
2340 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2341 (sh_regs_info): Turn into ...
2342 (sh_target::get_regs_info): ...this.
2343 (the_low_target): Remove the op field.
2344 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2345 (sparc_regs_info): Turn into ...
2346 (sparc_target::get_regs_info): ...this.
2347 (the_low_target): Remove the op field.
2348 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2349 (tic6x_regs_info): Turn into ...
2350 (tic6x_target::get_regs_info): ...this.
2351 (the_low_target): Remove the op field.
2352 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2353 (tile_regs_info): Turn into ...
2354 (tile_target::get_regs_info): ...this.
2355 (the_low_target): Remove the op field.
2356 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2357 Declare.
2358 (xtensa_regs_info): Turn into ...
2359 (xtensa_target::get_regs_info): ...this.
2360 (the_low_target): Remove the op field.
2361
2362 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2363
2364 Turn the 'arch_setup' linux target op into a method of
2365 linux_process_target.
2366
2367 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2368 (class linux_process_target) <arch_setup_thread>
2369 <low_arch_setup>: New declarations.
2370 * linux-low.cc (linux_arch_setup): Delete.
2371 (linux_arch_setup_thread): Turn into...
2372 (linux_process_target::arch_setup_thread): ... this.
2373
2374 Update the callers below.
2375
2376 (linux_process_target::handle_extended_wait)
2377 (linux_process_target::post_create_inferior)
2378 (linux_process_target::filter_event)
2379
2380 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2381 declaration.
2382 (x86_linux_update_xmltarget): Turn into...
2383 (x86_target::update_xmltarget): ...this.
2384 (x86_linux_process_qsupported): Update the call to
2385 x86_linux_update_xmltarget.
2386 (x86_arch_setup): Turn into ...
2387 (x86_target::low_arch_setup): ...this.
2388 (the_low_target): Remove the op field.
2389 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2390 declaration.
2391 (aarch64_arch_setup): Turn into ...
2392 (aarch64_target::low_arch_setup): ...this.
2393 (the_low_target): Remove the op field.
2394 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2395 declaration.
2396 (arm_arch_setup): Turn into ...
2397 (arm_target::low_arch_setup): ...this.
2398 (the_low_target): Remove the op field.
2399 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2400 declaration.
2401 (bfin_arch_setup): Turn into ...
2402 (bfin_target::low_arch_setup): ...this.
2403 (the_low_target): Remove the op field.
2404 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2405 declaration.
2406 (cris_arch_setup): Turn into ...
2407 (cris_target::low_arch_setup): ...this.
2408 (the_low_target): Remove the op field.
2409 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2410 declaration.
2411 (crisv32_arch_setup): Turn into ...
2412 (crisv32_target::low_arch_setup): ...this.
2413 (the_low_target): Remove the op field.
2414 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2415 declaration.
2416 (ia64_arch_setup): Turn into ...
2417 (ia64_target::low_arch_setup): ...this.
2418 (the_low_target): Remove the op field.
2419 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2420 declaration.
2421 (m32r_arch_setup): Turn into ...
2422 (m32r_target::low_arch_setup): ...this.
2423 (the_low_target): Remove the op field.
2424 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2425 declaration.
2426 (m68k_arch_setup): Turn into ...
2427 (m68k_target::low_arch_setup): ...this.
2428 (the_low_target): Remove the op field.
2429 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2430 declaration.
2431 (mips_arch_setup): Turn into ...
2432 (mips_target::low_arch_setup): ...this.
2433 (the_low_target): Remove the op field.
2434 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2435 declaration.
2436 (nios2_arch_setup): Turn into ...
2437 (nios2_target::low_arch_setup): ...this.
2438 (the_low_target): Remove the op field.
2439 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2440 declaration.
2441 (ppc_arch_setup): Turn into ...
2442 (ppc_target::low_arch_setup): ...this.
2443 (the_low_target): Remove the op field.
2444 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2445 declaration.
2446 (riscv_arch_setup): Turn into ...
2447 (riscv_target::low_arch_setup): ...this.
2448 (the_low_target): Remove the op field.
2449 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2450 declaration.
2451 (s390_arch_setup): Turn into ...
2452 (s390_target::low_arch_setup): ...this.
2453 (the_low_target): Remove the op field.
2454 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2455 declaration.
2456 (sh_arch_setup): Turn into ...
2457 (sh_target::low_arch_setup): ...this.
2458 (the_low_target): Remove the op field.
2459 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2460 declaration.
2461 (sparc_arch_setup): Turn into ...
2462 (sparc_target::low_arch_setup): ...this.
2463 (the_low_target): Remove the op field.
2464 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2465 declaration.
2466 (tic6x_arch_setup): Turn into ...
2467 (tic6x_target::low_arch_setup): ...this.
2468 (the_low_target): Remove the op field.
2469 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2470 declaration.
2471 (tile_arch_setup): Turn into ...
2472 (tile_target::low_arch_setup): ...this.
2473 (the_low_target): Remove the op field.
2474 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2475 declaration.
2476 (xtensa_arch_setup): Turn into ...
2477 (xtensa_target::low_arch_setup): ...this.
2478 (the_low_target): Remove the op field.
2479
2480 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2481
2482 * linux-low.h (the_linux_target): New extern declaration.
2483 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2484 'the_target'.
2485 (the_linux_target): Remove.
2486 * linux-x86-low.cc (class x86_target): New class.
2487 (the_x86_target): New static object.
2488 (the_linux_target): Define as pointer to the_x86_target.
2489 * linux-aarch64-low.cc (class aarch64_target): New class.
2490 (the_aarch64_target): New static object.
2491 (the_linux_target): Define as pointer to the_aarch64_target.
2492 * linux-arm-low.cc (class arm_target): New class.
2493 (the_arm_target): New static object.
2494 (the_linux_target): Define as pointer to the_arm_target.
2495 * linux-bfin-low.cc (class bfin_target): New class.
2496 (the_bfin_target): New static object.
2497 (the_linux_target): Define as pointer to the_bfin_target.
2498 * linux-cris-low.cc (class cris_target): New class.
2499 (the_cris_target): New static object.
2500 (the_linux_target): Define as pointer to the_cris_target.
2501 * linux-crisv32-low.cc (class crisv32_target): New class.
2502 (the_crisv32_target): New static object.
2503 (the_linux_target): Define as pointer to the_crisv32_target.
2504 * linux-ia64-low.cc (class ia64_target): New class.
2505 (the_ia64_target): New static object.
2506 (the_linux_target): Define as pointer to the_ia64_target.
2507 * linux-m32r-low.cc (class m32r_target): New class.
2508 (the_m32r_target): New static object.
2509 (the_linux_target): Define as pointer to the_m32r_target.
2510 * linux-m68k-low.cc (class m68k_target): New class.
2511 (the_m68k_target): New static object.
2512 (the_linux_target): Define as pointer to the_m68k_target.
2513 * linux-mips-low.cc (class mips_target): New class.
2514 (the_mips_target): New static object.
2515 (the_linux_target): Define as pointer to the_mips_target.
2516 * linux-nios2-low.cc (class nios2_target): New class.
2517 (the_nios2_target): New static object.
2518 (the_linux_target): Define as pointer to the_nios2_target.
2519 * linux-ppc-low.cc (class ppc_target): New class.
2520 (the_ppc_target): New static object.
2521 (the_linux_target): Define as pointer to the_ppc_target.
2522 * linux-riscv-low.cc (class riscv_target): New class.
2523 (the_riscv_target): New static object.
2524 (the_linux_target): Define as pointer to the_riscv_target.
2525 * linux-s390-low.cc (class s390_target): New class.
2526 (the_s390_target): New static object.
2527 (the_linux_target): Define as pointer to the_s390_target.
2528 * linux-sh-low.cc (class sh_target): New class.
2529 (the_sh_target): New static object.
2530 (the_linux_target): Define as pointer to the_sh_target.
2531 * linux-sparc-low.cc (class sparc_target): New class.
2532 (the_sparc_target): New static object.
2533 (the_linux_target): Define as pointer to the_sparc_target.
2534 * linux-tic6x-low.cc (class tic6x_target): New class.
2535 (the_tic6x_target): New static object.
2536 (the_linux_target): Define as pointer to the_tic6x_target.
2537 * linux-tile-low.cc (class tile_target): New class.
2538 (the_tile_target): New static object.
2539 (the_linux_target): Define as pointer to the_tile_target.
2540 * linux-xtensa-low.cc (class xtensa_target): New class.
2541 (the_xtensa_target): New static object.
2542 (the_linux_target): Define as pointer to the_xtensa_target.
2543
2544 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2545
2546 Turn some static functions in linux-low.cc into private methods of
2547 linux_process_target.
2548
2549 * linux-low.cc (handle_extended_wait): Turn into ...
2550 (linux_process_target::handle_extended_wait): ...this. Call
2551 'mourn' on 'this' object instead of 'the_target'.
2552 (maybe_move_out_of_jump_pad): Turn into...
2553 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2554 (linux_low_filter_event): Turn into...
2555 (linux_process_target::filter_event): ...this.
2556 (linux_wait_for_event_filtered): Turn into...
2557 (linux_process_target::wait_for_event_filtered): ...this.
2558 (linux_wait_for_event): Turn into...
2559 (linux_process_target::wait_for_event): ...this.
2560 (linux_wait_1): Turn into...
2561 (linux_process_target::wait_1): ...this.
2562 (wait_for_sigstop): Turn into...
2563 (linux_process_target::wait_for_sigstop): ...this.
2564 (move_out_of_jump_pad_callback): Turn into...
2565 (linux_process_target::move_out_of_jump_pad): ...this.
2566 (stop_all_lwps): Turn into...
2567 (linux_process_target::stop_all_lwps): ...this.
2568 (start_step_over): Turn into...
2569 (linux_process_target::start_step_over): ...this.
2570 (complete_ongoing_step_over): Turn into...
2571 (linux_process_target::complete_ongoing_step_over): ...this.
2572 (proceed_all_lwps): Turn into...
2573 (linux_process_target::proceed_all_lwps): ...this.
2574 (unstop_all_lwps): Turn into...
2575 (linux_process_target::unstop_all_lwps): ...this.
2576
2577 * linux-low.h (class linux_process_target)
2578 <handle_extended_wait>
2579 <maybe_move_out_of_jump_pad>
2580 filter_event>
2581 <wait_for_event_filtered>
2582 <wait_for_event>
2583 <wait_1>
2584 <wait_for_sigstop>
2585 <move_out_of_jump_pad>
2586 <stop_all_lwps>
2587 <start_step_over>
2588 <complete_ongoing_step_over>
2589 <proceed_all_lwps>
2590 <unstop_all_lwps>: Declare.
2591
2592 Update the callers below.
2593
2594 * linux-low.cc (linux_process_target::attach): Update.
2595 (linux_process_target::stabilize_threads): Ditto.
2596 (linux_process_target::wait): Ditto.
2597
2598 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2599
2600 * linux-low.h (struct linux_target_ops): Update the comment for
2601 'cannot_store_register' to return 0 or 1.
2602 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2603 of 2.
2604
2605 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2606
2607 * config.in: Re-generate.
2608 * configure: Re-generate.
2609
2610 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2611
2612 * regcache.cc (find_register_by_number): Update.
2613 * tdesc.cc (init_target_desc): Likewise.
2614 * tdesc.h (target_desc::reg_defs): Likewise.
2615
2616 2020-03-12 Tom Tromey <tom@tromey.com>
2617
2618 * configure: Rebuild.
2619 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2620 (WIN32APILIBS): New subst.
2621 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2622 gdbsupport files.
2623 (gdbsupport/%.o): Remove target.
2624 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2625 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2626 (WIN32APILIBS): New variable.
2627 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2628 (gdbreplay$(EXEEXT)): Likewise.
2629
2630 2020-03-12 Tom Tromey <tom@tromey.com>
2631
2632 * config.in, configure: Rebuild.
2633 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2634 * acinclude.m4: Include gettext-sister.m4.
2635 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2636 variables.
2637 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2638 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2639
2640 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2641
2642 * acinclude.m4: Update path to selftest.m4.
2643
2644 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2645
2646 * configure.ac: Don't source bfd/development.sh, move
2647 GDB_AC_COMMON higher.
2648 * configure: Re-generate.
2649
2650 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2651
2652 * configure: Re-generate.
2653
2654 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2655
2656 * configure: Re-generate.
2657
2658 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2659
2660 * .dir-locals.el: New file.
2661
2662 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2663
2664 * .gitattributes: New file.
2665
2666 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2667
2668 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2669 reply into an S reply.
2670 * server.cc (disable_packet_T): New global.
2671 (captured_main): Set new global when appropriate.
2672 * server.h (disable_packet_T): Declare.
2673
2674 2020-02-21 Tom Tromey <tom@tromey.com>
2675
2676 * Makefile.in (mostlyclean): New target.
2677
2678 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2679
2680 * target.h (struct process_stratum_target): Remove.
2681 (class process_target): Rename to ...
2682 (class process_stratum_target): ... this.
2683 * linux-low.h (class linux_process_target): Derive from
2684 'process_stratum_target'.
2685 * linux-low.cc (linux_target_ops): Remove.
2686 (initialize_low): Set the_target to the singleton instance of
2687 linux_process_target.
2688 * lynx-low.h (class lynx_process_target): Derive from
2689 'process_stratum_target'.
2690 * lynx-low.cc (lynx_target_ops): Remove.
2691 (initialize_low): Set the_target to the singleton instance of
2692 lynx_process_target.
2693 * nto-low.h (class nto_process_target): Derive from
2694 'process_stratum_target'.
2695 * nto-low.cc (nto_target_ops): Remove.
2696 (initialize_low): Set the_target to the singleton instance of
2697 nto_process_target.
2698 * win32-low.h (class win32_process_target): Derive from
2699 'process_stratum_target'.
2700 * win32-low.cc (win32_target_ops): Remove.
2701 (initialize_low): Set the_target to the singleton instance of
2702 win32_process_target.
2703
2704 Replace 'the_target->pt' with 'the_target' in the uses below.
2705
2706 * hostio.cc (hostio_error)
2707 (handle_setfs)
2708 (handle_open)
2709 (handle_unlink)
2710 (handle_readlink)
2711 * linux-aarch32-low.cc (arm_breakpoint_at)
2712 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2713 * linux-arm-low.cc (arm_sigreturn_next_pc)
2714 (arm_get_hwcap)
2715 (arm_get_syscall_trapinfo)
2716 * linux-cris-low.cc (cris_breakpoint_at)
2717 * linux-crisv32-low.cc (cris_breakpoint_at)
2718 * linux-low.cc (handle_extended_wait)
2719 (linux_wait_1)
2720 (linux_read_memory)
2721 (linux_process_target::breakpoint_kind_from_pc)
2722 (linux_get_auxv)
2723 * linux-m32r-low.cc (m32r_breakpoint_at)
2724 * linux-mips-low.cc (mips_breakpoint_at)
2725 * linux-nios2-low.cc (nios2_breakpoint_at)
2726 * linux-ppc-low.cc (ppc_breakpoint_at)
2727 * linux-s390-low.cc (s390_get_hwcap)
2728 * linux-sh-low.cc (sh_breakpoint_at)
2729 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2730 (sparc_store_gregset_from_stack)
2731 (sparc_breakpoint_at)
2732 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2733 * linux-tile-low.cc (tile_breakpoint_at)
2734 * linux-x86-low.cc (x86_breakpoint_at)
2735 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2736 * mem-break.cc (bp_size)
2737 (bp_opcode)
2738 (insert_memory_breakpoint)
2739 (set_raw_breakpoint_at)
2740 (delete_raw_breakpoint)
2741 (z_type_supported)
2742 (uninsert_raw_breakpoint)
2743 (reinsert_raw_breakpoint)
2744 (validate_inserted_breakpoint)
2745 * regcache.cc (regcache_read_pc)
2746 (regcache_write_pc)
2747 * remote-utils.cc (putpkt_binary_1)
2748 (input_interrupt)
2749 (getpkt)
2750 (prepare_resume_reply)
2751 * server.cc (handle_general_set)
2752 (handle_detach)
2753 (handle_qxfer_auxv)
2754 (handle_qxfer_exec_file)
2755 (handle_qxfer_libraries_svr4)
2756 (handle_qxfer_osdata)
2757 (handle_qxfer_siginfo)
2758 (handle_qxfer_fdpic)
2759 (handle_query)
2760 (resume)
2761 (handle_v_requests)
2762 (queue_stop_reply_callback)
2763 (captured_main)
2764 * target.cc (prepare_to_access_memory)
2765 (done_accessing_memory)
2766 (read_inferior_memory)
2767 (target_write_memory)
2768 (target_stop_and_wait)
2769 (target_wait)
2770 (target_mourn_inferior)
2771 (target_continue_no_signal)
2772 (target_continue)
2773 (target_supports_multi_process)
2774 (kill_inferior)
2775 * target.h
2776 (target_create_inferior)
2777 (target_post_create_inferior)
2778 (myattach)
2779 (target_supports_fork_events)
2780 (target_supports_vfork_events)
2781 (target_supports_exec_events)
2782 (target_handle_new_gdb_connection)
2783 (detach_inferior)
2784 (mythread_alive)
2785 (fetch_inferior_registers)
2786 (store_inferior_registers)
2787 (join_inferior)
2788 (target_supports_non_stop)
2789 (target_async)
2790 (target_process_qsupported)
2791 (target_supports_catch_syscall)
2792 (target_get_ipa_tdesc_idx)
2793 (target_supports_tracepoints)
2794 (target_supports_fast_tracepoints)
2795 (target_get_min_fast_tracepoint_insn_len)
2796 (target_thread_stopped)
2797 (target_pause_all)
2798 (target_unpause_all)
2799 (target_stabilize_threads)
2800 (target_install_fast_tracepoint_jump_pad)
2801 (target_emit_ops)
2802 (target_supports_disable_randomization)
2803 (target_supports_agent)
2804 (target_enable_btrace)
2805 (target_disable_btrace)
2806 (target_read_btrace)
2807 (target_read_btrace_conf)
2808 (target_supports_range_stepping)
2809 (target_supports_stopped_by_sw_breakpoint)
2810 (target_stopped_by_sw_breakpoint)
2811 (target_supports_stopped_by_hw_breakpoint)
2812 (target_supports_hardware_single_step)
2813 (target_stopped_by_hw_breakpoint)
2814 (target_breakpoint_kind_from_pc)
2815 (target_breakpoint_kind_from_current_state)
2816 (target_supports_software_single_step)
2817 (target_core_of_thread)
2818 (target_thread_name)
2819 (target_thread_handle)
2820 * win32-low.cc (do_initial_child_stuff)
2821
2822 Rename target op default definitions listed below.
2823
2824 * target.cc (process_target::post_create_inferior): Rename as ...
2825 (process_stratum_target::post_create_inferior): ... this.
2826 (process_target::prepare_to_access_memory): Rename as ...
2827 (process_stratum_target::prepare_to_access_memory): ... this.
2828 (process_target::done_accessing_memory): Rename as ...
2829 (process_stratum_target::done_accessing_memory): ... this.
2830 (process_target::look_up_symbols): Rename as ...
2831 (process_stratum_target::look_up_symbols): ... this.
2832 (process_target::supports_read_auxv): Rename as ...
2833 (process_stratum_target::supports_read_auxv): ... this.
2834 (process_target::read_auxv): Rename as ...
2835 (process_stratum_target::read_auxv): ... this.
2836 (process_target::supports_z_point_type): Rename as ...
2837 (process_stratum_target::supports_z_point_type): ... this.
2838 (process_target::insert_point): Rename as ...
2839 (process_stratum_target::insert_point): ... this.
2840 (process_target::remove_point): Rename as ...
2841 (process_stratum_target::remove_point): ... this.
2842 (process_target::stopped_by_sw_breakpoint): Rename as ...
2843 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2844 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2845 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2846 (process_target::stopped_by_hw_breakpoint): Rename as ...
2847 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2848 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2849 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2850 (process_target::supports_hardware_single_step): Rename as ...
2851 (process_stratum_target::supports_hardware_single_step): ... this.
2852 (process_target::stopped_by_watchpoint): Rename as ...
2853 (process_stratum_target::stopped_by_watchpoint): ... this.
2854 (process_target::stopped_data_address): Rename as ...
2855 (process_stratum_target::stopped_data_address): ... this.
2856 (process_target::supports_read_offsets): Rename as ...
2857 (process_stratum_target::supports_read_offsets): ... this.
2858 (process_target::read_offsets): Rename as ...
2859 (process_stratum_target::read_offsets): ... this.
2860 (process_target::supports_get_tls_address): Rename as ...
2861 (process_stratum_target::supports_get_tls_address): ... this.
2862 (process_target::get_tls_address): Rename as ...
2863 (process_stratum_target::get_tls_address): ... this.
2864 (process_target::hostio_last_error): Rename as ...
2865 (process_stratum_target::hostio_last_error): ... this.
2866 (process_target::supports_qxfer_osdata): Rename as ...
2867 (process_stratum_target::supports_qxfer_osdata): ... this.
2868 (process_target::qxfer_osdata): Rename as ...
2869 (process_stratum_target::qxfer_osdata): ... this.
2870 (process_target::supports_qxfer_siginfo): Rename as ...
2871 (process_stratum_target::supports_qxfer_siginfo): ... this.
2872 (process_target::qxfer_siginfo): Rename as ...
2873 (process_stratum_target::qxfer_siginfo): ... this.
2874 (process_target::supports_non_stop): Rename as ...
2875 (process_stratum_target::supports_non_stop): ... this.
2876 (process_target::async): Rename as ...
2877 (process_stratum_target::async): ... this.
2878 (process_target::start_non_stop): Rename as ...
2879 (process_stratum_target::start_non_stop): ... this.
2880 (process_target::supports_multi_process): Rename as ...
2881 (process_stratum_target::supports_multi_process): ... this.
2882 (process_target::supports_fork_events): Rename as ...
2883 (process_stratum_target::supports_fork_events): ... this.
2884 (process_target::supports_vfork_events): Rename as ...
2885 (process_stratum_target::supports_vfork_events): ... this.
2886 (process_target::supports_exec_events): Rename as ...
2887 (process_stratum_target::supports_exec_events): ... this.
2888 (process_target::handle_new_gdb_connection): Rename as ...
2889 (process_stratum_target::handle_new_gdb_connection): ... this.
2890 (process_target::handle_monitor_command): Rename as ...
2891 (process_stratum_target::handle_monitor_command): ... this.
2892 (process_target::core_of_thread): Rename as ...
2893 (process_stratum_target::core_of_thread): ... this.
2894 (process_target::supports_read_loadmap): Rename as ...
2895 (process_stratum_target::supports_read_loadmap): ... this.
2896 (process_target::read_loadmap): Rename as ...
2897 (process_stratum_target::read_loadmap): ... this.
2898 (process_target::process_qsupported): Rename as ...
2899 (process_stratum_target::process_qsupported): ... this.
2900 (process_target::supports_tracepoints): Rename as ...
2901 (process_stratum_target::supports_tracepoints): ... this.
2902 (process_target::read_pc): Rename as ...
2903 (process_stratum_target::read_pc): ... this.
2904 (process_target::write_pc): Rename as ...
2905 (process_stratum_target::write_pc): ... this.
2906 (process_target::supports_thread_stopped): Rename as ...
2907 (process_stratum_target::supports_thread_stopped): ... this.
2908 (process_target::thread_stopped): Rename as ...
2909 (process_stratum_target::thread_stopped): ... this.
2910 (process_target::supports_get_tib_address): Rename as ...
2911 (process_stratum_target::supports_get_tib_address): ... this.
2912 (process_target::get_tib_address): Rename as ...
2913 (process_stratum_target::get_tib_address): ... this.
2914 (process_target::pause_all): Rename as ...
2915 (process_stratum_target::pause_all): ... this.
2916 (process_target::unpause_all): Rename as ...
2917 (process_stratum_target::unpause_all): ... this.
2918 (process_target::stabilize_threads): Rename as ...
2919 (process_stratum_target::stabilize_threads): ... this.
2920 (process_target::supports_fast_tracepoints): Rename as ...
2921 (process_stratum_target::supports_fast_tracepoints): ... this.
2922 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2923 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2924 (process_target::emit_ops): Rename as ...
2925 (process_stratum_target::emit_ops): ... this.
2926 (process_target::supports_disable_randomization): Rename as ...
2927 (process_stratum_target::supports_disable_randomization): ... this.
2928 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2929 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2930 (process_target::qxfer_libraries_svr4): Rename as ...
2931 (process_stratum_target::qxfer_libraries_svr4): ... this.
2932 (process_target::supports_agent): Rename as ...
2933 (process_stratum_target::supports_agent): ... this.
2934 (process_target::enable_btrace): Rename as ...
2935 (process_stratum_target::enable_btrace): ... this.
2936 (process_target::disable_btrace): Rename as ...
2937 (process_stratum_target::disable_btrace): ... this.
2938 (process_target::read_btrace): Rename as ...
2939 (process_stratum_target::read_btrace): ... this.
2940 (process_target::read_btrace_conf): Rename as ...
2941 (process_stratum_target::read_btrace_conf): ... this.
2942 (process_target::supports_range_stepping): Rename as ...
2943 (process_stratum_target::supports_range_stepping): ... this.
2944 (process_target::supports_pid_to_exec_file): Rename as ...
2945 (process_stratum_target::supports_pid_to_exec_file): ... this.
2946 (process_target::pid_to_exec_file): Rename as ...
2947 (process_stratum_target::pid_to_exec_file): ... this.
2948 (process_target::supports_multifs): Rename as ...
2949 (process_stratum_target::supports_multifs): ... this.
2950 (process_target::multifs_open): Rename as ...
2951 (process_stratum_target::multifs_open): ... this.
2952 (process_target::multifs_unlink): Rename as ...
2953 (process_stratum_target::multifs_unlink): ... this.
2954 (process_target::multifs_readlink): Rename as ...
2955 (process_stratum_target::multifs_readlink): ... this.
2956 (process_target::breakpoint_kind_from_pc): Rename as ...
2957 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2958 (process_target::breakpoint_kind_from_current_state): Rename as ...
2959 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2960 (process_target::thread_name): Rename as ...
2961 (process_stratum_target::thread_name): ... this.
2962 (process_target::thread_handle): Rename as ...
2963 (process_stratum_target::thread_handle): ... this.
2964 (process_target::supports_software_single_step): Rename as ...
2965 (process_stratum_target::supports_software_single_step): ... this.
2966 (process_target::supports_catch_syscall): Rename as ...
2967 (process_stratum_target::supports_catch_syscall): ... this.
2968 (process_target::get_ipa_tdesc_idx): Rename as ...
2969 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2970
2971 2020-02-20 Pedro Alves <palves@redhat.com>
2972
2973 * target.cc (set_target_ops): Simply copy the given target pointer
2974 instead of creating a copy of the pointed object.
2975
2976 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2977
2978 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2979 of process_target.
2980
2981 * target.h (struct process_stratum_target): Remove the target op.
2982 (class process_target): Add the target op.
2983 (target_get_ipa_tdesc_idx): Update the macro.
2984 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2985
2986 Update the derived classes and callers below.
2987
2988 * linux-low.cc (linux_target_ops): Update.
2989 (linux_get_ipa_tdesc_idx): Turn into ...
2990 (linux_process_target::get_ipa_tdesc_idx): ... this.
2991 * linux-low.h (class linux_process_target): Update.
2992 * lynx-low.cc (lynx_target_ops): Update.
2993 * nto-low.cc (nto_target_ops): Update.
2994 * win32-low.cc (win32_target_ops): Update.
2995
2996 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2997
2998 Turn process_stratum_target's supports_catch_syscall op into a
2999 method of process_target.
3000
3001 * target.h (struct process_stratum_target): Remove the target op.
3002 (class process_target): Add the target op.
3003 (target_supports_catch_syscall): Update the macro.
3004 * target.cc (process_target::supports_catch_syscall): Define.
3005
3006 Update the derived classes and callers below.
3007
3008 * linux-low.cc (linux_target_ops): Update.
3009 (linux_supports_catch_syscall): Turn into ...
3010 (linux_process_target::supports_catch_syscall): ... this.
3011 * linux-low.h (class linux_process_target): Update.
3012 * lynx-low.cc (lynx_target_ops): Update.
3013 * nto-low.cc (nto_target_ops): Update.
3014 * win32-low.cc (win32_target_ops): Update.
3015
3016 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3017
3018 Turn process_stratum_target's supports_software_single_step op
3019 into a method of process_target.
3020
3021 * target.h (struct process_stratum_target): Remove the target op.
3022 (class process_target): Add the target op.
3023 (target_supports_software_single_step): Update the macro.
3024 * target.cc (process_target::supports_software_single_step): Define.
3025
3026 Update the derived classes and callers below.
3027
3028 * linux-low.cc (linux_target_ops): Update.
3029 (linux_supports_software_single_step): Turn into ...
3030 (linux_process_target::supports_software_single_step): ... this.
3031 * linux-low.h (class linux_process_target): Update.
3032 * lynx-low.cc (lynx_target_ops): Update.
3033 * nto-low.cc (nto_target_ops): Update.
3034 * win32-low.cc (win32_target_ops): Update.
3035
3036 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3037
3038 Turn process_stratum_target's thread_name and thread_handle ops
3039 into methods of process_target.
3040
3041 * target.h (struct process_stratum_target): Remove the target ops.
3042 (class process_target): Add the target ops.
3043 (target_thread_name): Update the macro.
3044 (target_thread_handle): Update the macro.
3045 * target.cc (process_target::thread_name): Define.
3046 (process_target::thread_handle): Define.
3047
3048 Update the derived classes and callers below.
3049
3050 * linux-low.cc (linux_target_ops): Update.
3051 (linux_process_target::thread_name): Define.
3052 (linux_process_target::thread_handle): Define.
3053 * linux-low.h (class linux_process_target): Update.
3054 * lynx-low.cc (lynx_target_ops): Update.
3055 * nto-low.cc (nto_target_ops): Update.
3056 * win32-low.cc (win32_target_ops): Update.
3057
3058 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3059
3060 Turn process_stratum_target's breakpoint_kind_from_pc,
3061 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
3062 ops into methods of process_target.
3063
3064 * target.h (struct process_stratum_target): Remove the target op.
3065 (class process_target): Add the target op.
3066 (target_breakpoint_kind_from_pc): Update the macro.
3067 (target_breakpoint_kind_from_current_state): Update the macro.
3068 (default_breakpoint_kind_from_pc): Remove declaration.
3069 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
3070 (process_target::breakpoint_kind_from_pc): ... this.
3071 (process_target::breakpoint_kind_from_current_state): Define.
3072
3073 Update the derived classes and callers below.
3074
3075 * mem-break.cc (bp_size): Update.
3076 (bp_opcode): Update.
3077 * linux-low.cc (linux_target_ops): Update.
3078 (linux_wait_1): Update.
3079 (linux_breakpoint_kind_from_pc): Turn into ...
3080 (linux_process_target::breakpoint_kind_from_pc): ... this.
3081 (linux_sw_breakpoint_from_kind): Turn into ...
3082 (linux_process_target::sw_breakpoint_from_kind): ... this.
3083 (linux_breakpoint_kind_from_current_state): Turn into ...
3084 (linux_process_target::breakpoint_kind_from_current_state): ... this.
3085 * linux-low.h (class linux_process_target): Update.
3086 * lynx-low.cc (lynx_target_ops): Update.
3087 (lynx_process_target::sw_breakpoint_from_kind): Define.
3088 * lynx-low.h (class lynx_process_target): Update.
3089 * nto-low.cc (nto_target_ops): Update.
3090 (nto_sw_breakpoint_from_kind): Turn into ...
3091 (nto_process_target::sw_breakpoint_from_kind): ... this.
3092 * nto-low.h (class nto_process_target): Update.
3093 * win32-low.cc (win32_target_ops): Update.
3094 (win32_sw_breakpoint_from_kind): Turn into ...
3095 (win32_process_target::sw_breakpoint_from_kind): ... this.
3096 * win32-low.h (class win32_process_target): Update.
3097
3098 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3099
3100 Turn process_stratum_target's multifs_open, multifs_readlink,
3101 multifs_unlink ops into methods of process_target.
3102
3103 * target.h (struct process_stratum_target): Remove the target ops.
3104 (class process_target): Add the target ops. Also add
3105 'supports_multifs'.
3106 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
3107 "sys/stat.h".
3108 (process_target::supports_multifs): Define.
3109 (process_target::multifs_open): Define.
3110 (process_target::multifs_readlink): Define.
3111 (process_target::multifs_unlink): Define.
3112
3113 Update the derived classes and callers below.
3114
3115 * hostio.cc (handle_setfs): Update.
3116 (handle_open): Update.
3117 (handle_unlink): Update.
3118 (handle_readlink): Update.
3119 * linux-low.cc (linux_target_ops): Update.
3120 (linux_process_target::supports_multifs): Define.
3121 (linux_process_target::multifs_open): Define.
3122 (linux_process_target::multifs_readlink): Define.
3123 (linux_process_target::multifs_unlink): Define.
3124 * linux-low.h (class linux_process_target): Update.
3125 * lynx-low.cc (lynx_target_ops): Update.
3126 * nto-low.cc (nto_target_ops): Update.
3127 * win32-low.cc (win32_target_ops): Update.
3128
3129 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3130
3131 Turn process_stratum_target's pid_to_exec_file op into a method
3132 of process_target.
3133
3134 * target.h (struct process_stratum_target): Remove the target op.
3135 (class process_target): Add the target op. Also add
3136 'supports_pid_to_exec_file'.
3137 * target.cc (process_target::pid_to_exec_file): Define.
3138 (process_target::supports_pid_to_exec_file): Define.
3139
3140 Update the derived classes and callers below.
3141
3142 * server.cc (handle_qxfer_exec_file): Update.
3143 (handle_query): Update.
3144 * linux-low.cc (linux_target_ops): Update.
3145 (linux_process_target::supports_pid_to_exec_file): Define.
3146 (linux_process_target::pid_to_exec_file): Define.
3147 * linux-low.h (class linux_process_target): Update.
3148 * lynx-low.cc (lynx_target_ops): Update.
3149 * nto-low.cc (nto_target_ops): Update.
3150 * win32-low.cc (win32_target_ops): Update.
3151
3152 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3153
3154 Turn process_stratum_target's supports_range_stepping op into a
3155 method of process_target.
3156
3157 * target.h (struct process_stratum_target): Remove the target op.
3158 (class process_target): Add the target op.
3159 (target_supports_range_stepping): Update the macro.
3160 * target.cc (process_target::supports_range_stepping): Define.
3161
3162 Update the derived classes and callers below.
3163
3164 * linux-low.cc (linux_target_ops): Update.
3165 (linux_supports_range_stepping): Turn into ...
3166 (linux_process_target::supports_range_stepping): ... this.
3167 * linux-low.h (class linux_process_target): Update.
3168 * lynx-low.cc (lynx_target_ops): Update.
3169 * nto-low.cc (nto_target_ops): Update.
3170 * win32-low.cc (win32_target_ops): Update.
3171
3172 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3173
3174 Turn process_stratum_target's btrace-related ops (enable_btrace,
3175 disable_btrace, read_btrace, read_btrace_conf) into methods of
3176 process_target.
3177
3178 * target.h (struct process_stratum_target): Remove the target ops.
3179 (class process_target): Add the target ops.
3180 (target_enable_btrace): Update.
3181 (target_disable_btrace): Update.
3182 (target_read_btrace): Update.
3183 (target_read_btrace_conf): Update.
3184 * target.cc (process_target::enable_btrace): Define.
3185 (process_target::disable_btrace): Define.
3186 (process_target::read_btrace): Define.
3187 (process_target::read_btrace_conf): Define.
3188
3189 Update the derived classes and callers below.
3190
3191 * linux-low.cc (linux_target_ops): Update.
3192 (linux_process_target:enable_btrace): Define as a wrapper around
3193 linux_enable_btrace.
3194 (linux_low_disable_btrace): Turn into ...
3195 (linux_process_target::disable_btrace): ... this.
3196 (linux_low_read_btrace): Turn into ...
3197 (linux_process_target::read_btrace): ... this.
3198 (linux_low_btrace_conf): Turn into ...
3199 (linux_process_target::read_btrace_conf): ... this.
3200 * linux-low.h (class linux_process_target): Update.
3201 * lynx-low.cc (lynx_target_ops): Update.
3202 * nto-low.cc (nto_target_ops): Update.
3203 * win32-low.cc (win32_target_ops): Update.
3204
3205 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3206
3207 Turn process_stratum_target's supports_agent op into a method of
3208 process_target.
3209
3210 * target.h (struct process_stratum_target): Remove the target op.
3211 (class process_target): Add the target op.
3212 (target_supports_agent): Update the macro.
3213 * target.cc (process_target::supports_agent): Define.
3214
3215 Update the derived classes and callers below.
3216
3217 * linux-low.cc (linux_target_ops): Update.
3218 (linux_supports_agent): Turn into ...
3219 (linux_process_target::supports_agent): ... this.
3220 * linux-low.h (class linux_process_target): Update.
3221 * lynx-low.cc (lynx_target_ops): Update.
3222 * nto-low.cc (nto_target_ops): Update.
3223 * win32-low.cc (win32_target_ops): Update.
3224
3225 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3226
3227 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3228 method of process_target.
3229
3230 * target.h (struct process_stratum_target): Remove the target op.
3231 (class process_target): Add the target op. Also add
3232 'supports_qxfer_libraries_svr4'.
3233 * target.cc (process_target::qxfer_libraries_svr4): Define.
3234 (process_target::supports_qxfer_libraries_svr4): Define.
3235
3236 Update the derived classes and callers below.
3237
3238 * server.cc (handle_qxfer_libraries_svr4): Update.
3239 (handle_query): Update.
3240 * linux-low.cc (linux_target_ops): Update.
3241 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3242 (linux_qxfer_libraries_svr4): Turn into ...
3243 (linux_process_target::qxfer_libraries_svr4): ... this.
3244 * linux-low.h (class linux_process_target): Update.
3245 * lynx-low.cc (lynx_target_ops): Update.
3246 * nto-low.cc (nto_target_ops): Update.
3247 * win32-low.cc (win32_target_ops): Update.
3248
3249 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3250
3251 Turn process_stratum_target's supports_disable_randomization op
3252 into a method of process_target.
3253
3254 * target.h (struct process_stratum_target): Remove the target op.
3255 (class process_target): Add the target op.
3256 (target_supports_disable_randomization): Update the macro.
3257 * target.cc (process_target::supports_disable_randomization): Define.
3258
3259 Update the derived classes and callers below.
3260
3261 * linux-low.cc (linux_target_ops): Update.
3262 (linux_supports_disable_randomization): Turn into ...
3263 (linux_process_target::supports_disable_randomization): ... this.
3264 * linux-low.h (class linux_process_target): Update.
3265 * lynx-low.cc (lynx_target_ops): Update.
3266 * nto-low.cc (nto_target_ops): Update.
3267 * win32-low.cc (win32_target_ops): Update.
3268
3269 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3270
3271 Turn process_stratum_target's emit_ops op into a method of
3272 process_target.
3273
3274 * target.h (struct process_stratum_target): Remove the target op.
3275 (class process_target): Add the target op.
3276 (target_emit_ops): Update the macro.
3277 * target.cc (process_target::emit_ops): Define.
3278
3279 Update the derived classes and callers below.
3280
3281 * linux-low.cc (linux_target_ops): Update.
3282 (linux_emit_ops): Turn into ...
3283 (linux_process_target::emit_ops): ... this.
3284 * linux-low.h (class linux_process_target): Update.
3285 * lynx-low.cc (lynx_target_ops): Update.
3286 * nto-low.cc (nto_target_ops): Update.
3287 * win32-low.cc (win32_target_ops): Update.
3288
3289 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3290
3291 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3292 and get_min_fast_tracepoint_insn_len ops into methods of
3293 process_target.
3294
3295 * target.h (struct process_stratum_target): Remove the target ops.
3296 (class process_target): Add the target ops. Also add
3297 'supports_fast_tracepoints'.
3298 (target_supports_fast_tracepoints): Update the macro.
3299 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3300 (install_fast_tracepoint_jump_pad): Update and rename the macro
3301 to ...
3302 (target_install_fast_tracepoint_jump_pad): ... this.
3303 * target.cc (process_target::supports_fast_tracepoints): Define.
3304 (process_target::install_fast_tracepoint_jump_pad): Define.
3305 (process_target::get_min_fast_tracepoint_insn_len): Define.
3306
3307 Update the derived classes and callers below.
3308
3309 * tracepoint.cc (install_fast_tracepoint): Update.
3310 * linux-low.cc (linux_target_ops): Update.
3311 (linux_process_target::supports_fast_tracepoints): Define.
3312 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3313 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3314 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3315 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3316 * linux-low.h (class linux_process_target): Update.
3317 * lynx-low.cc (lynx_target_ops): Update.
3318 * nto-low.cc (nto_target_ops): Update.
3319 * win32-low.cc (win32_target_ops): Update.
3320
3321 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3322
3323 Turn process_stratum_target's stabilize_threads op into a
3324 method of process_target.
3325
3326 * target.h (struct process_stratum_target): Remove the target op.
3327 (class process_target): Add the target op.
3328 (target_stabilize_threads): Update the macro.
3329 * target.cc (process_target::stabilize_threads): Define.
3330
3331 Update the derived classes and callers below.
3332
3333 * server.cc (handle_status): Update.
3334 * tracepoint.cc (cmd_qtdp): Update.
3335 (cmd_qtstart): Update.
3336 * linux-low.cc (linux_target_ops): Update.
3337 (linux_stabilize_threads): Turn into ...
3338 (linux_process_target::stabilize_threads): ... this.
3339 (linux_wait_1): Update.
3340 * linux-low.h (class linux_process_target): Update.
3341 * lynx-low.cc (lynx_target_ops): Update.
3342 * nto-low.cc (nto_target_ops): Update.
3343 * win32-low.cc (win32_target_ops): Update.
3344
3345 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3346
3347 Turn process_stratum_target's pause_all and unpause_all ops
3348 into methods of process_target.
3349
3350 * target.h (struct process_stratum_target): Remove the target ops.
3351 (class process_target): Add the target ops.
3352 (pause_all): Update the macro and rename to...
3353 (target_pause_all): ... this.
3354 (unpause_all): Update the macro and rename to...
3355 (target_unpause_all): ... this.
3356 * target.cc (process_target::pause_all): Define.
3357 (process_target::unpause_all): Define.
3358
3359 Update the derived classes and callers below.
3360
3361 * server.cc (handle_status): Update.
3362 * tracepoint.cc (clear_installed_tracepoints): Update.
3363 (cmd_qtdp): Update.
3364 (cmd_qtstart): Update.
3365 (stop_tracing): Update.
3366 (cmd_qtstatus): Update.
3367 (upload_fast_traceframes): Update.
3368 (run_inferior_command): Update.
3369 * linux-low.cc (linux_target_ops): Update.
3370 (linux_pause_all): Turn into ...
3371 (linux_process_target::pause_all): ... this.
3372 (linux_unpause_all): Turn into ...
3373 (linux_process_target::unpause_all): ... this.
3374 (linux_process_target::prepare_to_access_memory): Update.
3375 (linux_process_target::done_accessing_memory): Update.
3376 * linux-low.h (class linux_process_target): Update.
3377 * lynx-low.cc (lynx_target_ops): Update.
3378 * nto-low.cc (nto_target_ops): Update.
3379 * win32-low.cc (win32_target_ops): Update.
3380
3381 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3382
3383 Turn process_stratum_target's get_tib_address op into a method of
3384 process_target.
3385
3386 * target.h (struct process_stratum_target): Remove the target op.
3387 (class process_target): Add the target op. Also add
3388 'supports_get_tib_address'.
3389 * target.cc (process_target::get_tib_address): Define.
3390 (process_target::supports_get_tib_address): Define.
3391
3392 Update the derived classes and callers below.
3393
3394 * server.cc (handle_query): Update.
3395 * linux-low.cc (win32_target_ops): Update.
3396 * lynx-low.cc (lynx_target_ops): Update.
3397 * nto-low.cc (nto_target_ops): Update.
3398 * win32-low.cc (win32_target_ops): Update.
3399 (win32_process_target::supports_get_tib_address): Define.
3400 (win32_get_tib_address): Turn into ...
3401 (win32_process_target::get_tib_address): ... this.
3402 * win32-low.h (class win32_process_target): Update.
3403
3404 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3405
3406 Turn process_stratum_target's thread_stopped op into a method of
3407 process_target.
3408
3409 * target.h (struct process_stratum_target): Remove the target op.
3410 (class process_target): Add the target op. Also add
3411 'supports_thread_stopped'.
3412 (target_thread_stopped): Update the macro.
3413 * target.cc (process_target::thread_stopped): Define.
3414 (process_target::supports_thread_stopped): Define.
3415 (prepare_to_access_memory): Update.
3416
3417 Update the derived classes and callers below.
3418
3419 * server.cc (queue_stop_reply_callback): Update.
3420 * linux-low.cc (linux_target_ops): Update.
3421 (linux_process_target::supports_thread_stopped): Define.
3422 (linux_thread_stopped): Turn into ...
3423 (linux_process_target::thread_stopped): ... this.
3424 * linux-low.h (class linux_process_target): Update.
3425 * lynx-low.cc (lynx_target_ops): Update.
3426 * nto-low.cc (nto_target_ops): Update.
3427 * win32-low.cc (win32_target_ops): Update.
3428
3429 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3430
3431 Turn process_stratum_target's read_pc and write_pc ops into
3432 methods of process_target.
3433
3434 * target.h (struct process_stratum_target): Remove the target ops.
3435 (class process_target): Add the target ops.
3436 * target.cc (process_target::read_pc): Define.
3437 (process_target::write_pc): Define.
3438
3439 Update the derived classes and callers below.
3440
3441 * regcache.cc (regcache_read_pc): Update.
3442 (regcache_write_pc): Update.
3443 * linux-low.cc (linux_target_ops): Update.
3444 (linux_read_pc): Turn into ...
3445 (linux_process_target::read_pc): ... this.
3446 (linux_write_pc): Turn into ...
3447 (linux_process_target::write_pc): ... this.
3448 * linux-low.h (class linux_process_target): Update.
3449 * lynx-low.cc (lynx_target_ops): Update.
3450 * nto-low.cc (nto_target_ops): Update.
3451 * win32-low.cc (win32_target_ops): Update.
3452
3453 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3454
3455 Turn process_stratum_target's supports_tracepoints op into a
3456 method of process_target.
3457
3458 * target.h (struct process_stratum_target): Remove the target op.
3459 (class process_target): Add the target op.
3460 (target_supports_tracepoints): Update the macro.
3461 * target.cc (process_target::supports_tracepoints): Define.
3462
3463 Update the derived classes and callers below.
3464
3465 * linux-low.cc (linux_target_ops): Update.
3466 (linux_supports_tracepoints): Turn into ...
3467 (linux_process_target::supports_tracepoints): ... this.
3468 * linux-low.h (class linux_process_target): Update.
3469 * lynx-low.cc (lynx_target_ops): Update.
3470 * nto-low.cc (nto_target_ops): Update.
3471 * win32-low.cc (win32_target_ops): Update.
3472
3473 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3474
3475 Turn process_stratum_target's process_qsupported op into a method
3476 of process_target.
3477
3478 * target.h (struct process_stratum_target): Remove the target op.
3479 (class process_target): Add the target op.
3480 (target_process_qsupported): Update the macro.
3481 * target.cc (process_target::process_qsupported): Define.
3482
3483 Update the derived classes and callers below.
3484
3485 * linux-low.cc (linux_target_ops): Update.
3486 (linux_process_qsupported): Turn into ...
3487 (linux_process_target::process_qsupported): ... this.
3488 * linux-low.h (class linux_process_target): Update.
3489 * lynx-low.cc (lynx_target_ops): Update.
3490 * nto-low.cc (nto_target_ops): Update.
3491 * win32-low.cc (win32_target_ops): Update.
3492
3493 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3494
3495 Turn process_stratum_target's read_loadmap op into a method of
3496 process_target.
3497
3498 * target.h (struct process_stratum_target): Remove the target op.
3499 (class process_target): Add the target op. Also add
3500 'supports_read_loadmap'.
3501 * target.cc (process_target::read_loadmap): Define.
3502 (process_target::supports_read_loadmap): Define.
3503
3504 Update the derived classes and callers below.
3505
3506 * server.cc (handle_qxfer_fdpic): Update.
3507 (handle_query): Update.
3508 * linux-low.cc (linux_target_ops): Update.
3509 (linux_process_target::supports_read_loadmap): Define.
3510 (linux_read_loadmap): Turn into ...
3511 (linux_process_target::read_loadmap): ... this.
3512 * linux-low.h (class linux_process_target): Update.
3513 * lynx-low.cc (lynx_target_ops): Update.
3514 * nto-low.cc (nto_target_ops): Update.
3515 * win32-low.cc (win32_target_ops): Update.
3516
3517 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3518
3519 Turn process_stratum_target's core_of_thread op into a method of
3520 process_target.
3521
3522 * target.h (struct process_stratum_target): Remove the target op.
3523 (class process_target): Add the target op.
3524 (target_core_of_thread): Update the macro.
3525 * target.cc (process_target::core_of_thread): Define.
3526
3527 Update the derived classes and callers below.
3528
3529 * linux-low.cc (linux_target_ops): Update.
3530 (linux_process_target::core_of_thread): Define.
3531 * linux-low.h (class linux_process_target): Update.
3532 * lynx-low.cc (lynx_target_ops): Update.
3533 * nto-low.cc (nto_target_ops): Update.
3534 * win32-low.cc (win32_target_ops): Update.
3535
3536 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3537
3538 Turn process_stratum_target's handle_monitor_command op into a
3539 method of process_target.
3540
3541 * target.h (struct process_stratum_target): Remove the target op.
3542 (class process_target): Add the target op.
3543 (target_handle_monitor_command): Update the macro.
3544 * target.cc (process_target::handle_monitor_command): Define.
3545
3546 Update the derived classes and callers below.
3547
3548 * server.cc (handle_query): Update.
3549 * linux-low.cc (linux_target_ops): Update.
3550 (linux_process_target::handle_monitor_command): Define.
3551 * linux-low.h (class linux_process_target): Update.
3552 * lynx-low.cc (lynx_target_ops): Update.
3553 * nto-low.cc (nto_target_ops): Update.
3554 * win32-low.cc (win32_target_ops): Update.
3555
3556 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3557
3558 Turn process_stratum_target's handle_new_gdb_connection op into a
3559 method of process_target.
3560
3561 * target.h (struct process_stratum_target): Remove the target op.
3562 (class process_target): Add the target op.
3563 (target_handle_new_gdb_connection): Update the macro.
3564 * target.cc (process_target::handle_new_gdb_connection): Define.
3565
3566 Update the derived classes and callers below.
3567
3568 * linux-low.cc (linux_target_ops): Update.
3569 (linux_handle_new_gdb_connection): Turn into ...
3570 (linux_process_target::handle_new_gdb_connection): ... this.
3571 * linux-low.h (class linux_process_target): Update.
3572 * lynx-low.cc (lynx_target_ops): Update.
3573 * nto-low.cc (nto_target_ops): Update.
3574 * win32-low.cc (win32_target_ops): Update.
3575
3576 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3577
3578 Turn process_stratum_target's supports_fork_events,
3579 supports_vfork_events, and supports_exec_events ops into methods
3580 of process_target.
3581
3582 * target.h (struct process_stratum_target): Remove the target ops.
3583 (class process_target): Add the target ops.
3584 (target_supports_fork_events): Update the macro.
3585 (target_supports_vfork_events): Update the macro.
3586 (target_supports_exec_events): Update the macro.
3587 * target.cc (process_target::supports_fork_events): Define.
3588 (process_target::supports_vfork_events): Define.
3589 (process_target::supports_exec_events): Define.
3590
3591 Update the derived classes and callers below.
3592
3593 * linux-low.cc (linux_target_ops): Update.
3594 (linux_supports_fork_events): Turn into ...
3595 (linux_process_target::supports_fork_events): ... this.
3596 (linux_supports_vfork_events): Turn into ...
3597 (linux_process_target::supports_vfork_events): ... this.
3598 (linux_supports_exec_events): Turn into ...
3599 (linux_process_target::supports_exec_events): ... this.
3600 * linux-low.h (class linux_process_target): Update.
3601 * lynx-low.cc (lynx_target_ops): Update.
3602 * nto-low.cc (nto_target_ops): Update.
3603 * win32-low.cc (win32_target_ops): Update.
3604
3605 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3606
3607 Turn process_stratum_target's supports_multi_process op into a
3608 method of process_target.
3609
3610 * target.h (struct process_stratum_target): Remove the target op.
3611 (class process_target): Add the target op.
3612 * target.cc (process_target::supports_multi_process): Define.
3613 (target_supports_multi_process): Update.
3614
3615 Update the derived classes and callers below.
3616
3617 * linux-low.cc (linux_target_ops): Update.
3618 (linux_supports_multi_process): Turn into ...
3619 (linux_process_target::supports_multi_process): ... this.
3620 * linux-low.h (class linux_process_target): Update.
3621 * lynx-low.cc (lynx_target_ops): Update.
3622 * nto-low.cc (nto_target_ops): Update.
3623 * win32-low.cc (win32_target_ops): Update.
3624
3625 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3626
3627 Turn process_stratum_target's supports_non_stop, async, and
3628 start_non_stop ops into methods of process_target.
3629
3630 * target.h (struct process_stratum_target): Remove the target ops.
3631 (class process_target): Add the target ops.
3632 (target_supports_non_stop): Update the macro.
3633 (target_async): Update the macro.
3634 (start_non_stop): Remove declaration.
3635 * target.cc (process_target::supports_non_stop): Define.
3636 (process_target::async): Define.
3637 (process_target::start_non_stop): Define.
3638 (start_non_stop): Remove.
3639
3640 Update the derived classes and callers below.
3641
3642 * server.cc (handle_qxfer_siginfo): Update.
3643 (handle_query): Update.
3644 * linux-low.cc (linux_target_ops): Update.
3645 (linux_supports_non_stop): Turn into ...
3646 (linux_process_target::supports_non_stop): ... this.
3647 (linux_async): Turn into ...
3648 (linux_process_target::async): ... this.
3649 (linux_start_non_stop): Turn into ...
3650 (linux_process_target::start_non_stop): ... this.
3651 * linux-low.h (class linux_process_target): Update.
3652 * lynx-low.cc (lynx_target_ops): Update.
3653 * nto-low.cc (nto_target_ops): Update.
3654 (nto_supports_non_stop): Remove; rely on the default behavior
3655 instead.
3656 * win32-low.cc (win32_target_ops): Update.
3657
3658 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3659
3660 Turn process_stratum_target's qxfer_siginfo op into a method of
3661 process_target.
3662
3663 * target.h (struct process_stratum_target): Remove the target op.
3664 (class process_target): Add the target op. Also add
3665 'supports_qxfer_siginfo'.
3666 * target.cc (process_target::qxfer_siginfo): Define.
3667 (process_target::supports_qxfer_siginfo): Define.
3668
3669 Update the derived classes and callers below.
3670
3671 * server.cc (handle_qxfer_siginfo): Update.
3672 (handle_query): Update.
3673 * linux-low.cc (linux_target_ops): Update.
3674 (linux_process_target::supports_qxfer_siginfo): Define.
3675 (linux_xfer_siginfo): Turn into ...
3676 (linux_process_target::qxfer_siginfo): ... this.
3677 * linux-low.h (class linux_process_target): Update.
3678 * lynx-low.cc (lynx_target_ops): Update.
3679 * nto-low.cc (nto_target_ops): Update.
3680 * win32-low.cc (win32_target_ops): Update.
3681
3682 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3683
3684 Turn process_stratum_target's qxfer_osdata op into a method of
3685 process_target.
3686
3687 * target.h (struct process_stratum_target): Remove the target op.
3688 (class process_target): Add the target op. Also add
3689 'supports_qxfer_osdata'.
3690 * target.cc (process_target::qxfer_osdata): Define.
3691 (process_target::supports_qxfer_osdata): Define.
3692
3693 Update the derived classes and callers below.
3694
3695 * server.cc (handle_qxfer_osdata): Update.
3696 (handle_query): Update.
3697 * linux-low.cc (linux_target_ops): Update.
3698 (linux_process_target::supports_qxfer_osdata): Define.
3699 (linux_qxfer_osdata): Turn into ...
3700 (linux_process_target::qxfer_osdata): ... this.
3701 * linux-low.h (class linux_process_target): Update.
3702 * lynx-low.cc (lynx_target_ops): Update.
3703 * nto-low.cc (nto_target_ops): Update.
3704 * win32-low.cc (win32_target_ops): Update.
3705
3706 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3707
3708 Turn process_stratum_target's hostio_last_error op into a
3709 method of process_target.
3710
3711 * target.h (struct process_stratum_target): Remove the target op.
3712 (class process_target): Add the target op.
3713 * target.cc: Add "hostio.h" to includes.
3714 (process_target::hostio_last_error): Define.
3715
3716 Update the derived classes and callers below.
3717
3718 * hostio.cc (hostio_error): Update.
3719 * linux-low.cc: Remove "hostio.h" from includes.
3720 (linux_target_ops): Update.
3721 * lynx-low.cc (lynx_target_ops): Update.
3722 * nto-low.cc (nto_target_ops): Update.
3723 * win32-low.h (class win32_process_target): Update.
3724 * win32-low.cc (win32_target_ops): Update.
3725 (wince_hostio_last_error): Turn into ...
3726 (win32_process_target::hostio_last_error): ... this.
3727
3728 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3729
3730 Turn process_stratum_target's get_tls_address op into a method of
3731 process_target.
3732
3733 * target.h (struct process_stratum_target): Remove the target op.
3734 (class process_target): Add the target op. Also add
3735 'supports_get_tls_address'.
3736 * target.cc (process_target::get_tls_address): Define.
3737 (process_target::supports_get_tls_address): Define.
3738
3739 Update the derived classes and callers below.
3740
3741 * server.cc (handle_query): Update.
3742 * linux-low.cc (linux_target_ops): Update.
3743 (linux_process_target::supports_get_tls_address): Define.
3744 (linux_process_target::get_tls_address): Define.
3745 * linux-low.h (class linux_process_target): Update.
3746 * lynx-low.cc (lynx_target_ops): Update.
3747 * nto-low.cc (nto_target_ops): Update.
3748 * win32-low.cc (win32_target_ops): Update.
3749
3750 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3751
3752 Turn process_stratum_target's read_offsets op into a method of
3753 process_target.
3754
3755 * target.h (struct process_stratum_target): Remove the target op.
3756 (class process_target): Add the target op. Also add
3757 'supports_read_offsets'.
3758 * target.cc (process_target::read_offsets): Define.
3759 (process_target::supports_read_offsets): Define.
3760
3761 Update the derived classes and callers below.
3762
3763 * server.cc (handle_query): Update.
3764 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3765 (linux_target_ops): Update.
3766 (linux_process_target::supports_read_offsets): Define.
3767 (linux_read_offsets): Turn into ...
3768 (linux_process_target::read_offsets): ... this.
3769 * linux-low.h (class linux_process_target): Update.
3770 * lynx-low.cc (lynx_target_ops): Update.
3771 * nto-low.cc (nto_target_ops): Update.
3772 * win32-low.cc (win32_target_ops): Update.
3773
3774 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3775
3776 Turn process_stratum_target's stopped_by_watchpoint and
3777 stopped_data_address ops into methods of process_target.
3778
3779 * target.h (struct process_stratum_target): Remove the target ops.
3780 (class process_target): Add the target ops.
3781 * target.cc (process_target::stopped_by_watchpoint): Define.
3782 (process_target::stopped_data_address): Define.
3783
3784 Update the derived classes and callers below.
3785
3786 * remote-utils.cc (prepare_resume_reply): Update.
3787 * linux-low.cc (linux_target_ops): Update.
3788 (linux_stopped_by_watchpoint): Turn into ...
3789 (linux_process_target::stopped_by_watchpoint): ... this.
3790 (linux_stopped_data_address): Turn into ...
3791 (linux_process_target::stopped_data_address): ... this.
3792 * linux-low.h (class linux_process_target): Update.
3793 * lynx-low.cc (lynx_target_ops): Update.
3794 * nto-low.cc (nto_target_ops): Update.
3795 (nto_stopped_by_watchpoint): Turn into ...
3796 (nto_process_target::stopped_by_watchpoint): ... this.
3797 (nto_stopped_data_address): Turn into ...
3798 (nto_process_target::stopped_data_address): ... this.
3799 * nto-low.h (class nto_process_target): Update.
3800 * win32-low.cc (win32_target_ops): Update.
3801 (win32_stopped_by_watchpoint): Turn into ...
3802 (win32_process_target::stopped_by_watchpoint): ... this.
3803 (win32_stopped_data_address): Turn into ...
3804 (win32_process_target::stopped_data_address): ... this.
3805 * win32-low.h (class win32_process_target): Update.
3806
3807 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3808
3809 Turn process_stratum_target's supports_hardware_single_step op into
3810 a method of process_target.
3811
3812 * target.h (struct process_stratum_target): Remove the target op.
3813 (class process_target): Add the target op.
3814 (target_supports_hardware_single_step): Update the macro.
3815 (target_can_do_hardware_single_step): Remove declaration.
3816 * target.cc (process_target::supports_hardware_single_step): Define.
3817 (target_can_do_hardware_single_step): Remove.
3818
3819 Update the derived classes and callers below.
3820
3821 * linux-low.h (class linux_process_target): Update.
3822 * linux-low.cc (linux_target_ops): Update.
3823 (linux_supports_hardware_single_step): Turn into ...
3824 (linux_process_target::supports_hardware_single_step): ... this.
3825 * lynx-low.h (class lynx_process_target): Update.
3826 * lynx-low.cc (lynx_target_ops): Update.
3827 (lynx_process_target::supports_hardware_single_step): Define.
3828 * nto-low.h (class nto_process_target): Update.
3829 * nto-low.cc (nto_target_ops): Update.
3830 (nto_process_target::supports_hardware_single_step): Define.
3831 * win32-low.h (class win32_process_target): Update.
3832 * win32-low.cc (win32_target_ops): Update.
3833 (win32_process_target::supports_hardware_single_step): Define.
3834
3835 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3836
3837 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3838 ops into methods of process_target.
3839
3840 * target.h (struct process_stratum_target): Remove the target ops.
3841 (class process_target): Add the target ops.
3842 (target_stopped_by_hw_breakpoint): Update the macro.
3843 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3844 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3845 (process_target::supports_stopped_by_hw_breakpoint): Define.
3846
3847 Update the derived classes and callers below.
3848
3849 * linux-low.cc (linux_target_ops): Update.
3850 (linux_stopped_by_hw_breakpoint): Turn into ...
3851 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3852 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3853 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3854 * linux-low.h (class linux_process_target): Update.
3855 * lynx-low.cc (lynx_target_ops): Update.
3856 * nto-low.cc (nto_target_ops): Update.
3857 * win32-low.cc (win32_target_ops): Update.
3858
3859 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3860
3861 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3862 ops into methods of process_target.
3863
3864 * target.h (struct process_stratum_target): Remove the target ops.
3865 (class process_target): Add the target ops.
3866 (target_stopped_by_sw_breakpoint): Update the macro.
3867 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3868 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3869 (process_target::supports_stopped_by_sw_breakpoint): Define.
3870
3871 Update the derived classes and callers below.
3872
3873 * linux-low.cc (linux_target_ops): Update.
3874 (linux_stopped_by_sw_breakpoint): Turn into ...
3875 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3876 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3877 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3878 * linux-low.h (class linux_process_target): Update.
3879 * lynx-low.cc (lynx_target_ops): Update.
3880 * nto-low.cc (nto_target_ops): Update.
3881 * win32-low.cc (win32_target_ops): Update.
3882
3883 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3884
3885 Turn process_stratum_target's insert_point and remove_point ops
3886 into methods of process_target.
3887
3888 * target.h (struct process_stratum_target): Remove the target ops.
3889 (class process_target): Add the target ops.
3890 * target.cc (process_target::insert_point): Define.
3891 (process_target::remove_point): Define.
3892
3893 Update the derived classes and callers below.
3894
3895 * mem-break.cc (set_raw_breakpoint_at): Update.
3896 (delete_raw_breakpoint): Update.
3897 (uninsert_raw_breakpoint): Update.
3898 (reinsert_raw_breakpoint): Update.
3899 * linux-low.cc (linux_target_ops): Update.
3900 (linux_insert_point): Turn into ...
3901 (linux_process_target::insert_point): ... this.
3902 (linux_remove_point): Turn into ...
3903 (linux_process_target::remove_point): ... this.
3904 * linux-low.h (class linux_process_target): Update.
3905 * lynx-low.cc (lynx_target_ops): Update.
3906 * nto-low.cc (nto_target_ops): Update.
3907 (nto_insert_point): Turn into ...
3908 (nto_process_target::insert_point): ... this.
3909 (nto_remove_point): Turn into ...
3910 (nto_process_target::remove_point): ... this.
3911 * nto-low.h (class nto_process_target): Update.
3912 * win32-low.cc (win32_target_ops): Update.
3913 (win32_insert_point): Turn into ...
3914 (win32_process_target::insert_point): ... this.
3915 (win32_remove_point): Turn into ...
3916 (win32_process_target::remove_point): ... this.
3917 * win32-low.h (class win32_process_target): Update.
3918
3919 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3920
3921 Turn process_stratum_target's supports_z_point_type op into a
3922 method of process_target.
3923
3924 * target.h (struct process_stratum_target): Remove the target op.
3925 (class process_target): Add the target op.
3926 * target.cc (process_target::supports_z_point_type): Define.
3927
3928 Update the derived classes and callers below.
3929
3930 * mem-break.cc (z_type_supported): Update.
3931 * linux-low.cc (linux_target_ops): Update.
3932 (linux_supports_z_point_type): Turn into ...
3933 (linux_process_target::supports_z_point_type): ... this.
3934 * linux-low.h (class linux_process_target): Update.
3935 * lynx-low.cc (lynx_target_ops): Update.
3936 * nto-low.cc (nto_target_ops): Update.
3937 (nto_supports_z_point_type): Turn into ...
3938 (nto_process_target::supports_z_point_type): ... this.
3939 * nto-low.h (class nto_process_target): Update.
3940 * win32-low.cc (win32_target_ops): Update.
3941 (win32_supports_z_point_type): Turn into ...
3942 (win32_process_target::supports_z_point_type): ... this.
3943 * win32-low.h (class win32_process_target): Update.
3944
3945 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3946
3947 Turn process_stratum_target's read_auxv op into a method of
3948 process_target.
3949
3950 * target.h (class process_stratum_target): Remove the target op.
3951 (struct process_target): Add the target op. Also add
3952 'supports_read_auxv'.
3953 * target.cc (process_target::read_auxv): Define.
3954 (process_target::supports_read_auxv): Define.
3955
3956 Update the derived classes and callers below.
3957
3958 * server.cc (handle_qxfer_auxv): Update.
3959 (handle_query): Update.
3960 * linux-low.cc (linux_target_ops): Update.
3961 (linux_process_target::supports_read_auxv): Define.
3962 (linux_read_auxv): Turn into ...
3963 (linux_process_target::read_auxv): ... this.
3964 * linux-low.h (class linux_process_target): Update.
3965 * lynx-low.cc (lynx_target_ops): Update.
3966 * nto-low.cc (nto_target_ops): Update.
3967 (nto_process_target::supports_read_auxv): Define.
3968 (nto_read_auxv): Turn into ...
3969 (nto_process_target::read_auxv): ... this.
3970 * nto-low.h (class nto_process_target): Update.
3971 * win32-low.cc (win32_target_ops): Update.
3972
3973 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3974
3975 Turn process_stratum_target's request_interrupt op into a method of
3976 process_target.
3977
3978 * target.h (struct process_stratum_target): Remove the target op.
3979 (class process_target): Add the target op.
3980
3981 Update the derived classes and callers below.
3982
3983 * remote-utils.cc (putpkt_binary_1): Update.
3984 (input_interrupt): Update.
3985 (getpkt): Update.
3986 * server.cc (handle_v_requests): Update.
3987 * linux-low.cc (linux_target_ops): Update.
3988 (linux_request_interrupt): Turn into ...
3989 (linux_process_target::request_interrupt): ... this.
3990 * linux-low.h (class linux_process_target): Update.
3991 * lynx-low.cc (lynx_target_ops): Update.
3992 (lynx_request_interrupt): Turn into ...
3993 (lynx_process_target::request_interrupt): ... this.
3994 * lynx-low.h (class lynx_process_target): Update.
3995 * nto-low.cc (nto_target_ops): Update.
3996 (nto_request_interrupt): Turn into ...
3997 (nto_process_target::request_interrupt): ... this.
3998 * nto-low.h (class nto_process_target): Update.
3999 * win32-low.cc (win32_target_ops): Update.
4000 (win32_request_interrupt): Turn into ...
4001 (win32_process_target::request_interrupt): ... this.
4002 * win32-low.h (class win32_process_target): Update.
4003
4004 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4005
4006 Turn process_stratum_target's look_up_symbols op into a method of
4007 process_target.
4008
4009 * target.h (struct process_stratum_target): Remove the target op.
4010 (class process_target): Add the target op.
4011 * target.cc (process_target::look_up_symbols): Define.
4012
4013 Update the derived classes and callers below.
4014
4015 * server.cc (handle_query): Update.
4016 * linux-low.cc (linux_target_ops): Update.
4017 (linux_look_up_symbols): Turn into ...
4018 (linux_process_target::look_up_symbols): ... this.
4019 * linux-low.h (class linux_process_target): Update.
4020 * lynx-low.cc (lynx_target_ops): Update.
4021 * nto-low.cc (nto_target_ops): Update.
4022 * win32-low.cc (win32_target_ops): Update.
4023
4024 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4025
4026 Turn process_stratum_target's read_memory and write_memory
4027 ops into methods of process_target.
4028
4029 * target.h (struct process_stratum_target): Remove the target ops.
4030 (class process_target): Add the target ops.
4031
4032 Update the derived classes and callers below.
4033
4034 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
4035 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
4036 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
4037 (arm_get_syscall_trapinfo): Update.
4038 * linux-cris-low.cc (cris_breakpoint_at): Update.
4039 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
4040 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
4041 * linux-mips-low.cc (mips_breakpoint_at): Update.
4042 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
4043 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
4044 * linux-sh-low.cc (sh_breakpoint_at): Update.
4045 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
4046 (sparc_store_gregset_from_stack): Update.
4047 (sparc_breakpoint_at): Update.
4048 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
4049 * linux-tile-low.cc (tile_breakpoint_at): Update.
4050 * linux-x86-low.cc (x86_breakpoint_at): Update.
4051 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
4052 * mem-brea.cc (insert_memory_breakpoint): Update.
4053 (validate_inserted_breakpoint): Update.
4054 * target.cc (read_inferior_memory): Update.
4055 (target_write_memory): Update.
4056 * linux-low.cc (linux_target_ops): Update.
4057 (linux_read_memory): Make a wrapper around the read_memory target
4058 op call.
4059 (linux_process_target::read_memory): Rename from linux_read_memory.
4060 (linux_write_memory): Turn into ...
4061 (linux_process_target::write_memory): ... this.
4062 * linux-low.h (class linux_process_target): Update.
4063 * lynx-low.cc (lynx_target_ops): Update.
4064 (lynx_read_memory): Turn into ...
4065 (lynx_process_target::read_memory): ... this.
4066 (lynx_write_memory): Turn into ...
4067 (lynx_process_target::write_memory): ... this.
4068 * lynx-low.h (class lynx_process_target): Update.
4069 * nto-low.cc (nto_target_ops): Update.
4070 (nto_read_memory): Turn into ...
4071 (nto_process_target::read_memory): ... this.
4072 (nto_write_memory): Turn into ...
4073 (nto_process_target::write_memory): ... this.
4074 * nto-low.h (class nto_process_target): Update.
4075 * win32-low.cc (win32_target_ops): Update.
4076 (win32_read_inferior_memory): Turn into ...
4077 (win32_process_target::read_memory): ... this.
4078 (win32_write_inferior_memory): Turn into ...
4079 (win32_process_target::write_memory): ... this.
4080 * win32-low.h (class win32_process_target): Update.
4081
4082 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4083
4084 Turn process_stratum_target's prepare_to_access_memory and
4085 done_accessing_memory ops into methods of process_target.
4086
4087 * target.h (struct process_stratum_target): Remove the target ops.
4088 (class process_target): Add the target ops.
4089 * target.cc (process_target::prepare_to_access_memory): Define.
4090 (process_target::done_accessing_memory): Define.
4091 (prepare_to_access_memory): Update.
4092 (done_accessing_memory): Update.
4093
4094 Update the derived classes and callers below.
4095
4096 * linux-low.cc (linux_target_ops): Update.
4097 (linux_prepare_to_access_memory): Turn into ...
4098 (linux_process_target::prepare_to_access_memory): ... this.
4099 (linux_done_accessing_memory): Turn into ...
4100 (linux_process_target::done_accessing_memory): ... this.
4101 * linux-low.h (class linux_process_target): Update.
4102 * lynx-low.cc (lynx_target_ops): Update.
4103 * nto-low.cc (nto_target_ops): Update.
4104 * win32-low.cc (win32_target_ops): Update.
4105
4106 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4107
4108 Turn process_stratum_target's fetch_registers and store_registers
4109 ops into methods of process_target.
4110
4111 * target.h (struct process_stratum_target): Remove the target ops.
4112 (class process_target): Add the target ops.
4113 (fetch_inferior_registers): Update the macro.
4114 (store_inferior_registers): Update the macro.
4115
4116 Update the derived classes and callers below.
4117
4118 * linux-low.cc (linux_target_ops): Update.
4119 (linux_fetch_registers): Turn into ...
4120 (linux_process_target::fetch_registers): ... this.
4121 (linux_store_registers): Turn into ...
4122 (linux_process_target::store_registers): ... this.
4123 * linux-low.h (class linux_process_target): Update.
4124 * lynx-low.cc (lynx_target_ops): Update.
4125 (lynx_fetch_registers): Turn into ...
4126 (lynx_process_target::fetch_registers): ... this.
4127 (lynx_store_registers): Turn into ...
4128 (lynx_process_target::store_registers): ... this.
4129 * lynx-low.h (class lynx_process_target): Update.
4130 * nto-low.cc (nto_target_ops): Update.
4131 (nto_fetch_registers): Turn into ...
4132 (nto_process_target::fetch_registers): ... this.
4133 (nto_store_registers): Turn into ...
4134 (nto_process_target::store_registers): ... this.
4135 * nto-low.h (class nto_process_target): Update.
4136 * win32-low.cc (win32_target_ops): Update.
4137 (win32_fetch_inferior_registers): Turn into ...
4138 (win32_process_target::fetch_registers): ... this.
4139 (win32_store_inferior_registers): Turn into ...
4140 (win32_process_target::store_registers): ... this.
4141 * win32-low.h (class win32_process_target): Update.
4142
4143 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4144
4145 Turn process_stratum_target's wait op into a method of
4146 process_target.
4147
4148 * target.h (struct process_stratum_target): Remove the target op.
4149 (class process_target): Add the target op.
4150
4151 Update the derived classes and callers below.
4152
4153 * target.cc (target_wait): Update.
4154 * linux-low.cc (linux_target_ops): Update.
4155 (linux_wait): Turn into ...
4156 (linux_process_target::wait): ... this.
4157 * linux-low.h (class linux_process_target): Update.
4158 * lynx-low.cc (lynx_target_ops): Update.
4159 (lynx_wait): Turn into ...
4160 (lynx_process_target::wait): ... this.
4161 * lynx-low.h (class lynx_process_target): Update.
4162 * nto-low.cc (nto_target_ops): Update.
4163 (nto_wait): Turn into ...
4164 (nto_process_target::wait): ... this.
4165 * nto-low.h (class nto_process_target): Update.
4166 * win32-low.cc (win32_target_ops): Update.
4167 (win32_wait): Turn into ...
4168 (win32_process_target::wait): ... this.
4169 (do_initial_child_stuff): Update.
4170 * win32-low.h (class win32_process_target): Update.
4171
4172 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4173
4174 Turn process_stratum_target's resume op into a method of
4175 process_target.
4176
4177 * target.h (struct process_stratum_target): Remove the target op.
4178 (class process_target): Add the target op.
4179
4180 Update the derived classes and callers below.
4181
4182 * server.cc (resume): Update.
4183 * target.cc (target_stop_and_wait): Update.
4184 (target_continue_no_signal): Update.
4185 (target_continue): Update.
4186 * linux-low.cc (linux_target_ops): Update.
4187 (linux_resume): Turn into ...
4188 (linux_process_target::resume): ... this.
4189 * linux-low.h (class linux_process_target): Update.
4190 * lynx-low.cc (lynx_target_ops): Update.
4191 (lynx_resume): Turn into ...
4192 (lynx_process_target::resume): ... this.
4193 * lynx-low.h (class lynx_process_target): Update.
4194 * nto-low.cc (nto_target_ops): Update.
4195 (nto_resume): Turn into ...
4196 (nto_process_target::resume): ... this.
4197 * nto-low.h (class nto_process_target): Update.
4198 * win32-low.cc (win32_target_ops): Update.
4199 (win32_resume): Turn into ...
4200 (win32_process_target::resume): ... this.
4201 (win32_process_target::detach): Update.
4202 (do_initial_child_stuff): Update.
4203 * win32-low.h (class win32_process_target): Update.
4204
4205 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4206
4207 Turn process_stratum_target's thread_alive op into a method of
4208 process_target.
4209
4210 * target.h (struct process_stratum_target): Remove the target op.
4211 (class process_target): Add the target op.
4212 (mythread_alive): Update the macro.
4213
4214 Update the derived classes and callers below.
4215
4216 * linux-low.cc (linux_target_ops): Update.
4217 (linux_thread_alive): Turn into ...
4218 (linux_process_target::thread_alive): ... this.
4219 (wait_for_sigstop): Update.
4220 * linux-low.h (class linux_process_target): Update.
4221 * lynx-low.cc (lynx_target_ops): Update.
4222 (lynx_thread_alive): Turn into ...
4223 (lynx_process_target::thread_alive): ... this.
4224 * lynx-low.h (class lynx_process_target): Update.
4225 * nto-low.cc (nto_target_ops): Update.
4226 (nto_thread_alive): Turn into ...
4227 (nto_process_target::thread_alive): ... this.
4228 * nto-low.h (class nto_process_target): Update.
4229 * win32-low.cc (win32_target_ops): Update.
4230 (win32_thread_alive): Turn into ...
4231 (win32_process_target::thread_alive): ... this.
4232 * win32-low.h (class win32_process_target): Update.
4233
4234 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4235
4236 Turn process_stratum_target's join op into a method of
4237 process_target.
4238
4239 * target.h (struct process_stratum_target): Remove the target op.
4240 (class process_target): Add the target op.
4241 (join_inferior): Update the macro.
4242
4243 Update the derived classes and callers below.
4244
4245 * linux-low.cc (linux_target_ops): Update.
4246 (linux_join): Turn into ...
4247 (linux_process_target::join): ... this.
4248 * linux-low.h (class linux_process_target): Update.
4249 * lynx-low.cc (lynx_target_ops): Update.
4250 (lynx_join): Turn into ...
4251 (lynx_process_target::join): ... this.
4252 * lynx-low.h (class lynx_process_target): Update.
4253 * nto-low.cc (nto_target_ops): Update.
4254 (nto_process_target::join): Define.
4255 * nto-low.h (class nto_process_target): Update.
4256 * win32-low.cc (win32_target_ops): Update.
4257 (win32_join): Turn into ...
4258 (win32_process_target::join): ... this.
4259 * win32-low.h (class win32_process_target): Update.
4260
4261 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4262
4263 Turn process_stratum_target's mourn op into a method of
4264 process_target.
4265
4266 * target.h (struct process_stratum_target): Remove the target op.
4267 (class process_target): Add the target op.
4268
4269 Update the derived classes and callers below.
4270
4271 * target.cc (target_mourn_inferior): Update.
4272 * linux-low.cc (linux_target_ops): Update.
4273 (linux_mourn): Turn into ...
4274 (linux_process_target::mourn): ... this.
4275 (handle_extended_wait): Update.
4276 (linux_process_target::kill): Update.
4277 (linux_process_target::detach): Update.
4278 * linux-low.h (class linux_process_target): Update.
4279 * lynx-low.cc (lynx_target_ops): Update.
4280 (lynx_mourn): Turn into ...
4281 (lynx_process_target::mourn): ... this.
4282 * lynx-low.h (class lynx_process_target): Update.
4283 * nto-low.cc (nto_target_ops): Update.
4284 (nto_mourn): Turn into ...
4285 (nto_process_target::mourn): ... this.
4286 * nto-low.h (class nto_process_target): Update.
4287 * win32-low.cc (win32_target_ops): Update.
4288 (win32_mourn): Turn into ...
4289 (win32_process_target::mourn): ... this.
4290 * win32-low.h (class win32_process_target): Update.
4291
4292 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4293
4294 Turn process_stratum_target's detach op into a method of
4295 process_target.
4296
4297 * target.h (struct process_stratum_target): Remove the target op.
4298 (class process_target): Add the target op.
4299 (detach_inferior): Update the macro.
4300
4301 Update the derived classes and callers below.
4302
4303 * linux-low.cc (linux_target_ops): Update.
4304 (linux_detach): Turn into ...
4305 (linux_process_target::detach): ... this.
4306 * linux-low.h (class linux_process_target): Update.
4307 * lynx-low.cc (lynx_target_ops): Update.
4308 (lynx_detach): Turn into ...
4309 (lynx_process_target::detach): ... this.
4310 * lynx-low.h (class lynx_process_target): Update.
4311 * nto-low.cc (nto_target_ops): Update.
4312 (nto_detach): Turn into ...
4313 (nto_process_target::detach): ... this.
4314 * nto-low.h (class nto_process_target): Update.
4315 * win32-low.cc (win32_target_ops): Update.
4316 (win32_detach): Turn into ...
4317 (win32_process_target::detach): ... this.
4318 * win32-low.h (class win32_process_target): Update.
4319
4320 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4321
4322 Turn process_stratum_target's kill op into a method of
4323 process_target.
4324
4325 * target.h (struct process_stratum_target): Remove the target op.
4326 (class process_target): Add the target op.
4327
4328 Update the derived classes and callers below.
4329
4330 * target.cc (kill_inferior): Update.
4331 * linux-low.cc (linux_target_ops): Update.
4332 (linux_kill): Turn into ...
4333 (linux_process_target::kill): ... this.
4334 * linux-low.h (class linux_process_target): Update.
4335 * lynx-low.cc (lynx_target_ops): Update.
4336 (lynx_kill): Turn into ...
4337 (lynx_process_target::kill): ... this.
4338 * lynx-low.h (class lynx_process_target): Update.
4339 * nto-low.cc (nto_target_ops): Update.
4340 (nto_kill): Turn into ...
4341 (nto_process_target::kill): ... this.
4342 * nto-low.h (class nto_process_target): Update.
4343 * win32-low.cc (win32_target_ops): Update.
4344 (win32_kill): Turn into ...
4345 (win32_process_target::kill): ... this.
4346 * win32-low.h (class win32_process_target): Update.
4347
4348 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4349
4350 Turn process_stratum_target's attach op into a method of
4351 process_target.
4352
4353 * target.h (struct process_stratum_target): Remove the target op.
4354 (class process_target): Add the target op.
4355 (myattach): Update the macro.
4356
4357 Update the derived classes and callers below.
4358
4359 * linux-low.cc (linux_target_ops): Update.
4360 (linux_attach): Turn into ...
4361 (linux_process_target::attach): ... this.
4362 * linux-low.h (class linux_process_target): Update.
4363 * lynx-low.cc (lynx_target_ops): Update.
4364 (lynx_attach): Turn into ...
4365 (lynx_process_target::attach): ... this.
4366 * lynx-low.h (class lynx_process_target): Update.
4367 * nto-low.cc (nto_target_ops): Update.
4368 (nto_attach): Turn into ...
4369 (nto_process_target::attach): ... this.
4370 * nto-low.h (class nto_process_target): Update.
4371 * win32-low.cc (win32_target_ops): Update.
4372 (win32_attach): Turn into ...
4373 (win32_process_target::attach): ... this.
4374 * win32-low.h (class win32_process_target): Update.
4375
4376 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4377
4378 Turn process_stratum_target's post_create_inferior op into a method
4379 of process_target.
4380
4381 * target.h (struct process_stratum_target): Remove the target op.
4382 (class process_target): Add the target op.
4383 (target_post_create_inferior): Update the macro.
4384 * target.cc (process_target::post_create_inferior): Define.
4385
4386 Update the derived classes and callers below.
4387
4388 * linux-low.cc (linux_target_ops): Update.
4389 (linux_post_create_inferior): Turn into ...
4390 (linux_process_target::post_create_inferior): ... this.
4391 * linux-low.h (class linux_process_target): Update.
4392 * lynx-low.cc (lynx_target_ops): Update.
4393 * nto-low.cc (nto_target_ops): Update.
4394 * win32-low.cc (win32_target_ops): Update.
4395
4396 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4397
4398 Turn process_stratum_target's create_inferior op into a method of
4399 process_target.
4400
4401 * target.h (struct process_stratum_target): Remove the target op.
4402 (class process_target): Add the target op.
4403 (create_inferior): Rename the macro to ...
4404 (target_create_inferior): ... this.
4405
4406 Update the derived classes and callers below.
4407
4408 * server.cc (handle_v_run): Update.
4409 (captured_main): Update.
4410 (process_serial_event): Update.
4411 * linux-low.cc (linux_target_ops): Update.
4412 (linux_create_inferior): Turn into ...
4413 (linux_process_target::create_inferior): ... this.
4414 * linux-low.h (class linux_process_target): Update.
4415 * lynx-low.cc (lynx_target_ops): Update.
4416 (lynx_create_inferior): Turn into ...
4417 (lynx_process_target::create_inferior): ... this.
4418 * lynx-low.h (class lynx_process_target): Update.
4419 * nto-low.cc (nto_target_ops): Update.
4420 (nto_create_inferior): Turn into ...
4421 (nto_process_target::create_inferior): ... this.
4422 * nto-low.h (class nto_process_target): Update.
4423 * win32-low.cc (win32_target_ops): Update.
4424 (win32_create_inferior): Turn into ...
4425 (win32_process_target::create_inferior): ... this.
4426 * win32-low.h (class win32_process_target): Update.
4427
4428 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4429
4430 * target.h (class process_target): New class definition.
4431 (struct process_stratum_target) <pt>: New field with type
4432 'process_target*'.
4433 * linux-low.h (class linux_process_target): Define as a derived
4434 class of 'process_target'.
4435 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4436 as the 'pt' field.
4437 * lynx-low.h (class lynx_process_target): Define as a derived
4438 class of 'process_target'.
4439 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4440 as the 'pt' field.
4441 * nto-low.h (class nto_process_target): Define as a derived
4442 class of 'process_target'.
4443 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4444 as the 'pt' field.
4445 * win32-low.h (class win32_process_target): Define as a derived
4446 class of 'process_target'.
4447 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4448 as the 'pt' field.
4449
4450 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4451
4452 * configure: Regenerate.
4453
4454 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4455 Andrew Burgess <andrew.burgess@embecosm.com>
4456
4457 * linux-riscv-low.cc: New file.
4458 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4459 and nat/riscv-linux-tdesc.c.
4460 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4461 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4462 Define.
4463
4464 2020-02-14 Tom Tromey <tom@tromey.com>
4465
4466 * acinclude.m4: Don't include acx_configure_dir.m4.
4467 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4468 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4469 (all, install-only, uninstall, clean-info, clean)
4470 (maintainer-clean): Don't recurse.
4471 (subdir_do, all-lib): Remove.
4472 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4473 (GNULIB_H): Remove.
4474 (generated_files): Update.
4475 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4476 * configure: Rebuild.
4477 * configure.ac: Don't configure gnulib or libiberty.
4478 (GNULIB): Update.
4479
4480 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4481
4482 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4483 preparing the command line for CreateProcess.
4484 (win32_create_inferior): Reflect the program name in debugging
4485 output that shows the process and its command line.
4486
4487 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4488
4489 * Makefile.in: Rename source files from .c to .cc.
4490 * %.c: Rename to %.cc.
4491 * configure.ac: Rename server.c to server.cc.
4492 * configure: Re-generate.
4493
4494 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4495
4496 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4497
4498 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4499
4500 * win32-low.c (win32_create_inferior): Set signal_pid.
4501
4502 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4503 Pedro Alves <palves@redhat.com>
4504
4505 Skip building gdbserver in a cross-configuration.
4506 * configure.srv: Set $gdbserver_host depending on whether $target
4507 is $host. Use $gdbserver_host instead of $host.
4508
4509 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4510
4511 * configure: Re-generate.
4512
4513 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4514
4515 * configure: Re-generate.
4516
4517 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4518
4519 * acinclude.m4: Update warning.m4 path.
4520
4521 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4522
4523 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4524 (handle_exception): Set siginfo_er.
4525 (win32_xfer_siginfo): New function.
4526
4527 2020-02-07 Tom Tromey <tom@tromey.com>
4528 Pedro Alves <palves@redhat.com>
4529
4530 * README: Update build documentation.
4531 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4532 host, not target.
4533 * configure.ac: Update paths.
4534 * configure: Rebuild.
4535 * acinclude.m4: Update paths.
4536 * Makefile.in: Update include paths.
4537 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4538 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4539 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4540 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4541 (%-generated.c): Update paths.
4542 * Move entire directory from ../gdb/gdbserver.
4543
4544 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4545
4546 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4547
4548 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4549
4550 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4551 assignment instead of srv_linux_obj.
4552
4553 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4554
4555 * server.c (handle_qxfer_libraries): Write segment-address with
4556 paddress.
4557
4558 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4559
4560 * Makefile.in (install-strip): New target.
4561 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4562 * aclocal.m4: Regenerate.
4563 * configure: Regenerate.
4564 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4565
4566 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4567
4568 * Makefile.in (SFILES): Adjust paths to point to real files.
4569 (OBS): Move waitstatus.o to target/waitstatus.o.
4570 (TAGS): Transform paths appropriately.
4571 (%.o): Rename to...
4572 (nat/%.o): ... this pattern rule.
4573 (%.o): Rename to...
4574 (target/%.o): ... this pattern rule.
4575 * configure.srv: Adjust paths throughout to include nat/ prefix
4576 with the revant files.
4577 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4578 * configure: Regenerate.
4579
4580 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4581
4582 * Makefile.in (TAGS): Remove config files from the recipe.
4583
4584 2020-01-14 Tom Tromey <tom@tromey.com>
4585
4586 * configure: Rebuild.
4587 * configure.ac: Remove any checks that were added to common.m4.
4588 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4589 lib-link.m4.
4590
4591 2020-01-14 Tom Tromey <tom@tromey.com>
4592
4593 * server.h: Include config.h.
4594 * gdbreplay.c: Include config.h.
4595 * configure: Rebuild.
4596 * configure.ac: Don't source common.host.
4597 * acinclude.m4: Update path.
4598 * Makefile.in (INCSUPPORT): New variable.
4599 (INCLUDE_CFLAGS): Add INCSUPPORT.
4600 (SFILES): Update paths.
4601 (version-generated.c): Update path to create-version.sh.
4602 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4603
4604 2020-01-14 Tom Tromey <tom@tromey.com>
4605
4606 * configure.ac (LIBS): Use WIN32APILIBS.
4607 (USE_WIN32API): Don't define.
4608 * configure: Rebuild.
4609
4610 2020-01-14 Tom Tromey <tom@tromey.com>
4611
4612 * configure: Rebuild.
4613
4614 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4615
4616 * Makefile.in (%-generated.c): Remove rule for files from
4617 regformats/i386.
4618
4619 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4620
4621 * configure: Re-generate.
4622
4623 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4624
4625 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4626 Define to static.
4627 * tracepoint.c (stop_tracing, flush_trace_buffer,
4628 about_to_request_buffer_space, get_trace_state_variable_value,
4629 set_trace_state_variable_value, gdb_collect): Add declaration.
4630
4631 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4632
4633 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4634 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4635 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4636 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4637 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4638 static.
4639
4640 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4641
4642 * inferiors.c: Include gdbsupport/common-inferior.h.
4643
4644 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4645
4646 * hostio-errno.c: Include hostio.h.
4647
4648 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4649
4650 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4651 prerequisite.
4652
4653 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4654
4655 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4656 * linux-arm-tdesc.h: Include arch/arm.h.
4657
4658 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4659
4660 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4661
4662 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4663
4664 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4665 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4666
4667 2020-01-10 Pedro Alves <palves@redhat.com>
4668
4669 * fork-child.c (post_fork_inferior): Pass target down to
4670 startup_inferior.
4671 * inferiors.c (switch_to_thread): Add process_stratum_target
4672 parameter.
4673 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4674 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4675 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4676 * remote-utils.c (prepare_resume_reply): Pass the target to
4677 switch_to_thread.
4678 * target.c (the_target): Now a process_stratum_target.
4679 (done_accessing_memory): Pass the target to switch_to_thread.
4680 (set_target_ops): Ajust to use process_stratum_target.
4681 * target.h (struct target_ops): Rename to ...
4682 (struct process_stratum_target): ... this.
4683 (the_target, set_target_ops): Adjust.
4684 (prepare_to_access_memory): Adjust comment.
4685 * win32-low.c (child_xfer_memory): Adjust to use
4686 process_stratum_target.
4687 (win32_target_ops): Now a process_stratum_target.
4688
4689 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4690 Pedro Alves <palves@redhat.com>
4691
4692 * win32-low.c (get_child_debug_event): Extract the fatal exception
4693 from the exit status and convert to the equivalent Posix signal
4694 number.
4695 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4696 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4697
4698 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4699
4700 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4701
4702 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4703
4704 * server.c (gdbserver_version): Change copyright year to 2020.
4705 * gdbreplay.c (gdbreplay_version): Likewise.
4706
4707 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4708
4709 * configure: Regenerate.
4710 * configure.ac: Quote variable arguments of test.
4711
4712 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4713
4714 * Makefile.in: Fix build with GNU Make 3.81
4715
4716 2019-12-16 Tom Tromey <tromey@adacore.com>
4717
4718 * server.c (get_exec_file): Constify result.
4719
4720 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4721
4722 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4723 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4724 * config.in: Regenerate.
4725 * configure: Regenerate.
4726 * configure.ac: Don't check for strerror.
4727 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4728 Call safe_strerror instead of strerror.
4729 * server.h (strerror): Remove this now-unnecessary declaration.
4730 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4731 strerror.
4732 (gdb_agent_helper_thread): Likewise.
4733 * utils.c (perror_with_name): Likewise.
4734
4735 2019-11-26 Tom Tromey <tom@tromey.com>
4736
4737 * configure, config.in: Rebuild.
4738
4739 2019-11-26 Tom Tromey <tom@tromey.com>
4740
4741 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4742 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4743 gdb_sigmask.
4744 * configure, config.in: Rebuild.
4745
4746 2019-11-26 Tom Tromey <tom@tromey.com>
4747
4748 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4749 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4750 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4751 * acinclude.m4: Include ax_pthread.m4.
4752 * config.in, configure: Rebuild.
4753
4754 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4755
4756 * debug.c (debug_set_output): Call safe_strerror instead of
4757 strerror.
4758 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4759 (linux_kill_one_lwp): Likewise.
4760 (linux_detach_one_lwp): Likewise.
4761 (linux_wait_for_event_filtered): Likewise.
4762 (store_register): Likewise.
4763 * lynx-low.c (lynx_attach): Likewise.
4764 * mem-break.c (insert_memory_breakpoint): Likewise.
4765 (remove_memory_breakpoint): Likewise.
4766 (delete_fast_tracepoint_jump): Likewise.
4767 (set_fast_tracepoint_jump): Likewise.
4768 (uninsert_fast_tracepoint_jumps_at): Likewise.
4769 (reinsert_fast_tracepoint_jumps_at): Likewise.
4770 * nto-low.c (nto_xfer_memory): Likewise.
4771 (nto_resume): Likewise.
4772
4773 2019-11-20 Luis Machado <luis.machado@linaro.org>
4774
4775 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4776 instead of register count.
4777 * tdesc.c (tdesc_contains_feature): New function.
4778 * tdesc.h (tdesc_contains_feature): New prototype.
4779
4780 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4781
4782 * Makefile.in: Add safe-strerror.c.
4783 * configure: Regenerate.
4784 * configure.ac: Don't source common.host.
4785
4786 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4787
4788 * config.in: Regenerate.
4789 * configure: Regenerate.
4790
4791 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4792
4793 * ax.c (ax_printf): Handle size_t_arg.
4794
4795 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4796
4797 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4798 * mi/mi-main.c (output_cores): Likewise.
4799 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4800 (linux_xfer_osdata_modules): Likewise.
4801 * remote.c (register_remote_support_xml): Likewise.
4802 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4803 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4804
4805 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4806
4807 * configure: Regenerate.
4808 * configure.ac: Remove check for strerror_r.
4809
4810 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4811
4812 * config.in: Regenerate.
4813 * configure: Regenerate.
4814 * configure.ac: Also check for strerror_r.
4815
4816 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4817
4818 * ax.h (debug_agent): Remove duplicate declaration.
4819
4820 2019-10-26 Tom de Vries <tdevries@suse.de>
4821
4822 * linux-aarch64-low.c: Fix typos in comments.
4823 * linux-arm-low.c: Same.
4824 * linux-low.c: Same.
4825 * linux-ppc-low.c: Same.
4826 * proc-service.c: Same.
4827 * regcache.h: Same.
4828 * server.c: Same.
4829 * tracepoint.c: Same.
4830 * win32-low.c: Same.
4831
4832 2019-10-25 Tom Tromey <tromey@adacore.com>
4833
4834 * utils.c (xstrdup): Remove.
4835
4836 2019-10-23 Tom Tromey <tom@tromey.com>
4837
4838 * configure, config.in: Rebuild.
4839
4840 2019-10-23 Tom Tromey <tom@tromey.com>
4841
4842 * configure: Rebuild.
4843 * acinclude.m4: Use m4_include, not sinclude.
4844
4845 2019-10-17 Tom Tromey <tromey@adacore.com>
4846
4847 * configure: Rebuild.
4848 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4849 in AC_CONFIG_FILES invocation.
4850 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4851 invocation.
4852
4853 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4854
4855 * server.c: Include xml-builtin.h.
4856 (get_xml_features): Don't declare xml_builtins here.
4857
4858 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4859
4860 * Makefile.in: Remove references to vec-ipa.o.
4861
4862 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4863
4864 * Makefile.in: Remove references to vec.c.
4865
4866 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4867
4868 * server.c (server_waiting): Change to bool.
4869 (extended_protocol): Likewise.
4870 (response_needed): Likewise.
4871 (exit_requested): Likewise.
4872 (run_once): Likewise.
4873 (report_no_resumed): Likewise.
4874 (non_stop): Likewise.
4875 (disable_packet_vCont): Likewise.
4876 (disable_packet_Tthread): Likewise.
4877 (disable_packet_qC): Likewise.
4878 (disable_packet_qfThreadInfo): Likewise.
4879 (handle_general_set): Update.
4880 (handle_detach): Update.
4881 (handle_monitor_command): Update.
4882 (handle_query): Update.
4883 (captured_main): Update.
4884 (process_serial_event): Update.
4885 * server.h (server_waiting): Change to bool.
4886 (disable_packet_vCont): Likewise.
4887 (disable_packet_Tthread): Likewise.
4888 (disable_packet_qC): Likewise.
4889 (disable_packet_qfThreadInfo): Likewise.
4890 (run_once): Likewise.
4891 (non_stop): Likewise.
4892 * target.c (target_stop_and_wait): Update.
4893
4894 2019-10-02 Tom Tromey <tromey@adacore.com>
4895
4896 * Makefile.in (SFILES): Add common-inferior.c.
4897 (OBS): Add common-inferior.o.
4898 * server.c (startup_with_shell): Don't define.
4899
4900 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4901
4902 * linux-low.c (linux_low_read_btrace): Update for change to
4903 std::vector.
4904
4905 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4906
4907 * debug.c (debug_threads): Remove comment in favor of the header.
4908 * debug.h (using_threads): Add declaration.
4909 (debug_threads): Add comment.
4910 * linux-aarch64-low.c: Include debug.h and remove declaration of
4911 debug_threads.
4912 * nto-low.c: Likewise.
4913 * remote-utils.c: Likewise.
4914 * thread-db.c: Likewise.
4915
4916 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4917
4918 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4919 and powerpc-cell64l-ipa.o.
4920 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4921 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4922 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4923 (spu*-*-*): Remove.
4924
4925 * spu-low.c: Remove file.
4926
4927 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4928 (parse_spufs_run): Remove.
4929 (ppc_get_pc): Remove Cell/B.E. support.
4930 (ppc_set_pc): Likewise.
4931 (ppc_breakpoint_at): Likewise.
4932 (ppc_arch_setup): Likewise.
4933 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4934 tdesc_powerpc_cell32l.
4935 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4936 or init_registers_powerpc_cell32l.
4937 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4938 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4939 or init_registers_powerpc_cell32l.
4940 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4941 (init_registers_powerpc_cell32l): Remove prototype.
4942 (init_registers_powerpc_cell64l): Likewise.
4943
4944 * target.h (struct target_ops): Remove qxfer_spu member.
4945 * server.c (handle_qxfer_spu): Remove.
4946 (qxfer_packets): Remove entry for "spu".
4947 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4948 * linux-low.c (SPUFS_MAGIC): Remove.
4949 (spu_enumerate_spu_ids): Remove.
4950 (linux_qxfer_spu): Remove.
4951 (linux_target_ops): Remove qxfer_spu member.
4952 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4953 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4954 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4955
4956 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4957
4958 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4959 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4960 * config.in: Regenerate.
4961 * configure: Regenerate.
4962
4963 2019-08-15 Tom Tromey <tromey@adacore.com>
4964
4965 * target.c (target_write_memory): Use gdb::byte_vector.
4966
4967 2019-08-15 Tom Tromey <tromey@adacore.com>
4968
4969 * tracepoint.c (write_inferior_data_pointer)
4970 (write_inferior_integer, write_inferior_int8)
4971 (write_inferior_uinteger, m_tracepoint_action_download)
4972 (r_tracepoint_action_download, x_tracepoint_action_download)
4973 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4974 (download_agent_expr, download_tracepoint_1)
4975 (download_trace_state_variables, upload_fast_traceframes): Update.
4976 * server.c (gdb_write_memory): Update.
4977 * remote-utils.c (relocate_instruction): Update.
4978 * proc-service.c (ps_pdwrite): Update.
4979 * mem-break.c (remove_memory_breakpoint)
4980 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4981 (uninsert_fast_tracepoint_jumps_at)
4982 (reinsert_fast_tracepoint_jumps_at): Update.
4983 * linux-x86-low.c (append_insns)
4984 (i386_install_fast_tracepoint_jump_pad)
4985 (amd64_write_goto_address, i386_write_goto_address): Update.
4986 * linux-s390-low.c (append_insns, s390_write_goto_address):
4987 Update.
4988 * linux-ppc-low.c (ppc_relocate_instruction)
4989 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4990 (ppc_write_goto_address): Update.
4991 * linux-aarch64-low.c (append_insns): Update.
4992 * target.h (struct target_ops): Update.
4993 (write_inferior_memory): Don't declare.
4994 * target.c (target_write_memory): Rename from
4995 write_inferior_memory. Remove old target_write_memory.
4996
4997 2019-08-15 Tom Tromey <tromey@adacore.com>
4998
4999 * target.c (write_inferior_memory): Use std::vector.
5000
5001 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
5002
5003 PR build/24886
5004 * configure.ac: Drop enable-libmcheck support.
5005 * configure, config.in: Rebuild.
5006 * acinclude.m4: Don't include it.
5007
5008 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5009
5010 * configure.srv: Remove Arm xml files.
5011
5012 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5013
5014 * configure.srv: Add new files. Remove xml generated files.
5015 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
5016 registers.
5017 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
5018 * linux-aarch32-tdesc.c: New file.
5019 * linux-aarch32-tdesc.h: New file.
5020 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
5021 * linux-arm-low.c (init_registers_arm, tdesc_arm)
5022 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
5023 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
5024 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
5025 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5026 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
5027 (arm_read_description): Call arm_linux_read_description.
5028 (initialize_low_arch): Don't init registers.
5029 * linux-arm-tdesc.c: New file.
5030 * linux-arm-tdesc.h: New file.
5031
5032 2019-07-10 Alan Hayward <alan.hayward@arm.com>
5033
5034 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
5035 Move counter inside for.
5036 (arm_read_description): Check ptrace earlier.
5037 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
5038
5039 2019-07-09 Tom Tromey <tom@tromey.com>
5040
5041 * configure: Rebuild.
5042 * configure.ac: Change common to gdbsupport.
5043 * acinclude.m4: Change common to gdbsupport.
5044 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
5045 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
5046 common to gdbsupport.
5047 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
5048 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
5049 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
5050 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
5051 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
5052 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
5053 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
5054 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
5055 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
5056 common to gdbsupport.
5057
5058 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5059
5060 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
5061 defines.
5062 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
5063
5064 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5065
5066 * configure.srv: Remove legacy xml.
5067 * linux-aarch64-low.c (initialize_low_arch): Remove
5068 initialize_low_tdesc call.
5069 * linux-aarch64-tdesc-selftest.c: Remove file.
5070 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
5071 * linux-x86-low.c (initialize_low_arch): Remove
5072 initialize_low_tdesc call.
5073 * linux-x86-tdesc-selftest.c: Remove file.
5074 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
5075
5076 2019-06-20 Tom de Vries <tdevries@suse.de>
5077
5078 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
5079 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
5080
5081 2019-06-19 Tom de Vries <tdevries@suse.de>
5082
5083 * debug.h (debug_write): Change return type to ssize_t.
5084 * debug.c (debug_write): Same.
5085
5086 2019-06-14 Tom Tromey <tom@tromey.com>
5087
5088 * configure.ac: Use new path to gnulib.
5089 * configure: Rebuild.
5090 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
5091 to gnulib.
5092
5093 2019-06-11 Tom Tromey <tom@tromey.com>
5094
5095 * Makefile.in (SFILES): Add alloc.c.
5096 (OBS): Add alloc.o.
5097 (IPA_OBJS): Add alloc-ipa.o.
5098 (alloc-ipa.o): New target.
5099 (%.o: ../%.c): New pattern rule.
5100
5101 2019-06-10 Tom Tromey <tromey@adacore.com>
5102
5103 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
5104 end warning with a newline.
5105 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
5106 newline.
5107 * thread-db.c (attach_thread): Don't end warning with a newline.
5108 (thread_db_notice_clone): Likewise.
5109 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
5110 newline.
5111 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
5112 end warning with a newline.
5113
5114 2019-06-04 Pedro Alves <palves@redhat.com>
5115
5116 * server.c (captured_main): Use make_unique_xstrdup.
5117
5118 2019-06-02 Tom Tromey <tom@tromey.com>
5119
5120 * gdbreplay.c (fromhex): Remove.
5121 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5122
5123 2019-05-29 Tom Tromey <tromey@adacore.com>
5124
5125 * configure: Rebuild.
5126
5127 2019-05-06 Kevin Buettner <kevinb@redhat.com>
5128
5129 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
5130 sign extension code on 32-bit builds.
5131
5132 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5133
5134 * remote-utils.c:
5135 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5136
5137 2019-04-19 Tom Tromey <tom@tromey.com>
5138
5139 * server.c (struct vstop_notif): Derive from notif_event.
5140 <base>: Remove.
5141 (queue_stop_reply): Update.
5142 (remove_all_on_match_ptid): Change type. Rewrite.
5143 (discard_queued_stop_replies): Rewrite.
5144 (in_queued_stop_replies_ptid): Change type.
5145 (in_queued_stop_replies): Rewrite.
5146 (notif_stop): Update.
5147 (queue_stop_reply_callback): Update.
5148 (captured_main): Don't call initialize_notif.
5149 (push_stop_notification): Update.
5150 * notif.c (notif_write_event, handle_notif_ack)
5151 (notif_event_enque, notif_push): Update.
5152 (notif_event_xfree, initialize_notif): Remove.
5153 * notif.h (struct notif_event): Include <list>, not
5154 "common/queue.h".
5155 (struct notif_server) <queue>: Now a std::list.
5156 (notif_event_p): Remove typedef.
5157 (initialize_notif): Don't declare.
5158 (struct notif_event): Add virtual destructor.
5159
5160 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5161
5162 * ax.c (ax_vdebug): Call debug_printf.
5163 * debug.c (debug_write): New function.
5164 * debug.h (debug_write): New declaration.
5165 * linux-low.c (sigchld_handler): Call debug_write.
5166
5167 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5168
5169 * debug.c (debug_set_output): New function.
5170 (debug_vprintf): Send output to debug_file.
5171 (debug_flush): Likewise.
5172 * debug.h (debug_set_output): New declaration.
5173 * server.c (handle_monitor_command): Add debug-file option.
5174 (captured_main): Likewise.
5175
5176 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5177
5178 * debug.c (remote_debug): Add definition.
5179 * debug.h (remote_debug): Add declaration.
5180 * hostio.c (remote_debug): Remove declaration.
5181 * remote-utils.c (struct ui_file): Likewise.
5182 (remote_debug): Likewise.
5183 * remote-utils.h (remote_debug): Likewise,
5184 * server.c (remote_debug): Remove definition.
5185
5186 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5187
5188 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5189 when using a 64-bit gdbserver.
5190
5191 2019-04-09 Tom Tromey <tromey@adacore.com>
5192
5193 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5194
5195 2019-04-08 Tom Tromey <tom@tromey.com>
5196
5197 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5198 throw.
5199 (linux_resume_one_lwp): Likewise.
5200
5201 2019-04-08 Tom Tromey <tom@tromey.com>
5202
5203 * gdbreplay.c: Update.
5204 * linux-low.c: Update.
5205 * server.c: Update.
5206
5207 2019-04-08 Tom Tromey <tom@tromey.com>
5208
5209 * server.c: Use C++ exception handling.
5210 * linux-low.c: Use C++ exception handling.
5211 * gdbreplay.c: Use C++ exception handling.
5212
5213 2019-04-08 Tom Tromey <tom@tromey.com>
5214
5215 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5216 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5217 (captured_main, main): Update.
5218 * gdbreplay.c (main): Update.
5219
5220 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5221
5222 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5223 value in argument pointer, return 1 if the entry is found and 0
5224 otherwise. Move comment.
5225 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5226 * linux-low.h (linux_get_auxv): Declare.
5227 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5228
5229 2019-04-05 Tom Tromey <tromey@adacore.com>
5230
5231 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5232 variables.
5233
5234 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5235
5236 * linux-low.c (AT_HWCAP2): Add define if not already included.
5237
5238 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5239
5240 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5241 (aarch64_arch_setup): Call linux_get_hwcap.
5242 * linux-arm-low.c (arm_get_hwcap): Remove function.
5243 (arm_read_description): Call linux_get_hwcap.
5244 * linux-low.c (linux_get_auxv): New function.
5245 (linux_get_hwcap): Likewise.
5246 (linux_get_hwcap2): Likewise.
5247 * linux-low.h (linux_get_hwcap): New declaration.
5248 (linux_get_hwcap2): Likewise.
5249 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5250 (ppc_arch_setup): Call linux_get_hwcap.
5251 * linux-s390-low.c (s390_get_hwcap): Remove function.
5252 (s390_arch_setup): Call linux_get_hwcap.
5253
5254 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5255 Jiong Wang <jiong.wang@arm.com>
5256
5257 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5258 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5259 to fail.
5260 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5261
5262 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5263 Jiong Wang <jiong.wang@arm.com>
5264
5265 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5266 (aarch64_get_hwcap): New function.
5267 (aarch64_arch_setup): Read APIA hwcap.
5268
5269 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5270 Jiong Wang <jiong.wang@arm.com>
5271
5272 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5273 (initialize_low_tracepoint): Likewise.
5274 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5275 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5276 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5277 (aarch64_linux_read_description): Likewise.
5278 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5279
5280 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5281
5282 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5283 i386_create_target_description for 'segments' parameter.
5284 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5285 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5286 * win32-i386-low.c (i386_arch_setup): Likewise.
5287
5288 2019-03-12 Tom Tromey <tromey@adacore.com>
5289
5290 * linux-low.c (iterate_over_lwps): Update.
5291
5292 2019-03-06 Tom Tromey <tom@tromey.com>
5293
5294 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5295 (captured_main): Use SCOPE_EXIT.
5296
5297 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5298
5299 * configure.srv: Use '$enable_unittest' instead of '$development'
5300 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5301 case.
5302
5303 2019-02-27 Tom Tromey <tromey@adacore.com>
5304
5305 * gdbreplay.c (logchar): Handle \r\n.
5306
5307 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5308
5309 * linux-low.c (linux_attach): Add process before lwp.
5310 * server.c (attach_inferior): Check if already attached.
5311
5312 2019-02-07 Tom Tromey <tom@tromey.com>
5313
5314 * x86-tdesc.h: Rename include guard.
5315 * x86-low.h: Add include guard.
5316 * wincecompat.h: Rename include guard.
5317 * win32-low.h: Add include guard.
5318 * utils.h: Rename include guard.
5319 * tracepoint.h: Rename include guard.
5320 * tdesc.h: Rename include guard.
5321 * target.h: Rename include guard.
5322 * server.h: Rename include guard.
5323 * remote-utils.h: Rename include guard.
5324 * regcache.h: Rename include guard.
5325 * nto-low.h: Rename include guard.
5326 * notif.h: Add include guard.
5327 * mem-break.h: Rename include guard.
5328 * lynx-low.h: Add include guard.
5329 * linux-x86-tdesc.h: Add include guard.
5330 * linux-s390-tdesc.h: Add include guard.
5331 * linux-ppc-tdesc-init.h: Add include guard.
5332 * linux-low.h: Add include guard.
5333 * linux-aarch64-tdesc.h: Add include guard.
5334 * linux-aarch32-low.h: Add include guard.
5335 * inferiors.h: Rename include guard.
5336 * i387-fp.h: Rename include guard.
5337 * hostio.h: Rename include guard.
5338 * gdbthread.h: Rename include guard.
5339 * gdb_proc_service.h: Rename include guard.
5340 * event-loop.h: Rename include guard.
5341 * dll.h: Rename include guard.
5342 * debug.h: Rename include guard.
5343 * ax.h: Rename include guard.
5344
5345 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5346
5347 PR gdb/23985
5348 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5349 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5350
5351 2019-01-25 Tom Tromey <tom@tromey.com>
5352
5353 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5354
5355 2019-01-25 Tom Tromey <tom@tromey.com>
5356
5357 * win32-low.c: Fix common/ includes.
5358 * win32-i386-low.c: Fix common/ includes.
5359 * tracepoint.c: Fix common/ includes.
5360 * thread-db.c: Fix common/ includes.
5361 * target.h: Fix common/ includes.
5362 * symbol.c: Fix common/ includes.
5363 * spu-low.c: Fix common/ includes.
5364 * server.h: Fix common/ includes.
5365 * server.c: Fix common/ includes.
5366 * remote-utils.c: Fix common/ includes.
5367 * regcache.h: Fix common/ includes.
5368 * regcache.c: Fix common/ includes.
5369 * nto-x86-low.c: Fix common/ includes.
5370 * notif.h: Fix common/ includes.
5371 * mem-break.h: Fix common/ includes.
5372 * lynx-low.c: Fix common/ includes.
5373 * lynx-i386-low.c: Fix common/ includes.
5374 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5375 * linux-x86-low.c: Fix common/ includes.
5376 * linux-low.c: Fix common/ includes.
5377 * inferiors.h: Fix common/ includes.
5378 * i387-fp.c: Fix common/ includes.
5379 * hostio.c: Fix common/ includes.
5380 * hostio-errno.c: Fix common/ includes.
5381 * gdbthread.h: Fix common/ includes.
5382 * gdbreplay.c: Fix common/ includes.
5383 * fork-child.c: Fix common/ includes.
5384 * event-loop.c: Fix common/ includes.
5385 * ax.c:
5386 (enum gdb_agent_op): Fix common/ includes.
5387
5388 2019-01-21 Tom Tromey <tom@tromey.com>
5389
5390 * tracepoint.c: Fix includes.
5391 * remote-utils.c: Fix includes.
5392 * linux-x86-low.c: Fix includes.
5393
5394 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5395
5396 * gdbreplay.c (gdbreplay_version): Update copyright year in
5397 version message.
5398 * server.c (gdbserver_version): Likewise.
5399
5400 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5401
5402 * linux-low.c (add_lwp): Switch ordering.
5403
5404 2018-11-29 Tom Tromey <tom@tromey.com>
5405
5406 * win32-low.c (win32_join): Take pid, not process.
5407 * target.h (struct target_ops) <join>: Change argument type.
5408 (join_inferior): Change argument name.
5409 * spu-low.c (spu_join): Take pid, not process.
5410 * server.c (handle_detach): Preserve pid before destroying
5411 process.
5412 * lynx-low.c (lynx_join): Take pid, not process.
5413 * linux-low.c (linux_join): Take pid, not process.
5414
5415 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5416
5417 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5418 (aarch64_cannot_fetch_register): Likewise.
5419 (struct linux_target_ops): Update references.
5420
5421 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5422
5423 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5424
5425 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5426
5427 * configure.srv (ipa_ppc_linux_regobj): Add
5428 powerpc-isa207-htm-vsx32l-ipa.o and
5429 powerpc-isa207-htm-vsx64l-ipa.o.
5430 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5431 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5432 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5433 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5434 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5435 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5436 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5437 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5438 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5439 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5440 (init_registers_powerpc_isa207_htm_vsx32l)
5441 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5442 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5443 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5444 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5445 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5446 (ppc_store_tm_ctarregset): New functions.
5447 (ppc_regsets): Add entries for HTM regsets.
5448 (ppc_arch_setup): Set htm in features struct when needed. Set
5449 sizes for the HTM regsets.
5450 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5451 (initialize_low_arch): Call
5452 init_registers_powerpc_isa207_htm_vsx32l and
5453 init_registers_powerpc_isa207_htm_vsx64l.
5454 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5455 PPC_TDESC_ISA207_HTM_VSX.
5456 (initialize_low_tracepoint): Call
5457 init_registers_powerpc_isa207_htm_vsx32l and
5458 init_registers_powerpc_isa207_htm_vsx64l.
5459
5460 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5461
5462 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5463 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5464 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5465 (ppc_store_pmuregset): New functions.
5466 (ppc_regsets): Add entries for ebb and pmu regsets.
5467 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5468 pmu regsets are available. Set sizes for these regsets.
5469
5470 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5471
5472 * configure.srv (ipa_ppc_linux_regobj): Add
5473 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5474 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5475 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5476 rs6000/powerpc-isa207-vsx32l.xml, and
5477 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5478 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5479 <PPC_TDESC_ISA207_VSX>: New enum value.
5480 (init_registers_powerpc_isa207_vsx32l): Declare.
5481 (init_registers_powerpc_isa207_vsx64l): Declare.
5482 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5483 (ppc_store_tarregset): New function.
5484 (ppc_regsets): Add entry for the TAR regset.
5485 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5486 size for the TAR regsets.
5487 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5488 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5489 and init_registers_powerpc_isa207_vsx64l.
5490 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5491 (initialize_low_tracepoint): Call
5492 init_registers_powerpc_isa207_vsx32l and
5493 init_registers_powerpc_isa207_vsx64l.
5494
5495 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5496 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5497
5498 * configure.srv (ipa_ppc_linux_regobj): Add
5499 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5500 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5501 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5502 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5503 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5504 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5505 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5506 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5507 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5508 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5509 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5510 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5511 (ppc_hwcap): Add comment.
5512 (ppc_hwcap2): New global.
5513 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5514 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5515 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5516 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5517 when needed. Set sizes for the the DSCR and PPR regsets.
5518 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5519 (initialize_low_arch): Call
5520 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5521 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5522 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5523 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5524 (initialize_low_tracepoint): Call
5525 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5526 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5527
5528 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5529
5530 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5531
5532 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5533 Simon Marchi <simark@simark.ca>
5534
5535 * acinclude.m4: Include "../selftest.m4".
5536 * configure: Regenerate.
5537 * configure.ac: Use "GDB_AC_SELFTEST".
5538 * configure.srv: Use "$enable_unittests" instead of
5539 "$development" when checking whether unit tests have been
5540 enabled.
5541 * server.c (captured_main): Update message informing that
5542 selftests have been disabled.
5543
5544 2018-10-04 Tom Tromey <tom@tromey.com>
5545
5546 * configure: Rebuild.
5547
5548 2018-10-04 Tom Tromey <tom@tromey.com>
5549
5550 * server.c (handle_status): Rename inner "thread".
5551 (process_serial_event): Declare "res" in 'm' case.
5552 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5553 (iterate_over_lwps): Rename inner "thread".
5554 (linux_qxfer_libraries_svr4): Rename inner "len".
5555 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5556
5557 2018-10-01 Gary Benson <gbenson@redhat.com>
5558
5559 * gdb_proc_service.h: Moved common code to
5560 common/gdb_proc_service.h.
5561
5562 2018-10-01 Gary Benson <gbenson@redhat.com>
5563
5564 * gdb_proc_service.h: Synchronize comments and whitespace with
5565 GDB's version of this file.
5566
5567 2018-09-25 Tom Tromey <tom@tromey.com>
5568
5569 * configure: Rebuild.
5570 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5571
5572 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5573
5574 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5575 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5576 ($(IPA_LIB)): Sort IPA_OBJS.
5577
5578 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5579
5580 * Makefile.in: Remove references to $(ADD_DEPS).
5581
5582 2018-09-16 Tom Tromey <tom@tromey.com>
5583
5584 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5585 variables.
5586 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5587 variables.
5588
5589 2018-09-05 Tom Tromey <tom@tromey.com>
5590
5591 * configure: Rebuild.
5592
5593 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5594
5595 PR build/23399
5596 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5597
5598 2018-08-27 Tom Tromey <tom@tromey.com>
5599
5600 PR build/23087:
5601 * configure: Rebuild.
5602
5603 2018-08-27 Tom Tromey <tom@tromey.com>
5604
5605 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5606 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5607 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5608 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5609 (s390x_emit_stack_adjust): Add casts to unsigned char.
5610
5611 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5612
5613 PR gdb/23374
5614 PR gdb/23375
5615 * server.h (struct client_state) <disable_randomization>:
5616 Initialize to 1.
5617
5618 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5619
5620 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5621 variable.
5622 (mips_supply_ptrace_register): Likewise.
5623
5624 2018-07-22 Tom Tromey <tom@tromey.com>
5625
5626 * configure: Rebuild.
5627
5628 2018-07-22 Tom Tromey <tom@tromey.com>
5629
5630 * win32-low.c (win32_create_inferior): Remove unused variables.
5631 * gdbreplay.c (remote_open): Remove unused variable.
5632 * remote-utils.c (remote_prepare): Remove unused variable.
5633 * x86-tdesc.h (X86_TDESC_H): Define.
5634 (amd64_expedite_regs): Define conditionally.
5635 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5636 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5637 * remote-utils.c (readchar): Remove unused variable.
5638
5639 2018-07-13 Pedro Alves <palves@redhat.com>
5640
5641 * linux-low.c (linux_kill): Change parameter to process_info
5642 pointer instead of pid. Adjust.
5643 * lynx-low.c (lynx_kill): Likewise.
5644 * nto-low.c (nto_kill): Likewise.
5645 * spu-low.c (spu_kill): Likewise.
5646 * win32-low.c (win32_kill): Likewise.
5647 * server.c (handle_v_kill, kill_inferior_callback)
5648 (detach_or_kill_for_exit): Adjust.
5649 * target.c (kill_inferior): Change parameter to process_info
5650 pointer instead of pid. Adjust.
5651 * target.h (struct target_ops) <kill>: Change parameter to
5652 process_info pointer instead of pid. Adjust all implementations
5653 and callers.
5654 (kill_inferior): Likewise.
5655
5656 2018-07-13 Pedro Alves <palves@redhat.com>
5657
5658 * linux-low.c (linux_detach, linux_join): Change parameter to
5659 process_info pointer instead of pid. Adjust.
5660 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5661 * nto-low.c (nto_detach): Likewise.
5662 * spu-low.c (spu_detach, spu_join): Likewise.
5663 * win32-low.c (win32_detach, win32_join): Likewise.
5664 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5665 * target.h (struct target_ops) <detach, join>: Change parameter to
5666 process_info pointer instead of pid. Adjust all implementations
5667 and callers.
5668 (detach_inferior, join_inferior): Rename 'pid' parameter to
5669 'proc'.
5670
5671 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5672 Jan Kratochvil <jan.kratochvil@redhat.com>
5673 Paul Fertser <fercerpav@gmail.com>
5674 Tsutomu Seki <sekiriki@gmail.com>
5675
5676 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5677 (OBS): Add 'common/netstuff.o'.
5678 (GDBREPLAY_OBS): Likewise.
5679 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5680 (remote_open): Implement support for IPv6
5681 connections.
5682 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5683 and 'wspiapi.h'.
5684 (handle_accept_event): Accept connections from IPv6 sources.
5685 (remote_prepare): Handle IPv6-style hostnames; implement
5686 support for IPv6 connections.
5687 (remote_open): Implement support for printing connections from
5688 IPv6 sources.
5689
5690 2018-07-11 Pedro Alves <palves@redhat.com>
5691
5692 PR gdb/23377
5693 * mem-break.c (any_persistent_commands): Add process_info
5694 parameter and use it instead of relying on the current process.
5695 Change return type to bool.
5696 * mem-break.h (any_persistent_commands): Add process_info
5697 parameter and change return type to bool.
5698 * server.c (handle_detach): Remove require_running_or_return call.
5699 Look up the process_info for the process we're about to detach.
5700 If not found, return back error to GDB. Adjust
5701 any_persistent_commands call to pass down a process pointer.
5702
5703 2018-07-11 Pedro Alves <palves@redhat.com>
5704
5705 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5706 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5707 instead of collect_register_by_name.
5708 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5709 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5710
5711 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5712 Pedro Alves <palves@redhat.com>
5713
5714 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5715
5716 2018-07-03 Tom Tromey <tom@tromey.com>
5717
5718 * linux-low.c: Update.
5719 * lynx-low.c: Update.
5720 * mem-break.c: Update.
5721 * nto-low.c: Update.
5722 * remote-utils.c: Update.
5723 * server.c: Update.
5724 * spu-low.c: Update.
5725 * target.c: Update.
5726 * win32-low.c: Update.
5727
5728 2018-07-03 Tom Tromey <tom@tromey.com>
5729
5730 * server.c: Update.
5731
5732 2018-07-03 Tom Tromey <tom@tromey.com>
5733
5734 * linux-low.c: Update.
5735
5736 2018-07-03 Tom Tromey <tom@tromey.com>
5737
5738 * target.c: Update.
5739
5740 2018-07-03 Tom Tromey <tom@tromey.com>
5741
5742 * linux-low.c: Update.
5743 * linux-mips-low.c: Update.
5744 * lynx-low.c: Update.
5745 * nto-low.c: Update.
5746 * remote-utils.c: Update.
5747 * server.c: Update.
5748 * spu-low.c: Update.
5749 * target.c: Update.
5750 * thread-db.c: Update.
5751
5752 2018-07-03 Tom Tromey <tom@tromey.com>
5753
5754 * linux-low.c: Update.
5755 * linux-mips-low.c: Update.
5756 * lynx-low.c: Update.
5757 * mem-break.c: Update.
5758 * nto-low.c: Update.
5759 * remote-utils.c: Update.
5760 * server.c: Update.
5761 * spu-low.c: Update.
5762 * target.c: Update.
5763 * tracepoint.c: Update.
5764
5765 2018-07-03 Tom Tromey <tom@tromey.com>
5766
5767 * linux-low.c: Update.
5768 * linux-ppc-low.c: Update.
5769 * linux-x86-low.c: Update.
5770 * proc-service.c: Update.
5771 * server.c: Update.
5772 * spu-low.c: Update.
5773 * thread-db.c: Update.
5774 * win32-low.c: Update.
5775
5776 2018-07-03 Tom Tromey <tom@tromey.com>
5777
5778 * linux-low.c: Update.
5779 * lynx-low.c: Update.
5780 * nto-low.c: Update.
5781 * remote-utils.c: Update.
5782 * spu-low.c: Update.
5783 * thread-db.c: Update.
5784 * win32-low.c: Update.
5785
5786 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5787
5788 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5789 parameter in call to 'amd64_create_target_description'.
5790
5791 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5792
5793 * x86-tdesc.h: Remove executable permission flag.
5794
5795 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5796
5797 * configure.ac: Remove AC_PREREQ, add missing quoting.
5798 * configure: Re-generate.
5799 * config.in: Re-generate.
5800 * aclocal.m4: Re-generate.
5801
5802 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5803
5804 * tracepoint.h (current_traceframe): Remove declaration.
5805
5806 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5807
5808 * linux-aarch64-low.c (is_sve_tdesc): New function.
5809 (aarch64_sve_regs_copy_to_regcache): Likewise.
5810 (aarch64_sve_regs_copy_from_regcache): Likewise.
5811 (aarch64_regs_info): Add SVE checks.
5812 (initialize_low_arch): Initialize SVE.
5813
5814 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5815
5816 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5817
5818 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5819
5820 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5821 (initialize_low_tracepoint): Likewise
5822 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5823 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5824 param.
5825 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5826 checks.
5827 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5828
5829 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5830
5831 * server.h (PBUFSIZ): Increase size
5832
5833 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5834
5835 * regcache.c (regcache::raw_compare): New function.
5836 * regcache.h (regcache::raw_compare): New declaration.
5837
5838 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5839
5840 * regcache.c (new_register_cache): Use new.
5841 (free_register_cache): Use delete.
5842 (register_data): Use const.
5843 (supply_register): Move body inside regcache.
5844 (regcache::raw_supply): New override function.
5845 (collect_register): Move body inside regcache.
5846 (regcache::raw_collect): New override function.
5847 (regcache::get_register_status): New override function.
5848 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5849
5850 2018-06-09 Tom Tromey <tom@tromey.com>
5851
5852 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5853 declare queue.
5854 (event_queue): Use std::queue.
5855 (gdb_event_xfree): Remove.
5856 (initialize_event_loop, process_event, wait_for_event): Update.
5857
5858 2018-06-08 Stan Cox <scox@redhat.com>
5859
5860 * win32-low.c (win32_create_inferior): last_ptid and last_status
5861 moved to client_state.
5862
5863 2018-06-08 Pedro Alves <palves@redhat.com>
5864
5865 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5866 common/common-exceptions.o, common/common-utils.o,
5867 common/errors.o, common/print-utils.o and utils.o.
5868 * gdbreplay.c: Include "common-defs.h" instead of the two
5869 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5870 string.h or alloca.h.
5871 (perror_with_name): Delete.
5872 (remote_open): Use xstrdup instead of strdup.
5873 (main): Rename to ...
5874 (captured_main): ... this.
5875 (main): New.
5876
5877 2018-06-08 Tom Tromey <tom@tromey.com>
5878
5879 * linux-low.c (linux_low_read_btrace): Update.
5880
5881 2018-06-04 Stan Cox <scox@redhat.com>
5882
5883 * server.h (struct client_state): New.
5884 * server.c (cont_thread, general_thread, multi_process)
5885 (report_fork_events, report_vfork_events, report_exec_events)
5886 (report_thread_events, swbreak_feature, hwbreak_feature)
5887 (vCont_supported, disable_randomization, pass_signals)
5888 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5889 Moved to client_state.
5890 * remote-utils.c (remote_debug, noack_mode)
5891 (transport_is_reliable): Moved to client_state.
5892 * tracepoint.c (current_traceframe): Moved to client_state.
5893
5894 Update all callers.
5895 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5896 linux-low.c, remote-utils.h, target.c: Use client_state.
5897
5898 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5899
5900 * configure.srv: Add new c/h file.
5901
5902 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5903
5904 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5905 null VQ.
5906
5907 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5908
5909 * gdb.arch/mips-fpregset-core.exp: New test.
5910 * gdb.arch/mips-fpregset-core.c: New test source.
5911
5912 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5913
5914 PR server/23198
5915 * hostio.c (require_int): Do not report overflow for integers
5916 between 0xfffffff and 0x7fffffff.
5917
5918 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5919
5920 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5921 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5922 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5923 functions.
5924 (the_low_target): Wire them.
5925
5926 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5927
5928 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5929 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5930 mode. Call collect_register_by_name with vscr using
5931 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5932 (ppc_store_vrregset): Add and set vscr_offset variable as in
5933 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5934 vscr_offset.
5935
5936 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5937
5938 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5939 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5940 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5941
5942 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5943
5944 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5945 (ppc_store_vsxregset): Likewise.
5946 (ppc_fill_vrregset): Likewise.
5947 (ppc_store_vrregset): Likewise.
5948 (ppc_fill_evrregset): Likewise.
5949 (ppc_store_evrregset): Likewise.
5950 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5951 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5952 needed.
5953
5954 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5955
5956 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5957 wordsize of the inferior. Call ppc_linux_target_wordsize.
5958
5959 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5960
5961 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5962 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5963 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5964 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5965 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5966 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5967 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5968 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5969 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5970 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5971 (tdesc_powerpc_e500l): Remove.
5972 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5973 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5974 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5975 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5976 linux-ppc-tdesc.h.
5977 (ppc_arch_setup): Remove target description matching code. Fill a
5978 ppc_linux_features struct and call ppc_linux_match_description
5979 with it.
5980
5981 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5982
5983 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5984 width of the requested register exceeds the width of the
5985 `ptrace' data type.
5986 (mips_cannot_store_register): Likewise.
5987
5988 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5989
5990 * linux-mips-low.c (mips_fetch_register): New function. Update
5991 preceding comment.
5992 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5993 (the_low_target): Wire `mips_fetch_register'.
5994
5995 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5996
5997 * lynx-i386-low.c (LYNXOS_178): New macro.
5998 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5999 the layout on LynxOS-178.
6000 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
6001 handle floating point registers that are not supported by
6002 LynxOS-178.
6003
6004 2018-05-10 Tom Tromey <tom@tromey.com>
6005
6006 * configure: Rebuild.
6007
6008 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6009
6010 PR server/23158:
6011 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
6012 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
6013 Use it to set the expedite_regs field in the given tdesc.
6014 * x86-tdesc.h: New file.
6015 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
6016 Adjust following the addition of the new expedite_regs parameter
6017 to init_target_desc.
6018 * linux-tic6x-low.c (tic6x_read_description): Likewise.
6019 * linux-x86-tdesc.c: #include "x86-tdesc.h".
6020 (i386_linux_read_description, amd64_linux_read_description):
6021 Adjust following the addition of the new expedite_regs parameter
6022 to init_target_desc.
6023 * lynx-i386-low.c: #include "x86-tdesc.h".
6024 (lynx_i386_arch_setup): Adjust following the addition of the new
6025 expedite_regs parameter to init_target_desc.
6026 * nto-x86-low.c: #include "x86-tdesc.h".
6027 (nto_x86_arch_setup): Adjust following the addition of the new
6028 expedite_regs parameter to init_target_desc.
6029 * win32-i386-low.c: #include "x86-tdesc.h".
6030 (i386_arch_setup): Adjust following the addition of the new
6031 expedite_regs parameter to init_target_desc.
6032
6033 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6034
6035 PR server/23158:
6036 * win32-low.c (win32_create_inferior): Add call to my_wait
6037 setting last_status global.
6038
6039 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6040
6041 PR server/23158:
6042 * win32-low.c (create_process): Only call gdb_tilde_expand if
6043 inferior_cwd is not NULL.
6044
6045 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6046
6047 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
6048 registers to the cache if their values have changed.
6049 (i387_xsave_to_cache): Provide default values for x87 control
6050 registers when these features are available, but disabled.
6051 * regcache.c (supply_register_by_name_zeroed): New function.
6052 * regcache.h (supply_register_by_name_zeroed): Declare new
6053 function.
6054
6055 2018-05-07 Tom Tromey <tom@tromey.com>
6056
6057 * configure: Rebuild.
6058
6059 2018-05-04 Tom Tromey <tom@tromey.com>
6060
6061 * configure: Rebuild.
6062
6063 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6064 Pedro Alves <palves@redhat.com>
6065
6066 * linux-aarch64-low.c (aarch64_stopped_data_address):
6067 Likewise.
6068
6069 2018-04-27 Tom Tromey <tom@tromey.com>
6070
6071 * configure: Rebuild.
6072
6073 2018-04-23 Tom Tromey <tom@tromey.com>
6074
6075 * configure: Rebuild.
6076
6077 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
6078
6079 * Makefile.in (depcomp): Add "..".
6080 (all_deps_files): New and use it.
6081
6082 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6083
6084 * configure.srv (aarch64*-*-linux*): Don't include xml.
6085 (i[34567]86-*-cygwin*): Likewise.
6086 (i[34567]86-*-linux*): Likewise.
6087 (i[34567]86-*-lynxos*): Likewise.
6088 (i[34567]86-*-mingw32ce*): Likewise.
6089 (i[34567]86-*-mingw*): Likewise.
6090 (i[34567]86-*-nto*): Likewise.
6091 (tic6x-*-uclinux): Likewise.
6092 (x86_64-*-linux*): Likewise.
6093 (x86_64-*-mingw*): Likewise.
6094 (x86_64-*-cygwin*): Likewise.
6095
6096 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6097
6098 * tdesc.c: Remove xml parameter.
6099
6100 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6101
6102 * server.c (get_features_xml): Remove cast.
6103 * tdesc.c (void target_desc::accept): Fill in function.
6104 (tdesc_get_features_xml): Remove old xml creation.
6105 (print_xml_feature::visit_pre): Add xml vistor.
6106 * tdesc.h (struct target_desc): Make xmltarget mutable.
6107 (tdesc_get_features_xml): Remove declaration.
6108
6109 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6110
6111 * tdesc.c (tdesc_architecture_name): Add new function.
6112 (tdesc_osabi_name): Likewise.
6113 (tdesc_get_features_xml): Use new functions.
6114
6115 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6116
6117 * tdesc.c (tdesc_create_flags): Remove.
6118 (tdesc_add_flag): Likewise.
6119 (tdesc_named_type): Likewise.
6120 (tdesc_create_union): Likewise.
6121 (tdesc_create_struct): Likewise.
6122 (tdesc_create_vector): Likewise.
6123 (tdesc_add_bitfield): Likewise.
6124 (tdesc_add_field): Likewise.
6125 (tdesc_set_struct_size): Likewise.
6126
6127 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6128
6129 * tdesc.c (~target_desc): Remove implictly deleted items.
6130 (init_target_desc): Iterate all features.
6131 (tdesc_get_features_xml): Use vector.
6132 (tdesc_create_feature): Create feature.
6133 * tdesc.h (tdesc_feature) Remove
6134 (target_desc): Add features.
6135
6136 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6137
6138 * Makefile.in: Add common/tdesc.c
6139 * tdesc.c (init_target_desc): init all reg_defs from register
6140 vector.
6141 (tdesc_create_reg): Create tdesc_reg.
6142 * tdesc.h (tdesc_feature): Add register vector.
6143
6144 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6145
6146 * tdesc.h (struct target_desc) <features>: Change type to
6147 std::vector<std::string>.
6148 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6149 changes.
6150 (tdesc_get_features_xml): Likewise.
6151 (tdesc_create_feature): Likewise.
6152
6153 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6154
6155 * regcache.c (find_register_by_number): Return a ref.
6156 (find_regno): Use references.
6157 (register_size): Likewise.
6158 (register_data): Likewise.
6159 * tdesc.c (target_desc::~target_desc): Remove free calls.
6160 (target_desc::operator==): Use std::vector compare.
6161 (init_target_desc): Use reference.
6162 (tdesc_create_reg): Use reg constructors.
6163 * tdesc.h (struct target_desc): Replace pointer with object.
6164
6165 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6166
6167 * regcache.c (find_register_by_number): Make static.
6168 (find_regno): Use find_register_by_number
6169 * regcache.h (struct reg): Remove declaration.
6170
6171 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6172
6173 * tdesc.c (target_desc::~target_desc): Move to here.
6174 (target_desc::operator==): Likewise.
6175 * tdesc.h (target_desc::~target_desc): Move from here.
6176 (target_desc::operator==): Likewise.
6177
6178 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6179
6180 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6181
6182 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6183
6184 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6185 S390_TDESC_GS.
6186 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6187 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6188 and init_registers_s390_gs_linux64.
6189
6190 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6191
6192 * linux-s390-low.c (s390_fill_gs): Remove function.
6193 (s390_fill_gsbc): Remove function.
6194 (s390_regsets): Set fill functions for the guarded storage regsets
6195 to NULL.
6196
6197 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6198
6199 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6200 the word size. Add comment.
6201 (s390_get_wordsize): New function.
6202 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6203 pswm with it. Instead, use s390_get_wordsize to determine the
6204 word size first and derive the correct tdesc from that directly.
6205
6206 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6207
6208 * Makefile.in: Include silent-rules.mk.
6209 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6210 (COMPILE): Add ECHO_CXX.
6211 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6212 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6213 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6214 (version-generated.c): Add ECHO_GEN.
6215 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6216 (IPAGENT_COMPILE): Add ECHO_CXX.
6217 (%-generated.c): Add ECHO_REGDAT.
6218
6219 2018-03-14 Tom Tromey <tom@tromey.com>
6220
6221 PR cli/14977:
6222 * ax.c (ax_printf): Special case for NULL.
6223
6224 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6225
6226 * linux-low.c (linux_qxfer_libraries_svr4): Use
6227 xml_escape_text_append.
6228
6229 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6230
6231 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6232
6233 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6234
6235 * server.c (handle_general_set): Remove unnecessary xstrdup.
6236
6237 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6238
6239 * server.c (parse_debug_format_options): Adjust to
6240 delim_string_to_char_ptr_vec changes.
6241 * thread-db.c (thread_db_load_search): Adjust to
6242 dirnames_to_char_ptr_vec changes.
6243
6244 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6245
6246 * target.h (target_enable_btrace, target_disable_btrace)
6247 (target_read_btrace, target_read_btrace_conf): Turn macro into
6248 inline function. Throw error if target method is not defined.
6249 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6250 check for btrace target method. Be prepared to handle exceptions
6251 from btrace target methods.
6252
6253 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6254
6255 * server.c (captured_main): Change order of error message printed
6256 when the current working directory cannot be found.
6257
6258 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6259
6260 * server.c: Include "filenames.h" and "pathstuff.h".
6261 (program_name): Delete variable.
6262 (program_path): New anonymous class.
6263 (get_exec_wrapper): Use "program_path" instead of
6264 "program_name".
6265 (handle_v_run): Likewise.
6266 (captured_main): Likewise.
6267 (process_serial_event): Likewise.
6268
6269 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6270
6271 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6272 (OBJS): Add "pathstuff.o".
6273 * server.c (current_directory): New global variable.
6274 (captured_main): Initialize "current_directory".
6275
6276 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6277
6278 * tdesc.c: Use common/tdesc.h.
6279 * tdesc.h: Likewise.
6280
6281 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6282 Simon Marchi <simon.marchi@ericsson.com>
6283
6284 * Makefile.in: Switch order of make rules.
6285
6286 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6287
6288 * Makefile.in: Add common directory in build.
6289 * configure.ac: Add common reference.
6290 * configure: Regenerate.
6291
6292 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6293
6294 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6295 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6296 * spu-low.c (spu_target_ops): Likewise.
6297 * win32-low.c (win32_target_ops): Likewise.
6298 * server.c (supported_btrace_packets): Report packets unconditionally.
6299 * target.h (target_ops) <supports_btrace>: Remove.
6300 (target_supports_btrace): Remove.
6301
6302 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6303
6304 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6305 (handle_btrace_disable): Change return type to void. Use exceptions
6306 to report errors.
6307 (handle_btrace_general_set): Catch exception and copy message to
6308 return message.
6309
6310 2018-02-08 Tom Tromey <tom@tromey.com>
6311
6312 * linux-low.c (install_software_single_step_breakpoints): Use
6313 make_scoped_restore.
6314 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6315 (do_restore_current_thread_cleanup): Remove.
6316 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6317 declare.
6318
6319 2018-02-08 Tom Tromey <tom@tromey.com>
6320
6321 * mem-break.c (set_raw_breakpoint_at): Use
6322 gdb::unique_xmalloc_ptr.
6323
6324 2018-01-30 Pedro Alves <palves@redhat.com>
6325
6326 PR gdb/13211
6327 * target.c (target_terminal::terminal_state): Rename to ...
6328 (target_terminal::m_terminal_state): ... this.
6329
6330 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6331
6332 * linux-low.c (handle_extended_wait): Surround call to
6333 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6334
6335 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6336
6337 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6338 linux_ptrace_attach_fail_reason_string now returning an
6339 std::string.
6340 (linux_attach): Likewise.
6341 * thread-db.c (attach_thread): Likewise.
6342
6343 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6344
6345 PR gdb/21559
6346 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6347 checking for fs_base/gs_base fields in struct user_regs_struct.
6348 * configure: Regenerate.
6349
6350 2018-01-16 Yao Qi <yao.qi@linaro.org>
6351
6352 PR gdb/18749
6353 * linux-low.c (fetch_register): Call supply_register instead of
6354 error.
6355
6356 2018-01-08 Yao Qi <yao.qi@linaro.org>
6357 Simon Marchi <simon.marchi@ericsson.com>
6358
6359 * Makefile.in (OBS): Remove selftest.o.
6360 * configure.ac: Set srv_selftest_objs if $development is true.
6361 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6362 * configure: Re-generated.
6363 * server.c (captured_main): Wrap variable selftest_filter with
6364 GDB_SELF_TEST.
6365
6366 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6367
6368 * server.c (parse_debug_format_options): Return std::string.
6369 (handle_monitor_command, captured_main): Adjust.
6370
6371 2018-01-05 Pedro Alves <palves@redhat.com>
6372
6373 PR gdb/18653
6374 * server.c (captured_main): Pass quiet=false to
6375 save_original_signals_state.
6376
6377 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6378
6379 * gdbreplay.c (gdbreplay_version): Update copyright year in
6380 version message.
6381 * server.c (gdbserver_version): Likewise.
6382
6383 2017-12-08 Tom Tromey <tom@tromey.com>
6384
6385 * ax.c (ax_printf): Update.
6386
6387 2017-12-07 Yao Qi <yao.qi@linaro.org>
6388
6389 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6390 aarch64_linux_read_description.
6391 * linux-amd64-ipa.c (idx2mask): New array.
6392 (get_ipa_tdesc): Move idx2mask out.
6393 (initialize_low_tracepoint): Initialize target descriptions.
6394 * linux-i386-ipa.c (idx2mask): New array.
6395 (get_ipa_tdesc): Move idx2mask out.
6396 (initialize_low_tracepoint): Initialize target descriptions.
6397
6398 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6399
6400 * tdesc.c (struct tdesc_type): Change return type.
6401 (tdesc_add_flag): Change parameter type.
6402 (tdesc_add_bitfield): Likewise.
6403 (tdesc_add_field): Likewise.
6404 (tdesc_set_struct_size): Likewise.
6405
6406 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6407
6408 * regcache.c (registers_to_string): Remove unused variable.
6409
6410 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6411
6412 * inferiors.c (for_each_inferior_with_data): Remove.
6413 * inferiors.h (for_each_inferior_with_data): Remove.
6414 * server.c (handle_qxfer_threads_worker): Change parameter type.
6415 (handle_qxfer_threads_proper): Use for_each_thread.
6416
6417 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6418
6419 * inferiors.c (for_each_inferior): Remove.
6420 (clear_inferiors): Use for_each_thread.
6421 * inferiors.h (for_each_inferior): Remove.
6422 * linux-low.c (linux_wait_for_event_filtered): Use
6423 for_each_thread.
6424 (linux_stabilize_threads): Likewise.
6425 * regcache.c (regcache_release): Likewise.
6426 * server.c (gdb_wants_all_threads_stopped): Likewise.
6427 (clear_pending_status_callback): Remove.
6428 (handle_status): Use for_each_thread.
6429 (captured_main): Likewise.
6430 * win32-low.c (child_init_thread_list): Likewise.
6431 (win32_clear_inferiors): Likewise.
6432 (fake_breakpoint_event): Likewise.
6433
6434 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6435
6436 * inferiors.h (find_inferior): Remove.
6437 * inferiors.c (find_inferior): Remove.
6438
6439 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6440
6441 * linux-low.c (resume_status_pending_p): Update comment.
6442 (need_step_over_p): Update comment.
6443
6444 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6445
6446 * linux-low.c (proceed_one_lwp): Return void, change parameter
6447 type.
6448 (unsuspend_and_proceed_one_lwp): Likewise.
6449 (proceed_all_lwps): Use for_each_thread.
6450 (unstop_all_lwps): Likewise.
6451
6452 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6453
6454 * linux-low.c (linux_resume_one_thread): Return void, take
6455 parameter directly.
6456 (linux_resume): Use for_each_thread.
6457
6458 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6459
6460 * linux-low.c (send_sigstop_callback): Return void, change
6461 parameter type. Rename to...
6462 (send_sigstop): ... this.
6463 (suspend_and_send_sigstop_callback): Return void, change parameter
6464 type. Rename to...
6465 (suspend_and_send_sigstop): ... this.
6466 (stop_all_lwps): Use for_each_thread.
6467
6468 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6469
6470 * linux-low.c (lwp_running): Return bool, remove unused
6471 argument.
6472 (linux_stabilize_threads): Use find_thread.
6473
6474 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6475
6476 * linux-low.c (select_singlestep_lwp_callback): Remove.
6477 (count_events_callback): Remove.
6478 (select_event_lwp_callback): Remove.
6479 (select_event_lwp): Use find_thread/for_each_thread.
6480
6481 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6482
6483 * linux-low.c (not_stopped_callback): Return bool, take filter
6484 argument directly.
6485 (linux_wait_for_event_filtered): Use find_thread.
6486 (linux_wait_1): Likewise.
6487
6488 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6489
6490 * linux-low.c (same_lwp): Remove.
6491 (find_lwp_pid): Use find_thread.
6492
6493 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6494
6495 * linux-low.c (delete_lwp_callback): Remove.
6496 (linux_mourn): Use for_each_thread.
6497
6498 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6499
6500 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6501 args parameter, don't check for pid.
6502 (linux_detach): Use for_each_thread.
6503
6504 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6505
6506 * linux-low.c (struct counter): Remove.
6507 (second_thread_of_pid_p): Remove.
6508 (last_thread_of_process_p): Use find_thread.
6509
6510 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6511
6512 * inferiors.c (find_inferior_in_random): Remove.
6513 * inferiors.h (find_inferior_in_random): Remove.
6514 * linux-low.c (status_pending_p_callback): Return bool, accept
6515 parameter ptid directly.
6516 (linux_wait_for_event_filtered): Use find_thread_in_random.
6517 (linux_wait_1): Likewise.
6518
6519 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6520
6521 * inferiors.c (find_inferior_id): Remove.
6522 (find_thread_ptid): Move implemention from find_inferior_id to
6523 here.
6524 * inferiors.h (find_inferior_id): Remove.
6525 * server.c (handle_status): Use find_thread_ptid.
6526 (process_serial_event): Likewise.
6527 * thread-db.c (find_one_thread): Likewise.
6528 (thread_db_thread_handle): Likewise.
6529 * win32-low.c (thread_rec): Likewise.
6530 (child_delete_thread): Likewise.
6531 (win32_thread_alive): Likewise.
6532 (get_child_debug_event): Likewise.
6533
6534 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6535
6536 * linux-mips-low.c (update_watch_registers_callback): Return
6537 void, remove pid_p parameter, don't check for pid.
6538 (mips_insert_point, mips_remove_point): Use for_each_thread.
6539
6540 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6541
6542 * lynx.low (lynx_delete_thread_callback): Remove.
6543 (lynx_mourn): Use for_each_thread.
6544
6545 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6546
6547 * regcache.c (regcache_invalidate_one): Remove.
6548 (regcache_invalidate_pid): use for_each_thread.
6549
6550 2017-11-26 Tom Tromey <tom@tromey.com>
6551
6552 * linux-low.c (linux_create_inferior): Update.
6553
6554 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6555
6556 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6557
6558 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6559
6560 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6561 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6562 * linux-aarch64-tdesc-selftest.c: New file.
6563 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6564
6565 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6566
6567 * configure.srv: Add new file.
6568 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6569 * linux-aarch64-tdesc-selftest.c: New file.
6570 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6571
6572 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6573
6574 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6575 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6576 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6577
6578 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6579
6580 * configure.srv: Add new files.
6581 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6582 aarch64_linux_read_description.
6583 * linux-aarch64-low.c (aarch64_linux_read_description):
6584 Merge with aarch64_arch_setup.
6585 (aarch64_arch_setup): Call aarch64_linux_read_description.
6586 * linux-aarch64-tdesc.c: New file.
6587 * linux-aarch64-tdesc.h: New file.
6588
6589 2017-11-24 Yao Qi <yao.qi@linaro.org>
6590
6591 * configure.srv: Set $srv_regobj for tic6x-linux.
6592 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6593 (tic6x_read_description): Move some code to tic6x_arch_setup.
6594 (tic6x_tdesc_test): New function.
6595 (initialize_low_arch): Call selftests::register_test.
6596
6597 2017-11-22 Yao Qi <yao.qi@linaro.org>
6598
6599 * remote-utils.c (prepare_resume_reply): Use memcpy.
6600
6601 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6602
6603 * linux-low.c (kill_one_lwp_callback): Return void, take
6604 argument directly, don't filter on pid.
6605 (linux_kill): Use for_each_thread.
6606
6607 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6608
6609 * linux-low.c (need_step_over_p): Return bool, remove dummy
6610 argument.
6611 (linux_resume, proceed_all_lwps): Use find_thread.
6612
6613 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6614
6615 * linux-low.c (resume_status_pending_p): Return bool, remove
6616 flag_p argument.
6617 (linux_resume): Use find_thread.
6618
6619 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6620
6621 * linux-low.c (struct thread_resume_array): Remove.
6622 (linux_set_resume_request): Return void, take arguments
6623 directly.
6624 (linux_resume): Use for_each_thread.
6625
6626 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6627
6628 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6629 return bool, remove data argument.
6630 (linux_stabilize_threads): Use find_thread.
6631
6632 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6633
6634 * linux-low.c (unsuspend_one_lwp): Remove.
6635 (unsuspend_all_lwps): Use for_each_thread, inline code from
6636 unsuspend_one_lwp.
6637
6638 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6639
6640 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6641 * linux-low.c (struct iterate_over_lwps_args): Remove.
6642 (iterate_over_lwps_filter): Remove.
6643 (iterate_over_lwps): Use find_thread.
6644
6645 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6646
6647 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6648 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6649 code from reset_lwp_ptrace_options_callback.
6650
6651 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6652
6653 * linux-arm-low.c (struct update_registers_data): Remove.
6654 (update_registers_callback): Return void, take arguments
6655 directly, don't check thread's pid.
6656 (arm_insert_point, arm_remove_point): Use for_each_thread.
6657
6658 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6659
6660 * win32-low.c (continue_one_thread): Return void, take argument
6661 directly.
6662 (child_continue): Use for_each_thread.
6663
6664 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6665
6666 * win32-i386-low.c (update_debug_registers_callback): Rename
6667 to ...
6668 (update_debug_registers): ... this, return void, remove pid_p arg.
6669 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6670
6671 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6672
6673 * inferiors.h (struct process_info): Add constructor, initialize
6674 fields..
6675 <syscalls_to_catch>: Change type to std::vector<int>.
6676 * inferiors.c (add_process): Allocate process_info with new.
6677 (remove_process): Free process_info with delete.
6678 * linux-low.c (handle_extended_wait): Adjust.
6679 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6680 * server.c (handle_general_set): Adjust.
6681
6682 2017-11-16 Pedro Alves <palves@redhat.com>
6683
6684 * remote-utils.c (remote_close): Block SIGIO signals instead of
6685 uninstalling the SIGIO handler.
6686
6687 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6688
6689 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6690
6691 2017-11-16 Yao Qi <yao.qi@linaro.org>
6692
6693 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6694 (tic6x_store_gregset): Likewise.
6695 (tic6x_usrregs_info): Move it up.
6696
6697 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6698
6699 * Makefile.in: Update arch rules.
6700 * configure.srv: Explicitly mark arch/ files.
6701
6702 2017-11-13 Andreas Schwab <schwab@suse.de>
6703
6704 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6705 function.
6706 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6707
6708 2017-11-06 Pedro Alves <palves@redhat.com>
6709
6710 * config.in, configure: Regenerate.
6711
6712 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6713
6714 * target.c (struct thread_search): Remove.
6715 (thread_search_callback): Remove.
6716 (prepare_to_access_memory): Use for_each_thread instead of
6717 find_inferior. Inline code from thread_search_callback.
6718
6719 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6720
6721 * server.c (struct visit_actioned_threads_data): Remove.
6722 (visit_actioned_threads): Change prototype to take arguments
6723 directly.
6724 (resume): Use find_thread instead of find_inferior.
6725
6726 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6727
6728 * server.c (queue_stop_reply_callback): Change prototype, return
6729 void.
6730 (find_status_pending_thread_callback): Remove.
6731 (handle_status): Replace find_inferior with find_thread and
6732 for_each_thread.
6733
6734 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6735
6736 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6737 with REGNO.
6738 (aarch64_store_gregset): Likewise.
6739 (aarch64_fill_fpregset): Likewise.
6740 (aarch64_store_fpregset): Likewise.
6741
6742 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6743
6744 * gdbthread.h (find_thread, for_each_thread): New functions.
6745 * inferiors.c (thread_of_pid): Remove.
6746 (find_any_thread_of_pid): Use find_thread.
6747 * linux-low.c (num_lwps): Use for_each_thread.
6748
6749 2017-10-17 Yao Qi <yao.qi@linaro.org>
6750
6751 * Makefile.in: Remove one rule.
6752 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6753
6754 2017-10-17 Yao Qi <yao.qi@linaro.org>
6755
6756 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6757 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6758
6759 2017-10-17 Yao Qi <yao.qi@linaro.org>
6760
6761 * configure.srv: Rename arm.o with arch/arm.o.
6762
6763 2017-10-17 Yao Qi <yao.qi@linaro.org>
6764
6765 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6766 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6767 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6768 (arch-i386.o, arch-amd64.o): Remove rules.
6769 (arch/%.o): New rule.
6770 Update POSTCOMPILE and COMPILE.pre.
6771 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6772 * configure: Re-generated.
6773 * configure.srv: Replace arch-i386.o with arch/i386.o.
6774 Replace arch-amd64.o with arch/amd64.o.
6775
6776 2017-10-16 Yao Qi <yao.qi@linaro.org>
6777
6778 * configure: Regenerated.
6779
6780 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6781
6782 * inferiors.h: (struct inferior_list): Remove.
6783 (struct inferior_list_entry); Remove.
6784 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6785 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6786 get_first_inferior): Remove.
6787 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6788 find_inferior_id, find_inferior_in_random): Change signature.
6789 * inferiors.c (all_threads): Change type to
6790 std::list<thread_info *>.
6791 (get_thread): Remove macro.
6792 (find_inferior, find_inferior_id): Change signature, implement
6793 using find_thread.
6794 (find_inferior_in_random): Change signature, implement using
6795 find_thread_in_random.
6796 (for_each_inferior, for_each_inferior_with_data): Change
6797 signature, implement using for_each_thread.
6798 (add_inferior_to_list, remove_inferior): Remove.
6799 (add_thread, get_first_thread, thread_of_pid,
6800 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6801 (get_first_inferior, one_inferior_p, clear_inferior_list):
6802 Remove.
6803 (clear_inferiors, get_thread_process): Update.
6804 * gdbthread.h: Include <list>.
6805 (struct thread_info) <entry>: Remove field.
6806 <id>: New field.
6807 (all_threads): Change type to std::list<thread_info *>.
6808 (get_first_inferior): Add doc.
6809 (find_thread, for_each_thread, find_thread_in_random): New
6810 functions.
6811 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6812 * linux-arm-low.c (update_registers_callback): Update.
6813 * linux-low.c (second_thread_of_pid_p): Update.
6814 (kill_one_lwp_callback, linux_detach_lwp_callback,
6815 delete_lwp_callback, status_pending_p_callback, same_lwp,
6816 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6817 iterate_over_lwps, not_stopped_callback,
6818 resume_stopped_resumed_lwps, count_events_callback,
6819 select_singlestep_lwp_callback, select_event_lwp_callback,
6820 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6821 suspend_and_send_sigstop_callback, wait_for_sigstop,
6822 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6823 lwp_running, linux_set_resume_request, resume_status_pending_p,
6824 need_step_over_p, start_step_over, linux_resume_one_thread,
6825 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6826 reset_lwp_ptrace_options_callback): Update.
6827 * linux-mips-low.c (update_watch_registers_callback): Update.
6828 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6829 Update.
6830 (free_register_cache_thread_one): Remove.
6831 (regcache_release): Update.
6832 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6833 handle_qxfer_threads_worker): Update.
6834 (handle_query): Update, use list iterator.
6835 (visit_actioned_threads, handle_pending_status,
6836 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6837 clear_pending_status_callback, set_pending_status_callback,
6838 find_status_pending_thread_callback, handle_status,
6839 process_serial_event): Update.
6840 * target.c (thread_search_callback): Update.
6841 * thread-db.c (thread_db_get_tls_address): Update.
6842 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6843 Update.
6844 * win32-i386-low.c (update_debug_registers_callback): Update.
6845 * win32-low.c (delete_thread_info, child_delete_thread,
6846 continue_one_thread, suspend_one_thread,
6847 get_child_debug_event): Adjust.
6848
6849 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6850
6851 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6852 * inferiors.h: Include <list>.
6853 (struct process_info) <entry>: Remove field.
6854 <pid>: New field.
6855 (pid_of): Change macro to function.
6856 (ptid_of, lwpid_of): Remove macro.
6857 (all_processes): Change type to std::list<process_info *>.
6858 (ALL_PROCESSES): Remove macro.
6859 (for_each_process, find_process): New function.
6860 * inferiors.c (all_processes): Change type to
6861 std::list<process_info *>.
6862 (find_thread_process): Adjust.
6863 (add_process): Likewise.
6864 (remove_process): Likewise.
6865 (find_process_pid): Likewise.
6866 (get_first_process): Likewise.
6867 (started_inferior_callback): Remove.
6868 (have_started_inferiors_p): Adjust.
6869 (attached_inferior_callback): Remove.
6870 (have_attached_inferiors_p): Adjust.
6871 * linux-low.c (check_zombie_leaders): Likewise.
6872 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6873 (x86_linux_update_xmltarget): Adjust.
6874 * server.c (handle_query): Likewise.
6875 (gdb_reattached_process): Remove.
6876 (handle_status): Adjust.
6877 (kill_inferior_callback): Likewise.
6878 (detach_or_kill_inferior): Remove.
6879 (print_started_pid): Likewise.
6880 (print_attached_pid): Likewise.
6881 (detach_or_kill_for_exit): Update.
6882 (process_serial_event): Likewise.
6883 * linux-arm-low.c (arm_new_fork): Likewise.
6884
6885 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6886
6887 * dll.h: Include <list>.
6888 (struct dll_info): Add constructor.
6889 <entry>: Remove field.
6890 (all_dlls): Change type to std::list<dll_info>.
6891 * dll.c: Include <algorithm>.
6892 (get_dll): Remove macro.
6893 (all_dlls): Change type to std::list<dll_info *>.
6894 (free_one_dll): Remove.
6895 (match_dll): Likewise.
6896 (loaded_dll): Adjust.
6897 (unloaded_dll): Adjust to all_dlls type change, use
6898 std::find_if. Inline code from match_dll.
6899 (clear_dlls): Adjust to all_dlls type change.
6900 * server.c (emit_dll_description): Remove.
6901 (handle_qxfer_libraries): Adjust to all_dlls type change,
6902 integrate emit_dll_description's functionality.
6903
6904 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6905
6906 * linux-low.h (struct linux_target_ops) <delete_process>: New
6907 field.
6908 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6909 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6910 (struct linux_target_ops): Add delete_process callback.
6911 * linux-arm-low.c (arm_delete_process): New.
6912 (struct linux_target_ops): Add delete_process callback.
6913 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6914 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6915 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6916 * linux-mips-low.c (mips_linux_delete_process): New.
6917 (struct linux_target_ops): Add delete_process callback.
6918 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6919 * linux-s390-low.c (struct linux_target_ops): Likewise.
6920 * linux-sh-low.c (struct linux_target_ops): Likewise.
6921 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6922 * linux-tile-low.c (struct linux_target_ops): Likewise.
6923 * linux-x86-low.c (x86_linux_delete_process): New.
6924 (struct linux_target_ops): Add delete_process callback.
6925 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6926
6927 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6928
6929 * linux-aarch64-low.c (the_low_target): Add thread delete
6930 callback.
6931 * linux-arm-low.c (arm_delete_thread): New function.
6932 (the_low_target): Add thread delete callback.
6933 * linux-bfin-low.c (the_low_target): Likewise.
6934 * linux-crisv32-low.c (the_low_target): Likewise.
6935 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6936 set.
6937 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6938 field.
6939 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6940 * linux-mips-low.c (mips_linux_delete_thread): New function.
6941 (the_low_target): Add thread delete callback.
6942 * linux-ppc-low.c (the_low_target): Likewise.
6943 * linux-s390-low.c (the_low_target): Likewise.
6944 * linux-sh-low.c (the_low_target): Likewise.
6945 * linux-tic6x-low.c (the_low_target): Likewise.
6946 * linux-tile-low.c (the_low_target): Likewise.
6947 * linux-x86-low.c (the_low_target): Likewise.
6948 * linux-xtensa-low.c (the_low_target): Likewise.
6949
6950 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6951
6952 * win32-low.c: Include "common-inferior.h".
6953
6954 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6955
6956 * inferiors.c (set_inferior_cwd): New function.
6957 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6958 (handle_query): Inform that QSetWorkingDir is supported.
6959 * win32-low.c (create_process): Pass the inferior's cwd to
6960 CreateProcess.
6961
6962 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6963
6964 * inferiors.c (current_inferior_cwd): New global variable.
6965 (get_inferior_cwd): New function.
6966 * inferiors.h (struct process_info) <cwd>: New field.
6967
6968 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6969
6970 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6971 (OBS): Add gdb_tilde_expand.o.
6972
6973 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6974
6975 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6976 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6977
6978 2017-09-29 Pedro Alves <palves@redhat.com>
6979
6980 * ax.c (gdb_parse_agent_expr): Constify.
6981 * ax.h (gdb_parse_agent_expr): Constify.
6982 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6983 Constify.
6984 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6985 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6986 * remote-utils.h (read_ptid): Constify.
6987 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6988 (process_point_options, process_serial_event): Constify.
6989 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6990 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6991 (cmd_qtbuffer): Constify.
6992
6993 2017-09-29 Pedro Alves <palves@redhat.com>
6994
6995 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6996 fails.
6997
6998 2017-09-29 Pedro Alves <palves@redhat.com>
6999
7000 * linux-low.c (handle_extended_wait): Pass parent thread instead
7001 of process to thread_db_notice_clone.
7002 * linux-low.h (thread_db_notice_clone): Replace parent process
7003 parameter with parent thread parameter.
7004 * thread-db.c (find_one_thread): Add comment.
7005 (thread_db_notice_clone): Replace parent process parameter with
7006 parent thread parameter. Temporarily switch to the parent thread.
7007
7008 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
7009
7010 * gdbthread.h: Include "common-gdbthread.h".
7011 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
7012 "if" when validating the ptid.
7013 * remote-utils.c: Include "gdbthread.h".
7014 (prepare_resume_reply): Use "switch_to_thread".
7015 * target.c (done_accessing_memory): Likewise.
7016
7017 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7018
7019 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
7020 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
7021 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
7022 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
7023 s390x-gs-linux64-ipa.o to ipa_obj.
7024 * linux-s390-low.c (HWCAP_S390_GS): New define.
7025 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
7026 New functions.
7027 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
7028 (s390_arch_setup): Check for guarded-storage support and choose
7029 appropriate tdesc.
7030 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
7031 init_registers_s390x_gs_linux64.
7032 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
7033 enum value.
7034 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
7035 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
7036
7037 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
7038
7039 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
7040
7041 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7042
7043 * linux-low.h (struct lwp_info): Add new field, thread_handle.
7044 (thread_db_thread_handle): Declare.
7045 * linux-low.c (linux_target_ops): Initialize thread_handle.
7046 * server.c (handle_qxfer_threads_worker): Add support for
7047 "handle" attribute.
7048 * target.h (struct target_ops): Add new function pointer,
7049 thread_handle.
7050 (target_thread_handle): Define.
7051 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
7052 field in lwp.
7053 (thread_db_thread_handle): New function.
7054
7055 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7056
7057 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
7058 * linux-low.h (thread_db_notice_clone): Declare.
7059 * thread-db.c (thread_db_notice_clone): New function.
7060
7061 2017-09-21 Pedro Alves <palves@redhat.com>
7062
7063 * server.c (gdb_read_memory, handle_status, process_serial_event)
7064 (handle_serial_event, handle_target_event): Adjust to
7065 set_desired_thread prototype change.
7066 * target.c (set_desired_thread): Remove 'use_general' parameter
7067 and adjust.
7068 * target.h (set_desired_thread): Remove 'use_general' parameter.
7069
7070 2017-09-20 Tom Tromey <tom@tromey.com>
7071
7072 * target.c (target_terminal::terminal_state): Define.
7073 (target_terminal::init): Rename from target_terminal_init.
7074 (target_terminal::inferior): Rename from
7075 target_terminal_inferior.
7076 (target_terminal::ours): Rename from target_terminal_ours.
7077 (target_terminal::ours_for_output, target_terminal::info): New.
7078
7079 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7080
7081 * server.c (accumulate_file_name_length): Remove.
7082 (emit_dll_description): Adjust to std::string change.
7083 (handle_qxfer_libraries): Use std::string to hold document.
7084
7085 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7086
7087 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
7088 return type of xml_escape_text.
7089 * server.c (emit_dll_description): Likewise.
7090
7091 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7092
7093 * server.c (captured_main): Accept argument for --selftest.
7094 Update run_tests call.
7095 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
7096 when registering selftests.
7097
7098 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
7099
7100 * regcache.c (get_thread_regcache): Update code to use "std::vector"
7101 instead of "VEC" for "target_desc.reg_defs".
7102 (regcache_cpy): Likewise.
7103 (registers_to_string): Likewise.
7104 (registers_from_string): Likewise.
7105 (find_regno): Likewise.
7106 (supply_regblock): Likewise.
7107 (regcache_raw_read_unsigned): Likewise.
7108 * tdesc.c (init_target_desc): Likewise.
7109 (tdesc_create_reg): Likewise.
7110 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
7111 (struct target_desc) <reg_defs>: Convert to "std::vector".
7112 (target_desc): Do not initialize "reg_defs".
7113 (~target_desc): Update code to use "std::vector" instead of "VEC"
7114 for "target_desc.reg_defs".
7115 (operator==): Likewise.
7116
7117 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7118
7119 * inferiors.h (thread_to_gdb_id): Remove.
7120 * inferiors.c (thread_to_gdb_id): Remove.
7121 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
7122 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7123 lynx_store_registers, lynx_read_memory, lynx_write_memory):
7124 Likewise.
7125 * nto-low.c (nto_fetch_registers, nto_store_registers,
7126 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
7127
7128 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7129
7130 * inferiors.h (gdb_id_to_thread_id): Remove.
7131 * inferiors.c (gdb_id_to_thread_id): Remove.
7132 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7133 removal. Move pid declaration closer to where it's used.
7134
7135 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7136
7137 * server.c (handle_detach): New function.
7138 (process_serial_event): Move code out, call handle_detach.
7139
7140 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7141
7142 * server.c (require_running): Rename to ...
7143 (require_running_or_return): ... this ...
7144 (require_running_or_break): ... and this.
7145 (handle_query, process_serial_event): Adjust.
7146
7147 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7148
7149 * linux-low.c (linux_set_resume_request): Remove unused
7150 variables.
7151
7152 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7153
7154 * server.c (first_thread_of): Remove.
7155 (process_serial_event): Replace usage of first_thread_of with
7156 find_any_thread_of_pid.
7157 * tracepoint.c (same_process_p): Remove.
7158 (gdb_agent_about_to_close): Replace usage of same_process_p with
7159 find_any_thread_of_pid.
7160 * linux-x86-low.c (same_process_callback): Remove.
7161 (x86_arch_setup_process_callback): Replace usage of
7162 same_process_callback with find_any_thread_of_pid.
7163 * thread-db.c (any_thread_of): Remove.
7164 (switch_to_process): Replace usage of any_thread_of with
7165 find_any_thread_of_pid.
7166 * inferiors.c (thread_pid_matches_callback): Remove.
7167 (find_thread_process): Adjust to use find_any_thread_of_pid.
7168
7169 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7170
7171 * regcache.c (get_thread_regcache): Guard calls to "memset"
7172 with "!VEC_empty".
7173
7174 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7175
7176 * linux-low.c (handle_extended_wait): Use
7177 "allocate_target_description" instead of "XNEW".
7178 * linux-x86-low.c (initialize_low_arch): Likewise.
7179
7180 2017-09-05 Yao Qi <yao.qi@linaro.org>
7181
7182 * configure.srv (srv_i386_regobj): Remove.
7183 (srv_amd64_regobj): Remove.
7184 (srv_regobj): Set it to "" for x86 non-linux targets.
7185 * linux-x86-tdesc.c (i386_linux_read_description):
7186 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7187 (init_registers_i386): Remove the declaration.
7188 (tdesc_i386): Remove the declaration.
7189 (lynx_i386_arch_setup): Call i386_create_target_description.
7190 * nto-x86-low.c: Likewise.
7191 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7192 [!__x86_64__]: include arch/i386.h.
7193 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7194
7195 2017-09-05 Yao Qi <yao.qi@linaro.org>
7196
7197 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7198 i386/amd64-XXX-linux from it.
7199
7200 2017-09-05 Yao Qi <yao.qi@linaro.org>
7201
7202 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7203 false.
7204 (ipa_amd64_linux_regobj): Remove.
7205 (ipa_x32_linux_regobj): Remove.
7206
7207 2017-09-05 Yao Qi <yao.qi@linaro.org>
7208
7209 * Makefile.in (arch-amd64.o): New rule.
7210 * configure.srv: Append arch-amd64.o.
7211 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7212 (get_ipa_tdesc): Call amd64_linux_read_description.
7213 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7214 and init_registers_amd64_XXX.
7215 * linux-x86-low.c (x86_linux_read_description): Call
7216 amd64_linux_read_description.
7217 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7218 (initialize_low_arch): Don't call init_registers_x32_XXX and
7219 init_registers_amd64_XXX.
7220 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7221 and tdesc_amd64_XXX.
7222 [__x86_64__] (amd64_tdesc_test): New function.
7223 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7224 and init_registers_amd64_XXX.
7225 * linux-x86-tdesc.c: Include arch/amd64.h.
7226 (xcr0_to_tdesc_idx): New function.
7227 (i386_linux_read_description): New function.
7228 (amd64_get_ipa_tdesc_idx): New function.
7229 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7230 (amd64_get_ipa_tdesc): Declare.
7231
7232 2017-09-05 Yao Qi <yao.qi@linaro.org>
7233
7234 * configure.srv (srv_i386_linux_xmlfiles): Remove
7235 i386/i386-XXX-linux.xml from it.
7236
7237 2017-09-05 Yao Qi <yao.qi@linaro.org>
7238
7239 * configure.srv: Set srv_i386_linux_regobj empty if $development
7240 is false.
7241 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7242 initialize_low_tdesc.
7243 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7244 with #if initialize_low_tdesc.
7245 * linux-x86-tdesc-selftest.c: New file.
7246 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7247
7248 2017-09-05 Yao Qi <yao.qi@linaro.org>
7249
7250 * Makefile.in (arch-i386.o): New rule.
7251 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7252 (x86_64-*-linux*): Likewise.
7253 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7254 include arch/i386.h.
7255 (i386_linux_read_description): Remove code and call
7256 i386_create_target_description.
7257 * tdesc.c (allocate_target_description): New function.
7258 * tdesc.h (set_tdesc_architecture): Remove declaration.
7259 (set_tdesc_osabi): Likewise.
7260
7261 2017-09-05 Yao Qi <yao.qi@linaro.org>
7262
7263 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7264 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7265 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7266 .xmltarget.
7267 * server.c (get_features_xml): Call tdesc_get_features_xml.
7268 * tdesc.c (set_tdesc_architecture): New function.
7269 (set_tdesc_osabi): New function.
7270 (tdesc_get_features_xml): New function.
7271 (tdesc_create_feature): Add an argument.
7272 * tdesc.h (struct target_desc) <features>: New field.
7273 <arch, osabi>: New field.
7274 (~target_desc): xfree features, arch, and osabi.
7275 (target_desc::oerator==): Don't compare .xmltarget.
7276 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7277 (set_tdesc_osabi): Likewise.
7278 (tdesc_get_features_xml): Likewise.
7279
7280 2017-09-05 Yao Qi <yao.qi@linaro.org>
7281
7282 * linux-x86-tdesc.c: Include selftest.h.
7283 (i386_tdesc_test): New function.
7284 (initialize_low_tdesc): Call selftests::register_test.
7285 * tdesc.h: Include regdef.h.
7286 (target_desc): Override operator == and !=.
7287
7288 2017-09-05 Yao Qi <yao.qi@linaro.org>
7289
7290 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7291 (ipa_obj): Likewise.
7292 * linux-i386-ipa.c: Include common/x86-xstate.h
7293 (get_ipa_tdesc): Call i386_linux_read_description.
7294 (initialize_low_tracepoint): Don't call init_registers_XXX
7295 functions, call initialize_low_tdesc instead.
7296 * linux-x86-low.c (x86_linux_read_description): Call
7297 i386_linux_read_description.
7298 (initialize_low_arch): Don't call init_registers_i386_XXX
7299 functions, call initialize_low_tdesc.
7300 * linux-x86-tdesc.c: New file.
7301 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7302 (i386_get_ipa_tdesc_idx): Declare.
7303 (i386_get_ipa_tdesc): Declare.
7304 (initialize_low_tdesc): Declare.
7305
7306 2017-09-05 Yao Qi <yao.qi@linaro.org>
7307
7308 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7309 instead of 0.
7310
7311 2017-09-05 Yao Qi <yao.qi@linaro.org>
7312
7313 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7314 * regcache.c (get_thread_regcache): Use VEC_length.
7315 (init_register_cache): Likewise.
7316 (regcache_cpy): Likewise.
7317 (registers_to_string): Iterate reg_defs via VEC_iterate.
7318 (find_regno): Likewise.
7319 (find_register_by_number): Use VEC_index.
7320 (register_size): Call find_register_by_number.
7321 (register_data): Call find_register_by_number.
7322 (supply_regblock): Use VEC_length.
7323 (regcache_raw_read_unsigned): Likewise.
7324 * tdesc.c (init_target_desc): Iterate reg_defs via
7325 VEC_iterate.
7326 (default_description): Update initializer.
7327 (copy_target_description): Don't update field num_registers.
7328 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7329 <num_registers>: Remove.
7330
7331 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7332
7333 * Makefile.in (.SECONDARY): Define target.
7334
7335 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7336
7337 * linux-low.c (linux_wait_1): Adjust.
7338 * server.c (queue_stop_reply_callback): Adjust.
7339
7340 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7341
7342 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7343 QEnvironmentUnset and QEnvironmentReset packets.
7344 (handle_query): Inform remote that QEnvironmentHexEncoded,
7345 QEnvironmentUnset and QEnvironmentReset are supported.
7346
7347 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7348
7349 * inferiors.h (inferior_target_data): Rename to ...
7350 (thread_target_data): ... this.
7351 (inferior_regcache_data): Rename to ...
7352 (thread_regcache_data): ... this.
7353 (set_inferior_regcache_data): Rename to ...
7354 (set_thread_regcache_data): ... this.
7355 * inferiors.c (inferior_target_data): Rename to ...
7356 (thread_target_data): ... this.
7357 (inferior_regcache_data): Rename to ...
7358 (thread_regcache_data): ... this.
7359 (set_inferior_regcache_data): Rename to ...
7360 (set_thread_regcache_data): ... this.
7361 (free_one_thread): Update.
7362 * linux-low.h (get_thread_lwp): Update.
7363 * regcache.c (get_thread_regcache): Update.
7364 (regcache_invalidate_thread): Update.
7365 (free_register_cache_thread): Update.
7366 * win32-i386-low.c (update_debug_registers_callback): Update.
7367 (win32_get_current_dr): Update.
7368 * win32-low.c (thread_rec): Update.
7369 (delete_thread_info): Update.
7370 (continue_one_thread): Update.
7371 (suspend_one_thread): Update.
7372
7373 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7374
7375 * inferiors.c (set_inferior_target_data): Remove.
7376 * inferiors.h (set_inferior_target_data): Remove.
7377
7378 2017-08-18 Yao Qi <yao.qi@linaro.org>
7379
7380 * Makefile.in (OBS): Add selftest.o.
7381 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7382 * configure, config.in: Re-generated.
7383 * server.c: Include common/sefltest.h.
7384 (captured_main): Handle option --selftest.
7385
7386 2017-08-09 Yao Qi <yao.qi@linaro.org>
7387
7388 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7389 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7390 i386-avx-mpx.o and i386-mmx.o.
7391 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7392 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7393 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7394 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7395 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7396 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7397 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7398 i386/amd64-avx-mpx.xml.
7399
7400 2017-08-09 Yao Qi <yao.qi@linaro.org>
7401
7402 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7403 and x32-avx-avx512.o.
7404 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7405 i386/x32-avx-avx512.xml.
7406
7407 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7408
7409 * tracepoint.h (enum class fast_tpoint_collect_result): New
7410 enumeration.
7411 (fast_tracepoint_collecting): Change return type to
7412 fast_tpoint_collect_result.
7413 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7414 * linux-low.h: Include tracepoint.h.
7415 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7416 fast_tpoint_collect_result.
7417 * linux-low.c (handle_tracepoints): Adjust.
7418 (linux_fast_tracepoint_collecting): Change return type to
7419 fast_tpoint_collect_result.
7420 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7421 linux_wait_1, stuck_in_jump_pad_callback,
7422 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7423 proceed_one_lwp): Adjust to type change.
7424
7425 2017-07-10 Yao Qi <yao.qi@linaro.org>
7426
7427 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7428
7429 2017-06-29 Yao Qi <yao.qi@linaro.org>
7430
7431 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7432 Remove.
7433 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7434
7435 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7436
7437 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7438
7439 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7440
7441 * linux-low.c (linux_create_inferior): Adjust code to access the
7442 environment information via 'gdb_environ' class.
7443 * lynx-low.c (lynx_create_inferior): Likewise.
7444 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7445 (get_environ): Return a pointer to 'our_environ'.
7446 (captured_main): Initialize 'our_environ'.
7447 * server.h (get_environ): Adjust prototype.
7448 * spu-low.c (spu_create_inferior): Adjust code to access the
7449 environment information via 'gdb_environ' class.
7450
7451 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7452
7453 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7454 usage of "register" keyword.
7455
7456 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7457
7458 * configure: Re-generate.
7459
7460 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7461
7462 * configure: Re-generate.
7463
7464 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7465
7466 * Makefile.in (COMPILE.pre): Add "-x c++".
7467
7468 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7469
7470 * fork-child.c: Conditionally include <signal.h>.
7471
7472 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7473
7474 * server.c (handle_general_set): Handle new packet
7475 "QStartupWithShell".
7476 (handle_query): Add "QStartupWithShell" to the list of supported
7477 packets.
7478 (gdbserver_usage): Add help text explaining the
7479 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7480 options.
7481 (captured_main): Recognize and act upon the presence of the new
7482 CLI options.
7483
7484 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7485 Pedro Alves <palves@redhat.com>
7486
7487 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7488 * configure: Regenerate.
7489 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7490 "fork-inferior.o".
7491 (i[34567]86-*-lynxos*): Likewise.
7492 (spu*-*-*): Likewise.
7493 * fork-child.c: New file.
7494 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7495 and "environ.h".
7496 (linux_ptrace_fun): New function.
7497 (linux_create_inferior): Adjust function prototype to reflect
7498 change on "target.h". Adjust function code to use
7499 "fork_inferior".
7500 (linux_request_interrupt): Delete "signal_pid".
7501 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7502 (lynx_ptrace_fun): New function.
7503 (lynx_create_inferior): Adjust function prototype to reflect
7504 change on "target.h". Adjust function code to use
7505 "fork_inferior".
7506 * nto-low.c (nto_create_inferior): Adjust function prototype and
7507 code to reflect change on "target.h". Update comments.
7508 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7509 "common-terminal.h" and "environ.h".
7510 (terminal_fd): Moved to fork-child.c.
7511 (old_foreground_pgrp): Likewise.
7512 (restore_old_foreground_pgrp): Likewise.
7513 (last_status): Make it global.
7514 (last_ptid): Likewise.
7515 (our_environ): New variable.
7516 (startup_with_shell): Likewise.
7517 (program_name): Likewise.
7518 (program_argv): Rename to...
7519 (program_args): ...this.
7520 (wrapper_argv): New variable.
7521 (start_inferior): Delete function.
7522 (get_exec_wrapper): New function.
7523 (get_exec_file): Likewise.
7524 (get_environ): Likewise.
7525 (prefork_hook): Likewise.
7526 (post_fork_inferior): Likewise.
7527 (postfork_hook): Likewise.
7528 (postfork_child_hook): Likewise.
7529 (handle_v_run): Update code to deal with arguments coming from the
7530 remote host. Update calls from "start_inferior" to
7531 "create_inferior".
7532 (captured_main): Likewise. Initialize environment variable. Call
7533 "have_job_control".
7534 * server.h (post_fork_inferior): New prototype.
7535 (get_environ): Likewise.
7536 (last_status): Declare.
7537 (last_ptid): Likewise.
7538 (signal_pid): Likewise.
7539 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7540 (spu_ptrace_fun): New function.
7541 (spu_create_inferior): Adjust function prototype to reflect change
7542 on "target.h". Adjust function code to use "fork_inferior".
7543 * target.c (target_terminal_init): New function.
7544 (target_terminal_inferior): Likewise.
7545 (target_terminal_ours): Likewise.
7546 * target.h: Include <vector>.
7547 (struct target_ops) <create_inferior>: Update prototype.
7548 (create_inferior): Update macro.
7549 * utils.c (gdb_flush_out_err): New function.
7550 * win32-low.c (win32_create_inferior): Adjust function prototype
7551 and code to reflect change on "target.h".
7552
7553 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7554
7555 * inferiors.c (switch_to_thread): New function.
7556
7557 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7558
7559 * Makefile.in (SFILE): Add "common/job-control.c".
7560 (OBS): Add "job-control.o".
7561
7562 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7563
7564 * Makefile: Remove "@host_makefile_frag@".
7565
7566 2017-05-05 Pedro Alves <palves@redhat.com>
7567
7568 * configure: Regenerate.
7569
7570 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7571
7572 * configure: Regenerate.
7573
7574 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7575
7576 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7577 software_single_step change of return type to
7578 std::vector<CORE_ADDR>.
7579 * linux-low.c (install_software_single_step_breakpoints):
7580 Likewise.
7581 * linux-low.h (install_software_single_step_breakpoints):
7582 Likewise.
7583
7584 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7585
7586 * remote-utils.c: Include "gdb_termios.h" instead of
7587 "terminal.h".
7588 * terminal.h: Delete file.
7589
7590 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7591
7592 * server.c: Include <vector>.
7593 <program_argv, wrapper_argv>: Convert to std::vector.
7594 (start_inferior): Rewrite function to use C++.
7595 (handle_v_run): Likewise. Update code that calculates the argv
7596 based on the vRun packet; use C++.
7597 (captured_main): Likewise.
7598
7599 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7600
7601 * server.c (handle_v_cont): Initialize thread_resume::thread
7602 with null_ptid.
7603
7604 2017-04-05 Pedro Alves <palves@redhat.com>
7605
7606 * configure: Regenerate.
7607
7608 2017-04-05 Pedro Alves <palves@redhat.com>
7609
7610 * gdbreplay.c (sync_error): Constify.
7611 * linux-x86-low.c (push_opcode): Constify.
7612
7613 2017-04-05 Pedro Alves <palves@redhat.com>
7614
7615 * win32-low.c (get_child_debug_event)
7616 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7617 Report TARGET_WAITKIND_SPURIOUS instead.
7618
7619 2017-04-05 Pedro Alves <palves@redhat.com>
7620
7621 * remote-utils.c (remote_prepare, remote_open): Constify.
7622 * remote-utils.h (remote_prepare, remote_open): Constify.
7623 * server.c (captured_main): Constify 'port' handling.
7624
7625 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7626
7627 * Makefile.in (clean): Clear .deps.
7628
7629 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7630
7631 * .gitignore: Remove generated files, replace with wildcard.
7632 * (clean): Replace removal of generated files with wildcard.
7633 (version.c): Replace with...
7634 (version-generated.c): ...this.
7635 (xml-builtin.c): Replace with...
7636 (xml-builtin-generated.c): ...this.
7637 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7638 (%.c: *regformats*): Replace with...
7639 (%-generated.c: *regformats*): ...this.
7640
7641 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7642
7643 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7644 (xtensa_fill_gregset): Call collect_register_by_name for
7645 threadptr register.
7646 (xtensa_store_gregset): Call supply_register_by_name for
7647 threadptr register.
7648
7649 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7650
7651 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7652 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7653 (xtensa_store_gregset): Call supply_register for all registers in
7654 a0_regnum..a0_regnum + C0_NREGS range.
7655
7656 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7657
7658 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7659 (ax-ipa.o: ax.c): Remove.
7660 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7661 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7662 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7663 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7664 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7665
7666 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7667
7668 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7669 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7670 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7671 (errors-ipa.o: ../common/errors.c): Remove.
7672 (format-ipa.o: ../common/format.c): Remove.
7673 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7674
7675 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7676
7677 * Makefile.in (%-ipa.o: %.c): New rule.
7678 (tracepoint-ipa.o: tracepoint.c): Remove.
7679 (utils-ipa.o: utils.c): Remove.
7680 (remote-utils-ipa.o: remote-utils.c): Remove.
7681 (regcache-ipa.o: regcache.c): Remove.
7682 (i386-linux-ipa.o: i386-linux.c): Remove.
7683 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7684 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7685 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7686 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7687 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7688 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7689 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7690 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7691 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7692 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7693 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7694 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7695 (aarch64-ipa.o: aarch64.c): Remove.
7696 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7697 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7698 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7699 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7700 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7701 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7702 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7703 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7704 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7705 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7706 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7707 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7708 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7709 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7710 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7711 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7712 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7713 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7714 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7715 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7716 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7717 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7718 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7719 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7720 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7721 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7722 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7723 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7724 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7725 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7726 (tdesc-ipa.o: tdesc.c): Remove.
7727 (x32-linux-ipa.o: x32-linux.c): Remove.
7728 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7729 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7730
7731 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7732
7733 * Makefile.in (%.o: ../arch/%.c): New rule.
7734 (arm.o: ../arch/arm.c): Remove.
7735 (arm-linux.o: ../arch/arm-linux.c): Remove.
7736 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7737 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7738
7739 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7740
7741 * Makefile.in (%.o: ../nat/%.c): New rule.
7742 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7743 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7744 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7745 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7746 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7747 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7748 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7749 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7750 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7751 (linux-personality.o: ../nat/linux-personality.c): Remove.
7752 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7753 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7754 (x86-linux.o: ../nat/x86-linux.c): Remove.
7755 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7756 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7757
7758 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7759
7760 * Makefile.in (%.o: ../common/%.c): New rule.
7761 (signals.o: ../common/signals.c): Remove.
7762 (print-utils.o: ../common/print-utils.c): Remove.
7763 (rsp-low.o: ../common/rsp-low.c): Remove.
7764 (common-utils.o: ../common/common-utils.c): Remove.
7765 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7766 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7767 (vec.o: ../common/vec.c): Remove.
7768 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7769 (xml-utils.o: ../common/xml-utils.c): Remove.
7770 (ptid.o: ../common/ptid.c): Remove.
7771 (buffer.o: ../common/buffer.c): Remove.
7772 (format.o: ../common/format.c): Remove.
7773 (filestuff.o: ../common/filestuff.c): Remove.
7774 (agent.o: ../common/agent.c): Remove.
7775 (errors.o: ../common/errors.c): Remove.
7776 (environ.o: ../common/environ.c): Remove.
7777 (common-debug.o: ../common/common-debug.c): Remove.
7778 (cleanups.o: ../common/cleanups.c): Remove.
7779 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7780 (fileio.o: ../common/fileio.c): Remove.
7781 (common-regcache.o: ../common/common-regcache.c): Remove.
7782 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7783 (new-op.o: ../common/new-op.c): Remove.
7784 (btrace-common.o: ../common/btrace-common.c): Remove.
7785
7786 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7787
7788 * Makefile.in (%.o: ../target/%.c): New rule.
7789 (waitstatus.o: ../target/waitstatus.c): Remove.
7790
7791 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7792
7793 * Makefile.in
7794 (%.c: ../regformats/%.dat,
7795 (%.c: ../regformats/arm/%.dat,
7796 (%.c: ../regformats/i386/%.dat,
7797 (%.c: ../regformats/rs6000/%.dat): New rules.
7798 (aarch64.c): Remove.
7799 (reg-arm.c): Remove.
7800 (arm-with-iwmmxt.c): Remove.
7801 (arm-with-vfpv2.c): Remove.
7802 (arm-with-vfpv3.c): Remove.
7803 (arm-with-neon.c): Remove.
7804 (reg-bfin.c): Remove.
7805 (reg-cris.c): Remove.
7806 (reg-crisv32.c): Remove.
7807 (i386.c): Remove.
7808 (i386-linux.c): Remove.
7809 (i386-avx.c): Remove.
7810 (i386-avx-linux.c): Remove.
7811 (i386-avx-avx512.c): Remove.
7812 (i386-avx-avx512-linux.c): Remove.
7813 (i386-mpx.c): Remove.
7814 (i386-mpx-linux.c): Remove.
7815 (i386-avx-mpx-avx512-pku.c): Remove.
7816 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7817 (i386-avx-mpx.c): Remove.
7818 (i386-avx-mpx-linux.c): Remove.
7819 (i386-mmx.c): Remove.
7820 (i386-mmx-linux.c): Remove.
7821 (reg-ia64.c): Remove.
7822 (reg-m32r.c): Remove.
7823 (reg-m68k.c): Remove.
7824 (reg-cf.c): Remove.
7825 (mips-linux.c): Remove.
7826 (mips-dsp-linux.c): Remove.
7827 (mips64-linux.c): Remove.
7828 (mips64-dsp-linux.c): Remove.
7829 (nios2-linux.c): Remove.
7830 (powerpc-32.c): Remove.
7831 (powerpc-32l.c): Remove.
7832 (powerpc-altivec32l.c): Remove.
7833 (powerpc-cell32l.c): Remove.
7834 (powerpc-vsx32l.c): Remove.
7835 (powerpc-isa205-32l.c): Remove.
7836 (powerpc-isa205-altivec32l.c): Remove.
7837 (powerpc-isa205-vsx32l.c): Remove.
7838 (powerpc-e500l.c): Remove.
7839 (powerpc-64l.c): Remove.
7840 (powerpc-altivec64l.c): Remove.
7841 (powerpc-cell64l.c): Remove.
7842 (powerpc-vsx64l.c): Remove.
7843 (powerpc-isa205-64l.c): Remove.
7844 (powerpc-isa205-altivec64l.c): Remove.
7845 (powerpc-isa205-vsx64l.c): Remove.
7846 (s390-linux32.c): Remove.
7847 (s390-linux32v1.c): Remove.
7848 (s390-linux32v2.c): Remove.
7849 (s390-linux64.c): Remove.
7850 (s390-linux64v1.c): Remove.
7851 (s390-linux64v2.c): Remove.
7852 (s390-te-linux64.c): Remove.
7853 (s390-vx-linux64.c): Remove.
7854 (s390-tevx-linux64.c): Remove.
7855 (s390x-linux64.c): Remove.
7856 (s390x-linux64v1.c): Remove.
7857 (s390x-linux64v2.c): Remove.
7858 (s390x-te-linux64.c): Remove.
7859 (s390x-vx-linux64.c): Remove.
7860 (s390x-tevx-linux64.c): Remove.
7861 (tic6x-c64xp-linux.c): Remove.
7862 (tic6x-c64x-linux.c): Remove.
7863 (tic6x-c62x-linux.c): Remove.
7864 (reg-sh.c): Remove.
7865 (reg-sparc64.c): Remove.
7866 (reg-spu.c): Remove.
7867 (amd64.c): Remove.
7868 (amd64-linux.c): Remove.
7869 (amd64-avx.c): Remove.
7870 (amd64-avx-linux.c): Remove.
7871 (amd64-avx-avx512.c): Remove.
7872 (amd64-avx-avx512-linux.c): Remove.
7873 (amd64-mpx.c): Remove.
7874 (amd64-mpx-linux.c): Remove.
7875 (amd64-avx-mpx-avx512-pku.c): Remove.
7876 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7877 (amd64-avx-mpx.c): Remove.
7878 (amd64-avx-mpx-linux.c): Remove.
7879 (x32.c): Remove.
7880 (x32-linux.c): Remove.
7881 (x32-avx.c): Remove.
7882 (x32-avx-linux.c): Remove.
7883 (x32-avx-avx512.c): Remove.
7884 (x32-avx-avx512-linux.c): Remove.
7885 (reg-xtensa.c): Remove.
7886 (reg-tilegx.c): Remove.
7887 (reg-tilegx32.c): Remove.
7888
7889 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7890
7891 * Makefile.in (SFILES): Add "common/environ.c".
7892 (OBJS): Add "common/environ.h".
7893
7894 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7895
7896 * configure.ac: Check if the fs_base and gs_base members of
7897 `struct user_regs_struct' exist.
7898 * config.in: Regenerated.
7899 * configure: Likewise.
7900
7901 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7902
7903 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7904 target_read_memory.
7905 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7906 (get_next_pcs_syscall_next_pc): Likewise.
7907
7908 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7909
7910 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7911 * nto-x86-low.c: Likewise.
7912
7913 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7914
7915 * Makefile.in: Include disable-implicit-rules.mk.
7916
7917 2016-11-23 Pedro Alves <palves@redhat.com>
7918
7919 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7920 (debug_vprintf): Use std::chrono::steady_clock instead of
7921 gettimeofday. Use '.' instead of ':'.
7922 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7923 (get_timestamp): Use std::chrono::steady_clock instead of
7924 gettimeofday.
7925
7926 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7927
7928 * Makefile.in: Fix whitespace formatting.
7929
7930 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7931
7932 * Makefile.in (SFILES, OBS): Flatten list and order
7933 alphabetically.
7934
7935 2016-11-23 Pedro Alves <palves@redhat.com>
7936
7937 * event-loop.c (handle_file_event): Use warning.
7938 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7939 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7940 Use warning.
7941
7942 2016-11-23 Pedro Alves <palves@redhat.com>
7943
7944 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7945 output.
7946 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7947 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7948 debug_printf and debug_flush for debug output.
7949 * server.c (handle_general_set): Likewise.
7950 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7951 output.
7952
7953 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7954
7955 * Makefile.in (.c.o): Replace rule with ...
7956 (%.o: %.c): ... this one.
7957
7958 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7959
7960 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7961 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7962 make.
7963 * configure.ac: Remove checks for the make program.
7964 * configure: Re-generate.
7965
7966 2016-10-28 Pedro Alves <palves@redhat.com>
7967
7968 * Makefile.in (CXX_DIALECT): Get from configure.
7969 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7970 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7971 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7972 * config.in: Regenerate.
7973 * configure: Regenerate.
7974
7975 2016-10-27 Yao Qi <yao.qi@linaro.org>
7976
7977 * linux-low.c (linux_supports_range_stepping): Return true if
7978 can_software_single_step return true.
7979
7980 2016-10-27 Yao Qi <yao.qi@linaro.org>
7981
7982 * inferiors.c (find_inferior_in_random): New function.
7983 * inferiors.h (find_inferior_in_random): Declare.
7984 * linux-low.c (linux_wait_for_event_filtered): Call
7985 find_inferior_in_random instead of find_inferior.
7986
7987 2016-10-27 Yao Qi <yao.qi@linaro.org>
7988
7989 * linux-low.c (linux_wait_1): If single-step breakpoints are
7990 inserted, remove them.
7991
7992 2016-10-26 Pedro Alves <palves@redhat.com>
7993
7994 * linux-low.c (handle_extended_wait): Link parent/child fork
7995 threads.
7996 (linux_wait_1): Unlink them.
7997 (linux_set_resume_request): Ignore resume requests for
7998 already-resumed and unhandled fork child threads.
7999 * linux-low.h (struct lwp_info) <fork_relative>: New field.
8000 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
8001 New functions.
8002 (handle_v_requests) <vCont>: Don't call require_running.
8003 * server.h (in_queued_stop_replies): New declaration.
8004
8005 2016-10-24 Yao Qi <yao.qi@linaro.org>
8006
8007 PR server/20733
8008 * linux-aarch64-low.c (append_insns): Cast the return value to
8009 'uint32_t *'.
8010
8011 2016-10-10 Yao Qi <yao.qi@linaro.org>
8012
8013 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
8014
8015 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
8016
8017 * target.c (target_supports_multi_process): New function, moved
8018 from...
8019 * target.h (target_supports_multi_process): ... here. Remove
8020 macro.
8021
8022 2016-10-05 Tom Tromey <tom@tromey.com>
8023
8024 PR remote/20655:
8025 * tracepoint.c (handle_tracepoint_bkpts): Check
8026 ipa_error_tracepoint, not ipa_stopping_tracepoint.
8027
8028 2016-10-05 Yao Qi <yao.qi@linaro.org>
8029
8030 * configure.srv: Update the path of arm-*.xml files.
8031
8032 2016-10-05 Terry Guo <terry.guo@arm.com>
8033 Yao Qi <yao.qi@linaro.org>
8034
8035 * Makefile.in: Adjust the path of rules.
8036 * configure.srv: Update the path of xml files.
8037 * regformats/arm-with-iwmmxt.dat: Regenerated.
8038 * regformats/arm-with-neon.dat: Likewise.
8039 * regformats/arm-with-vfpv2.dat: Likewise.
8040 * regformats/arm-with-vfpv3.dat Likewise.
8041
8042 2016-09-30 Yao Qi <yao.qi@linaro.org>
8043
8044 PR gdbserver/20627
8045 * target.c (target_stop_and_wait): Don't call
8046 target_continue_no_signal, use resume_stop instead.
8047
8048 2016-09-26 Yao Qi <yao.qi@linaro.org>
8049
8050 * linux-low.c (linux_wait_1): Call debug_exit.
8051
8052 2016-09-23 Pedro Alves <palves@redhat.com>
8053
8054 * Makefile.in (SFILES): Add common/new-op.c.
8055 (OBS): Add common/new-op.o.
8056 (new-op.o): New rule.
8057
8058 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
8059
8060 * .gitinore: Ignore more files.
8061
8062 2016-09-21 Yao Qi <yao.qi@linaro.org>
8063
8064 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
8065 23.
8066
8067 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
8068
8069 * server.c (start_inferior): Call target_mourn_inferior instead of
8070 mourn_inferior; pass ptid_t argument to it.
8071 (resume): Likewise.
8072 (handle_target_event): Likewise.
8073 * target.c (target_mourn_inferior): New function.
8074 * target.h (mourn_inferior): Delete macro.
8075
8076 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8077
8078 * linux-low.c (lwp_is_stepping): New function.
8079
8080 2016-09-06 Carl Love <cel@us.ibm.com>
8081
8082 * server.c (start_inferior): Fixed comment, requested comment change
8083 didn't get updated correctly. Removed reference to ptrace () call as
8084 it is only true on Linux systems.
8085
8086 2016-09-06 Carl Love <cel@us.ibm.com>
8087
8088 * server.c (start_inferior): Do not call
8089 function target_post_create_inferior () if the
8090 inferior process has already exited.
8091
8092 2016-09-05 Pedro Alves <palves@redhat.com>
8093
8094 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
8095 (COMPILE.pre, CC_LD): Use CXX directly.
8096 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
8097 * acinclude.m4: Don't include build-with-cxx.m4.
8098 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
8099 * configure: Regenerate.
8100
8101 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
8102
8103 PR gdb/19495
8104 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
8105 call writing data to own_buf.
8106
8107 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8108
8109 * target.c (mywait): Call target_wait instead of
8110 the_target->wait.
8111 (target_wait): New function.
8112
8113 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8114
8115 * server.c (start_inferior): New variable 'ptid'. Replace calls
8116 to the_target->resume by target_continue{,_no_signal}, depending
8117 on the case.
8118 * target.c (target_stop_and_wait): Call target_continue_no_signal
8119 instead of the_target->resume.
8120 (target_continue): New function.
8121
8122 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
8123
8124 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
8125
8126 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
8127
8128 PR server/20491
8129 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
8130 ps_prochandle.
8131 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8132 * linux-arm-low.c (ps_get_thread_area): Likewise.
8133 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8134 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8135 * linux-mips-low.c (ps_get_thread_area): Likewise.
8136 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8137 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8138 * linux-x86-low.c (ps_get_thread_area): Likewise.
8139 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8140
8141 2016-08-19 Pedro Alves <palves@redhat.com>
8142
8143 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8144
8145 2016-08-19 Pedro Alves <palves@redhat.com>
8146
8147 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8148 comment. Use memcpy instead of casting through unsigned long.
8149
8150 2016-08-19 Pedro Alves <palves@redhat.com>
8151
8152 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8153 allocating around 0x80000000.
8154
8155 2016-08-19 Pedro Alves <palves@redhat.com>
8156
8157 PR gdb/20415
8158 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8159 (x32-avx512-linux-ipa.o): New rules.
8160 * configure.ac (x86_64-*-linux*): New x32 check.
8161 * configure.srv (ipa_x32_linux_regobj): New.
8162 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8163 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8164 descriptions.
8165 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8166 descriptions.
8167 * configure: Regenerate.
8168
8169 2016-08-09 Pedro Alves <palves@redhat.com>
8170
8171 PR gdb/18653
8172 * Makefile.in (OBS): Add signals-state-save-restore.o.
8173 (signals-state-save-restore.o): New rule.
8174 * config.in: Regenerate.
8175 * configure: Regenerate.
8176 * linux-low.c: Include "signals-state-save-restore.h".
8177 (linux_create_inferior): Call
8178 restore_original_signals_state.
8179 * server.c: Include "dispositions-save-restore.h".
8180 (captured_main): Call save_original_signals_state.
8181
8182 2016-08-05 Pedro Alves <palves@redhat.com>
8183
8184 * configure: Regenerate.
8185
8186 2016-08-04 Yao Qi <yao.qi@linaro.org>
8187
8188 * linux-low.c (regsets_fetch_inferior_registers): Check
8189 errno is ESRCH or not.
8190
8191 2016-08-02 Yao Qi <yao.qi@linaro.org>
8192
8193 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8194 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8195 (thread_db_load_search): Update.
8196 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8197 td_ta_set_event and td_ta_event_getmsg.
8198
8199 2016-07-26 Pedro Alves <palves@redhat.com>
8200
8201 PR server/20414
8202 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8203 of unsigned long for 64-bit registers and use uint32_t instead of
8204 unsigned int for 32-bit registers.
8205
8206 2016-07-26 Pedro Alves <palves@redhat.com>
8207
8208 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8209 to 'ptrace'.
8210
8211 2016-07-21 Tom Tromey <tom@tromey.com>
8212
8213 * configure: Rebuild.
8214
8215 2016-07-21 Yao Qi <yao.qi@linaro.org>
8216
8217 * mem-break.c (find_gdb_breakpoint): Cast bp to
8218 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8219
8220 2016-07-21 Yao Qi <yao.qi@linaro.org>
8221
8222 * server.c (handle_v_requests): Support s and S actions
8223 if target_supports_software_single_step return true.
8224
8225 2016-07-21 Yao Qi <yao.qi@linaro.org>
8226
8227 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8228 is resume_step, call maybe_hw_step.
8229 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8230 and unstop them.
8231 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8232 breakpoints or not.
8233 (proceed_one_lwp): If resume request is resume_step, install
8234 reinsert breakpoints and call maybe_hw_step.
8235
8236 2016-07-21 Yao Qi <yao.qi@linaro.org>
8237
8238 * linux-low.c (proceed_one_lwp): Declare.
8239 (linux_resume_one_thread): Remove local variable 'step'.
8240 Lift code enqueue signal. Call proceed_one_lwp instead of
8241 linux_resume_one_lwp.
8242
8243 2016-07-21 Yao Qi <yao.qi@linaro.org>
8244
8245 * linux-low.c (linux_resume_one_thread): Call
8246 enqueue_pending_signal.
8247
8248 2016-07-21 Yao Qi <yao.qi@linaro.org>
8249
8250 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8251 * inferiors.c (do_restore_current_thread_cleanup): New function.
8252 (make_cleanup_restore_current_thread): Likewise.
8253 * linux-low.c (install_software_single_step_breakpoints): Call
8254 make_cleanup_restore_current_thread. Switch current_thread to
8255 thread.
8256
8257 2016-07-21 Yao Qi <yao.qi@linaro.org>
8258
8259 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8260 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8261 (clone_one_breakpoint): Likewise.
8262 (delete_reinsert_breakpoints): Change parameter to thread.
8263 Callers updated.
8264 (has_reinsert_breakpoints): Likewise.
8265 (uninsert_reinsert_breakpoints): Likewise.
8266 (reinsert_reinsert_breakpoints): Likewise.
8267 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8268 (delete_reinsert_breakpoints): Likewise.
8269 (reinsert_reinsert_breakpoints): Likewise.
8270 (uninsert_reinsert_breakpoints): Likewise.
8271 (has_reinsert_breakpoints): Likewise.
8272
8273 2016-07-21 Yao Qi <yao.qi@linaro.org>
8274
8275 * inferiors.c (get_thread_process): Make parameter const.
8276 * inferiors.h (get_thread_process): Update declaration.
8277 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8278 Add new parameters child_thread and parent_thread. Callers
8279 updated.
8280 * mem-break.h (clone_all_breakpoints): Update declaration.
8281
8282 2016-07-21 Yao Qi <yao.qi@linaro.org>
8283
8284 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8285 <command_list, handler>: Remove.
8286 (struct gdb_breakpoint): New.
8287 (struct other_breakpoint): New.
8288 (struct reinsert_breakpoint): New.
8289 (is_gdb_breakpoint): New function.
8290 (any_persistent_commands): Update command_list if
8291 is_gdb_breakpoint returns true.
8292 (set_breakpoint): Create breakpoints according to their types.
8293 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8294 (set_gdb_breakpoint_1): Likewise.
8295 (set_gdb_breakpoint): Likewise.
8296 (clear_breakpoint_conditions): Change parameter type to
8297 'struct gdb_breakpoint *'.
8298 (clear_breakpoint_commands): Likewise.
8299 (clear_breakpoint_conditions_and_commands): Likewise.
8300 (add_condition_to_breakpoint): Likewise.
8301 (add_breakpoint_condition): Likewise.
8302 (add_commands_to_breakpoint): Likewise.
8303 (check_breakpoints): Check other_breakpoint.
8304 (clone_one_breakpoint): Clone breakpopint according to its type.
8305 * mem-break.h (struct gdb_breakpoint): Declare.
8306 (set_gdb_breakpoint): Update declaration.
8307 (clear_breakpoint_conditions_and_commands): Likewise.
8308 (add_breakpoint_condition): Likewise.
8309 (add_breakpoint_commands): Likewise.
8310 * server.c (process_point_options): Change parameter type to
8311 'struct gdb_breakpoint *'.
8312
8313 2016-07-21 Yao Qi <yao.qi@linaro.org>
8314
8315 * mem-break.c (set_breakpoint_at): Rename it to ...
8316 (set_breakpoint_type_at): ... it.
8317 (set_breakpoint_at): Call set_breakpoint_type_at.
8318 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8319 * mem-break.h (set_breakpoint_at): Update comments.
8320
8321 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8322
8323 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8324 to buf parameter.
8325 (nios2_store_gregset): Likewise.
8326
8327 2016-07-01 Pedro Alves <palves@redhat.com>
8328 Antoine Tremblay <antoine.tremblay@ericsson.com>
8329
8330 * linux-low.c: Change interface to take the target lwp_info
8331 pointer directly and return void. Handle detaching from a zombie
8332 thread.
8333 (linux_detach_lwp_callback): New function.
8334 (linux_detach): Detach from the leader thread after detaching from
8335 the clone threads.
8336
8337 2016-06-28 Yao Qi <yao.qi@linaro.org>
8338
8339 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8340 for variable new_offset.
8341 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8342 (aarch64_ftrace_insn_reloc_cb): Likewise.
8343 (aarch64_ftrace_insn_reloc_tb): Likewise.
8344 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8345 PRIx64 instead of PRIx32.
8346
8347 2016-06-28 Yao Qi <yao.qi@linaro.org>
8348
8349 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8350 (the_low_target): Install arm_get_syscall_trapinfo.
8351
8352 2016-06-28 Yao Qi <yao.qi@linaro.org>
8353
8354 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8355 function.
8356 (the_low_target): Install aarch64_get_syscall_trapinfo.
8357
8358 2016-06-28 Yao Qi <yao.qi@linaro.org>
8359
8360 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8361 Callers updated.
8362 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8363 Remove parameter sysno.
8364 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8365 sysret.
8366
8367 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8368
8369 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8370 (s390_emit_ne_goto): Likewise.
8371 (s390_emit_lt_goto): Likewise.
8372 (s390_emit_le_goto): Likewise.
8373 (s390_emit_gt_goto): Likewise.
8374 (s390_emit_ge_goto): Likewise.
8375 (s390x_emit_eq_goto): Likewise.
8376 (s390x_emit_ne_goto): Likewise.
8377 (s390x_emit_lt_goto): Likewise.
8378 (s390x_emit_le_goto): Likewise.
8379 (s390x_emit_gt_goto): Likewise.
8380 (s390x_emit_ge_goto): Likewise.
8381 (s390_emit_ops_impl): Mark variable static.
8382 (s390x_emit_ops): Likewise.
8383
8384 2016-06-17 Yao Qi <yao.qi@linaro.org>
8385
8386 * linux-low.c (handle_extended_wait): Call
8387 uninsert_reinsert_breakpoints for the parent process. Remove
8388 reinsert breakpoints from the child process. Reinsert them to
8389 the parent process when vfork is done.
8390 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8391 (reinsert_reinsert_breakpoints): New function.
8392 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8393 (reinsert_reinsert_breakpoints): Declare.
8394
8395 2016-06-17 Yao Qi <yao.qi@linaro.org>
8396
8397 * linux-low.c (handle_extended_wait): If the parent is doing
8398 step-over, remove the reinsert breakpoints from the forked child.
8399
8400 2016-06-17 Yao Qi <yao.qi@linaro.org>
8401
8402 * linux-low.c (unsuspend_all_lwps): Declare.
8403 (linux_low_filter_event): If thread exited, call finish_step_over.
8404 If step-over is finished, unsuspend other threads.
8405
8406 2016-06-17 Yao Qi <yao.qi@linaro.org>
8407
8408 * linux-low.c (linux_resume_one_lwp_throw): Assert
8409 has_reinsert_breakpoints returns false.
8410 * mem-break.c (delete_disabled_breakpoints): Assert
8411 bp type isn't reinsert_breakpoint.
8412
8413 2016-06-17 Yao Qi <yao.qi@linaro.org>
8414
8415 * linux-low.c (maybe_hw_step): New function.
8416 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8417 (finish_step_over): Switch current_thread to lwp temporarily,
8418 and assert has_reinsert_breakpoints returns true.
8419 (proceed_one_lwp): Call maybe_hw_step.
8420 * mem-break.c (has_reinsert_breakpoints): New function.
8421 * mem-break.h (has_reinsert_breakpoints): Declare.
8422
8423 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8424
8425 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8426
8427 2016-05-17 Yao Qi <yao.qi@linaro.org>
8428
8429 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8430 instead of find_inferior.
8431
8432 2016-05-05 Yao Qi <yao.qi@linaro.org>
8433
8434 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8435 Initialize res to zero.
8436
8437 2016-05-05 Yao Qi <yao.qi@linaro.org>
8438
8439 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8440 to uint32_t.
8441
8442 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8443
8444 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8445 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8446 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8447
8448 2016-04-28 Par Olsson <par.olsson@windriver.com>
8449 Simon Marchi <simon.marchi@ericsson.com>
8450
8451 * tracepoint.c (write_inferior_int8): New function.
8452 (cmd_qtenable_disable): Write enable flag using
8453 write_inferior_int8.
8454
8455 2016-04-25 Yao Qi <yao.qi@linaro.org>
8456
8457 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8458 (need_step_over_p): Return zero if the LWP has pending signals
8459 can be delivered on software single step target.
8460
8461 2016-04-25 Yao Qi <yao.qi@linaro.org>
8462
8463 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8464 return instead of error.
8465
8466 2016-04-22 Yao Qi <yao.qi@linaro.org>
8467
8468 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8469 to 23.
8470
8471 2016-04-22 Yao Qi <yao.qi@linaro.org>
8472
8473 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8474 signal when stepping over breakpoint with software single
8475 step.
8476
8477 2016-04-21 Pedro Alves <palves@redhat.com>
8478
8479 * linux-s390-low.c (s390_collect_ptrace_register)
8480 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8481 add casts.
8482 (s390_check_regset): Use void * instead of gdb_byte *.
8483
8484 2016-04-20 Pedro Alves <palves@redhat.com>
8485
8486 * configure: Renegerate.
8487
8488 2016-04-20 Yao Qi <yao.qi@linaro.org>
8489
8490 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8491 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8492 number 16.
8493 (arm_store_gregset): Likewise.
8494
8495 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8496
8497 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8498 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8499 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8500 (amd64-avx-mpx-linux.c): New rules.
8501 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8502 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8503 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8504 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8505 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8506 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8507 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8508 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8509 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8510 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8511 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8512 * linux-x86-low.c (x86_linux_read_description): Add case for
8513 X86_XSTATE_AVX_MPX_MASK.
8514 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8515 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8516 init_registers_i386_avx_mpx_linux.
8517 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8518 (initialize_low_tracepoint): Call
8519 init_registers_i386_avx_mpx_linux.
8520 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8521 (initialize_low_tracepoint): Call
8522 init_registers_amd64_avx_mpx_linux.
8523 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8524 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8525 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8526 declarations.
8527
8528 2016-04-18 Pedro Alves <palves@redhat.com>
8529
8530 * configure: Regenerate.
8531
8532 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8533
8534 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8535 (aarch64_emit_sub): Likewise.
8536
8537 2016-04-12 Pedro Alves <palves@redhat.com>
8538
8539 * utils.c (prepare_to_throw_exception): Delete.
8540
8541 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8542
8543 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8544
8545 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8546
8547 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8548
8549 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8550
8551 * linux-aarch64-ipa.c: Add <elf.h> include.
8552 * linux-ppc-ipa.c: Add <elf.h> include.
8553 * linux-s390-ipa.c: Add <elf.h> include.
8554
8555 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8556
8557 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8558 (get_raw_reg_ptr): Likewise.
8559 (get_trace_state_variable_value_ptr): Likewise.
8560 (set_trace_state_variable_value_ptr): Likewise.
8561 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8562 char *.
8563
8564 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8565 Marcin Kościelnicki <koriakin@0x04.net>
8566
8567 PR/17221
8568 * linux-ppc-low.c (emit_insns): New function.
8569 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8570 (ppc_emit_prologue): New function.
8571 (ppc_emit_epilogue): New function.
8572 (ppc_emit_add): New function.
8573 (ppc_emit_sub): New function.
8574 (ppc_emit_mul): New function.
8575 (ppc_emit_lsh): New function.
8576 (ppc_emit_rsh_signed): New function.
8577 (ppc_emit_rsh_unsigned): New function.
8578 (ppc_emit_ext): New function.
8579 (ppc_emit_zero_ext): New function.
8580 (ppc_emit_log_not): New function.
8581 (ppc_emit_bit_and): New function.
8582 (ppc_emit_bit_or): New function.
8583 (ppc_emit_bit_xor): New function.
8584 (ppc_emit_bit_not): New function.
8585 (ppc_emit_equal): New function.
8586 (ppc_emit_less_signed): New function.
8587 (ppc_emit_less_unsigned): New function.
8588 (ppc_emit_ref): New function.
8589 (ppc_emit_const): New function.
8590 (ppc_emit_reg): New function.
8591 (ppc_emit_pop): New function.
8592 (ppc_emit_stack_flush): New function.
8593 (ppc_emit_swap): New function.
8594 (ppc_emit_stack_adjust): New function.
8595 (ppc_emit_call): New function.
8596 (ppc_emit_int_call_1): New function.
8597 (ppc_emit_void_call_2): New function.
8598 (ppc_emit_if_goto): New function.
8599 (ppc_emit_goto): New function.
8600 (ppc_emit_eq_goto): New function.
8601 (ppc_emit_ne_goto): New function.
8602 (ppc_emit_lt_goto): New function.
8603 (ppc_emit_le_goto): New function.
8604 (ppc_emit_gt_goto): New function.
8605 (ppc_emit_ge_goto): New function.
8606 (ppc_write_goto_address): New function.
8607 (ppc_emit_ops_impl): New static variable.
8608 (ppc64v1_emit_prologue): New function.
8609 (ppc64v2_emit_prologue): New function.
8610 (ppc64_emit_epilogue): New function.
8611 (ppc64_emit_add): New function.
8612 (ppc64_emit_sub): New function.
8613 (ppc64_emit_mul): New function.
8614 (ppc64_emit_lsh): New function.
8615 (ppc64_emit_rsh_signed): New function.
8616 (ppc64_emit_rsh_unsigned): New function.
8617 (ppc64_emit_ext): New function.
8618 (ppc64_emit_zero_ext): New function.
8619 (ppc64_emit_log_not): New function.
8620 (ppc64_emit_bit_and): New function.
8621 (ppc64_emit_bit_or): New function.
8622 (ppc64_emit_bit_xor): New function.
8623 (ppc64_emit_bit_not): New function.
8624 (ppc64_emit_equal): New function.
8625 (ppc64_emit_less_signed): New function.
8626 (ppc64_emit_less_unsigned): New function.
8627 (ppc64_emit_ref): New function.
8628 (ppc64_emit_const): New function.
8629 (ppc64v1_emit_reg): New function.
8630 (ppc64v2_emit_reg): New function.
8631 (ppc64_emit_pop): New function.
8632 (ppc64_emit_stack_flush): New function.
8633 (ppc64_emit_swap): New function.
8634 (ppc64v1_emit_call): New function.
8635 (ppc64v2_emit_call): New function.
8636 (ppc64v1_emit_int_call_1): New function.
8637 (ppc64v2_emit_int_call_1): New function.
8638 (ppc64v1_emit_void_call_2): New function.
8639 (ppc64v2_emit_void_call_2): New function.
8640 (ppc64_emit_if_goto): New function.
8641 (ppc64_emit_eq_goto): New function.
8642 (ppc64_emit_ne_goto): New function.
8643 (ppc64_emit_lt_goto): New function.
8644 (ppc64_emit_le_goto): New function.
8645 (ppc64_emit_gt_goto): New function.
8646 (ppc64_emit_ge_goto): New function.
8647 (ppc64v1_emit_ops_impl): New static variable.
8648 (ppc64v2_emit_ops_impl): New static variable.
8649 (ppc_emit_ops): New function.
8650 (linux_low_target): Wire in ppc_emit_ops.
8651
8652 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8653 Marcin Kościelnicki <koriakin@0x04.net>
8654
8655 PR/17221
8656 * Makefile.in: Add powerpc-*-ipa.o
8657 * configure.srv: Add ipa_obj for powerpc*-linux.
8658 * linux-ppc-ipa.c: New file.
8659 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8660 includes.
8661 (PPC_FIELD): New macro.
8662 (PPC_SEXT): New macro.
8663 (PPC_OP6): New macro.
8664 (PPC_BO): New macro.
8665 (PPC_LI): New macro.
8666 (PPC_BD): New macro.
8667 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8668 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8669 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8670 (ppc_get_thread_area): New function.
8671 (is_elfv2_inferior): New function.
8672 (gen_ds_form): New function.
8673 (GEN_STD): New macro.
8674 (GEN_STDU): New macro.
8675 (GEN_LD): New macro.
8676 (GEN_LDU): New macro.
8677 (gen_d_form): New function.
8678 (GEN_ADDI): New macro.
8679 (GEN_ADDIS): New macro.
8680 (GEN_LI): New macro.
8681 (GEN_LIS): New macro.
8682 (GEN_ORI): New macro.
8683 (GEN_ORIS): New macro.
8684 (GEN_LWZ): New macro.
8685 (GEN_STW): New macro.
8686 (GEN_STWU): New macro.
8687 (gen_xfx_form): New function.
8688 (GEN_MFSPR): New macro.
8689 (GEN_MTSPR): New macro.
8690 (GEN_MFCR): New macro.
8691 (GEN_MTCR): New macro.
8692 (GEN_SYNC): New macro.
8693 (GEN_LWSYNC): New macro.
8694 (gen_x_form): New function.
8695 (GEN_OR): New macro.
8696 (GEN_MR): New macro.
8697 (GEN_LWARX): New macro.
8698 (GEN_STWCX): New macro.
8699 (GEN_CMPW): New macro.
8700 (gen_md_form): New function.
8701 (GEN_RLDICL): New macro.
8702 (GEN_RLDICR): New macro.
8703 (gen_i_form): New function.
8704 (GEN_B): New macro.
8705 (GEN_BL): New macro.
8706 (gen_b_form): New function.
8707 (GEN_BNE): New macro.
8708 (GEN_LOAD): New macro.
8709 (GEN_STORE): New macro.
8710 (gen_limm): New function.
8711 (gen_atomic_xchg): New function.
8712 (gen_call): New function.
8713 (ppc_relocate_instruction): New function.
8714 (ppc_install_fast_tracepoint_jump_pad): New function.
8715 (ppc_get_min_fast_tracepoint_insn_len): New function.
8716 (ppc_get_ipa_tdesc_idx): New function.
8717 (the_low_target): Wire in the new functions.
8718 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8719 tdescs.
8720 * linux-ppc-tdesc.h: New file.
8721
8722 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8723
8724 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8725 (alloc_jump_pad_buffer): New function.
8726 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8727 (alloc_jump_pad_buffer): New function.
8728 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8729 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8730 (alloc_jump_pad_buffer): New function.
8731 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8732 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8733 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8734 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8735
8736 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8737
8738 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8739 * linux-amd64-ipa.c: Likewise.
8740 * linux-i386-ipa.c: Likewise.
8741 * linux-s390-ipa.c: Likewise.
8742 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8743 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8744 set_trace_state_variable_value_ptr.
8745 (struct ipa_sym_addresses): Likewise.
8746 (symbol_list): Likewise.
8747 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8748 accessing gdb_collect directly.
8749 (gdb_collect_ptr_type): New typedef.
8750 (get_raw_reg_ptr_type): New typedef.
8751 (get_trace_state_variable_value_ptr_type): New typedef.
8752 (set_trace_state_variable_value_ptr_type): New typedef.
8753 (gdb_collect_ptr): New global.
8754 (get_raw_reg_ptr): New global.
8755 (get_trace_state_variable_value_ptr): New global.
8756 (set_trace_state_variable_value_ptr): New global.
8757 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8758 accessing get_raw_reg directly.
8759 (get_get_tsv_func_addr): Likewise for
8760 get_trace_state_variable_value_ptr.
8761 (get_set_tsv_func_addr): Likewise for
8762 set_trace_state_variable_value_ptr.
8763 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8764
8765 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8766
8767 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8768
8769 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8770
8771 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8772 packets.
8773 (relocate_instruction): Remove own_buf.
8774 * server.c (own_buf): Make global.
8775 (handle_v_requests): Make global.
8776 * server.h (own_buf): New declaration.
8777 (handle_v_requests): New prototype.
8778
8779 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8780
8781 PR 18377
8782 * linux-s390-low.c (add_insns): New function.
8783 (s390_emit_prologue): New function.
8784 (s390_emit_epilogue): New function.
8785 (s390_emit_add): New function.
8786 (s390_emit_sub): New function.
8787 (s390_emit_mul): New function.
8788 (s390_emit_lsh): New function.
8789 (s390_emit_rsh_signed): New function.
8790 (s390_emit_rsh_unsigned): New function.
8791 (s390_emit_ext): New function.
8792 (s390_emit_log_not): New function.
8793 (s390_emit_bit_and): New function.
8794 (s390_emit_bit_or): New function.
8795 (s390_emit_bit_xor): New function.
8796 (s390_emit_bit_not): New function.
8797 (s390_emit_equal): New function.
8798 (s390_emit_less_signed): New function.
8799 (s390_emit_less_unsigned): New function.
8800 (s390_emit_ref): New function.
8801 (s390_emit_if_goto): New function.
8802 (s390_emit_goto): New function.
8803 (s390_write_goto_address): New function.
8804 (s390_emit_litpool): New function.
8805 (s390_emit_const): New function.
8806 (s390_emit_call): New function.
8807 (s390_emit_reg): New function.
8808 (s390_emit_pop): New function.
8809 (s390_emit_stack_flush): New function.
8810 (s390_emit_zero_ext): New function.
8811 (s390_emit_swap): New function.
8812 (s390_emit_stack_adjust): New function.
8813 (s390_emit_set_r2): New function.
8814 (s390_emit_int_call_1): New function.
8815 (s390_emit_void_call_2): New function.
8816 (s390_emit_eq_goto): New function.
8817 (s390_emit_ne_goto): New function.
8818 (s390_emit_lt_goto): New function.
8819 (s390_emit_le_goto): New function.
8820 (s390_emit_gt_goto): New function.
8821 (s390_emit_ge_goto): New function.
8822 (s390x_emit_prologue): New function.
8823 (s390x_emit_epilogue): New function.
8824 (s390x_emit_add): New function.
8825 (s390x_emit_sub): New function.
8826 (s390x_emit_mul): New function.
8827 (s390x_emit_lsh): New function.
8828 (s390x_emit_rsh_signed): New function.
8829 (s390x_emit_rsh_unsigned): New function.
8830 (s390x_emit_ext): New function.
8831 (s390x_emit_log_not): New function.
8832 (s390x_emit_bit_and): New function.
8833 (s390x_emit_bit_or): New function.
8834 (s390x_emit_bit_xor): New function.
8835 (s390x_emit_bit_not): New function.
8836 (s390x_emit_equal): New function.
8837 (s390x_emit_less_signed): New function.
8838 (s390x_emit_less_unsigned): New function.
8839 (s390x_emit_ref): New function.
8840 (s390x_emit_if_goto): New function.
8841 (s390x_emit_const): New function.
8842 (s390x_emit_call): New function.
8843 (s390x_emit_reg): New function.
8844 (s390x_emit_pop): New function.
8845 (s390x_emit_stack_flush): New function.
8846 (s390x_emit_zero_ext): New function.
8847 (s390x_emit_swap): New function.
8848 (s390x_emit_stack_adjust): New function.
8849 (s390x_emit_int_call_1): New function.
8850 (s390x_emit_void_call_2): New function.
8851 (s390x_emit_eq_goto): New function.
8852 (s390x_emit_ne_goto): New function.
8853 (s390x_emit_lt_goto): New function.
8854 (s390x_emit_le_goto): New function.
8855 (s390x_emit_gt_goto): New function.
8856 (s390x_emit_ge_goto): New function.
8857 (s390_emit_ops): New function.
8858 (struct linux_target_ops): Fill in emit_ops hook.
8859
8860 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8861
8862 PR 18377
8863 * Makefile.in: Add s390 IPA files.
8864 * configure.srv: Build IPA for s390.
8865 * linux-s390-ipa.c: New file.
8866 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8867 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8868 (tdesc_s390_linux32): Likewise.
8869 (init_registers_s390_linux32v1): Likewise.
8870 (tdesc_s390_linux32v1): Likewise.
8871 (init_registers_s390_linux32v2): Likewise.
8872 (tdesc_s390_linux32v2): Likewise.
8873 (init_registers_s390_linux64): Likewise.
8874 (tdesc_s390_linux64): Likewise.
8875 (init_registers_s390_linux64v1): Likewise.
8876 (tdesc_s390_linux64v1): Likewise.
8877 (init_registers_s390_linux64v2): Likewise.
8878 (tdesc_s390_linux64v2): Likewise.
8879 (init_registers_s390_te_linux64): Likewise.
8880 (tdesc_s390_te_linux64): Likewise.
8881 (init_registers_s390_vx_linux64): Likewise.
8882 (tdesc_s390_vx_linux64): Likewise.
8883 (init_registers_s390_tevx_linux64): Likewise.
8884 (tdesc_s390_tevx_linux64): Likewise.
8885 (init_registers_s390x_linux64): Likewise.
8886 (tdesc_s390x_linux64): Likewise.
8887 (init_registers_s390x_linux64v1): Likewise.
8888 (tdesc_s390x_linux64v1): Likewise.
8889 (init_registers_s390x_linux64v2): Likewise.
8890 (tdesc_s390x_linux64v2): Likewise.
8891 (init_registers_s390x_te_linux64): Likewise.
8892 (tdesc_s390x_te_linux64): Likewise.
8893 (init_registers_s390x_vx_linux64): Likewise.
8894 (tdesc_s390x_vx_linux64): Likewise.
8895 (init_registers_s390x_tevx_linux64): Likewise.
8896 (tdesc_s390x_tevx_linux64): Likewise.
8897 (have_hwcap_s390_vx): New static variable.
8898 (s390_arch_setup): Fill have_hwcap_s390_vx.
8899 (s390_get_thread_area): New function.
8900 (s390_ft_entry_gpr_esa): New const.
8901 (s390_ft_entry_gpr_zarch): New const.
8902 (s390_ft_entry_misc): New const.
8903 (s390_ft_entry_fr): New const.
8904 (s390_ft_entry_vr): New const.
8905 (s390_ft_main_31): New const.
8906 (s390_ft_main_64): New const.
8907 (s390_ft_exit_fr): New const.
8908 (s390_ft_exit_vr): New const.
8909 (s390_ft_exit_misc): New const.
8910 (s390_ft_exit_gpr_esa): New const.
8911 (s390_ft_exit_gpr_zarch): New const.
8912 (append_insns): New function.
8913 (s390_relocate_instruction): New function.
8914 (s390_install_fast_tracepoint_jump_pad): New function.
8915 (s390_get_min_fast_tracepoint_insn_len): New function.
8916 (s390_get_ipa_tdesc_idx): New function.
8917 (struct linux_target_ops): Wire in the above functions.
8918 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8919 * linux-s390-tdesc.h: New file.
8920
8921 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8922
8923 * linux-s390-low.c (s390_supports_tracepoints): New function.
8924 (struct linux_target_ops): Fill supports_tracepoints hook.
8925
8926 2016-03-18 Yao Qi <yao.qi@linaro.org>
8927
8928 * linux-low.c (lwp_signal_can_be_delivered): New function.
8929 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8930
8931 2016-03-18 Yao Qi <yao.qi@linaro.org>
8932
8933 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8934 0 if signal is enqueued. Remove 'signal' from one debugging
8935 message. Move one debugging message to some lines below.
8936 Remove code setting 'signal' to 0.
8937
8938 2016-03-18 Yao Qi <yao.qi@linaro.org>
8939
8940 * linux-low.c (linux_low_filter_event): Remove redundant
8941 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8942
8943 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8944
8945 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8946 (struct linux_target_ops): Wire in the above.
8947
8948 2016-03-03 Yao Qi <yao.qi@linaro.org>
8949
8950 * linux-low.c: Update comments to start_step_over.
8951
8952 2016-03-03 Yao Qi <yao.qi@linaro.org>
8953
8954 PR server/19736
8955 * linux-low.c (handle_extended_wait): Set child suspended
8956 if event_lwp->bp_reinsert isn't zero.
8957
8958 2016-03-02 Yao Qi <yao.qi@linaro.org>
8959
8960 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8961 enqueue_pending_signal.
8962
8963 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8964
8965 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8966 is actually loaded.
8967
8968 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8969
8970 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8971 (s390_regmap_3264) [!__s390x__]: New global.
8972 (s390_collect_ptrace_register): Skip map entries containing -1.
8973 (s390_supply_ptrace_register): Ditto.
8974 (s390_fill_gprs_high): New function.
8975 (s390_store_gprs_high): New function.
8976 (s390_regsets): Add NT_S390_HIGH_GPRS.
8977 (s390_get_hwcap): Enable on 31-bit.
8978 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8979 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8980 Detect NT_S390_HIGH_GPRS.
8981 (s390_usrregs_info_3264): Enable on 31-bit.
8982 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8983 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8984
8985 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8986
8987 PR gdb/13808
8988 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8989 * configure.srv: Ditto.
8990 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8991 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8992 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8993 (init_registers_amd64_linux): Remove prototype.
8994 (tdesc_amd64_linux): Remove declaration.
8995 (get_ipa_tdesc): New function.
8996 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8997 initialize remaining tdescs.
8998 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8999 (init_registers_i386_linux): Remove prototype.
9000 (tdesc_i386_linux): Remove declaration.
9001 (get_ipa_tdesc): New function.
9002 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9003 initialize remaining tdescs.
9004 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
9005 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
9006 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
9007 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
9008 (x86_get_ipa_tdesc_idx): New function.
9009 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
9010 * linux-x86-tdesc.h: New file.
9011 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
9012 (target_get_ipa_tdesc_idx): New macro.
9013 * tracepoint.c (ipa_tdesc_idx): New macro.
9014 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
9015 (symbol_list): Add ipa_tdesc_idx.
9016 (cmd_qtstart): Write ipa_tdesc_idx in the target.
9017 (ipa_tdesc): Remove.
9018 (ipa_tdesc_idx): New variable.
9019 (get_context_regcache): Use get_ipa_tdesc.
9020 (gdb_collect): Ditto.
9021 (gdb_probe): Ditto.
9022 * tracepoint.h (get_ipa_tdesc): New prototype.
9023 (ipa_tdesc): Remove.
9024
9025 2016-02-24 Pedro Alves <palves@redhat.com>
9026
9027 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
9028 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
9029 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
9030 Factor out common code between the USE_SIGTRAP_SIGINFO and
9031 !USE_SIGTRAP_SIGINFO blocks.
9032 (linux_low_filter_event): Call save_stop_reason instead of
9033 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
9034 Update comments.
9035 (linux_wait_1): Update comments.
9036
9037 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
9038
9039 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
9040 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
9041 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
9042 ppc_insert_point, ppc_remove_point.
9043
9044 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
9045
9046 * linux-s390-low.c (s390_supports_z_point_type): New function.
9047 (struct linux_target_ops): Wire s390_supports_z_point_type in.
9048
9049 2016-02-16 Yao Qi <yao.qi@linaro.org>
9050
9051 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9052 PC. Get pc from regcache_read_pc.
9053
9054 2016-02-12 Yao Qi <yao.qi@linaro.org>
9055
9056 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
9057 or linux_get_pc_32bit.
9058 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
9059
9060 2016-02-12 Yao Qi <yao.qi@linaro.org>
9061
9062 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
9063 arm_linux_get_next_pcs_fixup.
9064
9065 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
9066
9067 * tracepoint.c (x_tracepoint_action_download): Change
9068 write_inferior_data_ptr to write_inferior_data_pointer.
9069 (cmd_qtstart): Likewise.
9070 (write_inferior_data_ptr): Remove.
9071 (download_agent_expr): Change write_inferior_data_ptr to
9072 write_inferior_data_pointer.
9073 (download_tracepoint_1): Likewise.
9074 (download_tracepoint): Likewise.
9075 (download_trace_state_variables): Likewise.
9076
9077 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
9078 Marcin Kościelnicki <koriakin@0x04.net>
9079
9080 * tracepoint.c (struct tracepoint_action_ops): Remove.
9081 (struct tracepoint_action): Remove ops.
9082 (m_tracepoint_action_download, r_tracepoint_action_download)
9083 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
9084 size and offset accordingly.
9085 (m_tracepoint_action_ops, r_tracepoint_action_ops)
9086 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
9087 (tracepoint_action_send, tracepoint_action_download): New functions.
9088 Helpers for trace action handlers.
9089 (add_tracepoint_action): Remove setup actions ops.
9090 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
9091
9092 2016-02-10 Yao Qi <yao.qi@linaro.org>
9093
9094 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
9095
9096 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9097
9098 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
9099 to AC_OUTPUT.
9100 * configure: Regenerate.
9101
9102 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9103
9104 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
9105 void * to gdb_byte *.
9106 * linux-low.c (siginfo_fixup): Likewise.
9107 (linux_xfer_siginfo): Likewise.
9108 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
9109 Likewise.
9110 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9111
9112 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
9113
9114 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9115 to srv_tgtobj.
9116 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
9117 to srv_tgtobj.
9118 * linux-x86-low.c [__x86_64__]: Include
9119 "nat/amd64-linux-siginfo.h".
9120 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
9121 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
9122 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
9123 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
9124 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
9125 (cpt_si_fd, si_timerid, si_overrun): Move from
9126 nat/amd64-linux-siginfo.c.
9127 * Makefile.in (amd64-linux-siginfo.o:): New rule.
9128
9129 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
9130
9131 * server.c (skip_to_semicolon): Remove.
9132 (process_point_options): Use strchrnul instead of
9133 skip_to_semicolon.
9134
9135 2016-01-26 Yao Qi <yao.qi@linaro.org>
9136
9137 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9138 * linux-low.c (install_software_single_step_breakpoints): Don't
9139 call regcache_read_pc.
9140 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9141 argument pc.
9142
9143 2016-01-26 Yao Qi <yao.qi@linaro.org>
9144
9145 * linux-low.c (install_software_single_step_breakpoints): Call
9146 regcache_read_pc instead of get_pc.
9147
9148 2016-01-26 Yao Qi <yao.qi@linaro.org>
9149
9150 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9151 (unblock_async_io): Rename to ...
9152 (block_unblock_async_io): ... it. New function.
9153 (enable_async_io): Don't install SIGIO handler. Unblock it
9154 instead.
9155 (disable_async_io): Don't ignore SIGIO. Block it instead.
9156 (initialize_async_io): Install SIGIO handler. Don't call
9157 unblock_async_io.
9158
9159 2016-01-26 Yao Qi <yao.qi@linaro.org>
9160
9161 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9162 first character is '\003', call *the_target->request_interrupt.
9163
9164 2016-01-25 Yao Qi <yao.qi@linaro.org>
9165
9166 * remote-utils.c (new_thread_notify): Remove.
9167 (dead_thread_notify): Likewise.
9168 * remote-utils.h (new_thread_notify): Remove declaration.
9169 (dead_thread_notify): Likewise.
9170
9171 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9172
9173 * gdb.trace/pending.exp: Fix expected message on continue.
9174
9175 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9176
9177 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9178 it works properly on big-endian machines where sizeof (CORE_ADDR)
9179 != sizeof (void *).
9180
9181 2016-01-21 Pedro Alves <palves@redhat.com>
9182
9183 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9184 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9185 * configure: Regenerate.
9186
9187 2016-01-21 Yao Qi <yao.qi@linaro.org>
9188
9189 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9190 is_thumb and set it according to CPSR saved on the stack.
9191 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9192 arm_sigreturn_next_pc.
9193
9194 2016-01-18 Yao Qi <yao.qi@linaro.org>
9195
9196 * linux-low.c (linux_set_pc_64bit): New function.
9197 (linux_get_pc_64bit): New function.
9198 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9199 Declare.
9200 * linux-sparc-low.c (debug_threads): Remove declaration.
9201 (sparc_get_pc): Remove.
9202 (the_low_target): Use linux_get_pc_64bit instead of
9203 sparc_get_pc.
9204 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9205 (the_low_target): Use linux_get_pc_64bit and
9206 linux_set_pc_64bit.
9207
9208 2016-01-18 Yao Qi <yao.qi@linaro.org>
9209
9210 * linux-arm-low.c (debug_threads): Remove declaration.
9211 (arm_get_pc, arm_set_pc): Remove.
9212 (the_low_target): Use linux_get_pc_32bit and
9213 linux_set_pc_32bit.
9214 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9215 (the_low_target): Use linux_get_pc_32bit and
9216 linux_set_pc_32bit.
9217 * linux-cris-low.c (debug_threads): Remove declaration.
9218 (cris_get_pc, cris_set_pc,): Remove.
9219 (the_low_target): Use linux_get_pc_32bit and
9220 linux_set_pc_32bit.
9221 * linux-crisv32-low.c (debug_threads): Remove declaration.
9222 (cris_get_pc, cris_set_pc): Remove.
9223 (the_low_target): Use linux_get_pc_32bit and
9224 linux_set_pc_32bit.
9225 * linux-low.c: Include inttypes.h.
9226 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9227 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9228 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9229 (the_low_target): Use linux_get_pc_32bit and
9230 linux_set_pc_32bit.
9231 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9232 (the_low_target): Use linux_get_pc_32bit and
9233 linux_set_pc_32bit.
9234 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9235 (the_low_target): Use linux_get_pc_32bit and
9236 linux_set_pc_32bit.
9237 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9238 (the_low_target): Use linux_get_pc_32bit and
9239 linux_set_pc_32bit.
9240 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9241 (the_low_target): Use linux_get_pc_32bit and
9242 linux_set_pc_32bit.
9243
9244 2016-01-18 Gary Benson <gbenson@redhat.com>
9245
9246 * configure.ac (AC_FUNC_FORK): New check.
9247 * config.in: Regenerate.
9248 * configure: Likewise.
9249
9250 2016-01-14 Yao Qi <yao.qi@linaro.org>
9251
9252 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9253 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9254 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9255 arm_get_next_pcs_ctor.
9256
9257 2016-01-12 Josh Stone <jistone@redhat.com>
9258 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9259
9260 * inferiors.h: Include "gdb_vecs.h".
9261 (struct process_info): Add syscalls_to_catch.
9262 * inferiors.c (remove_process): Free syscalls_to_catch.
9263 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9264 syscall_return stops.
9265 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9266 * server.c (handle_general_set): Handle QCatchSyscalls.
9267 (handle_query): Report support for QCatchSyscalls.
9268 * target.h (struct target_ops): Add supports_catch_syscall.
9269 (target_supports_catch_syscall): New macro.
9270 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9271 (struct lwp_info): Add syscall_state.
9272 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9273 Maintain syscall_state and syscalls_to_catch across exec.
9274 (get_syscall_trapinfo): New function, proxy to the_low_target.
9275 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9276 (linux_low_filter_event): Toggle syscall_state entry/return for
9277 syscall traps, and set it ignored for all others.
9278 (gdb_catching_syscalls_p): New function.
9279 (gdb_catch_this_syscall_p): New function.
9280 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9281 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9282 (linux_supports_catch_syscall): New function.
9283 (linux_target_ops): Install it.
9284 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9285 (the_low_target): Install it.
9286
9287 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9288
9289 * acinclude.m4: Include new ../warning.m4 file.
9290 * configure: Regenerated.
9291 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9292
9293 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9294
9295 * ax.c (is_goto_target): Mark static.
9296 * linux-low.c (register_addr): Likewise.
9297 (linux_fetch_registers, linux_store_registers): Likewise.
9298 * mem-break.c (any_persistent_commands): Fix old prototype.
9299 (add_commands_to_breakpoint): Mark static.
9300 * regcache.c (find_register_by_name): Delete unused func.
9301 * remote-utils.c (hex_or_minus_one): Mark static.
9302 * server.c (monitor_show_help): Mark static.
9303 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9304 handle_v_requests): Likewise.
9305
9306 2016-01-12 Pedro Alves <palves@redhat.com>
9307
9308 Remove use of the registered trademark symbol throughout.
9309
9310 2016-01-08 Yao Qi <yao.qi@linaro.org>
9311
9312 * remote-utils.c (getpkt): If c is '\003', call target hook
9313 request_interrupt.
9314
9315 2016-01-06 Yao Qi <yao.qi@linaro.org>
9316
9317 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9318 linux-aarch32-low.c.
9319 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9320 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9321 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9322 (thumb2_breakpoint): Declare.
9323 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9324 linux-aarch32-low.h.
9325 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9326 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9327 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9328
9329 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9330
9331 * gdbreplay.c (gdbreplay_version): Change copyright year in
9332 version message.
9333 * server.c (gdbserver_version): Likewise.
9334
9335 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9336
9337 * server.c (crc32_table): Delete.
9338 (crc32): Use libiberty's xcrc32 function.
9339
9340 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9341
9342 * lynx-low.c (lynx_delete_thread_callback): New function.
9343 (lynx_mourn): Properly delete our process and all of its
9344 threads. Remove call to clear_inferiors.
9345
9346 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9347
9348 * target.c (thread_search_callback): Add check that
9349 the thread_stopped target callback is not NULL before
9350 calling it.
9351
9352 2015-12-21 Yao Qi <yao.qi@linaro.org>
9353
9354 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9355 arm breakpoint.
9356
9357 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9358
9359 * server.c (handle_query): Call target_supports_software_single_step.
9360
9361 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9362
9363 * linux-low.c (single_step): New function.
9364 (linux_resume_one_lwp_throw): Call single_step.
9365 (start_step_over): Likewise.
9366
9367 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9368
9369 * Makefile.in (SFILES): Append arch/arm-linux.c,
9370 arch/arm-get-next-pcs.c.
9371 (arm-linux.o): New rule.
9372 (arm-get-next-pcs.o): New rule.
9373 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9374 arm-linux.o.
9375 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9376 to linux-aarch32-low.c.
9377 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9378 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9379 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9380 (thumb2_breakpoint_len): Likewise.
9381 (arm_is_thumb_mode): Make non-static.
9382 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9383 from linux-aarch32-low.c.
9384 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9385 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9386 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9387 (thumb2_breakpoint_len): Likewise.
9388 (arm_is_thumb_mode): New declaration.
9389 * linux-arm-low.c: Include arch/arm-linux.h
9390 aarch/arm-get-next-pcs.h, sys/syscall.h.
9391 (get_next_pcs_ops): New struct.
9392 (get_next_pcs_addr_bits_remove): New function.
9393 (get_next_pcs_is_thumb): New function.
9394 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9395 (arm_sigreturn_next_pc): Likewise.
9396 (get_next_pcs_syscall_next_pc): Likewise.
9397 (arm_gdbserver_get_next_pcs): Likewise.
9398 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9399 Initialize.
9400 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9401 * server.h: Include gdb_vecs.h.
9402
9403 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9404
9405 * Makefile.in (SFILES): Append common/common-regcache.c.
9406 (OBS): Append common-regcache.o.
9407 (common-regcache.o): New rule.
9408 * regcache.c (init_register_cache): Initialize cache to
9409 REG_UNAVAILABLE.
9410 (regcache_raw_read_unsigned): New function.
9411 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9412 register_status enum.
9413
9414 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9415
9416 * linux-aarch64-low.c (the_low_targets): Rename
9417 breakpoint_reinsert_addr to get_next_pcs.
9418 * linux-arm-low.c (the_low_targets): Likewise.
9419 * linux-bfin-low.c (the_low_targets): Likewise.
9420 * linux-cris-low.c (the_low_targets): Likewise.
9421 * linux-crisv32-low.c (the_low_targets): Likewise.
9422 * linux-low.c (can_software_single_step): Likewise.
9423 (install_software_single_step_breakpoints): New function.
9424 (start_step_over): Use install_software_single_step_breakpoints.
9425 * linux-low.h: New CORE_ADDR vector.
9426 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9427 get_next_pcs.
9428 * linux-mips-low.c (the_low_targets): Likewise.
9429 * linux-nios2-low.c (the_low_targets): Likewise.
9430 * linux-sparc-low.c (the_low_targets): Likewise.
9431
9432 2015-12-17 Pedro Alves <palves@redhat.com>
9433
9434 * linux-low.c (linux_kill_one_lwp): Remove references to
9435 LinuxThreads.
9436 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9437 to 'kill'.
9438 (linux_init_signals): Delete.
9439 (initialize_low): Adjust.
9440 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9441
9442 2015-12-16 Pedro Alves <palves@redhat.com>
9443
9444 * configure.ac (compiler warning flags): When testing a
9445 -Wno-foo option, check whether -Wfoo works instead.
9446 * configure: Regenerate.
9447
9448 2015-12-11 Don Breazeal <donb@codesourcery.com>
9449
9450 * server.c (process_serial_event): Don't exit from gdbserver
9451 in remote mode if there are still active inferiors.
9452
9453 2015-12-11 Yao Qi <yao.qi@linaro.org>
9454
9455 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9456 arm_breakpoint_at if the process is 32-bit.
9457
9458 2015-12-11 Yao Qi <yao.qi@linaro.org>
9459
9460 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9461 arm breakpoint.
9462
9463 2015-12-07 Yao Qi <yao.qi@linaro.org>
9464
9465 * configure.srv: Append arm.o to srv_tgtobj for
9466 aarch64*-*-linux* target.
9467 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9468 from linux-arm-low.c.
9469 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9470 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9471 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9472 (thumb2_breakpoint_len): Likewise.
9473 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9474 (arm_breakpoint_kinds): Likewise.
9475 (arm_breakpoint_kind_from_pc): Likewise.
9476 (arm_sw_breakpoint_from_kind): Likewise.
9477 (arm_breakpoint_kind_from_current_state): Likewise.
9478 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9479 (arm_sw_breakpoint_from_kind): Declare.
9480 (arm_breakpoint_kind_from_current_state): Declare.
9481 (arm_breakpoint_at): Declare.
9482 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9483 arm_sw_breakpoint_from_kind if process is 32-bit.
9484 (aarch64_breakpoint_kind_from_pc): New function.
9485 (aarch64_breakpoint_kind_from_current_state): New function.
9486 (the_low_target): Initialize fields breakpoint_kind_from_pc
9487 and breakpoint_kind_from_current_state.
9488 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9489 linux-aarch32-low.c.
9490 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9491 (arm_breakpoint, arm_breakpoint_len): Likewise.
9492 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9493 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9494 (arm_is_thumb_mode): Likewise.
9495 (arm_breakpoint_at): Likewise.
9496 (arm_breakpoint_kind_from_pc): Likewise.
9497 (arm_sw_breakpoint_from_kind): Likewise.
9498 (arm_breakpoint_kind_from_current_state): Likewise.
9499
9500 Revert:
9501 2015-08-04 Yao Qi <yao.qi@linaro.org>
9502
9503 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9504 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9505 * server.c (extended_protocol): Remove "static".
9506 * server.h (extended_protocol): Declare it.
9507
9508 2015-12-04 Josh Stone <jistone@redhat.com>
9509
9510 * target.h (struct target_ops) <arch_setup>: Rename to ...
9511 (struct target_ops) <post_create_inferior>: ... this.
9512 (target_arch_setup): Rename to ...
9513 (target_post_create_inferior): ... this, calling post_create_inferior.
9514 * server.c (start_inferior): Update target_arch_setup calls to
9515 target_post_create_inferior.
9516 * linux-low.c (linux_low_ptrace_options): Forward declare.
9517 (linux_arch_setup): Update its comment for general use.
9518 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9519 (struct linux_target_ops): Use linux_post_create_inferior.
9520 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9521 to post_create_inferior.
9522 * nto-low.c (struct nto_target_ops): Likewise.
9523 * spu-low.c (struct spu_target_ops): Likewise.
9524 * win32-low.c (struct win32_target_ops): Likewise.
9525
9526 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9527
9528 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9529
9530 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9531
9532 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9533 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9534 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9535 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9536 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9537 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9538 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9539 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9540 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9541 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9542 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9543 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9544
9545 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9546
9547 * linux-low.c (linux_look_up_symbols): Don't call
9548 linux_supports_traceclone.
9549 * linux-low.h (thread_db_init): Remove use_events argument.
9550 * thread-db.c (thread_db_use_event): Remove global variable.
9551 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9552 (struct thread_db) <td_create_bp>: Remove field.
9553 (thread_db_create_event): Remove function.
9554 (thread_db_enable_reporting): Likewise.
9555 (find_one_thread): Don't check for thread_db_use_events.
9556 (attach_thread): Likewise.
9557 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9558 (try_thread_db_load_1): Don't check for thread_db_use_events.
9559 (thread_db_init): Remove use_events argument and thread events
9560 handling.
9561 (remove_thread_event_breakpoints): Remove function.
9562 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9563
9564 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9565
9566 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9567 New function.
9568 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9569 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9570 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9571 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9572 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9573 Initialize.
9574 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9575 New function.
9576 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9577 * linux-low.c (can_hardware_single_step): Use
9578 supports_hardware_single_step.
9579 (can_software_single_step): New function.
9580 (start_step_over): Call can_software_single_step.
9581 (linux_supports_hardware_single_step): New function.
9582 (struct target_ops) <supports_software_single_step>: Initialize.
9583 * linux-low.h (struct linux_target_ops)
9584 <supports_hardware_single_step>: Initialize.
9585 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9586 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9587 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9588 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9589 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9590 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9591 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9592 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9593 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9594 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9595 Initialize.
9596 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9597 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9598 Initialize.
9599 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9600 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9601 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9602 New function.
9603 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9604 * target.h (struct target_ops): <supports_software_single_step>:
9605 New field.
9606 (target_supports_software_single_step): New macro.
9607
9608 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9609
9610 * linux-low.c (linux_wait_1): Fix pc advance condition.
9611 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9612 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9613
9614 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9615
9616 * linux-arm-low.c (arm_is_thumb_mode): New function.
9617 (arm_breakpoint_at): Use arm_is_thumb_mode.
9618 (arm_breakpoint_kind_from_current_state): New function.
9619 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9620 Initialize.
9621 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9622 (linux_breakpoint_kind_from_current_state): New function.
9623 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9624 * linux-low.h (struct linux_target_ops)
9625 <breakpoint_kind_from_current_state>: New field.
9626 * target.h (struct target_ops): Likewise.
9627 (target_breakpoint_kind_from_current_state): New macro.
9628
9629 2015-11-30 Pedro Alves <palves@redhat.com>
9630
9631 * linux-low.c (linux_resume): Wake up the event loop before
9632 returning.
9633
9634 2015-11-30 Pedro Alves <palves@redhat.com>
9635
9636 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9637 check.
9638 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9639 to -1.
9640 * target.c (struct thread_search): New structure.
9641 (thread_search_callback): New function.
9642 (prev_general_thread): New global.
9643 (prepare_to_access_memory, done_accessing_memory): New functions.
9644 * target.h (prepare_to_access_memory, done_accessing_memory):
9645 Replace macros with function declarations.
9646
9647 2015-11-30 Pedro Alves <palves@redhat.com>
9648
9649 PR 14618
9650 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9651 report TARGET_WAITKIND_NO_RESUMED.
9652 * remote-utils.c (prepare_resume_reply): Handle
9653 TARGET_WAITKIND_NO_RESUMED.
9654 * server.c (report_no_resumed): New global.
9655 (handle_query) <qSupported>: Handle "no-resumed+". Report
9656 "no-resumed+" support.
9657 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9658 return error if the client doesn't support no-resumed events.
9659 (push_stop_notification): New function.
9660 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9661 events if the client supports them.
9662
9663 2015-11-30 Pedro Alves <palves@redhat.com>
9664
9665 * linux-low.c (thread_still_has_status_pending_p): Don't check
9666 vCont;t here.
9667 (lwp_resumed): New function.
9668 (status_pending_p_callback): Return early if the LWP is not
9669 supposed to be resumed.
9670
9671 2015-11-30 Pedro Alves <palves@redhat.com>
9672
9673 * linux-low.c (handle_extended_wait): Assert that the LWP's
9674 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9675 thread create events, leave the new child's status pending.
9676 (linux_low_filter_event): If GDB wants to hear about thread exit
9677 events, leave the LWP marked dead and don't delete it.
9678 (linux_wait_for_event_filtered): Don't check for thread exit.
9679 (filter_exit_event): New function.
9680 (linux_wait_1): Use it, when returning an exit event.
9681 (linux_resume_one_lwp_throw): Assert that the LWP's
9682 waitstatus is TARGET_WAITKIND_IGNORE.
9683 * remote-utils.c (prepare_resume_reply): Handle
9684 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9685 * server.c (report_thread_events): New global.
9686 (handle_general_set): Handle QThreadEvents.
9687 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9688 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9689 TARGET_WAITKIND_THREAD_EXITED.
9690 * server.h (report_thread_events): Declare.
9691
9692 2015-11-30 Pedro Alves <palves@redhat.com>
9693
9694 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9695 the thread's last_resume_kind was resume_stop.
9696
9697 2015-11-30 Pedro Alves <palves@redhat.com>
9698
9699 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9700 before returning.
9701
9702 2015-11-30 Pedro Alves <palves@redhat.com>
9703
9704 * server.c (handle_v_requests): Handle vCtrlC.
9705
9706 2015-11-30 Pedro Alves <palves@redhat.com>
9707
9708 * gdbthread.h (find_any_thread_of_pid): Declare.
9709 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9710 functions.
9711 * server.c (handle_query): If current_thread is NULL, look for
9712 another thread of the selected process.
9713
9714 2015-11-26 Daniel Colascione <dancol@dancol.org>
9715 Simon Marchi <simon.marchi@ericsson.com>
9716
9717 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9718 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9719 name in reply.
9720 * target.h (struct target_ops) <thread_name>: New field.
9721 (target_thread_name): New macro.
9722
9723 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9724
9725 * regcache.h (regcache_invalidate_pid): Add declaration.
9726 * regcache.c (regcache_invalidate_pid): New function, extracted
9727 from regcache_invalidate.
9728 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9729 Add trivial documentation comment.
9730 * lynx-low.c: Use regcache_invalidate_pid instead of
9731 regcache_invalidate.
9732
9733 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9734
9735 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9736 and Elf64_auxv_t if the target is Android.
9737
9738 2015-11-22 Doug Evans <xdje42@gmail.com>
9739
9740 * target.h: #include <sys/types.h>.
9741
9742 2015-11-19 Pedro Alves <palves@redhat.com>
9743
9744 * linux-low.c (linux_process_qsupported): Change prototype.
9745 Adjust.
9746 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9747 Change prototype.
9748 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9749 and adjust to loop over all features.
9750 * server.c (handle_query) <qSupported>: Adjust to call
9751 target_process_qsupported once, passing it a vector of unprocessed
9752 features.
9753 * target.h (struct target_ops) <process_qsupported>: Change
9754 prototype.
9755 (target_process_qsupported): Adjust.
9756
9757 2015-11-19 Pedro Alves <palves@redhat.com>
9758
9759 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9760 mode.
9761 * configure: Regenerate.
9762
9763 2015-11-19 Pedro Alves <palves@redhat.com>
9764
9765 * configure: Regenerate.
9766
9767 2015-11-19 Yao Qi <yao.qi@linaro.org>
9768
9769 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9770 type to uint32_t.
9771
9772 2015-11-19 Yao Qi <yao.qi@linaro.org>
9773
9774 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9775 (struct aarch64_operand): Move enum out.
9776
9777 2015-11-19 Yao Qi <yao.qi@linaro.org>
9778
9779 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9780 struct user_fpsimd_state *.
9781 (aarch64_store_fpregset): Likewise.
9782
9783 2015-11-19 Yao Qi <yao.qi@linaro.org>
9784
9785 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9786 struct user_pt_regs *.
9787 (aarch64_store_gregset): Likewise.
9788
9789 2015-11-18 Pedro Alves <palves@redhat.com>
9790
9791 * Makefile.in (all_object_files): Add $IPA_OBJS.
9792
9793 2015-11-17 Pedro Alves <palves@redhat.com>
9794
9795 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9796 GDB_SIGNAL_0 and gdb_signal_to_string.
9797
9798 2015-11-17 Pedro Alves <palves@redhat.com>
9799
9800 * win32-low.c (handle_output_debug_string): Remove parameter.
9801 (win32_kill): Remove our_status local and adjust call to
9802 handle_output_debug_string.
9803 (get_child_debug_event): Adjust call to
9804 handle_output_debug_string.
9805
9806 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9807
9808 * linux-mips-low.c (mips_fill_gregset): Add cast.
9809 (mips_store_gregset): Likewise.
9810 (mips_fill_fpregset): Likewise.
9811 (mips_store_fpregset): Likewise.
9812
9813 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9814
9815 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9816 priv.
9817
9818 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9819
9820 * linux-mips-low.c (mips_linux_new_thread): Change type of
9821 watch_type to enum target_hw_bp_type.
9822
9823 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9824
9825 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9826 Change return type to arm_hwbp_type.
9827
9828 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9829
9830 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9831 (arm_store_gregset): Likewise.
9832 * linux-arm-low.c (arm_get_hwcap): Likewise.
9833 (arm_read_description): Likewise.
9834
9835 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9836
9837 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9838
9839 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9840
9841 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9842 (ppc_fill_vsxregset): Likewise.
9843 (ppc_store_vsxregset): Likewise.
9844 (ppc_fill_vrregset): Likewise.
9845 (ppc_store_vrregset): Likewise.
9846 (ppc_fill_evrregset): Likewise.
9847 (ppc_store_evrregset): Likewise.
9848
9849 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9850
9851 * linux-ppc-low.c (ppc_usrregs_info): Remove
9852 forward-declaration.
9853 (ppc_arch_setup): Move lower in file.
9854
9855 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9856
9857 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9858 (ps_pdwrite): Likewise.
9859
9860 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9861
9862 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9863 to after assert checks.
9864
9865 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9866
9867 * proc-service.c (ps_pdread): Add/adjust casts.
9868 (ps_pdwrite): Add/adjust casts.
9869
9870 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9871
9872 * server.c (handle_search_memory_1): Cast return value of
9873 memmem.
9874
9875 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9876
9877 * server.c (write_qxfer_response): Change type of data to
9878 gdb_byte *.
9879
9880 2015-10-29 Pedro Alves <palves@redhat.com>
9881
9882 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9883
9884 2015-10-29 Pedro Alves <palves@redhat.com>
9885
9886 * tracepoint.c (clear_installed_tracepoints): Add casts.
9887
9888 2015-10-29 Pedro Alves <palves@redhat.com>
9889
9890 * server.c (handle_v_cont, process_serial_event): Add enum
9891 gdb_signal casts to signal parsing code.
9892
9893 2015-10-29 Pedro Alves <palves@redhat.com>
9894
9895 * linux-low.h (NULL_REGSET): Define.
9896 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9897 * linux-arm-low.c (arm_regsets): Likewise.
9898 * linux-crisv32-low.c (cris_regsets): Likewise.
9899 * linux-m68k-low.c (m68k_regsets): Likewise.
9900 * linux-mips-low.c (mips_regsets): Likewise.
9901 * linux-nios2-low.c (nios2_regsets): Likewise.
9902 * linux-ppc-low.c (ppc_regsets): Likewise.
9903 * linux-s390-low.c (s390_regsets): Likewise.
9904 * linux-sh-low.c (sh_regsets): Likewise.
9905 * linux-sparc-low.c (sparc_regsets): Likewise.
9906 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9907 * linux-tile-low.c (tile_regsets): Likewise.
9908 * linux-x86-low.c (x86_regsets): Likewise.
9909 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9910
9911 2015-10-29 Pedro Alves <palves@redhat.com>
9912
9913 * linux-low.h (NULL_REGSET): Define.
9914 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9915 * linux-arm-low.c (arm_regsets): Likewise.
9916 * linux-crisv32-low.c (cris_regsets): Likewise.
9917 * linux-m68k-low.c (m68k_regsets): Likewise.
9918 * linux-mips-low.c (mips_regsets): Likewise.
9919 * linux-nios2-low.c (nios2_regsets): Likewise.
9920 * linux-ppc-low.c (ppc_regsets): Likewise.
9921 * linux-s390-low.c (s390_regsets): Likewise.
9922 * linux-sh-low.c (sh_regsets): Likewise.
9923 * linux-sparc-low.c (sparc_regsets): Likewise.
9924 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9925 * linux-tile-low.c (tile_regsets): Likewise.
9926 * linux-x86-low.c (x86_regsets): Likewise.
9927 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9928
9929 2015-10-26 Doug Evans <dje@google.com>
9930
9931 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9932
9933 2015-10-26 Doug Evans <dje@google.com>
9934
9935 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9936
9937 2015-10-26 Doug Evans <dje@google.com>
9938
9939 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9940 for debug_printf.
9941 (attach_thread, find_new_threads_callback): Ditto.
9942
9943 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9944
9945 * mem-break.h (set_breakpoint_data): Remove.
9946
9947 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9948
9949 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9950 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9951 (initialize_low): Remove set_breakpoint_data call.
9952 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9953 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9954 (initialize_low): Remove set_breakpoint_data call.
9955 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9956 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9957 (initialize_low): Remove set_breakpoint_data call.
9958
9959 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9960
9961 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9962 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9963 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9964 * target.h (target_breakpoint_kind_from_pc): New macro.
9965
9966 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9967
9968 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9969 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9970 the default breakpoint kind.
9971
9972 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9973
9974 * linux-arm-low.c (arm_supports_z_point_type): Add software
9975 breakpoint support.
9976
9977 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9978
9979 * linux-arm-low.c: Refactor breakpoint definitions.
9980 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9981 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9982
9983 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9984
9985 * Makefile.in: Add arm.c/o.
9986 * configure.srv: Likewise.
9987 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9988 (arm_breakpoint_kind_from_pc): New function.
9989 (arm_sw_breakpoint_from_kind): Return proper kind.
9990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9991
9992 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9993
9994 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9995 removal.
9996 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9997 (struct raw_breakpoint) <size>: Remove.
9998 (struct raw_breakpoint) <kind>: Add.
9999 (bp_size): New function.
10000 (bp_opcode): Likewise.
10001 (find_raw_breakpoint_at): Adjust for kind.
10002 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
10003 (remove_memory_breakpoint): Adjust for kind call bp_size.
10004 (set_raw_breakpoint_at): Adjust for kind.
10005 (set_breakpoint): Likewise.
10006 (set_breakpoint_at): Call breakpoint_kind_from_pc.
10007 (delete_raw_breakpoint): Adjust for kind.
10008 (delete_breakpoint): Likewise.
10009 (find_gdb_breakpoint): Likewise.
10010 (set_gdb_breakpoint_1): Likewise.
10011 (set_gdb_breakpoint): Likewise.
10012 (delete_gdb_breakpoint_1): Likewise.
10013 (delete_gdb_breakpoint): Likewise.
10014 (uninsert_raw_breakpoint): Likewise.
10015 (reinsert_raw_breakpoint): Likewise.
10016 (set_breakpoint_data): Remove.
10017 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
10018 (check_mem_read): Adjust for kind call bp_size.
10019 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
10020 (clone_one_breakpoint): Adjust for kind.
10021 * mem-break.h (set_gdb_breakpoint): Likewise.
10022 (delete_gdb_breakpoint): Likewise.
10023 * server.c (process_serial_event): Likewise.
10024
10025 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10026
10027 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
10028 (struct linux_target_ops) <breakpoint>: Remove.
10029 (struct linux_target_ops) <breakpoint_len>: Remove.
10030 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10031 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10032 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
10033 (arm_sw_breakpoint_from_kind): New function.
10034 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
10035 (struct linux_target_ops) <breakpoint>: Remove.
10036 (struct linux_target_ops) <breakpoint_len>: Remove.
10037 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10038 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10039 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
10040 (struct linux_target_ops) <breakpoint>: Remove.
10041 (struct linux_target_ops) <breakpoint_len>: Remove.
10042 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10043 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10044 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
10045 (struct linux_target_ops) <breakpoint>: Remove.
10046 (struct linux_target_ops) <breakpoint_len>: Remove.
10047 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10048 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10049 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
10050 and sw_breakpoint_from_kind to increment the pc.
10051 (linux_breakpoint_kind_from_pc): New function.
10052 (linux_sw_breakpoint_from_kind): New function.
10053 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
10054 (initialize_low): Call breakpoint_kind_from_pc and
10055 sw_breakpoint_from_kind to replace breakpoint_data/len.
10056 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
10057 New field.
10058 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
10059 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
10060 (struct linux_target_ops) <breakpoint>: Remove.
10061 (struct linux_target_ops) <breakpoint_len>: Remove.
10062 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10063 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10064 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
10065 (struct linux_target_ops) <breakpoint>: Remove.
10066 (struct linux_target_ops) <breakpoint_len>: Remove.
10067 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10068 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10069 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
10070 (struct linux_target_ops) <breakpoint>: Remove.
10071 (struct linux_target_ops) <breakpoint_len>: Remove.
10072 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10073 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10074 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
10075 (struct linux_target_ops) <breakpoint>: Remove.
10076 (struct linux_target_ops) <breakpoint_len>: Remove.
10077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10079 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
10080 (struct linux_target_ops) <breakpoint>: Remove.
10081 (struct linux_target_ops) <breakpoint_len>: Remove.
10082 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10083 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10084 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
10085 (struct linux_target_ops) <breakpoint>: Remove.
10086 (struct linux_target_ops) <breakpoint_len>: Remove.
10087 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10088 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10089 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
10090 (struct linux_target_ops) <breakpoint>: Remove.
10091 (struct linux_target_ops) <breakpoint_len>: Remove.
10092 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10093 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10094 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
10095 (struct linux_target_ops) <breakpoint>: Remove.
10096 (struct linux_target_ops) <breakpoint_len>: Remove.
10097 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10098 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10099 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
10100 (struct linux_target_ops) <breakpoint>: Remove.
10101 (struct linux_target_ops) <breakpoint_len>: Remove.
10102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10103 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10104 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
10105 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
10106 (struct linux_target_ops) <breakpoint>: Remove.
10107 (struct linux_target_ops) <breakpoint_len>: Remove.
10108 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10109 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10110 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
10111 (struct linux_target_ops) <breakpoint>: Remove.
10112 (struct linux_target_ops) <breakpoint_len>: Remove.
10113 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10114 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10115
10116 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10117
10118 * linux-cris-low.c (cris_get_pc): Remove void arg.
10119
10120 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10121
10122 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
10123 variable name.
10124
10125 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10126
10127 * inferiors.c (thread_pid_matches_callback): New function.
10128 (find_thread_process): New function.
10129 (remove_thread): Reset current_thread.
10130 (remove_process): Assert threads have been removed first.
10131
10132 2015-10-15 Yao Qi <yao.qi@linaro.org>
10133
10134 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10135 if it is 3.
10136 (aarch64_remove_point): Likewise.
10137 * regcache.c (regcache_register_size): New function.
10138
10139 2015-10-12 Yao Qi <yao.qi@linaro.org>
10140
10141 * linux-aarch64-low.c: Update all callers as emit_load_store
10142 is renamed to aarch64_emit_load_store.
10143
10144 2015-10-12 Yao Qi <yao.qi@linaro.org>
10145
10146 * linux-aarch64-low.c: Update all callers of function renaming
10147 from emit_insn to aarch64_emit_insn.
10148
10149 2015-10-12 Yao Qi <yao.qi@linaro.org>
10150
10151 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10152 arch/aarch64-insn.h.
10153 (struct aarch64_memory_operand): Likewise.
10154 (ENCODE): Likewise.
10155 (emit_insn): Move to arch/aarch64-insn.c.
10156 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10157 (emit_load_store): Move to arch/aarch64-insn.c.
10158 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10159 (can_encode_int32): Remove.
10160
10161 2015-10-12 Yao Qi <yao.qi@linaro.org>
10162
10163 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10164 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10165 (aarch64_relocate_instruction): Likewise.
10166 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10167 (struct aarch64_insn_visitor): Likewise.
10168
10169 2015-10-12 Yao Qi <yao.qi@linaro.org>
10170
10171 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10172 (struct aarch64_insn_visitor): New.
10173 (struct aarch64_insn_relocation_data): New.
10174 (aarch64_ftrace_insn_reloc_b): New function.
10175 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10176 (aarch64_ftrace_insn_reloc_cb): Likewise.
10177 (aarch64_ftrace_insn_reloc_tb): Likewise.
10178 (aarch64_ftrace_insn_reloc_adr): Likewise.
10179 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10180 (aarch64_ftrace_insn_reloc_others): Likewise.
10181 (visitor): New.
10182 (aarch64_relocate_instruction): Use visitor.
10183
10184 2015-10-12 Yao Qi <yao.qi@linaro.org>
10185
10186 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10187 int. Add argument buf.
10188 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10189 aarch64_relocate_instruction.
10190
10191 2015-10-12 Yao Qi <yao.qi@linaro.org>
10192
10193 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10194 argument insn. Remove local variable insn. Don't call
10195 target_read_uint32.
10196 (aarch64_install_fast_tracepoint_jump_pad): Call
10197 target_read_uint32.
10198
10199 2015-09-30 Yao Qi <yao.qi@linaro.org>
10200
10201 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10202 (emit_load_store_pair): Likewise.
10203
10204 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10205
10206 * dll.c (match_dll): Add cast(s).
10207 (unloaded_dll): Likewise.
10208 * linux-low.c (second_thread_of_pid_p): Likewise.
10209 (delete_lwp_callback): Likewise.
10210 (count_events_callback): Likewise.
10211 (select_event_lwp_callback): Likewise.
10212 (linux_set_resume_request): Likewise.
10213 * server.c (accumulate_file_name_length): Likewise.
10214 (emit_dll_description): Likewise.
10215 (handle_qxfer_threads_worker): Likewise.
10216 (visit_actioned_threads): Likewise.
10217 * thread-db.c (any_thread_of): Likewise.
10218 * tracepoint.c (same_process_p): Likewise.
10219 (match_blocktype): Likewise.
10220 (build_traceframe_info_xml): Likewise.
10221
10222 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10223
10224 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10225 assignment.
10226 (gdb_unparse_agent_expr): Likewise.
10227 * hostio.c (require_data): Likewise.
10228 (handle_pread): Likewise.
10229 * linux-low.c (disable_regset): Likewise.
10230 (fetch_register): Likewise.
10231 (store_register): Likewise.
10232 (get_dynamic): Likewise.
10233 (linux_qxfer_libraries_svr4): Likewise.
10234 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10235 (set_fast_tracepoint_jump): Likewise.
10236 (uninsert_fast_tracepoint_jumps_at): Likewise.
10237 (reinsert_fast_tracepoint_jumps_at): Likewise.
10238 (validate_inserted_breakpoint): Likewise.
10239 (clone_agent_expr): Likewise.
10240 * regcache.c (init_register_cache): Likewise.
10241 * remote-utils.c (putpkt_binary_1): Likewise.
10242 (decode_M_packet): Likewise.
10243 (decode_X_packet): Likewise.
10244 (look_up_one_symbol): Likewise.
10245 (relocate_instruction): Likewise.
10246 (monitor_output): Likewise.
10247 * server.c (handle_search_memory): Likewise.
10248 (handle_qxfer_exec_file): Likewise.
10249 (handle_qxfer_libraries): Likewise.
10250 (handle_qxfer): Likewise.
10251 (handle_query): Likewise.
10252 (handle_v_cont): Likewise.
10253 (handle_v_run): Likewise.
10254 (captured_main): Likewise.
10255 * target.c (write_inferior_memory): Likewise.
10256 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10257 * tracepoint.c (init_trace_buffer): Likewise.
10258 (add_tracepoint_action): Likewise.
10259 (add_traceframe): Likewise.
10260 (add_traceframe_block): Likewise.
10261 (cmd_qtdpsrc): Likewise.
10262 (cmd_qtdv): Likewise.
10263 (cmd_qtstatus): Likewise.
10264 (response_source): Likewise.
10265 (response_tsv): Likewise.
10266 (cmd_qtnotes): Likewise.
10267 (gdb_collect): Likewise.
10268 (initialize_tracepoint): Likewise.
10269
10270 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10271
10272 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10273 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10274 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10275 <NOP>: New.
10276 (enum aarch64_condition_codes): New enum.
10277 (w0): New static global.
10278 (fp): Likewise.
10279 (lr): Likewise.
10280 (struct aarch64_memory_operand) <type>: New
10281 MEMORY_OPERAND_POSTINDEX type.
10282 (postindex_memory_operand): New helper function.
10283 (emit_ret): New function.
10284 (emit_load_store_pair): New function, factored out of emit_stp
10285 with support for MEMORY_OPERAND_POSTINDEX.
10286 (emit_stp): Rewrite using emit_load_store_pair.
10287 (emit_ldp): New function.
10288 (emit_load_store): Likewise.
10289 (emit_ldr): Mention post-index instruction in comment.
10290 (emit_ldrh): New function.
10291 (emit_ldrb): New function.
10292 (emit_ldrsw): Mention post-index instruction in comment.
10293 (emit_str): Likewise.
10294 (emit_subs): New function.
10295 (emit_cmp): Likewise.
10296 (emit_and): Likewise.
10297 (emit_orr): Likewise.
10298 (emit_orn): Likewise.
10299 (emit_eor): Likewise.
10300 (emit_mvn): Likewise.
10301 (emit_lslv): Likewise.
10302 (emit_lsrv): Likewise.
10303 (emit_asrv): Likewise.
10304 (emit_mul): Likewise.
10305 (emit_sbfm): Likewise.
10306 (emit_sbfx): Likewise.
10307 (emit_ubfm): Likewise.
10308 (emit_ubfx): Likewise.
10309 (emit_csinc): Likewise.
10310 (emit_cset): Likewise.
10311 (emit_nop): Likewise.
10312 (emit_ops_insns): New helper function.
10313 (emit_pop): Likewise.
10314 (emit_push): Likewise.
10315 (aarch64_emit_prologue): New function.
10316 (aarch64_emit_epilogue): Likewise.
10317 (aarch64_emit_add): Likewise.
10318 (aarch64_emit_sub): Likewise.
10319 (aarch64_emit_mul): Likewise.
10320 (aarch64_emit_lsh): Likewise.
10321 (aarch64_emit_rsh_signed): Likewise.
10322 (aarch64_emit_rsh_unsigned): Likewise.
10323 (aarch64_emit_ext): Likewise.
10324 (aarch64_emit_log_not): Likewise.
10325 (aarch64_emit_bit_and): Likewise.
10326 (aarch64_emit_bit_or): Likewise.
10327 (aarch64_emit_bit_xor): Likewise.
10328 (aarch64_emit_bit_not): Likewise.
10329 (aarch64_emit_equal): Likewise.
10330 (aarch64_emit_less_signed): Likewise.
10331 (aarch64_emit_less_unsigned): Likewise.
10332 (aarch64_emit_ref): Likewise.
10333 (aarch64_emit_if_goto): Likewise.
10334 (aarch64_emit_goto): Likewise.
10335 (aarch64_write_goto_address): Likewise.
10336 (aarch64_emit_const): Likewise.
10337 (aarch64_emit_call): Likewise.
10338 (aarch64_emit_reg): Likewise.
10339 (aarch64_emit_pop): Likewise.
10340 (aarch64_emit_stack_flush): Likewise.
10341 (aarch64_emit_zero_ext): Likewise.
10342 (aarch64_emit_swap): Likewise.
10343 (aarch64_emit_stack_adjust): Likewise.
10344 (aarch64_emit_int_call_1): Likewise.
10345 (aarch64_emit_void_call_2): Likewise.
10346 (aarch64_emit_eq_goto): Likewise.
10347 (aarch64_emit_ne_goto): Likewise.
10348 (aarch64_emit_lt_goto): Likewise.
10349 (aarch64_emit_le_goto): Likewise.
10350 (aarch64_emit_gt_goto): Likewise.
10351 (aarch64_emit_ge_got): Likewise.
10352 (aarch64_emit_ops_impl): New static global variable.
10353 (aarch64_emit_ops): New target function, return
10354 &aarch64_emit_ops_impl.
10355 (struct linux_target_ops): Install it.
10356
10357 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10358
10359 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10360 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10361 aarch64-ipa.o.
10362 * linux-aarch64-ipa.c: New file.
10363 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10364 and endian.h.
10365 (aarch64_get_thread_area): New target method.
10366 (extract_signed_bitfield): New helper function.
10367 (aarch64_decode_ldr_literal): New function.
10368 (enum aarch64_opcodes): New enum.
10369 (struct aarch64_register): New struct.
10370 (struct aarch64_operand): New struct.
10371 (x0): New static global.
10372 (x1): Likewise.
10373 (x2): Likewise.
10374 (x3): Likewise.
10375 (x4): Likewise.
10376 (w2): Likewise.
10377 (ip0): Likewise.
10378 (sp): Likewise.
10379 (xzr): Likewise.
10380 (aarch64_register): New helper function.
10381 (register_operand): Likewise.
10382 (immediate_operand): Likewise.
10383 (struct aarch64_memory_operand): New struct.
10384 (offset_memory_operand): New helper function.
10385 (preindex_memory_operand): Likewise.
10386 (enum aarch64_system_control_registers): New enum.
10387 (ENCODE): New macro.
10388 (emit_insn): New helper function.
10389 (emit_b): New function.
10390 (emit_bcond): Likewise.
10391 (emit_cb): Likewise.
10392 (emit_tb): Likewise.
10393 (emit_blr): Likewise.
10394 (emit_stp): Likewise.
10395 (emit_ldp_q_offset): Likewise.
10396 (emit_stp_q_offset): Likewise.
10397 (emit_load_store): Likewise.
10398 (emit_ldr): Likewise.
10399 (emit_ldrsw): Likewise.
10400 (emit_str): Likewise.
10401 (emit_ldaxr): Likewise.
10402 (emit_stxr): Likewise.
10403 (emit_stlr): Likewise.
10404 (emit_data_processing_reg): Likewise.
10405 (emit_data_processing): Likewise.
10406 (emit_add): Likewise.
10407 (emit_sub): Likewise.
10408 (emit_mov): Likewise.
10409 (emit_movk): Likewise.
10410 (emit_mov_addr): Likewise.
10411 (emit_mrs): Likewise.
10412 (emit_msr): Likewise.
10413 (emit_sevl): Likewise.
10414 (emit_wfe): Likewise.
10415 (append_insns): Likewise.
10416 (can_encode_int32_in): New helper function.
10417 (aarch64_relocate_instruction): New function.
10418 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10419 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10420 (struct linux_target_ops): Install aarch64_get_thread_area,
10421 aarch64_install_fast_tracepoint_jump_pad and
10422 aarch64_get_min_fast_tracepoint_insn_len.
10423
10424 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10425
10426 * Makefile.in (aarch64-insn.o): New rule.
10427 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10428
10429 2015-09-21 Yao Qi <yao.qi@linaro.org>
10430
10431 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10432
10433 2015-09-21 Yao Qi <yao.qi@linaro.org>
10434
10435 * tracepoint.c (max_jump_pad_size): Remove.
10436
10437 2015-09-18 Yao Qi <yao.qi@linaro.org>
10438
10439 * linux-aarch64-low.c: Don't include sys/uio.h.
10440 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10441
10442 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10443
10444 * tracepoint.c (eval_result_type): Change prototype.
10445 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10446
10447 2015-09-15 Pedro Alves <palves@redhat.com>
10448
10449 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10450 Check whether to report exec events instead of checking whether
10451 multiprocess is enabled.
10452
10453 2015-09-15 Pedro Alves <palves@redhat.com>
10454
10455 PR remote/18965
10456 * remote-utils.c (prepare_resume_reply): Merge
10457 TARGET_WAITKIND_VFORK_DONE switch case with the
10458 TARGET_WAITKIND_FORKED case.
10459
10460 2015-09-15 Yao Qi <yao.qi@linaro.org>
10461
10462 * server.c (handle_query): Check string comparison using
10463 "else if" instead of "if".
10464
10465 2015-09-15 Yao Qi <yao.qi@linaro.org>
10466
10467 * server.c (vCont_supported): New global variable.
10468 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10469 matches. Append ";vContSupported+" to own_buf.
10470 (handle_v_requests): Append ";s;S" to own_buf if target supports
10471 hardware single step or vCont_supported is false.
10472 (capture_main): Set vCont_supported to zero.
10473
10474 2015-09-15 Yao Qi <yao.qi@linaro.org>
10475
10476 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10477 it to ...
10478 (linux_supports_hardware_single_step): ... New function.
10479 (linux_target_ops): Update.
10480 * lynx-low.c (lynx_target_ops): Set field
10481 supports_hardware_single_step to target_can_do_hardware_single_step.
10482 * nto-low.c (nto_target_ops): Likewise.
10483 * spu-low.c (spu_target_ops): Likewise.
10484 * win32-low.c (win32_target_ops): Likewise.
10485 * target.c (target_can_do_hardware_single_step): New function.
10486 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10487 Remove. <supports_hardware_single_step>: New field.
10488 (target_supports_conditional_breakpoints): Remove.
10489 (target_supports_hardware_single_step): New macro.
10490 (target_can_do_hardware_single_step): Declare.
10491 * server.c (handle_query): Use target_supports_hardware_single_step
10492 instead of target_supports_conditional_breakpoints.
10493
10494 2015-09-15 Yao Qi <yao.qi@linaro.org>
10495
10496 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10497 function.
10498 (struct linux_target_ops the_low_target): Install
10499 aarch64_linux_siginfo_fixup.
10500
10501 2015-09-11 Don Breazeal <donb@codesourcery.com>
10502 Luis Machado <lgustavo@codesourcery.com>
10503
10504 * linux-low.c (linux_mourn): Static declaration.
10505 (linux_arch_setup): Move in front of
10506 handle_extended_wait.
10507 (linux_arch_setup_thread): New function.
10508 (handle_extended_wait): Handle exec events. Call
10509 linux_arch_setup_thread. Make event_lwp argument a
10510 pointer-to-a-pointer.
10511 (check_zombie_leaders): Do not check stopped threads.
10512 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10513 (linux_low_filter_event): Add lwp and thread for exec'ing
10514 non-leader thread if leader thread has been deleted.
10515 Refactor code into linux_arch_setup_thread and call it.
10516 Pass child lwp pointer by reference to handle_extended_wait.
10517 (linux_wait_for_event_filtered): Update comment.
10518 (linux_wait_1): Prevent clobbering exec event status.
10519 (linux_supports_exec_events): New function.
10520 (linux_target_ops) <supports_exec_events>: Initialize new member.
10521 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10522 new member.
10523 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10524 * server.c (report_exec_events): New global variable.
10525 (handle_query): Handle qSupported query for exec-events feature.
10526 (captured_main): Initialize report_exec_events.
10527 * server.h (report_exec_events): Declare new global variable.
10528 * target.h (struct target_ops) <supports_exec_events>: New
10529 member.
10530 (target_supports_exec_events): New macro.
10531 * win32-low.c (win32_target_ops) <supports_exec_events>:
10532 Initialize new member.
10533
10534 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10535
10536 * linux-low.c (linux_low_enable_btrace): Remove.
10537 (linux_target_ops): Replace linux_low_enable_btrace with
10538 linux_enable_btrace.
10539
10540 2015-09-03 Yao Qi <yao.qi@linaro.org>
10541
10542 * linux-aarch64-low.c (aarch64_insert_point): Call
10543 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10544 returns true.
10545
10546 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10547
10548 * linux-low.c (check_stopped_by_breakpoint): Use
10549 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10550
10551 2015-08-27 Pedro Alves <palves@redhat.com>
10552
10553 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10554
10555 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10556
10557 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10558 the XNEW-family equivalent.
10559 (compile_bytecodes): Likewise.
10560 * dll.c (loaded_dll): Likewise.
10561 * event-loop.c (append_callback_event): Likewise.
10562 (create_file_handler): Likewise.
10563 (create_file_event): Likewise.
10564 * hostio.c (handle_open): Likewise.
10565 * inferiors.c (add_thread): Likewise.
10566 (add_process): Likewise.
10567 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10568 * linux-arm-low.c (arm_new_process): Likewise.
10569 (arm_new_thread): Likewise.
10570 * linux-low.c (add_to_pid_list): Likewise.
10571 (linux_add_process): Likewise.
10572 (handle_extended_wait): Likewise.
10573 (add_lwp): Likewise.
10574 (enqueue_one_deferred_signal): Likewise.
10575 (enqueue_pending_signal): Likewise.
10576 (linux_resume_one_lwp_throw): Likewise.
10577 (linux_resume_one_thread): Likewise.
10578 (linux_read_memory): Likewise.
10579 (linux_write_memory): Likewise.
10580 * linux-mips-low.c (mips_linux_new_process): Likewise.
10581 (mips_linux_new_thread): Likewise.
10582 (mips_add_watchpoint): Likewise.
10583 * linux-x86-low.c (initialize_low_arch): Likewise.
10584 * lynx-low.c (lynx_add_process): Likewise.
10585 * mem-break.c (set_raw_breakpoint_at): Likewise.
10586 (set_breakpoint): Likewise.
10587 (add_condition_to_breakpoint): Likewise.
10588 (add_commands_to_breakpoint): Likewise.
10589 (clone_agent_expr): Likewise.
10590 (clone_one_breakpoint): Likewise.
10591 * regcache.c (new_register_cache): Likewise.
10592 * remote-utils.c (look_up_one_symbol): Likewise.
10593 * server.c (queue_stop_reply): Likewise.
10594 (start_inferior): Likewise.
10595 (queue_stop_reply_callback): Likewise.
10596 (handle_target_event): Likewise.
10597 * spu-low.c (fetch_ppc_memory): Likewise.
10598 (store_ppc_memory): Likewise.
10599 * target.c (set_target_ops): Likewise.
10600 * thread-db.c (thread_db_load_search): Likewise.
10601 (try_thread_db_load_1): Likewise.
10602 * tracepoint.c (add_tracepoint): Likewise.
10603 (add_tracepoint_action): Likewise.
10604 (create_trace_state_variable): Likewise.
10605 (cmd_qtdpsrc): Likewise.
10606 (cmd_qtro): Likewise.
10607 (add_while_stepping_state): Likewise.
10608 * win32-low.c (child_add_thread): Likewise.
10609 (get_image_name): Likewise.
10610
10611 2015-08-25 Yao Qi <yao.qi@linaro.org>
10612
10613 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10614
10615 2015-08-25 Yao Qi <yao.qi@linaro.org>
10616
10617 * Makefile.in (aarch64-linux.o): New rule.
10618 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10619 srv_tgtobj.
10620 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10621 (aarch64_init_debug_reg_state): Make it extern.
10622 (aarch64_linux_prepare_to_resume): Remove.
10623
10624 2015-08-25 Yao Qi <yao.qi@linaro.org>
10625
10626 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10627 lwp_arch_private_info and ptid_of_lwp.
10628
10629 2015-08-25 Yao Qi <yao.qi@linaro.org>
10630
10631 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10632 Find proc_info by find_process_pid. All callers updated.
10633
10634 2015-08-25 Yao Qi <yao.qi@linaro.org>
10635
10636 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10637 Remove.
10638 (debug_reg_change_callback): Remove.
10639 (aarch64_notify_debug_reg_change): Remove.
10640
10641 2015-08-25 Yao Qi <yao.qi@linaro.org>
10642
10643 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10644 Call current_lwp_ptid.
10645
10646 2015-08-25 Yao Qi <yao.qi@linaro.org>
10647
10648 * linux-aarch64-low.c (debug_reg_change_callback): Use
10649 debug_printf.
10650
10651 2015-08-25 Yao Qi <yao.qi@linaro.org>
10652
10653 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10654
10655 2015-08-25 Yao Qi <yao.qi@linaro.org>
10656
10657 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10658
10659 2015-08-25 Yao Qi <yao.qi@linaro.org>
10660
10661 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10662 the code.
10663
10664 2015-08-25 Yao Qi <yao.qi@linaro.org>
10665
10666 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10667 Remove.
10668 (debug_reg_change_callback): Remove argument entry and add argument
10669 lwp. Remove local variable thread. Don't print thread id in the
10670 debugging output. Don't check whether pid of thread equals to pid.
10671 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10672 iterate_over_lwps instead find_inferior.
10673
10674 2015-08-24 Pedro Alves <palves@redhat.com>
10675
10676 * inferiors.c (get_first_process): New function.
10677 * inferiors.h (get_first_process): New declaration.
10678 * remote-utils.c (read_ptid): Default to the first process in the
10679 list, instead of to the current thread's process.
10680
10681 2015-08-24 Pedro Alves <palves@redhat.com>
10682
10683 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10684 * event-loop.c: Likewise.
10685 * remote-utils.c: Likewise.
10686 * tracepoint.c: Likewise.
10687
10688 2015-08-24 Pedro Alves <palves@redhat.com>
10689
10690 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10691 ptid_get_lwp.
10692
10693 2015-08-21 Pedro Alves <palves@redhat.com>
10694
10695 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10696 instead of literal 1.
10697
10698 2015-08-21 Pedro Alves <palves@redhat.com>
10699
10700 * tdesc.c (default_description): Explicitly zero-initialize.
10701
10702 2015-08-21 Pedro Alves <palves@redhat.com>
10703
10704 PR gdb/18749
10705 * inferiors.c (remove_thread): Discard any pending stop reply for
10706 this thread.
10707 * server.c (remove_all_on_match_pid): Rename to ...
10708 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10709 instead of a pid.
10710 (discard_queued_stop_replies): Change parameter to a ptid. Now
10711 extern.
10712 (handle_v_kill, kill_inferior_callback, captured_main)
10713 (process_serial_event): Adjust.
10714 * server.h (discard_queued_stop_replies): Declare.
10715
10716 2015-08-21 Pedro Alves <palves@redhat.com>
10717
10718 * linux-low.c (wait_for_sigstop): Always switch to no thread
10719 selected if the previously current thread dies.
10720 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10721 process instead of the current thread's.
10722 * remote-utils.c (input_interrupt): Don't check if there's no
10723 current thread.
10724 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10725 current thread to the general thread fails, error out.
10726 (handle_qxfer_auxv, handle_qxfer_libraries)
10727 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10728 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10729 (handle_query): Check if there's a thread selected instead of
10730 checking whether there's any thread in the thread list.
10731 (handle_qxfer_threads, handle_qxfer_btrace)
10732 (handle_qxfer_btrace_conf): Don't error out early if there's no
10733 thread in the thread list.
10734 (handle_v_cont, myresume): Don't set the current thread to the
10735 continue thread.
10736 (process_serial_event) <Hg handling>: Also set thread_id if the
10737 previous general thread is still alive.
10738 (process_serial_event) <g/G handling>: If setting the current
10739 thread to the general thread fails, error out.
10740 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10741 thread's lwp instead of the current thread's.
10742 * target.c (set_desired_thread): If the desired thread was not
10743 found, leave the current thread pointing to NULL. Return an int
10744 (boolean) indicating success.
10745 * target.h (set_desired_thread): Change return type to int.
10746
10747 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10748
10749 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10750 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10751 #includes.
10752 (ps_get_thread_area): New function.
10753
10754 2015-08-19 Gary Benson <gbenson@redhat.com>
10755
10756 * hostio.c (handle_pread): Do not attempt to read more data
10757 than hostio_reply_with_data can fit in a packet.
10758
10759 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10760
10761 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10762
10763 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10764
10765 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10766
10767 2015-08-06 Pedro Alves <palves@redhat.com>
10768
10769 * tracepoint.c (expr_eval_result): Now an int.
10770
10771 2015-08-06 Pedro Alves <palves@redhat.com>
10772
10773 * gdbthread.h (struct regcache): Forward declare.
10774 (struct thread_info) <regcache_data>: Now a struct regcache
10775 pointer.
10776 * inferiors.c (inferior_regcache_data)
10777 (set_inferior_regcache_data): Now work with struct regcache
10778 pointers.
10779 * inferiors.h (struct regcache): Forward declare.
10780 (inferior_regcache_data, set_inferior_regcache_data): Now work
10781 with struct regcache pointers.
10782 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10783 (free_register_cache_thread): Remove struct regcache pointer
10784 casts.
10785
10786 2015-08-06 Pedro Alves <palves@redhat.com>
10787
10788 * server.c (captured_main): On error, print the exception message
10789 to stderr, and if run_once is set, throw a quit.
10790
10791 2015-08-06 Pedro Alves <palves@redhat.com>
10792
10793 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10794 the current thread.
10795
10796 2015-08-06 Pedro Alves <palves@redhat.com>
10797
10798 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10799 reading beyond the passed in buffer length.
10800
10801 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10802
10803 * tracepoint.c (symbol_list) <required>: Remove.
10804
10805 2015-08-06 Pedro Alves <palves@redhat.com>
10806
10807 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10808 count if stopping and suspending threads.
10809 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10810 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10811 (linux_detach): Complete an ongoing step-over.
10812 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10813 throughout.
10814 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10815 (linux_wait_1): If passing a signal to the inferior after
10816 finishing a step-over, unsuspend and re-resume all lwps. If we
10817 see a single-step event but the thread should be continuing, don't
10818 pass the trap to gdb.
10819 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10820 internal_error instead of gdb_assert.
10821 (enqueue_pending_signal): New function.
10822 (check_ptrace_stopped_lwp_gone): Add debug output.
10823 (start_step_over): Use internal_error instead of gdb_assert.
10824 (complete_ongoing_step_over): New function.
10825 (linux_resume_one_thread): Don't resume a suspended thread.
10826 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10827 it stepping.
10828
10829 2015-08-06 Pedro Alves <palves@redhat.com>
10830
10831 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10832 (linux_thread_alive): Use lwp_is_marked_dead.
10833 (extended_event_reported): Delete.
10834 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10835 instead of extended_event_reported.
10836 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10837 as well.
10838 (lwp_is_marked_dead): New function.
10839 (lwp_running): Use lwp_is_marked_dead.
10840 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10841 comment.
10842
10843 2015-08-06 Pedro Alves <palves@redhat.com>
10844
10845 * linux-low.c (linux_wait_1): Move fork event output out of the
10846 !report_to_gdb check. Pass event_child->waitstatus to
10847 target_waitstatus_to_string instead of ourstatus.
10848
10849 2015-08-04 Yao Qi <yao.qi@linaro.org>
10850
10851 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10852 if current_thread is 32 bit.
10853
10854 2015-08-04 Yao Qi <yao.qi@linaro.org>
10855
10856 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10857 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10858 * server.c (extended_protocol): Remove "static".
10859 * server.h (extended_protocol): Declare it.
10860
10861 2015-08-04 Yao Qi <yao.qi@linaro.org>
10862
10863 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10864 both aarch64 and aarch32.
10865 (aarch64_set_pc): Likewise.
10866
10867 2015-08-04 Yao Qi <yao.qi@linaro.org>
10868
10869 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10870 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10871 arm-with-neon.xml to srv_xmlfiles.
10872 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10873 (is_64bit_tdesc): New function.
10874 (aarch64_linux_read_description): New function.
10875 (aarch64_arch_setup): Call aarch64_linux_read_description.
10876 (regs_info): Rename to regs_info_aarch64.
10877 (aarch64_regs_info): Return right regs_info.
10878 (initialize_low_arch): Call initialize_low_arch_aarch32.
10879
10880 2015-08-04 Yao Qi <yao.qi@linaro.org>
10881
10882 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10883 * linux-aarch32-low.c: New file.
10884 * linux-aarch32-low.h: New file.
10885 * linux-arm-low.c (arm_fill_gregset): Move it to
10886 linux-aarch32-low.c.
10887 (arm_store_gregset): Likewise.
10888 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10889 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10890 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10891 (regs_info): Rename to regs_info_arm.
10892 (arm_regs_info): Return regs_info_aarch32 if
10893 have_ptrace_getregset is 1 and target description is
10894 arm_with_neon or arm_with_vfpv3.
10895 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10896 Call initialize_low_arch_aarch32 instead.
10897
10898 2015-08-04 Yao Qi <yao.qi@linaro.org>
10899
10900 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10901 * linux-low.c: ... here.
10902 * linux-low.h (have_ptrace_getregset): Declare it.
10903
10904 2015-08-04 Pedro Alves <palves@redhat.com>
10905
10906 * thread-db.c (struct thread_db): Use new typedefs.
10907 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10908 CHK calls.
10909 (disable_thread_event_reporting): Cast result of dlsym to
10910 destination function pointer type.
10911 (thread_db_mourn): Use td_ta_delete_ftype.
10912
10913 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10914
10915 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10916 arch variant.
10917 (CDX_BREAKPOINT): Define for R2.
10918 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10919 (the_low_target): Add comments.
10920
10921 2015-07-30 Yao Qi <yao.qi@linaro.org>
10922
10923 * linux-arm-low.c (arm_hwcap): Remove it.
10924 (arm_read_description): New local variable arm_hwcap. Don't
10925 set arm_hwcap to zero.
10926
10927 2015-07-30 Yao Qi <yao.qi@linaro.org>
10928
10929 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10930 Use regcache->tdesc instead.
10931 (arm_store_wmmxregset): Likewise.
10932 (arm_fill_vfpregset): Likewise.
10933 (arm_store_vfpregset): Likewise.
10934
10935 2015-07-30 Yao Qi <yao.qi@linaro.org>
10936
10937 * linux-arm-low.c: Include arch/arm.h.
10938 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10939 (arm_store_gregset): Likewise.
10940
10941 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10942
10943 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10944 ptrace's 4th parameter.
10945
10946 2015-07-27 Yao Qi <yao.qi@linaro.org>
10947
10948 * configure.srv (case aarch64*-*-linux*): Don't set
10949 srv_linux_usrregs.
10950
10951 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10952
10953 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10954 sys/ptrace.h.
10955 * linux-arm-low.c: Likewise.
10956 * linux-cris-low.c: Likewise.
10957 * linux-crisv32-low.c: Likewise.
10958 * linux-low.c: Likewise.
10959 * linux-m68k-low.c: Likewise.
10960 * linux-mips-low.c: Likewise.
10961 * linux-nios2-low.c: Likewise.
10962 * linux-s390-low.c: Likewise.
10963 * linux-sparc-low.c: Likewise.
10964 * linux-tic6x-low.c: Likewise.
10965 * linux-tile-low.c: Likewise.
10966 * linux-x86-low.c: Likewise.
10967
10968 2015-07-24 Pedro Alves <palves@redhat.com>
10969
10970 * config.in: Regenerate.
10971 * configure: Regenerate.
10972
10973 2015-07-24 Pedro Alves <palves@redhat.com>
10974
10975 * acinclude.m4: Include ../ptrace.m4.
10976 * configure.ac: Call GDB_AC_PTRACE.
10977 * config.in, configure: Regenerate.
10978
10979 2015-07-24 Yao Qi <yao.qi@linaro.org>
10980
10981 * linux-low.c (linux_create_inferior): Remove setting to
10982 proc->priv->new_inferior.
10983 (linux_attach): Likewise.
10984 (linux_low_filter_event): Likewise.
10985 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10986
10987 2015-07-24 Yao Qi <yao.qi@linaro.org>
10988
10989 * linux-low.c (linux_arch_setup): New function.
10990 (linux_low_filter_event): If proc->tdesc is NULL and
10991 proc->attached is true, call the_low_target.arch_setup.
10992 Otherwise, keep status pending, and return.
10993 (linux_resume_one_lwp_throw): Don't call get_pc if
10994 thread->while_stepping isn't NULL. Don't call
10995 get_thread_regcache if proc->tdesc is NULL.
10996 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10997 (linux_target_ops): Install arch_setup.
10998 * server.c (start_inferior): Call the_target->arch_setup.
10999 * target.h (struct target_ops) <arch_setup>: New field.
11000 (target_arch_setup): New marco.
11001 * lynx-low.c (lynx_target_ops): Update.
11002 * nto-low.c (nto_target_ops): Update.
11003 * spu-low.c (spu_target_ops): Update.
11004 * win32-low.c (win32_target_ops): Update.
11005
11006 2015-07-24 Yao Qi <yao.qi@linaro.org>
11007
11008 * linux-low.c (linux_add_process): Don't set
11009 proc->priv->new_inferior.
11010 (linux_create_inferior): Set proc->priv->new_inferior to 1.
11011 (linux_attach): Likewise.
11012
11013 2015-07-24 Yao Qi <yao.qi@linaro.org>
11014
11015 * server.c (start_inferior): Code refactor.
11016
11017 2015-07-24 Yao Qi <yao.qi@linaro.org>
11018
11019 * server.c (process_serial_event): Set general_thread.
11020
11021 2015-07-21 Yao Qi <yao.qi@linaro.org>
11022
11023 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
11024 aarch64_linux_get_debug_reg_capacity.
11025
11026 2015-07-17 Yao Qi <yao.qi@linaro.org>
11027
11028 * Makefile.in (aarch64-linux-hw-point.o): New rule.
11029 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
11030 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
11031 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
11032 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
11033 (AARCH64_HWP_ALIGNMENT): Likewise.
11034 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
11035 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
11036 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
11037 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
11038 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
11039 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
11040 (struct aarch64_debug_reg_state): Likewise.
11041 (struct arch_lwp_info): Likewise.
11042 (aarch64_align_watchpoint): Likewise.
11043 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
11044 (aarch64_watchpoint_length): Likewise.
11045 (aarch64_point_encode_ctrl_reg): Likewise
11046 (aarch64_point_is_aligned): Likewise.
11047 (aarch64_align_watchpoint): Likewise.
11048 (aarch64_linux_set_debug_regs):
11049 (aarch64_dr_state_insert_one_point): Likewise.
11050 (aarch64_dr_state_remove_one_point): Likewise.
11051 (aarch64_handle_breakpoint): Likewise.
11052 (aarch64_handle_aligned_watchpoint): Likewise.
11053 (aarch64_handle_unaligned_watchpoint): Likewise.
11054 (aarch64_handle_watchpoint): Likewise.
11055
11056 2015-07-17 Yao Qi <yao.qi@linaro.org>
11057
11058 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
11059 and don't aarch64_get_debug_reg_state. All callers update.
11060 (aarch64_handle_aligned_watchpoint): Likewise.
11061 (aarch64_handle_unaligned_watchpoint): Likewise.
11062 (aarch64_handle_watchpoint): Likewise.
11063 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
11064 (aarch64_remove_point): Likewise.
11065
11066 2015-07-17 Yao Qi <yao.qi@linaro.org>
11067
11068 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
11069 debug_printf.
11070 (aarch64_handle_unaligned_watchpoint): Likewise.
11071
11072 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11073
11074 Revert the previous 3 commits:
11075 Move gdb_regex* to common/
11076 Move linux_find_memory_regions_full & co.
11077 gdbserver build-id attribute generator
11078
11079 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11080 Jan Kratochvil <jan.kratochvil@redhat.com>
11081
11082 gdbserver build-id attribute generator.
11083 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
11084 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
11085 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
11086 (find_phdr): New.
11087 (get_dynamic): Use find_pdhr to traverse program headers.
11088 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
11089 (compare_mapping_entry_range, struct find_memory_region_callback_data)
11090 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
11091 (get_hex_build_id): New.
11092 (linux_qxfer_libraries_svr4): Add optional build-id attribute
11093 to reply XML document.
11094
11095 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11096 Jan Kratochvil <jan.kratochvil@redhat.com>
11097
11098 * target.c: Include target/target-utils.h and fcntl.h.
11099 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
11100 (target_fileio_read_stralloc): New functions.
11101
11102 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11103
11104 * Makefile.in (OBS): Add gdb_regex.o.
11105 (gdb_regex.o): New.
11106 * config.in: Rebuilt.
11107 * configure: Rebuilt.
11108
11109 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11110 Jan Kratochvil <jan.kratochvil@redhat.com>
11111
11112 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
11113 * Makefile.in (OBS): Add target-utils.o.
11114 (linux-maps.o, target-utils.o): New.
11115 * configure.srv (srv_linux_obj): Add linux-maps.o.
11116
11117 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
11118
11119 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
11120 function, return 1.
11121 (the_low_target): Install it.
11122
11123 2015-07-14 Pedro Alves <palves@redhat.com>
11124
11125 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
11126 Instead, ignore ECHILD, and throw an error for other errnos.
11127
11128 2015-07-10 Pedro Alves <palves@redhat.com>
11129
11130 * event-loop.c (struct callback_event) <data>: Change type to
11131 gdb_client_data instance instead of gdb_client_data pointer.
11132 (append_callback_event): Adjust.
11133
11134 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11135
11136 * linux-aarch64-low.c: Add comments for each linux_target_ops
11137 method. Remove comments already covered in target_ops and
11138 linux_target_ops definitions.
11139 (the_low_target): Add comments for each unimplemented method.
11140
11141 2015-07-09 Yao Qi <yao.qi@linaro.org>
11142
11143 * linux-aarch64-low.c (aarch64_regmap): Remove.
11144 (aarch64_usrregs_info): Remove.
11145 (regs_info): Set field usrregs to NULL.
11146
11147 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11148
11149 * linux-low.c: Include "rsp-low.h"
11150 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11151 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11152 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11153 (handle_btrace_enable_pt): New.
11154 (handle_btrace_general_set): Support "pt".
11155 (handle_btrace_conf_general_set): Support "pt:size".
11156
11157 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11158
11159 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11160 Z_PACKET_SW_BP.
11161
11162 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11163
11164 * linux-aarch64-low.c: Remove comment about endianness.
11165 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11166 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11167 memcmp.
11168
11169 2015-06-24 Gary Benson <gbenson@redhat.com>
11170
11171 * linux-i386-ipa.c (stdint.h): Do not include.
11172 * lynx-i386-low.c (stdint.h): Likewise.
11173 * lynx-ppc-low.c (stdint.h): Likewise.
11174 * mem-break.c (stdint.h): Likewise.
11175 * thread-db.c (stdint.h): Likewise.
11176 * tracepoint.c (stdint.h): Likewise.
11177 * win32-low.c (stdint.h): Likewise.
11178
11179 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11180
11181 * server.c (write_qxfer_response): Update call to
11182 remote_escape_output.
11183
11184 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11185 Jan Kratochvil <jan.kratochvil@redhat.com>
11186
11187 Merge multiple hex conversions.
11188 * gdbreplay.c (tohex): Rename to 'fromhex'.
11189 (logchar): Use fromhex.
11190
11191 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11192
11193 * server.c (handle_qxfer_libraries): Set `version' attribute for
11194 <library-list>.
11195
11196 2015-06-10 Gary Benson <gbenson@redhat.com>
11197
11198 * target.h (struct target_ops) <multifs_open>: New field.
11199 <multifs_unlink>: Likewise.
11200 <multifs_readlink>: Likewise.
11201 * linux-low.c (nat/linux-namespaces.h): New include.
11202 (linux_target_ops): Initialize the_target->multifs_open,
11203 the_target->multifs_unlink and the_target->multifs_readlink.
11204 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11205 * hostio.c (hostio_fs_pid): New static variable.
11206 (hostio_handle_new_gdb_connection): New function.
11207 (handle_setfs): Likewise.
11208 (handle_open): Use the_target->multifs_open as appropriate.
11209 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11210 (handle_readlink): Use the_target->multifs_readlink as
11211 appropriate.
11212 (handle_vFile): Handle vFile:setfs packets.
11213 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11214 after target_handle_new_gdb_connection.
11215
11216 2015-06-10 Gary Benson <gbenson@redhat.com>
11217
11218 * configure.ac (AC_CHECK_FUNCS): Add setns.
11219 * config.in: Regenerate.
11220 * configure: Likewise.
11221 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11222 (linux-namespaces.o): New rule.
11223 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11224
11225 2015-06-09 Gary Benson <gbenson@redhat.com>
11226
11227 * hostio.c (handle_open): Process mode argument with
11228 fileio_to_host_mode.
11229
11230 2015-06-01 Yao Qi <yao.qi@linaro.org>
11231
11232 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11233 * linux-x86-low.c: Likewise.
11234
11235 2015-05-28 Don Breazeal <donb@codesourcery.com>
11236
11237 * linux-low.c (handle_extended_wait): Initialize
11238 thread_info.last_resume_kind for new fork children.
11239
11240 2015-05-15 Pedro Alves <palves@redhat.com>
11241
11242 * target.h (target_handle_new_gdb_connection): Rewrite using if
11243 wrapped in do/while.
11244
11245 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11246
11247 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11248 * configure, config.in: Regenerate.
11249 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11250 Declare typedef.
11251
11252 2015-05-12 Don Breazeal <donb@codesourcery.com>
11253
11254 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11255 PTRACE_EVENT_VFORK_DONE.
11256 (linux_low_ptrace_options, extended_event_reported): Add vfork
11257 events.
11258 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11259 and "vforkdone" for RSP 'T' Stop Reply Packet.
11260 * server.h (report_vfork_events): Declare
11261 global variable.
11262
11263 2015-05-12 Don Breazeal <donb@codesourcery.com>
11264
11265 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11266 (the_low_target) <new_fork>: Initialize new member.
11267 * linux-arm-low.c (arm_new_fork): New function.
11268 (the_low_target) <new_fork>: Initialize new member.
11269 * linux-low.c (handle_extended_wait): Call new target function
11270 new_fork.
11271 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11272 * linux-mips-low.c (mips_add_watchpoint): New function
11273 extracted from mips_insert_point.
11274 (the_low_target) <new_fork>: Initialize new member.
11275 (mips_linux_new_fork): New function.
11276 (mips_insert_point): Call mips_add_watchpoint.
11277 * linux-x86-low.c (x86_linux_new_fork): New function.
11278 (the_low_target) <new_fork>: Initialize new member.
11279
11280 2015-05-12 Don Breazeal <donb@codesourcery.com>
11281
11282 * linux-low.c (handle_extended_wait): Implement return value,
11283 rename argument 'event_child' to 'event_lwp', handle
11284 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11285 (linux_low_ptrace_options): New function.
11286 (linux_low_filter_event): Call linux_low_ptrace_options,
11287 use different argument fo linux_enable_event_reporting,
11288 use return value from handle_extended_wait.
11289 (extended_event_reported): New function.
11290 (linux_wait_1): Call extended_event_reported and set
11291 status to report fork events.
11292 (linux_write_memory): Add pid to debug message.
11293 (reset_lwp_ptrace_options_callback): New function.
11294 (linux_handle_new_gdb_connection): New function.
11295 (linux_target_ops): Initialize new structure member.
11296 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11297 * lynx-low.c: Initialize new structure member.
11298 * remote-utils.c (prepare_resume_reply): Implement stop reason
11299 "fork" for "T" stop message.
11300 * server.c (handle_query): Call handle_new_gdb_connection.
11301 * server.h (report_fork_events): Declare global flag.
11302 * target.h (struct target_ops) <handle_new_gdb_connection>:
11303 New member.
11304 (target_handle_new_gdb_connection): New macro.
11305 * win32-low.c: Initialize new structure member.
11306
11307 2015-05-12 Don Breazeal <donb@codesourcery.com>
11308
11309 * mem-break.c (APPEND_TO_LIST): Define macro.
11310 (clone_agent_expr): New function.
11311 (clone_one_breakpoint): New function.
11312 (clone_all_breakpoints): New function.
11313 * mem-break.h: Declare new functions.
11314
11315 2015-05-12 Don Breazeal <donb@codesourcery.com>
11316
11317 * linux-low.c (linux_supports_fork_events): New function.
11318 (linux_supports_vfork_events): New function.
11319 (linux_target_ops): Initialize new structure members.
11320 (initialize_low): Call linux_check_ptrace_features.
11321 * lynx-low.c (lynx_target_ops): Initialize new structure
11322 members.
11323 * server.c (report_fork_events, report_vfork_events):
11324 New global flags.
11325 (handle_query): Add new features to qSupported packet and
11326 response.
11327 (captured_main): Initialize new global variables.
11328 * target.h (struct target_ops) <supports_fork_events>:
11329 New member.
11330 <supports_vfork_events>: New member.
11331 (target_supports_fork_events): New macro.
11332 (target_supports_vfork_events): New macro.
11333 * win32-low.c (win32_target_ops): Initialize new structure
11334 members.
11335
11336 2015-05-12 Gary Benson <gbenson@redhat.com>
11337
11338 * server.c (handle_qxfer_exec_file): Use current process
11339 if annex is empty.
11340
11341 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11342
11343 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11344 Remove HAVE_PTRACE_GETREGS conditionals.
11345 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11346 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11347
11348 2015-05-08 Yao Qi <yao.qi@linaro.org>
11349
11350 * linux-low.c (linux_supports_conditional_breakpoints): New
11351 function.
11352 (linux_target_ops): Install new target method.
11353 * lynx-low.c (lynx_target_ops): Install NULL hook for
11354 supports_conditional_breakpoints.
11355 * nto-low.c (nto_target_ops): Likewise.
11356 * spu-low.c (spu_target_ops): Likewise.
11357 * win32-low.c (win32_target_ops): Likewise.
11358 * server.c (handle_query): Check
11359 target_supports_conditional_breakpoints.
11360 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11361 New field.
11362 (target_supports_conditional_breakpoints): New macro.
11363
11364 2015-05-06 Pedro Alves <palves@redhat.com>
11365
11366 PR server/18081
11367 * server.c (start_inferior): If the process exits, mourn it.
11368
11369 2015-04-21 Gary Benson <gbenson@redhat.com>
11370
11371 * hostio.c (fileio_open_flags_to_host): Factored out to
11372 fileio_to_host_openflags in common/fileio.c. Single use
11373 updated.
11374
11375 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11376
11377 * linux-xtensa-low.c (xtensa_fill_gregset)
11378 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11379 XCHAL_HAVE_LOOP.
11380
11381 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11382
11383 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11384 (regs_info): Replace usrregs pointer with NULL.
11385
11386 2015-04-17 Gary Benson <gbenson@redhat.com>
11387
11388 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11389 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11390 * server.c (handle_qxfer_exec_file): New function.
11391 (qxfer_packets): Add exec-file entry.
11392 (handle_query): Report qXfer:exec-file:read as supported packet.
11393
11394 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11395
11396 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11397
11398 2015-04-09 Gary Benson <gbenson@redhat.com>
11399
11400 * hostio-errno.c (errno_to_fileio_error): Remove function.
11401 Update caller to use remote_fileio_to_fio_error.
11402
11403 2015-04-09 Yao Qi <yao.qi@linaro.org>
11404
11405 * linux-low.c (linux_insert_point): Call
11406 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11407 (linux_remove_point): Call remove_memory_breakpoint if type is
11408 raw_bkpt_type_sw.
11409 * linux-x86-low.c (x86_insert_point): Don't call
11410 insert_memory_breakpoint.
11411 (x86_remove_point): Don't call remove_memory_breakpoint.
11412
11413 2015-04-01 Pedro Alves <palves@redhat.com>
11414 Cleber Rosa <crosa@redhat.com>
11415
11416 * server.c (gdbserver_usage): Reorganize and extend the usage
11417 message.
11418
11419 2015-03-24 Pedro Alves <palves@redhat.com>
11420
11421 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11422 output. Also dump TRAP_TRACE.
11423 (linux_low_filter_event): In debug output, distinguish a
11424 resume_stop SIGSTOP from a delayed SIGSTOP.
11425
11426 2015-03-24 Gary Benson <gbenson@redhat.com>
11427
11428 * linux-x86-low.c (x86_linux_new_thread): Moved to
11429 nat/x86-linux.c.
11430 (x86_linux_prepare_to_resume): Likewise.
11431
11432 2015-03-24 Gary Benson <gbenson@redhat.com>
11433
11434 * Makefile.in (x86-linux-dregs.o): New rule.
11435 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11436 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11437 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11438 (x86_linux_dr_get): Likewise.
11439 (x86_linux_dr_set): Likewise.
11440 (update_debug_registers_callback): Likewise.
11441 (x86_linux_dr_set_addr): Likewise.
11442 (x86_linux_dr_get_addr): Likewise.
11443 (x86_linux_dr_set_control): Likewise.
11444 (x86_linux_dr_get_control): Likewise.
11445 (x86_linux_dr_get_status): Likewise.
11446 (x86_linux_update_debug_registers): Likewise.
11447
11448 2015-03-24 Gary Benson <gbenson@redhat.com>
11449
11450 * linux-x86-low.c (x86_linux_update_debug_registers):
11451 New function, factored out from...
11452 (x86_linux_prepare_to_resume): ...this.
11453
11454 2015-03-24 Gary Benson <gbenson@redhat.com>
11455
11456 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11457 (x86_linux_dr_set): Likewise.
11458 (update_debug_registers_callback): Likewise.
11459 (x86_linux_dr_set_addr): Likewise.
11460 (x86_linux_dr_get_addr): Likewise.
11461 (x86_linux_dr_set_control): Likewise.
11462 (x86_linux_dr_get_control): Likewise.
11463 (x86_linux_dr_get_status): Likewise.
11464 (x86_linux_prepare_to_resume): Likewise.
11465
11466 2015-03-24 Gary Benson <gbenson@redhat.com>
11467
11468 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11469 Use perror_with_name. Pass string through gettext.
11470 (x86_linux_dr_set): Likewise.
11471
11472 2015-03-24 Gary Benson <gbenson@redhat.com>
11473
11474 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11475 (x86_linux_dr_set_addr): ...this.
11476 (x86_dr_low_get_addr): Rename to...
11477 (x86_linux_dr_get_addr): ...this.
11478 (x86_dr_low_set_control): Rename to...
11479 (x86_linux_dr_set_control): ...this.
11480 (x86_dr_low_get_control): Rename to...
11481 (x86_linux_dr_get_control): ...this.
11482 (x86_dr_low_get_status): Rename to...
11483 (x86_linux_dr_get_status): ...this.
11484 (x86_dr_low): Update with new function names.
11485
11486 2015-03-24 Gary Benson <gbenson@redhat.com>
11487
11488 * Makefile.in (x86-linux.o): New rule.
11489 * configure.srv: Add x86-linux.o to relevant targets.
11490 * linux-low.c (lwp_set_arch_private_info): New function.
11491 (lwp_arch_private_info): Likewise.
11492 * linux-x86-low.c: Include nat/x86-linux.h.
11493 (arch_lwp_info): Removed structure.
11494 (update_debug_registers_callback):
11495 Use lwp_set_debug_registers_changed.
11496 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11497 and lwp_set_debug_registers_changed.
11498 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11499
11500 2015-03-24 Gary Benson <gbenson@redhat.com>
11501
11502 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11503 * linux-arm-low.c (arm_new_thread): Likewise.
11504 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11505 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11506 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11507 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11508
11509 2015-03-24 Gary Benson <gbenson@redhat.com>
11510
11511 * linux-low.c (ptid_of_lwp): New function.
11512 (lwp_is_stopped): Likewise.
11513 (lwp_stop_reason): Likewise.
11514 * linux-x86-low.c (update_debug_registers_callback):
11515 Use lwp_is_stopped.
11516 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11517 lwp_stop_reason.
11518
11519 2015-03-24 Gary Benson <gbenson@redhat.com>
11520
11521 * linux-low.h (linux_stop_lwp): Remove declaration.
11522
11523 2015-03-24 Gary Benson <gbenson@redhat.com>
11524
11525 * linux-low.h: Include nat/linux-nat.h.
11526 * linux-low.c (iterate_over_lwps_args): New structure.
11527 (iterate_over_lwps_filter): New function.
11528 (iterate_over_lwps): Likewise.
11529 * linux-x86-low.c (update_debug_registers_callback):
11530 Update signature to what iterate_over_lwps expects.
11531 Remove PID check that iterate_over_lwps now performs.
11532 (x86_dr_low_set_addr): Use iterate_over_lwps.
11533 (x86_dr_low_set_control): Likewise.
11534
11535 2015-03-24 Gary Benson <gbenson@redhat.com>
11536
11537 * linux-x86-low.c (x86_debug_reg_state): New function.
11538 (x86_linux_prepare_to_resume): Use the above.
11539
11540 2015-03-24 Gary Benson <gbenson@redhat.com>
11541
11542 * linux-low.c (current_lwp_ptid): New function.
11543 * linux-x86-low.c: Include nat/linux-nat.h.
11544 (x86_dr_low_get_addr): Use current_lwp_ptid.
11545 (x86_dr_low_get_control): Likewise.
11546 (x86_dr_low_get_status): Likewise.
11547
11548 2015-03-20 Pedro Alves <palves@redhat.com>
11549
11550 * tracepoint.c (cmd_qtstatus): Make "str" const.
11551
11552 2015-03-20 Pedro Alves <palves@redhat.com>
11553
11554 * server.c (handle_general_set): Make "req_str" const.
11555
11556 2015-03-19 Pedro Alves <palves@redhat.com>
11557
11558 * linux-low.c (linux_resume_one_lwp): Rename to ...
11559 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11560 instead call perror_with_name.
11561 (check_ptrace_stopped_lwp_gone): New function.
11562 (linux_resume_one_lwp): Reimplement as wrapper around
11563 linux_resume_one_lwp_throw that swallows errors if the LWP is
11564 gone.
11565
11566 2015-03-19 Pedro Alves <palves@redhat.com>
11567
11568 * linux-low.c (count_events_callback, select_event_lwp_callback):
11569 No longer check whether the thread has resume_stop as last resume
11570 kind.
11571
11572 2015-03-19 Pedro Alves <palves@redhat.com>
11573
11574 * linux-low.c (count_events_callback, select_event_lwp_callback):
11575 Use the lwp's status_pending_p field, not the thread's.
11576
11577 2015-03-19 Pedro Alves <palves@redhat.com>
11578
11579 * linux-low.c (select_event_lwp_callback): Update comments to
11580 no longer mention SIGTRAP.
11581
11582 2015-03-18 Gary Benson <gbenson@redhat.com>
11583
11584 * server.c (handle_query): Do not report vFile:fstat as supported.
11585
11586 2015-03-11 Gary Benson <gbenson@redhat.com>
11587
11588 * hostio.c (sys/types.h): New include.
11589 (sys/stat.h): Likewise.
11590 (common-remote-fileio.h): Likewise.
11591 (handle_fstat): New function.
11592 (handle_vFile): Handle vFile:fstat packets.
11593
11594 2015-03-11 Gary Benson <gbenson@redhat.com>
11595
11596 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11597 struct stat.st_blocks and struct stat.st_blksize.
11598 * configure: Regenerate.
11599 * config.in: Likewise.
11600 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11601 (OBS): Add common-remote-fileio.o.
11602 (common-remote-fileio.o): New rule.
11603
11604 2015-03-09 Pedro Alves <palves@redhat.com>
11605
11606 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11607 'struct sockaddr' pointer in 'accept' call.
11608
11609 2015-03-09 Pedro Alves <palves@redhat.com>
11610
11611 Revert:
11612 2015-03-07 Pedro Alves <palves@redhat.com>
11613 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11614 or <winsock2.h> here. Instead include "gdb_socket.h".
11615 (remote_open): Use union gdb_sockaddr_u.
11616 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11617 or <winsock2.h> here. Instead include "gdb_socket.h".
11618 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11619 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11620 or <sys/un.h>.
11621 (init_named_socket, gdb_agent_helper_thread): Use union
11622 gdb_sockaddr_u.
11623
11624 2015-03-07 Pedro Alves <palves@redhat.com>
11625
11626 * configure.ac (build_warnings): Move
11627 -Wdeclaration-after-statement to the C-specific set.
11628 * configure: Regenerate.
11629
11630 2015-03-07 Pedro Alves <palves@redhat.com>
11631
11632 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11633 or <winsock2.h> here. Instead include "gdb_socket.h".
11634 (remote_open): Use union gdb_sockaddr_u.
11635 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11636 or <winsock2.h> here. Instead include "gdb_socket.h".
11637 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11638 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11639 or <sys/un.h>.
11640 (init_named_socket, gdb_agent_helper_thread): Use union
11641 gdb_sockaddr_u.
11642
11643 2015-03-07 Pedro Alves <palves@redhat.com>
11644
11645 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11646 instead.
11647
11648 2015-03-06 Yao Qi <yao.qi@linaro.org>
11649
11650 * linux-aarch64-low.c (aarch64_insert_point): Use
11651 show_debug_regs as a boolean.
11652 (aarch64_remove_point): Likewise.
11653
11654 2015-03-05 Pedro Alves <palves@redhat.com>
11655
11656 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11657 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11658 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11659 * nto-low.c (nto_target_ops): Likewise.
11660 * spu-low.c (spu_target_ops): Likewise.
11661 * win32-low.c (win32_target_ops): Likewise.
11662
11663 2015-03-04 Pedro Alves <palves@redhat.com>
11664
11665 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11666 Decide whether a breakpoint triggered based on the SIGTRAP's
11667 siginfo.si_code.
11668 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11669 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11670 (linux_low_filter_event): Check for breakpoints before checking
11671 watchpoints.
11672 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11673 siginfo.si_code.
11674 (linux_stopped_by_sw_breakpoint)
11675 (linux_supports_stopped_by_sw_breakpoint)
11676 (linux_stopped_by_hw_breakpoint)
11677 (linux_supports_stopped_by_hw_breakpoint): New functions.
11678 (linux_target_ops): Install new target methods.
11679
11680 2015-03-04 Pedro Alves <palves@redhat.com>
11681
11682 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11683 * server.c (swbreak_feature, hwbreak_feature): New globals.
11684 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11685 (captured_main): Clear swbreak_feature and hwbreak_feature.
11686 * server.h (swbreak_feature, hwbreak_feature): Declare.
11687 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11688 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11689 supports_stopped_by_hw_breakpoint>: New fields.
11690 (target_supports_stopped_by_sw_breakpoint)
11691 (target_stopped_by_sw_breakpoint)
11692 (target_supports_stopped_by_hw_breakpoint)
11693 (target_stopped_by_hw_breakpoint): Declare.
11694
11695 2015-03-04 Pedro Alves <palves@redhat.com>
11696
11697 enum lwp_stop_reason -> enum target_stop_reason
11698 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11699 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11700 (linux_wait_1, stuck_in_jump_pad_callback)
11701 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11702 (linux_stopped_by_watchpoint):
11703 * linux-low.h (enum lwp_stop_reason): Delete.
11704 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11705 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11706
11707 2015-03-04 Yao Qi <yao.qi@linaro.org>
11708
11709 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11710
11711 2015-03-03 Gary Benson <gbenson@redhat.com>
11712
11713 * hostio.c (handle_vFile): Fix prefix lengths.
11714
11715 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11716
11717 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11718 ptr_bits.
11719
11720 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11721
11722 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11723 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11724 (clean): Add "rm -f" for above C files.
11725 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11726 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11727 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11728 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11729 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11730 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11731 (init_registers_s390x_vx_linux64)
11732 (init_registers_s390x_tevx_linux64)
11733 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11734 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11735 declarations.
11736 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11737 (s390_store_vxrs_high): New functions.
11738 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11739 NT_S390_VXRS_HIGH.
11740 (s390_arch_setup): Add logic for selecting one of the new target
11741 descriptions. Activate the new vector regsets if applicable.
11742 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11743 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11744 and init_registers_s390x_tevx_linux64.
11745
11746 2015-03-01 Pedro Alves <palves@redhat.com>
11747
11748 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11749 parameter.
11750
11751 2015-02-27 Pedro Alves <palves@redhat.com>
11752
11753 * linux-x86-low.c (u_debugreg_offset): New function.
11754 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11755
11756 2015-02-27 Pedro Alves <palves@redhat.com>
11757
11758 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11759 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11760 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11761 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11762 (ps_lsetfpregs, ps_getpid)
11763 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11764 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11765 (ps_lsetxregs, ps_plog): Declare.
11766
11767 2015-02-27 Pedro Alves <palves@redhat.com>
11768
11769 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11770 IP_AGENT_EXPORT_FUNC.
11771 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11772 IP_AGENT_EXPORT_FUNC.
11773 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11774 (IP_AGENT_EXPORT): Delete.
11775 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11776 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11777 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11778 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11779 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11780 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11781 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11782 (traceframe_read_count, traceframe_write_count)
11783 (traceframes_created, trace_state_variables, get_raw_reg)
11784 (get_trace_state_variable_value, set_trace_state_variable_value)
11785 (ust_loaded, helper_thread_id, cmd_buf): Use
11786 IPA_SYM_EXPORTED_NAME.
11787 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11788 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11789 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11790 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11791 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11792 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11793 EXTERN_C_PUSH/EXTERN_C_POP.
11794 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11795 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11796 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11797 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11798 (traceframe_write_count, traceframe_read_count)
11799 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11800 (about_to_request_buffer_space, get_trace_state_variable_value)
11801 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11802 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11803 EXTERN_C_PUSH/EXTERN_C_POP.
11804 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11805 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11806 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11807 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11808 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11809 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11810 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11811 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11812 Define.
11813 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11814 (IP_AGENT_EXPORT_VAR_DECL): Define.
11815 (tracing): Declare.
11816 (gdb_agent_get_raw_reg): Declare.
11817
11818 2015-02-27 Tom Tromey <tromey@redhat.com>
11819 Pedro Alves <palves@redhat.com>
11820
11821 Rename symbols whose names are reserved C++ keywords throughout.
11822
11823 2015-02-27 Pedro Alves <palves@redhat.com>
11824
11825 * Makefile.in (COMPILER): New, get it from autoconf.
11826 (CXX): Get from autoconf instead.
11827 (COMPILE.pre): Use COMPILER.
11828 (CC-LD): Rename to ...
11829 (CC_LD): ... this. Use COMPILER.
11830 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11831 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11832 * acinclude.m4: Include build-with-cxx.m4.
11833 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11834 Disable -Werror by default if building in C++ mode.
11835 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11836 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11837 the C++ compiler. Save/restore CXXFLAGS too.
11838 * configure: Regenerate.
11839
11840 2015-02-27 Pedro Alves <palves@redhat.com>
11841
11842 * acinclude.m4: Include libiberty.m4.
11843 * configure.ac: Call libiberty_INIT.
11844 * config.in, configure: Regenerate.
11845
11846 2015-02-26 Pedro Alves <palves@redhat.com>
11847
11848 * linux-low.c (linux_wait_1): When incrementing the PC past a
11849 program breakpoint always use the_low_target.breakpoint_len as
11850 increment, rather than the maximum between that and
11851 the_low_target.decr_pc_after_break.
11852
11853 2015-02-23 Pedro Alves <palves@redhat.com>
11854
11855 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11856 thread was doing a step-over; always adjust the PC if
11857 we stepped over a permanent breakpoint.
11858 (linux_wait_1): If we stepped over breakpoint that was on top of a
11859 permanent breakpoint, manually advance the PC past it.
11860
11861 2015-02-23 Pedro Alves <palves@redhat.com>
11862
11863 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11864 modes.
11865 (x86_fill_gregset, x86_store_gregset): Use it when handling
11866 $orig_eax.
11867
11868 2015-02-20 Pedro Alves <palves@redhat.com>
11869
11870 * thread-db.c: Include "nat/linux-procfs.h".
11871 (thread_db_init): Skip listing new threads if the kernel supports
11872 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11873
11874 2015-02-20 Pedro Alves <palves@redhat.com>
11875
11876 * linux-low.c (status_pending_p_callback): Use ptid_match.
11877
11878 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11879
11880 PR breakpoints/16812
11881 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11882 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11883 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11884
11885 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11886
11887 PR breakpoints/15956
11888 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11889
11890 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11891
11892 * linux-low.c (linux_low_btrace_conf): Print size.
11893 * server.c (handle_btrace_conf_general_set): New.
11894 (hanle_general_set): Call handle_btrace_conf_general_set.
11895 (handle_query): Report Qbtrace-conf:bts:size as supported.
11896
11897 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11898
11899 * linux-low.c (linux_low_enable_btrace): Update parameters.
11900 (linux_low_btrace_conf): New.
11901 (linux_target_ops)<to_btrace_conf>: Initialize.
11902 * server.c (current_btrace_conf): New.
11903 (handle_btrace_enable): Rename to ...
11904 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11905 to target_enable_btrace. Update comment. Update users.
11906 (handle_qxfer_btrace_conf): New.
11907 (qxfer_packets): Add btrace-conf entry.
11908 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11909 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11910 (target_ops)<read_btrace_conf>: New.
11911 (target_enable_btrace): Update parameters.
11912 (target_read_btrace_conf): New.
11913
11914 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11915
11916 * server.c (handle_btrace_general_set): Remove call to
11917 target_supports_btrace.
11918 (supported_btrace_packets): New.
11919 (handle_query): Call supported_btrace_packets.
11920 * target.h: include btrace-common.h.
11921 (btrace_target_info): Removed.
11922 (supports_btrace, target_supports_btrace): Update parameters.
11923
11924 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11925
11926 * Makefile.in (SFILES): Add common/btrace-common.c.
11927 (OBS): Add common/btrace-common.o.
11928 (btrace-common.o): Add build rules.
11929 * linux-low: Include btrace-common.h.
11930 (linux_low_read_btrace): Use struct btrace_data. Call
11931 btrace_data_init and btrace_data_fini.
11932
11933 2015-02-06 Pedro Alves <palves@redhat.com>
11934
11935 * thread-db.c (find_new_threads_callback): Add debug output.
11936
11937 2015-02-04 Pedro Alves <palves@redhat.com>
11938
11939 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11940 (resume_stopped_resumed_lwps): New function.
11941 (linux_wait_for_event_filtered): Use it.
11942
11943 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11944
11945 * Makefile.in (SFILES): Add linux-personality.c.
11946 (linux-personality.o): New rule.
11947 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11948 list of objects to be built.
11949 * linux-low.c: Include nat/linux-personality.h.
11950 (linux_create_inferior): Remove code to disable address space
11951 randomization (moved to ../nat/linux-personality.c). Create
11952 cleanup to disable address space randomization.
11953
11954 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11955
11956 * Makefile.in (posix-strerror.o): New rule.
11957 (mingw-strerror.o): Likewise.
11958 * configure: Regenerated.
11959 * configure.ac: Source file ../common/common.host. Initialize new
11960 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11961
11962 2015-01-14 Yao Qi <yao@codesourcery.com>
11963
11964 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11965 (ppc-linux.o): New rule.
11966 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11967 * configure.ac: AC_CHECK_FUNCS(getauxval).
11968 * config.in: Re-generated.
11969 * configure: Re-generated.
11970 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11971 ppc64_64bit_inferior_p
11972
11973 2015-01-14 Yao Qi <yao@codesourcery.com>
11974
11975 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11976 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11977 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11978 (PT_ORIG_R3, PT_TRAP): Likewise.
11979 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11980 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11981 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11982
11983 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11984
11985 * i387-fp.c (i387_cache_to_xsave): In look over
11986 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11987 zmmh_low_space field by use of zmmh_high_space.
11988
11989 2015-01-09 Pedro Alves <palves@redhat.com>
11990
11991 * linux-low.c (step_over_bkpt): Move higher up in the file.
11992 (handle_extended_wait): Don't store the stop_pc here.
11993 (get_stop_pc): Adjust comments and rename to ...
11994 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11995 stopped for a software breakpoint or hardware breakpoint.
11996 (thread_still_has_status_pending_p): New function.
11997 (status_pending_p_callback): Use
11998 thread_still_has_status_pending_p. If the event is no longer
11999 interesting, resume the LWP.
12000 (handle_tracepoints): Add assert.
12001 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
12002 (wstatus_maybe_breakpoint): New function.
12003 (cancel_breakpoint): Delete function.
12004 (check_stopped_by_watchpoint): New function, factored out from
12005 linux_low_filter_event.
12006 (lp_status_maybe_breakpoint): Delete function.
12007 (linux_low_filter_event): Remove filter_ptid argument.
12008 Leave thread group exits pending here. Store the LWP's stop PC.
12009 Always leave events pending.
12010 (linux_wait_for_event_filtered): Pull all events out of the
12011 kernel, and leave them all pending.
12012 (count_events_callback, select_event_lwp_callback): Consider all
12013 events.
12014 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
12015 (select_event_lwp): Only give preference to the stepping LWP in
12016 all-stop mode. Adjust comments.
12017 (ignore_event): New function.
12018 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
12019 references to cancel_breakpoints. Adjust to renames. Also give
12020 equal priority to all LWPs that have had events in non-stop mode.
12021 If reporting a software breakpoint event, unadjust the LWP's PC.
12022 (linux_wait): If linux_wait_1 returned an ignored event, retry.
12023 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
12024 Adjust.
12025 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
12026 (resume_status_pending_p): Use thread_still_has_status_pending_p.
12027 (linux_stopped_by_watchpoint): Adjust.
12028 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
12029 * linux-low.h (enum lwp_stop_reason): New.
12030 (struct lwp_info) <stop_pc>: Adjust comment.
12031 <stopped_by_watchpoint>: Delete field.
12032 <stop_reason>: New field.
12033 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
12034 * mem-break.c (software_breakpoint_inserted_here)
12035 (hardware_breakpoint_inserted_here): New function.
12036 * mem-break.h (software_breakpoint_inserted_here)
12037 (hardware_breakpoint_inserted_here): Declare.
12038 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
12039 (cancel_breakpoints): Delete.
12040 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
12041 (upload_fast_traceframes): Remove references to
12042 cancel_breakpoints.
12043
12044 2015-01-09 Pedro Alves <palves@redhat.com>
12045
12046 * thread-db.c (find_new_threads_callback): Ignore thread if the
12047 kernel thread ID is -1.
12048
12049 2015-01-09 Pedro Alves <palves@redhat.com>
12050
12051 * linux-low.c (linux_attach_fail_reason_string): Move to
12052 nat/linux-ptrace.c, and rename.
12053 (linux_attach_lwp): Update comment.
12054 (attach_proc_task_lwp_callback): New function.
12055 (linux_attach): Adjust to rename and use
12056 linux_proc_attach_tgid_threads.
12057 (linux_attach_fail_reason_string): Delete declaration.
12058
12059 2015-01-01 Joel Brobecker <brobecker@adacore.com>
12060
12061 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
12062 * server.c (gdbserver_version): Likewise.
12063
12064 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
12065
12066 * remote-utils.c: Include ctype.h.
12067 (input_interrupt): Explicitly handle the case when the char
12068 received is the NUL byte. Improve the printing of non-ASCII
12069 characters.
12070
12071 2014-12-16 Joel Brobecker <brobecker@adacore.com>
12072
12073 * linux-low.c (linux_low_filter_event): Update call to
12074 linux_enable_event_reporting following the addition of
12075 a new parameter to that function.
12076
12077 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
12078
12079 PR server/17457
12080 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
12081 (AARCH64_FPCR_REGNO): Likewise.
12082 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
12083 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
12084 (aarch64_store_fpregset): Likewise.
12085
12086 2014-12-15 Joel Brobecker <brobecker@adacore.com>
12087
12088 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
12089 Remove FIXME comment about assumption about N.
12090
12091 2014-12-13 Joel Brobecker <brobecker@adacore.com>
12092
12093 * configure.ac: If large-file support is disabled in GDBserver,
12094 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
12095 * configure: Regenerate.
12096
12097 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12098
12099 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
12100 warning upon ENODATA from ptrace.
12101 * linux-s390-low.c (s390_store_tdb): New.
12102 (s390_regsets): Add regset for NT_S390_TDB.
12103
12104 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12105
12106 * linux-low.c (regsets_store_inferior_registers): Skip regsets
12107 without a fill_function.
12108 * linux-s390-low.c (s390_fill_last_break): Remove.
12109 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
12110 (s390_arch_setup): Use regset's size instead of fill_function for
12111 loop end condition.
12112
12113 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12114
12115 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
12116 the regset's store function when ptrace returned an error.
12117 * regcache.c (get_thread_regcache): Invalidate register cache
12118 before fetching inferior's registers.
12119
12120 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12121
12122 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
12123 while-loop as for-loop.
12124 (regsets_store_inferior_registers): Likewise.
12125
12126 2014-11-28 Yao Qi <yao@codesourcery.com>
12127
12128 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
12129 * config.in, configure: Re-generate.
12130 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
12131 is defined.
12132
12133 2014-11-21 Yao Qi <yao@codesourcery.com>
12134
12135 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12136 (AC_CHECK_HEADERS): Remove malloc.h.
12137 * configure: Re-generated.
12138 * config.in: Re-generated.
12139 * server.h: Don't include alloca.h and malloc.h.
12140 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12141 Don't include malloc.h.
12142
12143 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12144
12145 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12146 corresponding ERRNO check in same block.
12147
12148 2014-11-12 Pedro Alves <palves@redhat.com>
12149
12150 * server.c (cont_thread): Update comment.
12151 (start_inferior, attach_inferior): No longer clear cont_thread.
12152 (handle_v_cont): No longer set cont_thread.
12153 (captured_main): Clear cont_thread each time a GDB connects.
12154
12155 2014-11-12 Pedro Alves <palves@redhat.com>
12156
12157 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12158 thread, and don't resume all threads if the Hc thread has exited.
12159
12160 2014-11-12 Pedro Alves <palves@redhat.com>
12161
12162 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12163 the process group instead of to a specific LWP.
12164
12165 2014-10-15 Pedro Alves <palves@redhat.com>
12166
12167 PR server/17487
12168 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12169 parameter.
12170 (arm_set_thread_context): Delete.
12171 (the_low_target): Adjust.
12172 * win32-i386-low.c (debug_registers_changed)
12173 (debug_registers_used): Delete.
12174 (update_debug_registers_callback): New function.
12175 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12176 needing to update their debug registers.
12177 (win32_get_current_dr): New function.
12178 (x86_dr_low_get_addr, x86_dr_low_get_control)
12179 (x86_dr_low_get_status): Fetch the debug register from the thread
12180 record's context.
12181 (i386_initial_stuff): Adjust.
12182 (i386_get_thread_context): Remove current_event parameter. Don't
12183 clear debug_registers_changed nor copy DR values to
12184 debug_reg_state.
12185 (i386_set_thread_context): Delete.
12186 (i386_prepare_to_resume): New function.
12187 (i386_thread_added): Mark the thread as needing to update irs
12188 debug registers.
12189 (the_low_target): Remove i386_set_thread_context and install
12190 i386_prepare_to_resume.
12191 * win32-low.c (win32_get_thread_context): Adjust.
12192 (win32_set_thread_context): Use SetThreadContext
12193 directly.
12194 (win32_prepare_to_resume): New function.
12195 (win32_require_context): New function, factored out from ...
12196 (thread_rec): ... this.
12197 (continue_one_thread): Call win32_prepare_to_resume on each thread
12198 we're about to continue.
12199 (win32_resume): Call win32_prepare_to_resume on the event thread.
12200 * win32-low.h (struct win32_thread_info)
12201 <debug_registers_changed>: New field.
12202 (struct win32_target_ops): Change prototype of set_thread_context,
12203 delete set_thread_context and add prepare_to_resume.
12204 (win32_require_context): New declaration.
12205
12206 2014-10-08 Gary Benson <gbenson@redhat.com>
12207
12208 * server.h: Do not include common-exceptions.h.
12209
12210 2014-10-08 Gary Benson <gbenson@redhat.com>
12211
12212 * server.h: Do not include cleanups.h.
12213
12214 2014-09-30 James Hogan <james.hogan@imgtec.com>
12215
12216 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12217 mips64-dsp-linux.c.
12218
12219 2014-09-23 Yao Qi <yao@codesourcery.com>
12220
12221 * linux-low.c (lp_status_maybe_breakpoint): New function.
12222 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12223 (count_events_callback): Likewise.
12224 (select_event_lwp_callback): Likewise.
12225 (cancel_breakpoints_callback): Likewise.
12226
12227 2014-09-19 Don Breazeal <donb@codesourcery.com>
12228
12229 * linux-low.c (handle_extended_wait): Call
12230 linux_ptrace_get_extended_event.
12231 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12232 linux_is_extended_waitstatus.
12233
12234 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12235
12236 * Makefile.in (CPPFLAGS): Define.
12237 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12238 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12239
12240 2014-09-16 Gary Benson <gbenson@redhat.com>
12241
12242 * inferiors.h (current_inferior): Renamed as...
12243 (current_thread): New variable. All uses updated.
12244 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12245 (maybe_move_out_of_jump_pad): Likewise.
12246 (cancel_breakpoint): Likewise.
12247 (linux_low_filter_event): Likewise.
12248 (wait_for_sigstop): Likewise.
12249 (linux_resume_one_lwp): Likewise.
12250 (need_step_over_p): Likewise.
12251 (start_step_over): Likewise.
12252 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12253 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12254 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12255 and save_inferior as saved_thread.
12256 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12257 saved_thread.
12258 (regcache_invalidate_thread): Likewise.
12259 * remote-utils.c (prepare_resume_reply): Likewise.
12260 * thread-db.c (thread_db_get_tls_address): Likewise.
12261 (disable_thread_event_reporting): Likewise.
12262 (remove_thread_event_breakpoints): Likewise.
12263 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12264 as saved_thread.
12265 * target.h (set_desired_inferior): Renamed as...
12266 (set_desired_thread): New declaration. All uses updated.
12267 * server.c (myresume): Updated comment to reference thread instead
12268 of inferior.
12269 (handle_serial_event): Likewise.
12270 (handle_target_event): Likewise.
12271
12272 2014-09-12 Tom Tromey <tromey@redhat.com>
12273 Gary Benson <gbenson@redhat.com>
12274
12275 * regcache.h: Include common-regcache.h.
12276 (regcache_read_pc): Don't declare.
12277 * regcache.c (get_thread_regcache_for_ptid): New function.
12278
12279 2014-09-11 Tom Tromey <tromey@redhat.com>
12280 Gary Benson <gbenson@redhat.com>
12281
12282 * symbol.c: New file.
12283 * Makefile.in (SFILES): Add symbol.c.
12284 (OBS): Add symbol.o.
12285
12286 2014-09-11 Gary Benson <gbenson@redhat.com>
12287
12288 * target.c (target_stop_ptid, target_continue_ptid): New
12289 functions.
12290
12291 2014-09-11 Tom Tromey <tromey@redhat.com>
12292 Gary Benson <gbenson@redhat.com>
12293
12294 * target.h: Include target/target.h.
12295 * target.c (target_read_memory, target_read_uint32)
12296 (target_write_memory): New functions.
12297
12298 2014-09-11 Gary Benson <gbenson@redhat.com>
12299
12300 * server.h (debug_hw_points): Don't declare.
12301 * server.c (debug_hw_points): Don't define. Replace all uses
12302 with show_debug_regs.
12303 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12304 all uses with show_debug_regs.
12305
12306 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12307
12308 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12309 endianness into account.
12310 (ppc_supply_ptrace_register): Likewise.
12311
12312 2014-09-03 James Hogan <james.hogan@imgtec.com>
12313
12314 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12315 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12316
12317 2014-09-03 Gary Benson <gbenson@redhat.com>
12318
12319 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12320 ALL_DEBUG_ADDRESS_REGISTERS.
12321
12322 2014-09-02 Gary Benson <gbenson@redhat.com>
12323
12324 * i386-low.h: Renamed as...
12325 * x86-low.h: New file. All type, function and variable name
12326 prefixes changed from "i386_" to "x86_". All references updated.
12327 * i386-low.c: Renamed as...
12328 * x86-low.c: New file. All type, function and variable name
12329 prefixes changed from "i386_" to "x86_". All references updated.
12330
12331 2014-09-02 Gary Benson <gbenson@redhat.com>
12332
12333 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12334 (x86_linux_new_thread): Likewise.
12335
12336 2014-08-29 Gary Benson <gbenson@redhat.com>
12337
12338 * server.h (setjmp.h): Do not include.
12339 (toplevel): Do not declare.
12340 (common-exceptions.h): Include.
12341 (cleanups.h): Likewise.
12342 * server.c (toplevel): Do not define.
12343 (exit_code): New static global.
12344 (detach_or_kill_for_exit_cleanup): New function.
12345 (main): New function. Original main renamed to...
12346 (captured_main): New function.
12347 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12348
12349 2014-08-29 Gary Benson <gbenson@redhat.com>
12350
12351 * Makefile.in (SFILES): Add common/common-exceptions.c.
12352 (OBS): Add common-exceptions.o.
12353 (common-exceptions.o): New rule.
12354 * utils.c (prepare_to_throw_exception): New function.
12355
12356 2014-08-29 Gary Benson <gbenson@redhat.com>
12357
12358 * config.in: Regenerate.
12359 * configure: Likewise.
12360
12361 2014-08-29 Gary Benson <gbenson@redhat.com>
12362
12363 * Makefile.in (SFILES): Add common/cleanups.c.
12364 (OBS): cleanups.o.
12365 (cleanups.o): New rule.
12366
12367 2014-08-29 Gary Benson <gbenson@redhat.com>
12368
12369 * utils.c (internal_vwarning): New function.
12370
12371 2014-08-28 Gary Benson <gbenson@redhat.com>
12372
12373 * utils.h (fatal): Remove declaration.
12374 * utils.c (fatal): Remove function.
12375
12376 2014-08-28 Gary Benson <gbenson@redhat.com>
12377
12378 * tracepoint.c (gdb_agent_init): Replace fatal with
12379 perror_with_name.
12380 (initialize_tracepoint): Likewise.
12381
12382 2014-08-28 Gary Benson <gbenson@redhat.com>
12383
12384 * remote-utils.c (remote_prepare): Replace fatal with error.
12385
12386 2014-08-28 Gary Benson <gbenson@redhat.com>
12387
12388 * linux-low.c (linux_async): Replace fatal with warning.
12389 Tidy up and return.
12390 (linux_start_non_stop): Return -1 if linux_async failed.
12391
12392 2014-08-28 Gary Benson <gbenson@redhat.com>
12393
12394 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12395 gdb_assert.
12396 (i386_dr_low_get_addr): Remove vague comment.
12397 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12398 gdb_assert.
12399
12400 2014-08-28 Gary Benson <gbenson@redhat.com>
12401
12402 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12403 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12404 internal_error.
12405 (linux_resume_one_lwp): Likewise.
12406 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12407 gdb_assert.
12408 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12409 with internal_error.
12410 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12411 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12412 (find_register_by_name): Replace fatal with internal_error.
12413 (find_regno): Likewise.
12414 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12415 * thread-db.c (thread_db_create_event): Likewise.
12416 (thread_db_load_search): Likewise.
12417 (try_thread_db_load_1): Likewise.
12418 * tracepoint.c (get_jump_space_head): Replace fatal with
12419 internal_error.
12420 (claim_trampoline_space): Likewise.
12421 (have_fast_tracepoint_trampoline_buffer): Likewise.
12422 (cmd_qtstart): Likewise.
12423 (stop_tracing): Likewise.
12424 (fast_tracepoint_collecting): Likewise.
12425 (target_malloc): Likewise.
12426 (download_tracepoint): Likewise.
12427 (download_trace_state_variables): Replace check with gdb_assert.
12428 (upload_fast_traceframes): Replace fatal with internal_error.
12429
12430 2014-08-19 Tom Tromey <tromey@redhat.com>
12431 Gary Benson <gbenson@redhat.com>
12432
12433 * Makefile.in (SFILES): Add common/common-debug.c.
12434 (OBS): Add common-debug.o.
12435 (common-debug.o): New rule.
12436 * debug.h (debug_printf): Don't declare.
12437 * debug.c (debug_printf): Renamed and rewritten as...
12438 (debug_vprintf): New function.
12439
12440 2014-08-19 Gary Benson <gbenson@redhat.com>
12441
12442 * utils.h: Do not include print-utils.h.
12443
12444 2014-08-19 Tom Tromey <tromey@redhat.com>
12445 Gary Benson <gbenson@redhat.com>
12446
12447 * server.h: Add static assertion.
12448 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12449
12450 2014-08-19 Tom Tromey <tromey@redhat.com>
12451 Gary Benson <gbenson@redhat.com>
12452
12453 * Makefile.in (SFILES): Add common/errors.c.
12454 (OBS): Add errors.o.
12455 (IPA_OBS): Add errors-ipa.o.
12456 (errors.o): New rule.
12457 (errors-ipa.o): Likewise.
12458 * utils.h (perror_with_name, error, warning): Don't declare.
12459 * utils.c (warning): Renamed and rewritten as...
12460 (vwarning): New function.
12461 (error): Renamed and rewritten as...
12462 (verror): New function.
12463 (internal_error): Renamed and rewritten as...
12464 (internal_verror): New function.
12465
12466 2014-08-07 Gary Benson <gbenson@redhat.com>
12467
12468 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12469 * configure: Regenerate.
12470 * config.in: Likewise.
12471 * server.h: Do not include errno.h.
12472 * event-loop.c: Likewise.
12473 * hostio-errno.c: Likewise.
12474 * linux-low.c: Likewise.
12475 * remote-utils.c: Likewise.
12476 * spu-low.c: Likewise.
12477 * utils.c: Likewise.
12478 * gdbreplay.c: Unconditionally include errno.h.
12479
12480 2014-08-07 Gary Benson <gbenson@redhat.com>
12481
12482 * server.h: Do not include string.h.
12483 * event-loop.c: Likewise.
12484 * linux-low.c: Likewise.
12485 * regcache.c: Likewise.
12486 * remote-utils.c: Likewise.
12487 * spu-low.c: Likewise.
12488 * utils.c: Likewise.
12489
12490 2014-08-07 Gary Benson <gbenson@redhat.com>
12491
12492 * server.h: Do not include gdb_assert.h.
12493
12494 2014-08-07 Gary Benson <gbenson@redhat.com>
12495
12496 * server.h: Do not include common-utils.h.
12497
12498 2014-08-07 Gary Benson <gbenson@redhat.com>
12499
12500 * server.h: Do not include ptid.h.
12501 * notif.h: Likewise.
12502
12503 2014-08-07 Gary Benson <gbenson@redhat.com>
12504
12505 * server.h: Do not include gdb_locale.h.
12506
12507 2014-08-07 Gary Benson <gbenson@redhat.com>
12508
12509 * server.h: Do not include gdb/signals.h.
12510 * win32-low.c: Likewise.
12511
12512 2014-08-07 Gary Benson <gbenson@redhat.com>
12513
12514 * server.h: Do not include pathmax.h.
12515
12516 2014-08-07 Gary Benson <gbenson@redhat.com>
12517
12518 * server.h: Do not include libiberty.h.
12519 * linux-bfin-low.c: Likewise.
12520
12521 2014-08-07 Gary Benson <gbenson@redhat.com>
12522
12523 * server.h: Do not include ansidecl.h.
12524
12525 2014-08-07 Gary Benson <gbenson@redhat.com>
12526
12527 * linux-x86-low.c: Do not include stddef.h.
12528 * lynx-ppc-low.c: Likewise.
12529 * tracepoint.c: Likewise.
12530
12531 2014-08-07 Gary Benson <gbenson@redhat.com>
12532
12533 * server.h: Do not include stdarg.h.
12534 * nto-low.c: Likewise.
12535
12536 2014-08-07 Gary Benson <gbenson@redhat.com>
12537
12538 * server.h: Do not include stdlib.h.
12539 * inferiors.c: Likewise.
12540 * linux-low.c: Likewise.
12541 * regcache.c: Likewise.
12542 * spu-low.c: Likewise.
12543 * tracepoint.c: Likewise.
12544 * utils.c: Likewise.
12545
12546 2014-08-07 Gary Benson <gbenson@redhat.com>
12547
12548 * server.h: Do not include stdio.h.
12549 * linux-low.c: Likewise.
12550 * remote-utils.c: Likewise.
12551 * spu-low.c: Likewise.
12552 * utils.c: Likewise.
12553 * wincecompat.c: Likewise.
12554
12555 2014-08-06 Gary Benson <gbenson@redhat.com>
12556
12557 * regcache.c (init_register_cache): Move conditionals inside if.
12558
12559 2014-08-06 Gary Benson <gbenson@redhat.com>
12560
12561 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12562
12563 2014-07-31 Gary Benson <gbenson@redhat.com>
12564
12565 * ax.h: Do not include server.h.
12566 * gdbthread.h: Likewise.
12567 * lynx-low.h: Likewise.
12568 * notif.h: Likewise.
12569
12570 2014-07-30 Gary Benson <gbenson@redhat.com>
12571
12572 * server.h: Include common-defs.h.
12573 Do not include config.h or build-gnulib-gdbserver/config.h.
12574
12575 2014-07-30 Gary Benson <gbenson@redhat.com>
12576
12577 * hostio-errno.c: Move server.h to top of includes list.
12578 * inferiors.c: Likewise.
12579 * linux-x86-low.c: Likewise.
12580 * notif.c: Include server.h.
12581
12582 2014-07-24 Tom Tromey <tromey@redhat.com>
12583 Gary Benson <gbenson@redhat.com>
12584
12585 * server.h (CORE_ADDR): Now unsigned.
12586
12587 2014-07-16 Pedro Alves <palves@redhat.com>
12588
12589 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12590
12591 2014-07-15 Pedro Alves <palves@redhat.com>
12592
12593 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12594 copy.
12595
12596 2014-07-11 Pedro Alves <palves@redhat.com>
12597
12598 * linux-low.c (kill_wait_lwp): New function, based on
12599 kill_one_lwp_callback, but use my_waitpid directly.
12600 (kill_one_lwp_callback, linux_kill): Use it.
12601
12602 2014-06-23 Pedro Alves <palves@redhat.com>
12603
12604 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12605 before setting DR0..DR3.
12606
12607 2014-06-20 Gary Benson <gbenson@redhat.com>
12608
12609 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12610 * configure: Regenerated.
12611 * config.in: Likewise.
12612
12613 2014-06-20 Gary Benson <gbenson@redhat.com>
12614
12615 * Makefile.in (SFILES): Update locations for files moved
12616 from common to nat.
12617 (object file files): Reordered.
12618
12619 2014-06-20 Gary Benson <gbenson@redhat.com>
12620
12621 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12622 (i386_dr_low_set_addr): Likewise.
12623 (i386_dr_low_get_addr): Likewise.
12624 (i386_dr_low_can_set_control): Likewise.
12625 (i386_dr_low_set_control): Likewise.
12626 (i386_dr_low_get_control): Likewise.
12627 (i386_dr_low_get_status): Likewise.
12628 (i386_get_debug_register_length): Likewise.
12629 * linux-x86-low.c (i386_dr_low_set_addr):
12630 Changed signature. Made static.
12631 (i386_dr_low_get_addr): Likewise.
12632 (i386_dr_low_set_control): Likewise.
12633 (i386_dr_low_get_control): Likewise.
12634 (i386_dr_low_get_status): Likewise.
12635 (i386_dr_low): New global variable.
12636 * win32-i386-low.c (i386_dr_low_set_addr):
12637 Changed signature. Made static.
12638 (i386_dr_low_get_addr): Likewise.
12639 (i386_dr_low_set_control): Likewise.
12640 (i386_dr_low_get_control): Likewise.
12641 (i386_dr_low_get_status): Likewise.
12642 (i386_dr_low): New global variable.
12643
12644 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12645
12646 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12647 * Makefile.in (AR, AR_FLAGS): Define.
12648 * configure: Regenerate.
12649
12650 2014-06-19 Gary Benson <gbenson@redhat.com>
12651
12652 * Makefile.in (i386-dregs.o): New rule.
12653 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12654 * i386-low.c (target.h): Remove include.
12655 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12656 (DR_CONTROL_SHIFT): Likewise.
12657 (DR_CONTROL_SIZE): Likewise.
12658 (DR_RW_EXECUTE): Likewise.
12659 (DR_RW_WRITE): Likewise.
12660 (DR_RW_READ): Likewise.
12661 (DR_RW_IORW): Likewise.
12662 (DR_LEN_1): Likewise.
12663 (DR_LEN_2): Likewise.
12664 (DR_LEN_4): Likewise.
12665 (DR_LEN_8): Likewise.
12666 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12667 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12668 (DR_ENABLE_SIZE): Likewise.
12669 (DR_LOCAL_SLOWDOWN): Likewise.
12670 (DR_GLOBAL_SLOWDOWN): Likewise.
12671 (DR_CONTROL_RESERVED): Likewise.
12672 (I386_DR_CONTROL_MASK): Likewise.
12673 (I386_DR_VACANT): Likewise.
12674 (I386_DR_LOCAL_ENABLE): Likewise.
12675 (I386_DR_GLOBAL_ENABLE): Likewise.
12676 (I386_DR_DISABLE): Likewise.
12677 (I386_DR_SET_RW_LEN): Likewise.
12678 (I386_DR_GET_RW_LEN): Likewise.
12679 (I386_DR_WATCH_HIT): Likewise.
12680 (i386_wp_op_t): Likewise.
12681 (i386_show_dr): Likewise.
12682 (i386_length_and_rw_bits): Likewise.
12683 (i386_insert_aligned_watchpoint): Likewise.
12684 (i386_remove_aligned_watchpoint): Likewise.
12685 (i386_handle_nonaligned_watchpoint): Likewise.
12686 i386_update_inferior_debug_regs(): Likewise.
12687 (i386_dr_insert_watchpoint): Likewise.
12688 (i386_dr_remove_watchpoint): Likewise.
12689 (i386_dr_region_ok_for_watchpoint): Likewise.
12690 (i386_dr_stopped_data_address): Likewise.
12691 (i386_dr_stopped_by_watchpoint): Likewise.
12692
12693 2014-06-19 Gary Benson <gbenson@redhat.com>
12694
12695 * i386-low.c (i386_dr_show): Renamed to
12696 i386_show_dr and made static. All uses updated.
12697 (i386_dr_length_and_rw_bits): Renamed to
12698 i386_length_and_rw_bits and made static.
12699 All uses updated.
12700 (i386_dr_insert_aligned_watchpoint): Renamed to
12701 i386_insert_aligned_watchpoint and made static.
12702 All uses updated.
12703 (i386_dr_remove_aligned_watchpoint): Renamed to
12704 i386_remove_aligned_watchpoint and made static.
12705 All uses updated.
12706 (i386_dr_update_inferior_debug_regs): Renamed to
12707 i386_update_inferior_debug_regs and made static.
12708 All uses updated.
12709
12710 2014-06-18 Gary Benson <gbenson@redhat.com>
12711
12712 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12713 (i386_dr_low_can_set_control): Likewise.
12714 (i386_get_debug_register_length): Likewise.
12715 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12716 (i386_dr_low_can_set_control): Likewise.
12717 (i386_get_debug_register_length): Likewise.
12718
12719 2014-06-17 Gary Benson <gbenson@redhat.com>
12720
12721 * i386-low.h (i386-dregs.h): New include.
12722 (DR_FIRSTADDR): Now in i386-dregs.h.
12723 (DR_LASTADDR): Likewise.
12724 (DR_NADDR): Likewise.
12725 (DR_STATUS): Likewise.
12726 (DR_CONTROL): Likewise.
12727 (i386_debug_reg_state): Likewise.
12728 (i386_dr_insert_watchpoint): Likewise.
12729 (i386_dr_remove_watchpoint): Likewise.
12730 (i386_dr_region_ok_for_watchpoint): Likewise.
12731 (i386_dr_stopped_data_address): Likewise.
12732 (i386_dr_stopped_by_watchpoint): Likewise.
12733 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12734
12735 2014-06-18 Gary Benson <gbenson@redhat.com>
12736
12737 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12738 i386_dr_insert_watchpoint.
12739 (i386_low_remove_watchpoint): Renamed to
12740 i386_dr_remove_watchpoint.
12741 (i386_low_region_ok_for_watchpoint): Renamed to
12742 i386_dr_region_ok_for_watchpoint.
12743 (i386_low_stopped_data_address): Renamed to
12744 i386_dr_stopped_data_address.
12745 (i386_low_stopped_by_watchpoint): Renamed to
12746 i386_dr_stopped_by_watchpoint.
12747 * i386-low.c (i386_show_dr): Renamed to
12748 i386_dr_show and made nonstatic. All uses updated.
12749 (i386_length_and_rw_bits): Renamed to
12750 i386_dr_length_and_rw_bits and made nonstatic.
12751 All uses updated.
12752 (i386_insert_aligned_watchpoint): Renamed to
12753 i386_dr_insert_aligned_watchpoint and made nonstatic.
12754 All uses updated.
12755 (i386_remove_aligned_watchpoint): Renamed to
12756 i386_dr_remove_aligned_watchpoint and made nonstatic.
12757 All uses updated.
12758 (i386_update_inferior_debug_regs): Renamed to
12759 i386_dr_update_inferior_debug_regs and made nonstatic.
12760 All uses updated.
12761 (i386_low_insert_watchpoint): Renamed to
12762 i386_dr_insert_watchpoint. All uses updated.
12763 (i386_low_remove_watchpoint): Renamed to
12764 i386_dr_remove_watchpoint. All uses updated.
12765 (i386_low_region_ok_for_watchpoint): Renamed to
12766 i386_dr_region_ok_for_watchpoint. All uses updated.
12767 (i386_low_stopped_data_address): Renamed to
12768 i386_dr_stopped_data_address. All uses updated.
12769 (i386_low_stopped_by_watchpoint): Renamed to
12770 i386_dr_stopped_by_watchpoint. All uses updated.
12771
12772 2014-06-18 Gary Benson <gbenson@redhat.com>
12773
12774 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12775 (i386_dr_low_can_set_control): Likewise.
12776 (i386_insert_aligned_watchpoint): New check.
12777
12778 2014-06-18 Gary Benson <gbenson@redhat.com>
12779
12780 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12781 Renamed to state.
12782
12783 2014-06-18 Gary Benson <gbenson@redhat.com>
12784
12785 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12786 instead of fatal and error.
12787 (i386_handle_nonaligned_watchpoint): Likewise.
12788
12789 2014-06-18 Gary Benson <gbenson@redhat.com>
12790
12791 * i386-low.c (i386_get_debug_register_length): New macro.
12792 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12793 (i386_show_dr): Use debug_printf instead of fprintf. Use
12794 phex to format values.
12795
12796 2014-06-18 Gary Benson <gbenson@redhat.com>
12797
12798 * i386-low.h: Comment changes.
12799 * i386-low.c: Likewise.
12800
12801 2014-06-18 Gary Benson <gbenson@redhat.com>
12802
12803 * i386-low.c: Whitespace changes.
12804
12805 2014-06-12 Tom Tromey <tromey@redhat.com>
12806
12807 * utils.c (freeargv): Remove.
12808
12809 2014-06-12 Tom Tromey <tromey@redhat.com>
12810
12811 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12812 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12813 (parse_debug_format_options): Likewise.
12814 (gdbserver_usage): Likewise.
12815 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12816 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12817 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12818 against libiberty.
12819 ($(LIBGNU)): Depend on libiberty.
12820 (all-lib): Recurse into all subdirs.
12821 (install-only): Invoke "install" target in subdirs.
12822 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12823 targets.
12824 * configure: Rebuild.
12825 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12826 for vasprintf, vsnprintf, or gettimeofday.
12827 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12828 srv_tgtobj.
12829
12830 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12831
12832 * development.sh: Delete.
12833 * Makefile.in (config.status): Adjust dependency on development.sh.
12834 * configure.ac: Adjust development.sh source call.
12835 * configure: Regenerate.
12836
12837 2014-06-02 Pedro Alves <palves@redhat.com>
12838
12839 * ax.c (gdb_free_agent_expr): New function.
12840 * ax.h (gdb_free_agent_expr): New declaration.
12841 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12842 list.
12843 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12844 static.
12845 (clear_breakpoint_conditions_and_commands): New function.
12846 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12847 (clear_breakpoint_conditions_and_commands): New declaration.
12848
12849 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12850
12851 * linux-aarch64-low.c (asm/ptrace.h): Include.
12852
12853 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12854
12855 Fix TLS access for -static -pthread.
12856 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12857 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12858 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12859
12860 2014-05-20 Pedro Alves <palves@redhat.com>
12861
12862 * linux-aarch64-low.c (aarch64_insert_point)
12863 (aarch64_remove_point): No longer check whether the type is
12864 supported here. Adjust to new interface.
12865 (the_low_target): Install aarch64_supports_z_point_type as
12866 supports_z_point_type method.
12867 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12868 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12869 instead of a Z packet char. Adjust.
12870 (arm_supports_z_point_type): New function.
12871 (arm_insert_point, arm_remove_point): Adjust to new interface.
12872 (the_low_target): Install arm_supports_z_point_type.
12873 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12874 (cris_insert_point, cris_remove_point): Adjust to new interface.
12875 Don't check whether the type is supported here.
12876 (the_low_target): Install cris_supports_z_point_type.
12877 * linux-low.c (linux_supports_z_point_type): New function.
12878 (linux_insert_point, linux_remove_point): Adjust to new interface.
12879 * linux-low.h (struct linux_target_ops) <insert_point,
12880 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12881 raw_breakpoint pointer parameter.
12882 <supports_z_point_type>: New method.
12883 * linux-mips-low.c (mips_supports_z_point_type): New function.
12884 (mips_insert_point, mips_remove_point): Adjust to new interface.
12885 Use mips_supports_z_point_type.
12886 (the_low_target): Install mips_supports_z_point_type.
12887 * linux-ppc-low.c (the_low_target): Install NULL as
12888 supports_z_point_type method.
12889 * linux-s390-low.c (the_low_target): Install NULL as
12890 supports_z_point_type method.
12891 * linux-sparc-low.c (the_low_target): Install NULL as
12892 supports_z_point_type method.
12893 * linux-x86-low.c (x86_supports_z_point_type): New function.
12894 (x86_insert_point): Adjust to new insert_point interface. Use
12895 insert_memory_breakpoint. Adjust to new
12896 i386_low_insert_watchpoint interface.
12897 (x86_remove_point): Adjust to remove_point interface. Use
12898 remove_memory_breakpoint. Adjust to new
12899 i386_low_remove_watchpoint interface.
12900 (the_low_target): Install x86_supports_z_point_type.
12901 * lynx-low.c (lynx_target_ops): Install NULL as
12902 supports_z_point_type callback.
12903 * nto-low.c (nto_supports_z_point_type): New.
12904 (nto_insert_point, nto_remove_point): Adjust to new interface.
12905 (nto_target_ops): Install nto_supports_z_point_type.
12906 * mem-break.c: Adjust intro comment.
12907 (struct raw_breakpoint) <raw_type, size>: New fields.
12908 <inserted>: Update comment.
12909 <shlib_disabled>: Delete field.
12910 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12911 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12912 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12913 (raw_bkpt_type_to_target_hw_bp_type): New function.
12914 (find_enabled_raw_code_breakpoint_at): New function.
12915 (find_raw_breakpoint_at): New type and size parameters. Use them.
12916 (insert_memory_breakpoint): New function, based off
12917 set_raw_breakpoint_at.
12918 (remove_memory_breakpoint): New function.
12919 (set_raw_breakpoint_at): Reimplement.
12920 (set_breakpoint): New, based on set_breakpoint_at.
12921 (set_breakpoint_at): Reimplement.
12922 (delete_raw_breakpoint): Go through the_target->remove_point
12923 instead of assuming memory breakpoints.
12924 (find_gdb_breakpoint_at): Delete.
12925 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12926 (find_gdb_breakpoint): New function.
12927 (set_gdb_breakpoint_at): Delete.
12928 (z_type_supported): New function.
12929 (set_gdb_breakpoint_1): New function, loosely based off
12930 set_gdb_breakpoint_at.
12931 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12932 (delete_gdb_breakpoint_at): Delete.
12933 (delete_gdb_breakpoint_1): New function, loosely based off
12934 delete_gdb_breakpoint_at.
12935 (delete_gdb_breakpoint): New function.
12936 (clear_gdb_breakpoint_conditions): Rename to ...
12937 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12938 breakpoint.
12939 (add_condition_to_breakpoint): Make static.
12940 (add_breakpoint_condition): Take a struct breakpoint pointer
12941 instead of an address. Adjust.
12942 (gdb_condition_true_at_breakpoint): Rename to ...
12943 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12944 z_type parameter.
12945 (gdb_condition_true_at_breakpoint): Reimplement.
12946 (add_breakpoint_commands): Take a struct breakpoint pointer
12947 instead of an address. Adjust.
12948 (gdb_no_commands_at_breakpoint): Rename to ...
12949 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12950 parameter. Return true if no breakpoint was found. Change debug
12951 output.
12952 (gdb_no_commands_at_breakpoint): Reimplement.
12953 (run_breakpoint_commands): Rename to ...
12954 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12955 and change return type to boolean.
12956 (run_breakpoint_commands): New function.
12957 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12958 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12959 breakpoint. Go through the_target->remove_point instead of
12960 assuming memory breakpoint.
12961 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12962 software and hardware breakpoints.
12963 (reinsert_raw_breakpoint): Go through the_target->insert_point
12964 instead of assuming memory breakpoint.
12965 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12966 software and hardware breakpoints.
12967 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12968 Check both software and hardware breakpoints.
12969 (validate_inserted_breakpoint): Assert the breakpoint is a
12970 software breakpoint. Set the inserted flag to -1 instead of
12971 setting shlib_disabled.
12972 (delete_disabled_breakpoints): Adjust.
12973 (validate_breakpoints): Only validate software breakpoints.
12974 Adjust to inserted flag change.
12975 (check_mem_read, check_mem_write): Skip breakpoint types other
12976 than software breakpoints. Adjust to inserted flag change.
12977 * mem-break.h (enum raw_bkpt_type): New enum.
12978 (raw_breakpoint, struct process_info): Forward declare.
12979 (Z_packet_to_target_hw_bp_type): Delete declaration.
12980 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12981 (set_gdb_breakpoint, delete_gdb_breakpoint)
12982 (clear_breakpoint_conditions): New declarations.
12983 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12984 (breakpoint_inserted_here): Update comment.
12985 (add_breakpoint_condition, add_breakpoint_commands): Replace
12986 address parameter with a breakpoint pointer parameter.
12987 (gdb_breakpoint_here): Update comment.
12988 (delete_gdb_breakpoint_at): Delete.
12989 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12990 * server.c (process_point_options): Take a struct breakpoint
12991 pointer instead of an address. Adjust.
12992 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12993 delete_gdb_breakpoint.
12994 * spu-low.c (spu_target_ops): Install NULL as
12995 supports_z_point_type method.
12996 * target.h: Include mem-break.h.
12997 (struct target_ops) <prepare_to_access_memory>: Update comment.
12998 <supports_z_point_type>: New field.
12999 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13000 instead of a char. Also take a raw breakpoint pointer.
13001 * win32-arm-low.c (the_low_target): Install NULL as
13002 supports_z_point_type.
13003 * win32-i386-low.c (i386_supports_z_point_type): New function.
13004 (i386_insert_point, i386_remove_point): Adjust to new interface.
13005 (the_low_target): Install i386_supports_z_point_type.
13006 * win32-low.c (win32_supports_z_point_type): New function.
13007 (win32_insert_point, win32_remove_point): Adjust to new interface.
13008 (win32_target_ops): Install win32_supports_z_point_type.
13009 * win32-low.h (struct win32_target_ops):
13010 <supports_z_point_type>: New method.
13011 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13012 instead of a char. Also take a raw breakpoint pointer.
13013
13014 2014-05-20 Pedro Alves <palves@redhat.com>
13015
13016 * mem-break.h: Include break-common.h.
13017 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13018 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
13019 (Z_packet_to_target_hw_bp_type): New declaration.
13020 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
13021 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
13022 (Z_PACKET_ACCESS_WP): Delete macros.
13023 (Z_packet_to_hw_type): Delete function.
13024 * i386-low.h: Don't include break-common.h here.
13025 (Z_packet_to_hw_type): Delete declaration.
13026 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
13027 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13028 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
13029 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13030 * linux-aarch64-low.c: Don't include break-common.h here.
13031 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13032 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
13033 (Z_packet_to_target_hw_bp_type): Delete function.
13034 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
13035 function.
13036 (mips_insert_point, mips_remove_point): Use
13037 Z_packet_to_target_hw_bp_type.
13038
13039 2014-05-20 Pedro Alves <palves@redhat.com>
13040
13041 * linux-aarch64-low.c: Include break-common.h.
13042 (enum target_point_type): Delete.
13043 (Z_packet_to_point_type): Rename to ...
13044 (Z_packet_to_target_hw_bp_type): ... this, and return a
13045 target_hw_bp_type instead.
13046 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
13047 instead of an enum target_point_type.
13048 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
13049 breakpoint type.
13050 (aarch64_dr_state_insert_one_point)
13051 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
13052 (aarch64_handle_aligned_watchpoint)
13053 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
13054 Take an enum target_hw_bp_type instead of an enum
13055 target_point_type.
13056 (aarch64_supports_z_point_type): New function.
13057 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
13058 use Z_packet_to_target_hw_bp_type.
13059
13060 2014-05-20 Joel Brobecker <brobecker@adacore.com>
13061
13062 * configure.ac: Only use -Werror by default when DEVELOPMENT
13063 is true.
13064 * configure: Regenerate.
13065
13066 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
13067
13068 Fix gdbserver qGetTLSAddr for x86_64 -m32.
13069 * linux-x86-low.c (X86_64_USER_REGS): New.
13070 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
13071
13072 2014-04-28 Yao Qi <yao@codesourcery.com>
13073
13074 * Makefile.in (i386-avx512.c): Fix the typo of generated file
13075 name.
13076
13077 2014-04-25 Pedro Alves <palves@redhat.com>
13078
13079 PR server/16255
13080 * linux-low.c (linux_attach_fail_reason_string): New function.
13081 (linux_attach_lwp): Delete.
13082 (linux_attach_lwp_1): Rename to ...
13083 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
13084 argument. Remove "initial" parameter. Return int instead of
13085 void. Don't error or warn here.
13086 (linux_attach): Adjust to call linux_attach_lwp. Call error on
13087 failure to attach to the tgid. Call warning when failing to
13088 attach to an lwp.
13089 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
13090 argument. Remove "initial" parameter. Return int instead of
13091 void. Don't error or warn here.
13092 (linux_attach_fail_reason_string): New declaration.
13093 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
13094 interface change. Use linux_attach_fail_reason_string.
13095
13096 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
13097 Walfred Tedeschi <walfred.tedeschi@intel.com>
13098
13099 * Makefile.in: Added rules to handle new files
13100 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
13101 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
13102 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
13103 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
13104 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
13105 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
13106 x32-avx512-linux.o.
13107 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
13108 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
13109 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
13110 i386/x32-avx512.xml.
13111 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
13112 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
13113 i386/x32-avx512-linux.xml.
13114 * i387-fp.c (num_avx512_k_registers): New constant for number
13115 of K registers.
13116 (num_avx512_zmmh_low_registers): New constant for number of
13117 lower ZMM registers (0-15).
13118 (num_avx512_zmmh_high_registers): New constant for number of
13119 higher ZMM registers (16-31).
13120 (num_avx512_ymmh_registers): New contant for number of higher
13121 YMM registers (ymm16-31 added by avx521 on x86_64).
13122 (num_avx512_xmm_registers): New constant for number of higher
13123 XMM registers (xmm16-31 added by AVX512 on x86_64).
13124 (struct i387_xsave): Add space for AVX512 registers.
13125 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
13126 Add code to handle AVX512 registers.
13127 (i387_xsave_to_cache): Add code to handle AVX512 registers.
13128 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
13129 prototypei from generated file.
13130 (tdesc_amd64_avx512_linux): Likewise.
13131 (init_registers_x32_avx512_linux): Likewise.
13132 (tdesc_x32_avx512_linux): Likewise.
13133 (init_registers_i386_avx512_linux): Likewise.
13134 (tdesc_i386_avx512_linux): Likewise.
13135 (x86_64_regmap): Add AVX512 registers.
13136 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13137 mask.
13138 (initialize_low_arch): Add code to initialize AVX512 registers.
13139
13140 2014-04-23 Pedro Alves <palves@redhat.com>
13141
13142 * mem-break.c (find_gdb_breakpoint_at): Make static.
13143 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13144
13145 2014-04-23 Pedro Alves <palves@redhat.com>
13146
13147 * i386-low.c: Don't include break-common.h here.
13148 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13149 prototype to take target_hw_bp_type as argument instead of a Z
13150 packet char.
13151 * i386-low.h: Include break-common.h here.
13152 (Z_packet_to_hw_type): Declare.
13153 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13154 prototypes.
13155 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13156 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13157 (x86_remove_point): Convert the packet number to a
13158 target_hw_bp_type before calling i386_low_remove_watchpoint.
13159 * win32-i386-low.c (i386_insert_point): Convert the packet number
13160 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13161 (i386_remove_point): Convert the packet number to a
13162 target_hw_bp_type before calling i386_low_remove_watchpoint.
13163
13164 2014-04-23 Pedro Alves <palves@redhat.com>
13165
13166 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13167
13168 2014-04-10 Pedro Alves <palves@redhat.com>
13169
13170 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13171 Check if the condition or command is NULL before checking if the
13172 breakpoint is known. On success, return true.
13173 * mem-break.h (add_breakpoint_condition): Document return.
13174 (add_breakpoint_commands): Add describing comment.
13175 * server.c (skip_to_semicolon): New function.
13176 (process_point_options): Use it.
13177
13178 2014-04-09 Pedro Alves <palves@redhat.com>
13179
13180 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13181 to lwpid_of.
13182
13183 2014-02-27 Pedro Alves <palves@redhat.com>
13184
13185 PR 12702
13186 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13187 macros.
13188 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13189 output.
13190 (last_thread_of_process_p): Take a PID argument instead of a
13191 thread pointer.
13192 (linux_wait_for_lwp): Delete.
13193 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13194 functions.
13195 (linux_low_filter_event): New function, party factored out from
13196 linux_wait_for_event.
13197 (linux_wait_for_event): Rename to ...
13198 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13199 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13200 sigsuspend. Check for zombie leaders.
13201 (linux_wait_for_event): Reimplement as wrapper around
13202 linux_wait_for_event_filtered.
13203 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13204 a normal or signal exit is seen, it's the whole process exiting.
13205 (wait_for_sigstop): No longer a for_each_inferior callback.
13206 Rewrite on top of linux_wait_for_event_filtered.
13207 (stop_all_lwps): Call wait_for_sigstop directly.
13208 * server.c (resume, handle_target_event): Handle
13209 TARGET_WAITKIND_NO_RESUMED.
13210
13211 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13212
13213 * win32-low.c (psapi_get_dll_name,
13214 * win32_CreateToolhelp32Snapshot): Delete.
13215 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13216 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13217 Delete.
13218 (handle_load_dll): Add function description.
13219 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13220
13221 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13222
13223 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13224 Add comment.
13225 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13226 base address when calling win32_add_one_solib.
13227 (handle_load_dll): Delete local variable load_addr.
13228 Remove 0x1000 offset applied to DLL base address when calling
13229 win32_add_one_solib.
13230 (handle_unload_dll): Add comment.
13231
13232 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13233
13234 * win32-low.c (win32_add_all_dlls): Renames
13235 win32_ensure_ntdll_loaded. Rewrite function documentation.
13236 Adjust implementation to always load all DLLs.
13237 Add 0x1000 offset to DLL base address when calling
13238 win32_add_one_solib.
13239 (child_initialization_done): New static global.
13240 (do_initial_child_stuff): Set child_initialization_done to
13241 zero during child initialization, and 1 after. Replace call
13242 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13243 Add comment.
13244 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13245 (handle_unload_dll): Add function documentation.
13246 (get_child_debug_event): Ignore load and unload DLL events
13247 during child initialization.
13248
13249 2014-02-20 Doug Evans <dje@google.com>
13250
13251 Remove global all_lwps.
13252 * inferiors.h (ptid_of): Move here from linux-low.h.
13253 (pid_of, lwpid_of): Ditto.
13254 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13255 parameter is a struct thread_info * now.
13256 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13257 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13258 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13259 directly.
13260 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13261 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13262 * linux-arm-low.c (update_registers_callback): Update, "entry"
13263 parameter is a struct thread_info * now.
13264 Fetch lwpid from current_inferior directly.
13265 (arm_insert_point): Pass &all_threads to find_inferior instead of
13266 &all_lwps.
13267 (arm_remove_point): Ditto.
13268 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13269 (arm_prepare_to_resume): Fetch pid from thread.
13270 (arm_read_description): Fetch lwpid from current_inferior directly.
13271 * linux-low.c (all_lwps): Delete.
13272 (delete_lwp): Delete call to remove_inferior.
13273 (handle_extended_wait): Fetch lwpid from thread.
13274 (add_lwp): Don't set lwp->entry.id. Remove call to
13275 add_inferior_to_list.
13276 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13277 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13278 (kill_one_lwp_callback): Ditto.
13279 (linux_kill): Don't dereference NULL pointer.
13280 Fetch ptid,lwpid from thread.
13281 (get_detach_signal): Fetch ptid from thread.
13282 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13283 Simplify call to regcache_invalidate_thread.
13284 (delete_lwp_callback): Update, "entry" parameter is a
13285 struct thread_info * now. Fetch pid from thread.
13286 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13287 (status_pending_p_callback): Update, "entry" parameter is a
13288 struct thread_info * now. Fetch ptid from thread.
13289 (find_lwp_pid): Update, "entry" parameter is a
13290 struct thread_info * now.
13291 (linux_wait_for_lwp): Fetch pid from thread.
13292 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13293 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13294 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13295 (dequeue_one_deferred_signal): Ditto.
13296 (cancel_breakpoint): Fetch ptid from current_inferior.
13297 (linux_wait_for_event): Pass &all_threads to find_inferior,
13298 not &all_lwps. Fetch ptid, lwpid from thread.
13299 (count_events_callback): Update, "entry" parameter is a
13300 struct thread_info * now.
13301 (select_singlestep_lwp_callback): Ditto.
13302 (select_event_lwp_callback): Ditto.
13303 (cancel_breakpoints_callback): Ditto.
13304 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13305 not &all_lwps.
13306 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13307 (unsuspend_one_lwp): Update, "entry" parameter is a
13308 struct thread_info * now.
13309 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13310 not &all_lwps.
13311 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13312 Fetch lwpid from thread, not lwp.
13313 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13314 Pass &all_threads to find_inferior, not &all_lwps.
13315 (send_sigstop): Fetch lwpid from thread, not lwp.
13316 (send_sigstop_callback): Update, "entry" parameter is a
13317 struct thread_info * now.
13318 (suspend_and_send_sigstop_callback): Ditto.
13319 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13320 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13321 struct thread_info * now.
13322 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13323 from thread, lwp.
13324 (lwp_running): Update, "entry" parameter is a
13325 struct thread_info * now.
13326 (stop_all_lwps): Fetch ptid from thread.
13327 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13328 (linux_resume_one_lwp): Fetch lwpid from thread.
13329 (linux_set_resume_request): Update, "entry" parameter is a
13330 struct thread_info * now. Fetch pid, lwpid from thread.
13331 (resume_status_pending_p): Update, "entry" parameter is a
13332 struct thread_info * now.
13333 (need_step_over_p): Ditto. Fetch lwpid from thread.
13334 (start_step_over): Fetch lwpid from thread.
13335 (linux_resume_one_thread): Update, "entry" parameter is a
13336 struct thread_info * now. Fetch lwpid from thread.
13337 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13338 (proceed_one_lwp): Update, "entry" parameter is a
13339 struct thread_info * now. Fetch lwpid from thread.
13340 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13341 struct thread_info * now.
13342 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13343 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13344 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13345 directly.
13346 (regsets_store_inferior_registers): Ditto.
13347 (fetch_register, store_register): Ditto.
13348 (linux_read_memory, linux_write_memory): Ditto.
13349 (linux_request_interrupt): Ditto.
13350 (linux_read_auxv): Ditto.
13351 (linux_xfer_siginfo): Ditto.
13352 (linux_qxfer_spu): Ditto.
13353 (linux_qxfer_libraries_svr4): Ditto.
13354 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13355 moved to inferiors.h.
13356 (get_lwp): Delete.
13357 (get_thread_lwp): Update.
13358 (struct lwp_info): Delete member "entry". Simplify comment for
13359 member "thread".
13360 (all_lwps): Delete.
13361 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13362 current_inferior directly.
13363 (update_watch_registers_callback): Update, "entry" parameter is a
13364 struct thread_info * now. Fetch pid from thread.
13365 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13366 (mips_insert_point): Fetch lwpid from current_inferior.
13367 Pass &all_threads to find_inferior, not &all_lwps.
13368 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13369 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13370 directly.
13371 (mips_stopped_data_address): Ditto.
13372 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13373 directly.
13374 * linux-tile-low.c (tile_arch_setup): Ditto.
13375 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13376 (update_debug_registers_callback): Update, "entry" parameter is a
13377 struct thread_info * now. Fetch pid from thread.
13378 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13379 Pass &all_threads to find_inferior, not &all_lwps.
13380 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13381 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13382 Pass &all_threads to find_inferior, not &all_lwps.
13383 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13384 (i386_dr_low_get_status): Ditto.
13385 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13386 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13387 (x86_linux_read_description): Ditto.
13388 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13389
13390 2014-02-20 Doug Evans <dje@google.com>
13391
13392 * inferiors.c (get_first_inferior): Fix buglet.
13393
13394 2014-02-19 Doug Evans <dje@google.com>
13395
13396 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13397 * inferiors.c (add_thread): Change result type to struct thread_info *.
13398 All callers updated.
13399 (add_lwp): Call add_thread here instead of in callers.
13400 All callers updated.
13401 * linux-low.h (get_lwp_thread): Rewrite.
13402 (struct lwp_info): New member "thread".
13403
13404 2014-02-19 Doug Evans <dje@google.com>
13405
13406 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13407 All callers updated.
13408
13409 2014-02-19 Doug Evans <dje@google.com>
13410
13411 * inferiors.c (add_thread): Fix whitespace.
13412
13413 2014-02-19 Doug Evans <dje@google.com>
13414
13415 * dll.c (clear_dlls): Replace accessing list implemention details
13416 with API function.
13417 * gdbthread.h (get_first_thread): Declare.
13418 * inferiors.c (for_each_inferior_with_data): New function.
13419 (get_first_thread): New function.
13420 (find_thread_ptid): Simplify.
13421 (get_first_inferior): New function.
13422 (clear_list): Delete.
13423 (one_inferior_p): New function.
13424 (clear_inferior_list): New function.
13425 (clear_inferiors): Update.
13426 * inferiors.h (for_each_inferior_with_data): Declare.
13427 (clear_inferior_list): Declare.
13428 (one_inferior_p): Declare.
13429 (get_first_inferior): Declare.
13430 * linux-low.c (linux_wait_for_event): Replace accessing list
13431 implemention details with API function.
13432 * server.c (target_running): Ditto.
13433 (accumulate_file_name_length): New function.
13434 (emit_dll_description): New function.
13435 (handle_qxfer_libraries): Replace accessing list implemention
13436 details with API function.
13437 (handle_qxfer_threads_worker): New function.
13438 (handle_qxfer_threads_proper): Replace accessing list implemention
13439 details with API function.
13440 (handle_query): Ditto.
13441 (visit_actioned_threads_callback_ftype): New typedef.
13442 (visit_actioned_threads_data): New struct.
13443 (visit_actioned_threads): Rewrite to be find_inferior callback.
13444 (resume): Call find_inferior.
13445 (handle_status): Replace accessing list implemention
13446 details with API function.
13447 (process_serial_event): Replace accessing list implemention details
13448 with API function.
13449 * target.c (set_desired_inferior): Replace accessing list implemention
13450 details with API function.
13451 * tracepoint.c (same_process_p): New function.
13452 (gdb_agent_about_to_close): Replace accessing list implemention
13453 details with API function.
13454 * win32-low.c (child_delete_thread): Replace accessing list
13455 implemention details with API function.
13456 (match_dll_by_basename): New function.
13457 (dll_is_loaded_by_basename): New function.
13458 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13459 details call to dll_is_loaded_by_basename.
13460
13461 2014-02-19 Doug Evans <dje@google.com>
13462
13463 * dll.h (struct dll_info): Add comment.
13464 * gdbthread.h (struct thread_info): Add comment.
13465 (current_ptid): Simplify.
13466 * inferiors.c (add_process): Update.
13467 (remove_process): Update.
13468 * inferiors.h (struct process_info): Rename member "head" to "entry".
13469 * linux-low.c (delete_lwp): Update.
13470 (add_lwp): Update.
13471 (last_thread_of_process_p): Update.
13472 (kill_one_lwp_callback, linux_kill): Update.
13473 (status_pending_p_callback): Update.
13474 (wait_for_sigstop): Update. Simplify read of ptid.
13475 (start_step_over): Update.
13476 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13477 (get_lwp_thread): Update.
13478 (struct lwp_info): Rename member "head" to "entry".
13479 * regcache.h (inferior_list_entry): Delete.
13480 * server.c (kill_inferior_callback): Update.
13481 (detach_or_kill_inferior_callback): Update.
13482 (print_started_pid): Update.
13483 (print_attached_pid): Update.
13484 (process_serial_event): Simplify read of ptid.
13485 * thread-db.c (thread_db_create_event): Update.
13486 (thread_db_get_tls_address): Update.
13487 * win32-low.c (current_inferior_ptid): Simplify.
13488
13489 2014-02-19 Tom Tromey <tromey@redhat.com>
13490
13491 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13492 argument.
13493 (target_supports_btrace): Update.
13494
13495 2014-02-14 Yao Qi <yao@codesourcery.com>
13496
13497 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13498 (rsp-low-ipa.o): New target.
13499
13500 2014-02-12 Tom Tromey <tromey@redhat.com>
13501
13502 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13503 convert_ascii_to_int.
13504 * regcache.c (registers_to_string): Likewise.
13505 * remote-utils.c (decode_M_packet): Likewise.
13506 * server.c (process_serial_event): Likewise.
13507
13508 2014-02-12 Tom Tromey <tromey@redhat.com>
13509
13510 * server.c (handle_query, handle_v_run): Use hex2bin, not
13511 unhexify.
13512 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13513
13514 2014-02-12 Tom Tromey <tromey@redhat.com>
13515
13516 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13517 convert_int_to_ascii.
13518 * regcache.c (registers_to_string, collect_register_as_string):
13519 Likewise.
13520 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13521 Likewise.
13522 * server.c (process_serial_event): Likewise.
13523 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13524 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13525
13526 2014-02-12 Tom Tromey <tromey@redhat.com>
13527
13528 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13529 bin2hex, not hexify.
13530 * tracepoint.c (cmd_qtstatus): Likewise.
13531
13532 2014-02-12 Tom Tromey <tromey@redhat.com>
13533
13534 * remote-utils.c (monitor_output): Pass explicit length to
13535 hexify.
13536
13537 2014-02-12 Tom Tromey <tromey@redhat.com>
13538
13539 * tracepoint.c: Include rsp-low.h.
13540 * server.c: Include rsp-low.h.
13541 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13542 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13543 declare.
13544 * remote-utils.c: Include rsp-low.h.
13545 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13546 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13547 (convert_int_to_ascii, convert_ascii_to_int): Move to
13548 common/rsp-low.c.
13549 * regcache.c: Include rsp-low.h.
13550 * ax.c: Include rsp-low.h.
13551 * Makefile.in (SFILES): Add common/rsp-low.c.
13552 (OBS): Add rsp-low.o.
13553 (rsp-low.o): New target.
13554
13555 2014-02-12 Tom Tromey <tromey@redhat.com>
13556
13557 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13558 Include print-utils.h.
13559 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13560 (plongest, thirty_two, phex_nz): Remove.
13561 * Makefile.in (SFILES): Add common/print-utils.c.
13562 (OBS): Add print-utils.o.
13563 (print-utils-ipa.o): New target.
13564 (print-utils.o): New target.
13565 (IPA_OBJS): Add print-utils-ipa.o.
13566
13567 2014-02-06 Tom Tromey <tromey@redhat.com>
13568
13569 * Makefile.in (SFILES): Fix indentation.
13570
13571 2014-02-05 Doug Evans <dje@google.com>
13572
13573 * linux-low.c (linux_wait_for_event): Improve comment.
13574 (linux_wait_1): Keep current_inferior in sync with event_child.
13575
13576 2014-01-22 Doug Evans <dje@google.com>
13577
13578 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13579
13580 2014-01-22 Doug Evans <dje@google.com>
13581
13582 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13583 * configure: Regenerate.
13584 * config.in: Regenerate.
13585 * Makefile.in (SFILES): Add debug.c.
13586 (OBS): Add debug.o.
13587 * debug.c: New file.
13588 * debug.h: New file.
13589 * linux-aarch64-low.c (*): Update all debugging printfs to use
13590 debug_printf instead of fprintf.
13591 * linux-arm-low.c (*): Ditto.
13592 * linux-cris-low.c (*): Ditto.
13593 * linux-crisv32-low.c (*): Ditto.
13594 * linux-m32r-low.c (*): Ditto.
13595 * linux-sparc-low.c (*): Ditto.
13596 * linux-x86.c (*): Ditto.
13597 * linux-low.c (*): Ditto.
13598 (linux_wait_1): Add calls to debug_enter, debug_exit.
13599 (linux_wait): Remove redundant debugging printf.
13600 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13601 (linux_resume, unstop_all_lwps): Ditto.
13602 * mem-break.c (*): Update all debugging printfs to use
13603 debug_printf instead of fprintf.
13604 * remote-utils.c (*): Ditto.
13605 * thread-db.c (*): Ditto.
13606 * server.c #include <ctype.h>, "gdb_vecs.h".
13607 (debug_threads): Moved to debug.c.
13608 (*): Update all debugging printfs to use debug_printf instead of
13609 fprintf.
13610 (start_inferior): Replace call to fflush with call to debug_flush.
13611 (monitor_show_help): Mention set debug-format.
13612 (parse_debug_format_options): New function.
13613 (handle_monitor_command): Handle "monitor set debug-format".
13614 (gdbserver_usage): Mention --debug-format.
13615 (main): Parse --debug-format.
13616 * server.h (debug_threads): Declaration moved to debug.h.
13617 #include "debug.h".
13618 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13619 trace_debug_1 that uses debug_printf.
13620 (tracepoint_look_up_symbols): Update all debugging printfs to use
13621 debug_printf instead of fprintf.
13622
13623 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13624
13625 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13626 sys/ptrace.h.
13627
13628 2014-01-17 Pedro Alves <palves@redhat.com>
13629
13630 PR build/16445
13631 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13632 defined after including gdb_proc_service.h.
13633
13634 2014-01-16 Doug Evans <dje@google.com>
13635
13636 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13637 (match_dll): Use it.
13638
13639 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13640
13641 * target.h (target_ops) <read_btrace>: Change parameters and
13642 return type to allow error reporting.
13643 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13644 trace reading errors on.
13645 * linux-low.c (linux_low_read_btrace): Pass trace reading
13646 errors on.
13647 (linux_low_disable_btrace): New.
13648
13649 2014-01-15 Doug Evans <dje@google.com>
13650
13651 * inferiors.c (thread_id_to_gdb_id): Delete.
13652 * inferiors.h (thread_id_to_gdb_id): Delete.
13653
13654 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13655
13656 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13657 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13658 versions.
13659
13660 2014-01-08 Pedro Alves <palves@redhat.com>
13661
13662 * server.c (handle_status): Don't discard previous queued stop
13663 replies or thread's pending status here.
13664 (main) <disconnection>: Do it here instead.
13665
13666 2014-01-08 Pedro Alves <palves@redhat.com>
13667
13668 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13669 * server.c (visit_actioned_threads, handle_pending_status): New
13670 function.
13671 (handle_v_cont): Factor out parts to ...
13672 (resume): ... this new function. If in all-stop, and a thread
13673 being resumed has a pending status, report it without actually
13674 resuming.
13675 (myresume): Adjust to use the new 'resume' function.
13676 (clear_pending_status_callback, set_pending_status_callback)
13677 (find_status_pending_thread_callback): New functions.
13678 (handle_status): Handle the case of multiple threads having
13679 interesting statuses to report. Report threads' real last signal
13680 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13681 with an interesting thread to report the status for, instead of
13682 always reporting the status of the first thread.
13683
13684 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13685
13686 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13687 * gdbreplay.c (gdbreplay_version): Likewise.
13688
13689 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13690
13691 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13692 iov.iov_len with the real length in use.
13693
13694 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13695
13696 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13697 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13698 for all targets that use win32-low.c.
13699 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13700 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13701
13702 2013-12-13 Pedro Alves <palves@redhat.com>
13703
13704 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13705 if equal to TARGET_WAITKIND_LOADED.
13706 * win32-low.c (cached_status): New static global.
13707 (win32_wait): Add declaration.
13708 (do_initial_child_stuff): Flush all initial pending debug events
13709 up to the initial breakpoint.
13710 (win32_wait): If CACHED_STATUS was set, return that instead
13711 of doing a real wait. Remove the code resuming the execution
13712 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13713 during the initial phase. Also remove the code changing
13714 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13715 TARGET_WAITKIND_STOPPED.
13716
13717 2013-12-11 Yao Qi <yao@codesourcery.com>
13718
13719 * notif.c (handle_notif_ack): Return 0 if no notification
13720 matches.
13721
13722 2013-11-20 Doug Evans <dje@google.com>
13723
13724 * linux-low.c (linux_set_resume_request): Fix comment.
13725
13726 2013-11-20 Doug Evans <dje@google.com>
13727
13728 * linux-low.c (resume_status_pending_p): Tweak comment.
13729
13730 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13731
13732 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13733 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13734 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13735 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13736 (srv_amd64_regobj): Add amd64-mpx.o.
13737 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13738 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13739 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13740 * i387-fp.c (num_pl_bnd_register) Added constant.
13741 (num_pl_bnd_cfg_registers) Added constant.
13742 (struct i387_xsave) Added reserved area and MPX fields.
13743 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13744 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13745 function.
13746 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13747 (init_registers_amd64_mpx_linux): Declare new function.
13748 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13749 (x86_64_regmap): Add MPX registers.
13750 (x86_linux_read_description): Add MPX case.
13751 (initialize_low_arch): Initialize MPX targets.
13752
13753 2013-11-18 Tom Tromey <tromey@redhat.com>
13754
13755 * configure: Rebuild.
13756 * configure.ac: Don't check for stdlib.h.
13757 * gdbreplay.c: Unconditionally include stdlib.h.
13758
13759 2013-11-18 Tom Tromey <tromey@redhat.com>
13760
13761 * config.in: Rebuild.
13762 * configure: Rebuild.
13763 * configure.ac: Don't use AC_HEADER_DIRENT.
13764
13765 2013-11-18 Tom Tromey <tromey@redhat.com>
13766
13767 * server.h: Don't check HAVE_STRING_H.
13768 * gdbreplay.c: Don't check HAVE_STRING_H.
13769 * configure: Rebuild.
13770
13771 2013-11-18 Tom Tromey <tromey@redhat.com>
13772
13773 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13774 LIBGNU.
13775
13776 2013-11-08 Tom Tromey <tromey@redhat.com>
13777
13778 * configure, config.in: Rebuild.
13779 * configure.ac: Remove unused configury.
13780
13781 2013-11-08 Tom Tromey <tromey@redhat.com>
13782
13783 * acinclude.m4: Include common.m4, codeset.m4.
13784 * configure, config.in: Rebuild.
13785 * configure.ac: Use GDB_AC_COMMON.
13786
13787 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13788
13789 * linux-s390-low.c (HWCAP_S390_TE): New define.
13790 (s390_arch_setup): Consider the TE field in the HWCAP for
13791 determining 'have_regset_tdb'.
13792
13793 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13794
13795 PR gdb/16014
13796 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13797 call to sizeof.
13798
13799 2013-10-02 Pedro Alves <palves@redhat.com>
13800
13801 * server.c (process_serial_event): Don't output "GDBserver
13802 exiting" if GDB is connected through stdio.
13803 * target.c (mywait): Likewise, be silent if GDB is connected
13804 through stdio.
13805
13806 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13807
13808 * lynx-low.c (lynx_add_threads_after_attach): New function.
13809 (lynx_attach): Remove call to add_thread. Add call to
13810 lynx_add_threads_after_attach instead.
13811
13812 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13813
13814 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13815 * config.in, configure: Regenerated.
13816
13817 2013-09-18 Yao Qi <yao@codesourcery.com>
13818
13819 PR server/15959
13820 * server.c (start_inferior): Clear 'resume_info'.
13821
13822 2013-09-16 Jiong Wang <jiwang@tilera.com>
13823
13824 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13825 for each register.
13826
13827 2013-09-16 Jiong Wang <jiwang@tilera.com>
13828
13829 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13830 linux-tile-low.o to srv_tgtobj.
13831
13832 2013-09-16 Will Newton <will.newton@linaro.org>
13833
13834 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13835 out regs.
13836
13837 2013-09-06 Pedro Alves <palves@redhat.com>
13838
13839 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13840 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13841 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13842 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13843 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13844 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13845
13846 2013-09-06 Pedro Alves <palves@redhat.com>
13847
13848 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13849 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13850
13851 2013-09-06 Pedro Alves <palves@redhat.com>
13852
13853 * linux-amd64-ipa.c: Include tracepoint.h.
13854 * linux-i386-ipa.c: Include tracepoint.h.
13855
13856 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13857
13858 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13859 (ps_get_thread_area): New function.
13860
13861 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13862
13863 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13864 (initialize_low_arch): Call init_registers_crisv32 rather than
13865 init_register_crisv32.
13866
13867 2013-09-05 Pedro Alves <palves@redhat.com>
13868
13869 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13870 to ...
13871 * hostio.h: ... this new file.
13872 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13873 win32-low.c: Include hostio.h.
13874
13875 2013-09-05 Pedro Alves <palves@redhat.com>
13876
13877 * server.h (gdb_client_data, handler_func, callback_handler_func)
13878 (delete_file_handler, add_file_handler, append_callback_event)
13879 (delete_callback_event, start_event_loop, initialize_event_loop):
13880 Move to event-loop.h and include it.
13881 * event-loop.h: New file.
13882
13883 2013-09-05 Pedro Alves <palves@redhat.com>
13884
13885 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13886 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13887 (loaded_dll, unloaded_dll): Move to ...
13888 * dll.h: ... this new file.
13889 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13890
13891 2013-09-05 Pedro Alves <palves@redhat.com>
13892
13893 * server.h (current_process, get_thread_process, all_processes)
13894 (add_inferior_to_list, for_each_inferior, current_inferior)
13895 (remove_inferior, add_process, remove_process, find_process_pid)
13896 (have_started_inferiors_p, have_attached_inferiors_p)
13897 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13898 (clear_inferiors, find_inferior, find_inferior_id)
13899 (inferior_target_data, set_inferior_target_data)
13900 (inferior_regcache_data, set_inferior_regcache_data): Move to
13901 inferiors.h, and include it.
13902 * inferiors.h: New file.
13903
13904 2013-09-05 Pedro Alves <palves@redhat.com>
13905
13906 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13907 Move ...
13908 * ax.h: ... here.
13909
13910 2013-09-05 Pedro Alves <palves@redhat.com>
13911
13912 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13913 tracepoint.h.
13914 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13915 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13916 (handle_tracepoint_general_set, handle_tracepoint_query)
13917 (tracepoint_finished_step, tracepoint_was_hit)
13918 (release_while_stepping_state_list, current_traceframe)
13919 (in_readonly_region, traceframe_read_mem)
13920 (fetch_traceframe_registers, traceframe_read_sdata)
13921 (traceframe_read_info, struct fast_tpoint_collect_status)
13922 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13923 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13924 (supply_fast_tracepoint_registers)
13925 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13926 (ipa_tdesc, claim_trampoline_space)
13927 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13928 (agent_mem_read, agent_get_trace_state_variable_value)
13929 (agent_set_trace_state_variable_value, agent_tsv_read)
13930 (agent_mem_read_string, get_raw_reg_func_addr)
13931 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13932 * tracepoint.h: ... this new file.
13933
13934 2013-09-05 Pedro Alves <palves@redhat.com>
13935
13936 * server.h (perror_with_name, error, fatal, warning, paddress)
13937 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13938 include it.
13939 * utils.h: New file.
13940
13941 2013-09-05 Pedro Alves <palves@redhat.com>
13942
13943 * server.h (remote_debug, noack_mode, transport_is_reliable)
13944 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13945 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13946 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13947 (write_enn, initialize_async_io, enable_async_io)
13948 (disable_async_io, check_remote_input_interrupt_request)
13949 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13950 (dead_thread_notify, prepare_resume_reply)
13951 (decode_address_to_semicolon, decode_address, decode_m_packet)
13952 (decode_M_packet, decode_X_packet, decode_xfer_write)
13953 (decode_search_memory_packet, unhexify, hexify)
13954 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13955 (look_up_one_symbol, relocate_instruction)
13956 (monitor_output): Move to remote-utils.h, and include it.
13957 * remote-utils.h: New file.
13958
13959 2013-09-05 Pedro Alves <palves@redhat.com>
13960
13961 * server.h (_): Delete.
13962
13963 2013-09-02 Pedro Alves <palves@redhat.com>
13964
13965 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13966 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13967 allocated.
13968 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13969
13970 2013-09-02 Pierre Muller <muller@sourceware.org>
13971
13972 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13973 or WriteProcessMemory complete successfully and handle
13974 ERROR_PARTIAL_COPY error.
13975
13976 2013-09-02 Pedro Alves <palves@redhat.com>
13977
13978 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13979 error instead of EIO.
13980
13981 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13982
13983 PR server/15604
13984 * linux-low.c: Include filestuff.h.
13985 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13986 * lynx-low.c: Include filestuff.h.
13987 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13988 * server.c: Include filestuff.h.
13989 (main): Call notice_open_fds.
13990 * spu-low.c: Include filestuff.h.
13991 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13992
13993 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13994
13995 * Makefile.in: Explain why ../target and ../nat are not
13996 listed as include file search paths.
13997 (linux-waitpid.o): New object file rule.
13998 * configure.srv (srv_native_linux_obj): New variable.
13999 Replace all occurrences of linux native object files with
14000 $srv_native_linux_obj.
14001 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
14002 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
14003 (linux_enable_event_reporting): Remove declaration.
14004 (my_waitpid): Moved to common/linux-waitpid.c.
14005 (linux_wait_for_event): Pass ptid when calling
14006 linux_enable_event_reporting.
14007 (linux_supports_tracefork_flag): Remove.
14008 (linux_enable_event_reporting): Likewise.
14009 (linux_tracefork_grandchild): Remove.
14010 (STACK_SIZE): Moved to common/linux-ptrace.c.
14011 (linux_tracefork_child): Remove.
14012 (linux_test_for_tracefork): Remove.
14013 (linux_look_up_symbols): Call linux_supports_traceclone.
14014 (initialize_low): Remove call to linux_test_for_tracefork.
14015 * linux-low.h (PTRACE_TYPE_ARG3): Move to
14016 common/linux-ptrace.h.
14017 (PTRACE_TYPE_ARG4): Likewise.
14018 Include linux-ptrace.h.
14019
14020 2013-08-21 Pedro Alves <palves@redhat.com>
14021
14022 * config.in: Renegerate.
14023
14024 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
14025
14026 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
14027 (SFILES): Remove $(srcdir)/common/target-common.c and
14028 add $(srcdir)/target/waitstatus.c.
14029 (OBS): Remove target-common.o and add waitstatus.o.
14030 (server_h): Remove $(srcdir)/../common/target-common.h and
14031 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
14032 and $(srcdir)/../target/waitstatus.h.
14033 (target-common.o): Remove.
14034 (waitstatus.o): New target object file.
14035 * target.h: Do not include target-common.h and
14036 include target/resume.h, target/wait.h and
14037 target/waitstatus.h.
14038
14039 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
14040
14041 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14042 to PTRACE_TYPE_ARG3.
14043 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14044 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
14045 PTRACE_TYPE_ARG4.
14046 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
14047 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
14048
14049 2013-07-27 Jie Zhang <jie@codesourcery.com>
14050 Daniel Jacobowitz <dan@codesourcery.com>
14051 Yao Qi <yao@codesourcery.com>
14052
14053 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
14054 (mips-linux-watch.o): New rule.
14055 (mips_linux_watch_h): New variable.
14056 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
14057 srv_tgtobj.
14058 * linux-mips-low.c: Include mips-linux-watch.h.
14059 (struct arch_process_info, struct arch_lwp_info): New.
14060 (update_watch_registers_callback): New function.
14061 (mips_linux_new_process, mips_linux_new_thread) New functions.
14062 (mips_linux_prepare_to_resume, mips_insert_point): New
14063 functions.
14064 (mips_remove_point, mips_stopped_by_watchpoint): New
14065 functions.
14066 (rsp_bp_type_to_target_hw_bp_type): New function.
14067 (mips_stopped_data_address): New function.
14068 (the_low_target): Add watchpoint support functions.
14069
14070 2013-07-27 Yao Qi <yao@codesourcery.com>
14071
14072 * i386-low.c: Include break-common.h.
14073 (enum target_hw_bp_type): Remove.
14074
14075 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
14076
14077 * Makefile.in (SFILES): /common/target-common.c.
14078 (OBS): Add target-common.o.
14079 (server_h): Add $(srcdir)/../common/target-common.h.
14080 (target-common.o): New target.
14081 * server.c (queue_stop_reply_callback): Free
14082 status string after use.
14083 * target.c (target_waitstatus_to_string): Remove.
14084 * target.h: Include target-common.h.
14085 (resume_kind): Likewise.
14086 (target_waitkind): Likewise.
14087 (target_waitstatus): Likewise.
14088 (TARGET_WNOHANG): Likewise.
14089
14090 2013-07-04 Yao Qi <yao@codesourcery.com>
14091
14092 * Makefile.in (host_alias): Use @host_noncanonical@.
14093 (target_alias): Use @target_noncanonical@.
14094 * configure.ac: Use ACX_NONCANONICAL_TARGET and
14095 ACX_NONCANONICAL_HOST.
14096 * configure: Regenerated.
14097
14098 Revert:
14099 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14100
14101 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14102 * configure: Rebuild.
14103 * Makefile.in (version_host, version_target): Get from configure.
14104 (version.c): Use $(version_host) and $(version_target).
14105
14106 2013-07-03 Pedro Alves <palves@redhat.com>
14107
14108 * Makefile.in (config.status): Depend on development.sh.
14109 * acinclude.m4: Include libmcheck.m4.
14110 * configure: Regenerate.
14111
14112 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14113
14114 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
14115 attribute inside the parentheses.
14116 (winapi_DebugSetProcessKillOnExit): Ditto.
14117 (winapi_DebugBreakProcess): Ditto.
14118 (winapi_GenerateConsoleCtrlEvent): Ditto.
14119
14120 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14121
14122 * notif.h (notif_event): Add a dummy member to avoid compiler
14123 errors.
14124
14125 2013-07-01 Pedro Alves <palves@redhat.com>
14126
14127 * hostio.c (HOSTIO_PATH_MAX): Define.
14128 (require_filename, handle_open, handle_unlink, handle_readlink):
14129 Use it.
14130
14131 2013-07-01 Pedro Alves <palves@redhat.com>
14132
14133 * server.h: Include "pathmax.h".
14134 * linux-low.c: Don't include sys/param.h.
14135 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14136 MAXPATHLEN.
14137 * win32-low.c: Don't include sys/param.h.
14138 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14139
14140 2013-07-01 Pedro Alves <palves@redhat.com>
14141
14142 * event-loop.c: Don't check HAVE_UNISTD_H before including
14143 <unistd.h>.
14144 * gdbreplay.c: Likewise.
14145 * remote-utils.c: Likewise.
14146 * server.c: Likewise.
14147 * configure.ac: Don't check for unistd.h.
14148 * configure: Regenerate.
14149
14150 2013-06-28 Tom Tromey <tromey@redhat.com>
14151
14152 * Makefile.in (version.c): Use version.in, not
14153 common/version.in.
14154
14155 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14156
14157 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14158 * configure: Rebuild.
14159 * Makefile.in (version_host, version_target): Get from configure.
14160 (version.c): Use $(version_host) and $(version_target).
14161
14162 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14163
14164 Fix trace-status to output user name without trailing colon.
14165 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14166
14167 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14168
14169 Fix trace-status to output proper start-time and stop-time.
14170 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14171 output start time and stop time in hex as gdb expects.
14172
14173 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14174
14175 * tracepoint.c (build_traceframe_info_xml): Output trace state
14176 variables present in the trace buffer.
14177
14178 2013-06-24 Tom Tromey <tromey@redhat.com>
14179
14180 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14181 create-version.sh.
14182 (version.o): Remove.
14183 * gdbreplay.c: Include version.h.
14184 (version, host_name): Don't declare.
14185 * server.h: Include version.h.
14186 (version, host_name): Don't declare.
14187
14188 2013-06-12 Pedro Alves <palves@redhat.com>
14189
14190 * linux-x86-low.c (linux_is_elf64): Delete global.
14191 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14192 with local linux_pid_exe_is_elf_64_file use.
14193
14194 2013-06-11 Pedro Alves <palves@redhat.com>
14195
14196 * linux-low.c (regset_disabled, disable_regset): New functions.
14197 (regsets_fetch_inferior_registers)
14198 (regsets_store_inferior_registers): Use them.
14199 (initialize_regsets_info); Don't allocate the disabled_regsets
14200 array here.
14201 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14202 comment.
14203
14204 2013-06-11 Pedro Alves <palves@redhat.com>
14205
14206 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14207 xmalloc.
14208
14209 2013-06-11 Pedro Alves <palves@redhat.com>
14210
14211 * linux-x86-low.c (initialize_low_arch): Call
14212 init_registers_x32_avx_linux.
14213
14214 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14215
14216 Fix compatibility with Android Bionic.
14217 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14218 it is not empty.
14219
14220 2013-06-07 Pedro Alves <palves@redhat.com>
14221
14222 PR server/14823
14223 * Makefile.in (OBS): Add tdesc.o.
14224 (IPA_OBJS): Add tdesc-ipa.o.
14225 (tdesc-ipa.o): New rule.
14226 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14227 interface.
14228 * linux-low.c (new_inferior): Delete.
14229 (disabled_regsets, num_regsets): Delete.
14230 (linux_add_process): Adjust to set the new per-process
14231 new_inferior flag.
14232 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14233 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14234 was a stop. When calling arch_setup, switch the current inferior
14235 to the thread that got an event.
14236 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14237 (regsets_fetch_inferior_registers)
14238 (regsets_store_inferior_registers): New regsets_info parameter.
14239 Adjust to use it.
14240 (linux_register_in_regsets): New regs_info parameter. Adjust to
14241 use it.
14242 (register_addr, fetch_register, store_register): New usrregs_info
14243 parameter. Adjust to use it.
14244 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14245 parameter regs_info. Adjust to use it.
14246 (linux_fetch_registers): Get the current inferior's regs_info, and
14247 adjust to use it.
14248 (linux_store_registers): Ditto.
14249 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14250 (initialize_low): Don't initialize the target_regsets here. Call
14251 initialize_low_arch.
14252 * linux-low.h (target_regsets): Delete declaration.
14253 (struct regsets_info): New.
14254 (struct usrregs_info): New.
14255 (struct regs_info): New.
14256 (struct process_info_private) <new_inferior>: New field.
14257 (struct linux_target_ops): Delete the num_regs, regmap, and
14258 regset_bitmap fields. New field regs_info.
14259 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14260 * i387-fp.c (num_xmm_registers): Delete.
14261 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14262 calls to new interface.
14263 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14264 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14265 Infer the number of xmm registers from the regcache's target
14266 description.
14267 * i387-fp.h (num_xmm_registers): Delete.
14268 * inferiors.c (add_thread): Don't install the thread's regcache
14269 here.
14270 * proc-service.c (gregset_info): Fetch the current inferior's
14271 regs_info. Adjust to use it.
14272 * regcache.c: Include tdesc.h.
14273 (register_bytes, reg_defs, num_registers)
14274 (gdbserver_expedite_regs): Delete.
14275 (get_thread_regcache): If the thread doesn't have a regcache yet,
14276 create one, instead of aborting gdbserver.
14277 (regcache_invalidate_one): Rename to ...
14278 (regcache_invalidate_thread): ... this.
14279 (regcache_invalidate_one): New.
14280 (regcache_invalidate): Only invalidate registers of the current
14281 process.
14282 (init_register_cache): Add target_desc parameter, and use it.
14283 (new_register_cache): Ditto. Assert the target description has a
14284 non zero registers_size.
14285 (regcache_cpy): Add assertions. Adjust.
14286 (realloc_register_cache, set_register_cache): Delete.
14287 (registers_to_string, registers_from_string): Adjust.
14288 (find_register_by_name, find_regno, find_register_by_number)
14289 (register_cache_size): Add target_desc parameter, and use it.
14290 (free_register_cache_thread, free_register_cache_thread_one)
14291 (regcache_release, register_cache_size): New.
14292 (register_size): Add target_desc parameter, and use it.
14293 (register_data, supply_register, supply_register_zeroed)
14294 (supply_regblock, supply_register_by_name, collect_register)
14295 (collect_register_as_string, collect_register_by_name): Adjust.
14296 * regcache.h (struct target_desc): Forward declare.
14297 (struct regcache) <tdesc>: New field.
14298 (init_register_cache, new_register_cache): Add target_desc
14299 parameter.
14300 (regcache_invalidate_thread): Declare.
14301 (regcache_invalidate_one): Delete declaration.
14302 (regcache_release): Declare.
14303 (find_register_by_number, register_cache_size, register_size)
14304 (find_regno): Add target_desc parameter.
14305 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14306 declarations.
14307 * remote-utils.c: Include tdesc.h.
14308 (outreg, prepare_resume_reply): Adjust.
14309 * server.c: Include tdesc.h.
14310 (gdbserver_xmltarget): Delete declaration.
14311 (get_features_xml, process_serial_event): Adjust.
14312 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14313 declare.
14314 (struct process_info) <tdesc>: New field.
14315 (ipa_tdesc): Declare.
14316 * tdesc.c: New file.
14317 * tdesc.h: New file.
14318 * tracepoint.c: Include tdesc.h.
14319 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14320 (get_context_regcache): Adjust to pass ipa_tdesc down.
14321 (do_action_at_tracepoint): Adjust to get the register cache size
14322 from the context regcache's description.
14323 (traceframe_walk_blocks): Adjust to get the register cache size
14324 from the current trace frame's description.
14325 (traceframe_get_pc): Adjust to get current trace frame's
14326 description and pass it down.
14327 (gdb_collect): Adjust to get the register cache size from the
14328 IPA's description.
14329 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14330 (gdbserver_xmltarget): Delete.
14331 (initialize_low_tracepoint): Set the ipa's target description.
14332 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14333 (initialize_low_tracepoint): Set the ipa's target description.
14334 * linux-x86-low.c: Include tdesc.h.
14335 [__x86_64__] (is_64bit_tdesc): New.
14336 (ps_get_thread_area, x86_get_thread_area): Use it.
14337 (i386_cannot_store_register): Rename to ...
14338 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14339 (i386_cannot_fetch_register): Rename to ...
14340 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14341 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14342 to new interface.
14343 (target_regsets): Rename to ...
14344 (x86_regsets): ... this.
14345 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14346 interface.
14347 (x86_siginfo_fixup): Use is_64bit_tdesc.
14348 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14349 (tdesc_x32_avx_linux, tdesc_x32_linux)
14350 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14351 Declare.
14352 (x86_linux_update_xmltarget): Delete.
14353 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14354 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14355 (AMD64_LINUX_USER64_CS): New.
14356 (x86_linux_read_description): New, based on
14357 x86_linux_update_xmltarget.
14358 (same_process_callback): New.
14359 (x86_arch_setup_process_callback): New.
14360 (x86_linux_update_xmltarget): New.
14361 (x86_regsets_info): New.
14362 (amd64_linux_regs_info): New.
14363 (i386_linux_usrregs_info): New.
14364 (i386_linux_regs_info): New.
14365 (x86_linux_regs_info): New.
14366 (x86_arch_setup): Reimplement.
14367 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14368 (x86_emit_ops): Ditto.
14369 (the_low_target): Adjust. Install x86_linux_regs_info,
14370 x86_cannot_fetch_register, and x86_cannot_store_register.
14371 (initialize_low_arch): New.
14372 * linux-ia64-low.c (tdesc_ia64): Declare.
14373 (ia64_fetch_register): Adjust.
14374 (ia64_usrregs_info, regs_info): New globals.
14375 (ia64_regs_info): New function.
14376 (the_low_target): Adjust.
14377 (initialize_low_arch): New function.
14378 * linux-sparc-low.c (tdesc_sparc64): Declare.
14379 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14380 Adjust.
14381 (sparc_arch_setup): New function.
14382 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14383 (the_low_target): Adjust.
14384 (initialize_low_arch): New function.
14385 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14386 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14387 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14388 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14389 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14390 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14391 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14392 (tdesc_powerpc_isa205_vsx64l): Declare.
14393 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14394 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14395 (ppc_set_pc, ppc_get_hwcap): Adjust.
14396 (ppc_usrregs_info): Forward declare.
14397 (!__powerpc64__) ppc_regmap_adjusted: New global.
14398 (ppc_arch_setup): Adjust to the current process'es target
14399 description.
14400 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14401 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14402 (ppc_store_evrregset): Adjust.
14403 (target_regsets): Rename to ...
14404 (ppc_regsets): ... this, and make static.
14405 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14406 (ppc_regs_info): New function.
14407 (the_low_target): Adjust.
14408 (initialize_low_arch): New function.
14409 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14410 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14411 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14412 (tdesc_s390x_linux64v2): Declare.
14413 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14414 (s390_fill_gregset, s390_store_last_break): Adjust.
14415 (target_regsets): Rename to ...
14416 (s390_regsets): ... this, and make static.
14417 (s390_get_pc, s390_set_pc): Adjust.
14418 (s390_get_hwcap): New target_desc parameter, and use it.
14419 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14420 (s390_arch_setup): Adjust to set the current process'es target
14421 description. Don't adjust the regmap.
14422 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14423 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14424 (regs_info_3264): New globals.
14425 (s390_regs_info): New function.
14426 (the_low_target): Adjust.
14427 (initialize_low_arch): New function.
14428 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14429 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14430 [__mips64] (init_registers_mips_linux)
14431 (init_registers_mips_dsp_linux): Delete defines.
14432 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14433 (have_dsp): New global.
14434 (mips_read_description): New, based on mips_arch_setup.
14435 (mips_arch_setup): Reimplement.
14436 (get_usrregs_info): New function.
14437 (mips_cannot_fetch_register, mips_cannot_store_register)
14438 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14439 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14440 (target_regsets): Rename to ...
14441 (mips_regsets): ... this, and make static.
14442 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14443 (dsp_regs_info, regs_info): New globals.
14444 (mips_regs_info): New function.
14445 (the_low_target): Adjust.
14446 (initialize_low_arch): New function.
14447 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14448 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14449 Declare.
14450 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14451 (arm_read_description): New, with bits factored from
14452 arm_arch_setup.
14453 (arm_arch_setup): Reimplement.
14454 (target_regsets): Rename to ...
14455 (arm_regsets): ... this, and make static.
14456 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14457 (arm_regs_info): New function.
14458 (the_low_target): Adjust.
14459 (initialize_low_arch): New function.
14460 * linux-m68k-low.c (tdesc_m68k): Declare.
14461 (target_regsets): Rename to ...
14462 (m68k_regsets): ... this, and make static.
14463 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14464 (m68k_regs_info): New function.
14465 (m68k_arch_setup): New function.
14466 (the_low_target): Adjust.
14467 (initialize_low_arch): New function.
14468 * linux-sh-low.c (tdesc_sharch): Declare.
14469 (target_regsets): Rename to ...
14470 (sh_regsets): ... this, and make static.
14471 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14472 (sh_regs_info, sh_arch_setup): New functions.
14473 (the_low_target): Adjust.
14474 (initialize_low_arch): New function.
14475 * linux-bfin-low.c (tdesc_bfin): Declare.
14476 (bfin_arch_setup): New function.
14477 (bfin_usrregs_info, regs_info): New globals.
14478 (bfin_regs_info): New function.
14479 (the_low_target): Adjust.
14480 (initialize_low_arch): New function.
14481 * linux-cris-low.c (tdesc_cris): Declare.
14482 (cris_arch_setup): New function.
14483 (cris_usrregs_info, regs_info): New globals.
14484 (cris_regs_info): New function.
14485 (the_low_target): Adjust.
14486 (initialize_low_arch): New function.
14487 * linux-cris-low.c (tdesc_crisv32): Declare.
14488 (cris_arch_setup): New function.
14489 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14490 (cris_regs_info): New function.
14491 (the_low_target): Adjust.
14492 (initialize_low_arch): New function.
14493 * linux-m32r-low.c (tdesc_m32r): Declare.
14494 (m32r_arch_setup): New function.
14495 (m32r_usrregs_info, regs_info): New globals.
14496 (m32r_regs_info): Adjust.
14497 (initialize_low_arch): New function.
14498 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14499 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14500 (tic6x_usrregs_info): Forward declare.
14501 (tic6x_read_description): New function, based on ...
14502 (tic6x_arch_setup): ... this. Reimplement.
14503 (target_regsets): Rename to ...
14504 (tic6x_regsets): ... this, and make static.
14505 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14506 (tic6x_regs_info): New function.
14507 (the_low_target): Adjust.
14508 (initialize_low_arch): New function.
14509 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14510 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14511 (target_regsets): Rename to ...
14512 (xtensa_regsets): ... this, and make static.
14513 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14514 globals.
14515 (xtensa_arch_setup, xtensa_regs_info): New functions.
14516 (the_low_target): Adjust.
14517 (initialize_low_arch): New function.
14518 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14519 (nios2_arch_setup): Set the current process'es tdesc.
14520 (target_regsets): Rename to ...
14521 (nios2_regsets): ... this.
14522 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14523 (nios2_regs_info): New function.
14524 (the_low_target): Adjust.
14525 (initialize_low_arch): New function.
14526 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14527 (aarch64_arch_setup): Set the current process'es tdesc.
14528 (target_regsets): Rename to ...
14529 (aarch64_regsets): ... this.
14530 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14531 (aarch64_regs_info): New function.
14532 (the_low_target): Adjust.
14533 (initialize_low_arch): New function.
14534 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14535 globals.
14536 (target_regsets): Rename to ...
14537 (tile_regsets): ... this.
14538 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14539 (tile_regs_info): New function.
14540 (tile_arch_setup): Set the current process'es tdesc.
14541 (the_low_target): Adjust.
14542 (initialize_low_arch): New function.
14543 * spu-low.c (tdesc_spu): Declare.
14544 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14545 * win32-arm-low.c (tdesc_arm): Declare.
14546 (arm_arch_setup): New function.
14547 (the_low_target): Install arm_arch_setup instead of
14548 init_registers_arm.
14549 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14550 (init_windows_x86): Rename to ...
14551 (i386_arch_setup): ... this. Set `win32_tdesc'.
14552 (the_low_target): Adjust.
14553 * win32-low.c (win32_tdesc): New global.
14554 (child_add_thread): Don't create the thread cache here.
14555 (do_initial_child_stuff): Set the new process'es tdesc.
14556 * win32-low.h (struct target_desc): Forward declare.
14557 (win32_tdesc): Declare.
14558 * lynx-i386-low.c (tdesc_i386): Declare global.
14559 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14560 * lynx-low.c (lynx_tdesc): New global.
14561 (lynx_add_process): Set the new process'es tdesc.
14562 * lynx-low.h (struct target_desc): Forward declare.
14563 (lynx_tdesc): Declare global.
14564 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14565 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14566 * nto-low.c (nto_tdesc): New global.
14567 (do_attach): Set the new process'es tdesc.
14568 * nto-low.h (struct target_desc): Forward declare.
14569 (nto_tdesc): Declare.
14570 * nto-x86-low.c (tdesc_i386): Declare.
14571 (nto_x86_arch_setup): Set `nto_tdesc'.
14572
14573 2013-06-04 Gary Benson <gbenson@redhat.com>
14574
14575 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14576 to qSupported response when appropriate.
14577 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14578 with nonzero-length annex.
14579 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14580 arguments supplied in annex.
14581
14582 2013-05-31 Doug Evans <dje@google.com>
14583
14584 PR server/15594
14585 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14586 64 bits in 64-cross-32 environment.
14587
14588 2013-05-28 Pedro Alves <palves@redhat.com>
14589
14590 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14591 (aarch64-without-fpu.c): Delete rule.
14592 * configure.srv (aarch64*-*-linux*): Remove references to
14593 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14594 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14595 declaration.
14596
14597 2013-05-24 Pedro Alves <palves@redhat.com>
14598
14599 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14600 instead of strchr/decode_address. Error if the range isn't split
14601 with a ','. Don't assume there's be a ':' in the action.
14602
14603 2013-05-23 Yao Qi <yao@codesourcery.com>
14604 Pedro Alves <palves@redhat.com>
14605
14606 * linux-low.c (lwp_in_step_range): New function.
14607 (linux_wait_1): If the thread was range stepping and stopped
14608 outside the stepping range, report the stop to GDB. Otherwise,
14609 continue stepping. Add range stepping debug output.
14610 (linux_set_resume_request): Copy the step range from the resume
14611 request to the lwp.
14612 (linux_supports_range_stepping): New.
14613 (linux_target_ops) <supports_range_stepping>: Set to
14614 linux_supports_range_stepping.
14615 * linux-low.h (struct linux_target_ops)
14616 <supports_range_stepping>: New field.
14617 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14618 * linux-x86-low.c (x86_supports_range_stepping): New.
14619 (the_low_target) <supports_range_stepping>: Set to
14620 x86_supports_range_stepping.
14621 * server.c (handle_v_cont): Handle 'r' action.
14622 (handle_v_requests): Append ";r" if the target supports range
14623 stepping.
14624 * target.h (struct thread_resume) <step_range_start,
14625 step_range_end>: New fields.
14626 (struct target_ops) <supports_range_stepping>:
14627 New field.
14628 (target_supports_range_stepping): New macro.
14629
14630 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14631
14632 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14633 confusion in comment.
14634
14635 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14636
14637 * lynx-low.c (struct process_info_private): New type.
14638 (lynx_add_process): New function.
14639 (lynx_create_inferior, lynx_attach): Replace calls to
14640 add_process by calls to lynx_add_process.
14641 (lynx_resume): If PTID is null, then try using
14642 current_process()->private->last_wait_event_ptid.
14643 Add comments.
14644 (lynx_clear_inferiors): Delete. The contents of that function
14645 has been inlined in lynx_mourn;
14646 (lynx_wait_1): Save the ptid in the process's private data.
14647 (lynx_mourn): Free the process' private data. Replace call
14648 to lynx_clear_inferiors by call to clear_inferiors.
14649
14650 2013-05-17 Yao Qi <yao@codesourcery.com>
14651
14652 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14653 the right place.
14654
14655 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14656
14657 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14658 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14659 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14660 PT_TEXT_END_ADDR guards. Update comments.
14661 (linux_target_op) <read_offsets>: Conditionally define to
14662 linux_read_offsets if the target is UCLIBC and if it defines
14663 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14664
14665 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14666 Andrew Jenner <andrew@codesourcery.com>
14667
14668 * Makefile.in (SFILES): Add linux-nios2-low.c.
14669 (clean): Add action to delete nios2-linux.c.
14670 (nios2-linux.c): New rule.
14671 * configure.srv: Add nios2*-*-linux*.
14672 * linux-nios2-low.c: New.
14673
14674 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14675
14676 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14677
14678 2013-04-25 Hui Zhu <hui@codesourcery.com>
14679
14680 PR gdb/15186
14681 * ax.c (ax_printf): Add fflush.
14682
14683 2013-04-22 Tom Tromey <tromey@redhat.com>
14684
14685 * Makefile.in (SFILES): Add filestuff.c.
14686 (OBS): Add filestuff.o.
14687 (filestuff.o): New target.
14688 * config.in, configure: Rebuild.
14689 * configure.ac: Check for fdwalk, pipe2.
14690
14691 2013-04-17 Pedro Alves <palves@redhat.com>
14692
14693 * configure.ac (USE_THREAD_DB): Delete variable.
14694 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14695 Don't AC_SUBST USE_THREAD_DB.
14696 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14697 * config.in, configure: Regenerate.
14698
14699 2013-04-16 Pedro Alves <palves@redhat.com>
14700
14701 * linux-low.h (struct lwp_info) <thread_known>: Move under
14702 the USE_THREAD_DB #ifdef.
14703
14704 2013-04-16 Pedro Alves <palves@redhat.com>
14705
14706 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14707 (linux-low.o): Delete rule.
14708 * linux-low.h: Always include "gdb_thread_db.h" instead of
14709 conditionally including thread_db.h.
14710 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14711 HAVE_THREAD_DB_H.
14712
14713 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14714
14715 * Makefile.in (install-only): Fix make install regression.
14716
14717 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14718
14719 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14720 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14721 installation.
14722 * gdbserver.1: Remove.
14723
14724 2013-03-22 Pedro Alves <palves@redhat.com>
14725
14726 * linux-low.c (handle_extended_wait): Don't call
14727 linux_enable_event_reporting.
14728
14729 2013-03-15 Tony Theodore <tonyt@logyst.com>
14730
14731 PR build/9098:
14732 * Makefile.in (SHELL): Use @SHELL@.
14733
14734 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14735
14736 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14737 compiler warning.
14738
14739 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14740
14741 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14742 Remove extraneous NULL element.
14743
14744 2013-03-13 Yao Qi <yao@codesourcery.com>
14745
14746 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14747 'V' block in trace frame.
14748
14749 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14750
14751 * target.h (struct target_ops): Add btrace ops.
14752 (target_supports_btrace): New macro.
14753 (target_enable_btrace): New macro.
14754 (target_disable_btrace): New macro.
14755 (target_read_btrace): New macro.
14756 * gdbthread.h (struct thread_info): Add btrace field.
14757 * server.c: Include btrace-common.h.
14758 (handle_btrace_general_set): New function.
14759 (handle_btrace_enable): New function.
14760 (handle_btrace_disable): New function.
14761 (handle_general_set): Call handle_btrace_general_set.
14762 (handle_qxfer_btrace): New function.
14763 (struct qxfer qxfer_packets[]): Add btrace entry.
14764 * inferiors.c (remove_thread): Disable btrace.
14765 * linux-low: Include linux-btrace.h.
14766 (linux_low_enable_btrace): New function.
14767 (linux_low_read_btrace): New function.
14768 (linux_target_ops): Add btrace ops.
14769 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14770 Add srv_linux_btrace=yes.
14771 (x86_64-*-linux*): Add linux-btrace.o.
14772 Add srv_linux_btrace=yes.
14773 * configure.ac: Define HAVE_LINUX_BTRACE.
14774 * config.in: Regenerated.
14775 * configure: Regenerated.
14776
14777 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14778
14779 * server.c (handle_qxfer): Preserve error message if -3 is
14780 returned.
14781 (qxfer): Document the -3 return value.
14782
14783 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14784
14785 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14786 (linux_btrace_h): New variable.
14787 (linux-btrace.o): New rule.
14788
14789 2013-03-08 Stan Shebs <stan@codesourcery.com>
14790 Hafiz Abid Qadeer <abidh@codesourcery.com>
14791
14792 * tracepoint.c (trace_buffer_size): New global.
14793 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14794 (init_trace_buffer): Change to one-argument function. Allocate
14795 trace buffer memory.
14796 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14797 handle QTBuffer:size packet.
14798 (cmd_bigqtbuffer_size): New function.
14799 (initialize_tracepoint): Call init_trace_buffer with
14800 DEFAULT_TRACE_BUFFER_SIZE.
14801 * server.c (handle_query): Add QTBuffer:size in the
14802 supported packets.
14803
14804 2013-03-07 Yao Qi <yao@codesourcery.com>
14805
14806 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14807 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14808 of -1.
14809 (cmd_qtsp): Adjust condition. Do post increment.
14810 Set cur_action and cur_step_action back to 0.
14811
14812 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14813
14814 PR server/15236
14815 * linux-low.c (linux_write_memory): Return early success if LEN is
14816 zero.
14817
14818 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14819
14820 * configure.srv: Add x86_64-*-cygwin* as target.
14821
14822 2013-02-28 Tom Tromey <tromey@redhat.com>
14823
14824 * configure.ac: Invoke AC_SYS_LARGEFILE.
14825 * configure, config.in: Rebuild.
14826
14827 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14828
14829 * win32-low.c: Throughout, fix format strings and casts of
14830 printf-like functions to avoid type related warnings on all
14831 platforms.
14832 (get_child_debug_event): Print dwDebugEventCode as hex since
14833 that's how it's usually documented.
14834
14835 2013-02-28 Yao Qi <yao@codesourcery.com>
14836
14837 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14838 pulongest.
14839
14840 2013-02-27 Jiong Wang <jiwang@tilera.com>
14841
14842 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14843 (reg-tilegx32.c): New rule.
14844 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14845 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14846 different register info initializer according to elf class.
14847 (init_registers_tilgx32): New function. The tilegx32 register info
14848 initializer.
14849 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14850 (tile_store_gregset): Likewise.
14851
14852 2013-02-27 Yao Qi <yao@codesourcery.com>
14853
14854 * server.c (process_point_options): Print debug message when
14855 debug_threads is true.
14856
14857 2013-02-26 Yao Qi <yao@codesourcery.com>
14858
14859 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14860
14861 2013-02-19 Pedro Alves <palves@redhat.com>
14862 Kai Tietz <ktietz@redhat.com>
14863
14864 PR gdb/15161
14865
14866 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14867 instead of strtoul to extract address from packet.
14868 (process_serial_event) <'z'>: Likewise.
14869
14870 2013-02-18 Yao Qi <yao@codesourcery.com>
14871
14872 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14873
14874 2013-02-14 Pedro Alves <palves@redhat.com>
14875
14876 Plug memory leak.
14877
14878 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14879 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14880
14881 2013-02-14 Pedro Alves <palves@redhat.com>
14882
14883 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14884
14885 2013-02-14 Pedro Alves <palves@redhat.com>
14886
14887 * tracepoint.c (save_string): Delete.
14888 (add_tracepoint_action): Use savestring instead of save_string.
14889
14890 2013-02-12 Pedro Alves <palves@redhat.com>
14891
14892 * linux-xtensa-low.c: Ditto.
14893 * xtensa-xtregs.c: Ditto.
14894
14895 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14896
14897 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14898 thread_db.
14899
14900 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14901
14902 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14903 aarch64_num_wp_regs and aarch64_num_bp_regs to
14904 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14905
14906 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14907
14908 * linux-aarch64-low.c (ps_get_thread_area): Replace
14909 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14910
14911 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14912 Marcus Shawcroft <marcus.shawcroft@arm.com>
14913 Nigel Stephens <nigel.stephens@arm.com>
14914 Yufeng Zhang <yufeng.zhang@arm.com>
14915
14916 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14917 (aarch64.c, aarch64-without-fpu.c): New targets.
14918 * configure.srv (aarch64*-*-linux*): New.
14919 * linux-aarch64-low.c: New file.
14920
14921 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14922
14923 * linux-low.c (handle_extended_wait, linux_create_inferior)
14924 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14925 (dequeue_one_deferred_signal, linux_resume_one_thread)
14926 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14927 (linux_tracefork_grandchild, linux_test_for_tracefork)
14928 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14929 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14930 where the argument is 0.
14931
14932 2013-01-25 Yao Qi <yao@codesourcery.com>
14933
14934 * event-loop.c: Include "queue.h".
14935 (gdb_event_p): New typedef.
14936 (struct gdb_event) <next_event>: Remove.
14937 (event_queue): Change to QUEUE(gdb_event_p).
14938 (async_queue_event): Remove.
14939 (gdb_event_xfree): New.
14940 (initialize_event_loop): New.
14941 (process_event): Use API from QUEUE.
14942 (wait_for_event): Likewise.
14943 * server.c (main): Call initialize_event_loop.
14944 * server.h (initialize_event_loop): Declare.
14945
14946 2013-01-18 Yao Qi <yao@codesourcery.com>
14947
14948 * ax.h (struct eval_agent_expr_context): New.
14949 (gdb_eval_agent_expr): Update declaration.
14950 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14951 TFRAME. Add new argument CTX.
14952 * server.h (struct eval_agent_expr_context): Declare.
14953 (agent_mem_read, agent_tsv_read): Update declaration.
14954 (agent_mem_read_string): Likewise.
14955 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14956 (add_traceframe_block): Add new argument TPOINT.
14957 Increase TPOINT->traceframe_usage.
14958 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14959 eval_tracepoint_agent_expr.
14960 (condition_true_at_tracepoint): Likewise.
14961 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14962 (agent_mem_read_string, agent_tsv_read): Likewise.
14963
14964 2013-01-16 Yao Qi <yao@codesourcery.com>
14965
14966 * linux-low.c (linux_resume_one_lwp): Don't check
14967 'lwp->bp_reinsert != 0'.
14968
14969 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14970 Pedro Alves <palves@redhat.com>
14971
14972 * lynx-low.c (ptrace_request_to_str): Define a temporary
14973 macro and use it to simplify this function's implementation.
14974
14975 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14976
14977 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14978 sets errno.
14979
14980 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14981
14982 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14983
14984 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14985
14986 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14987
14988 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14989
14990 * lynx-low.c (lynx_resume): Use the resume_info parameter
14991 to determine the ptid for the lynx_ptrace call, unless
14992 it is equal to minus_one_ptid, in which case we use the
14993 ptid of the current_inferior.
14994 (lynx_wait_1): After having received a thread create/exit
14995 event, resume the inferior's execution using the signaling
14996 thread's ptid, rather than the old ptid.
14997
14998 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14999
15000 * lynx-low.c (lynx_resume): Delete variable ret.
15001
15002 2013-01-01 Joel Brobecker <brobecker@adacore.com>
15003
15004 * gdbreplay.c (gdbreplay_version): Update copyright year.
15005 * server.c (gdbserver_version): Likewise.
15006
15007 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15008
15009 * lynx-low.c (lynx_wait_1): Add debug trace before adding
15010 new thread.
15011
15012 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15013
15014 * lynx-low.c (ptrace_request_to_str): Add handling for
15015 PTRACE_GETTRACESIG.
15016
15017 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15018
15019 * lynx-low.c (lynx_attach): Delete variable new_process.
15020
15021 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15022
15023 * lynx-low.c (lynx_create_inferior): Delete variable
15024 new_process.
15025
15026 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15027
15028 * lynx-low.c (ptrace_request_to_str): Do not handle
15029 PTRACE_GETTHREADLIST if this macro does not exist.
15030
15031 2012-12-15 Yao Qi <yao@codesourcery.com>
15032
15033 * Makefile.in (OBS): Add notif.o.
15034 * notif.c, notif.h: New.
15035 * server.c: Include "notif.h".
15036 (struct vstop_notif) <next>: Remove.
15037 <base>: New field.
15038 (queue_stop_reply): Update.
15039 (push_event, send_next_stop_reply): Remove.
15040 (discard_queued_stop_replies): Update.
15041 (notif_stop): New variable.
15042 (handle_v_stopped): Remove.
15043 (handle_v_requests): Don't call handle_v_stopped. Call
15044 handle_ack_notif instead.
15045 (queue_stop_reply_callback): Call notif_event_enque instead
15046 of queue_stop_reply.
15047 (handle_status): Don't call send_next_stop_reply, call
15048 notif_write_event instead.
15049 (kill_inferior_callback): Likewise.
15050 (detach_or_kill_inferior_callback): Likewise.
15051 (main): Call initialize_notif.
15052 (process_serial_event): Call QUEUE_is_empty.
15053 (handle_target_event): Call notif_push instead of push event.
15054 * server.h (push_event): Remove declaration.
15055
15056 2012-12-10 Tom Tromey <tromey@redhat.com>
15057
15058 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
15059 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
15060 macros.
15061 (.c.o): Rewrite.
15062 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
15063 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
15064 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
15065 (amd64-linux-ipa.o, ax.o): Rewrite.
15066 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
15067 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
15068 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
15069 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
15070 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
15071 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
15072 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
15073 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
15074 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
15075 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
15076 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
15077 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
15078 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
15079 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
15080 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
15081 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
15082 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
15083 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
15084 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
15085 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
15086 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
15087 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
15088 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
15089 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
15090 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
15091 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
15092 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
15093 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
15094 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
15095 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
15096 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
15097 (reg-tilegx.o): Remove.
15098 (all_object_files): New macro.
15099 Include .deps files.
15100 * aclocal.m4, configure: Rebuild.
15101 * acinclude.m4: Include depstand.m4, lead-dot.m4.
15102 * configure.ac: Invoke ZW_CREATE_DEPDIR,
15103 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
15104
15105 2012-12-05 Tom Tromey <tromey@redhat.com>
15106
15107 PR gdb/14917:
15108 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
15109
15110 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
15111
15112 * configure.ac: Check for linux/perf_event.h.
15113 * config.in: Regenerated.
15114 * configure: Regenerated.
15115
15116 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
15117
15118 * hostio.c (handle_readlink): Decrease buffer size
15119 parameter passed to readlink by one byte.
15120
15121 2012-11-26 Yao Qi <yao@codesourcery.com>
15122
15123 * configure.ac (build_warnings): Append '-Wempty-body'.
15124 * configure: Regenerated.
15125 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
15126 body.
15127
15128 2012-11-15 Pierre Muller <muller@sourceware.org>
15129
15130 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
15131 * config.in: Regenerate.
15132 * configure: Regenerate.
15133 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15134 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15135 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15136 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15137 header.
15138 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15139 instead of <sys/wait.h> header.
15140 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15141
15142 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15143
15144 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15145 (various make rules): Remove -DGDBSERVER
15146
15147 2012-11-09 Yao Qi <yao@codesourcery.com>
15148
15149 * spu-low.c (current_ptid): Move it to ..
15150 * gdbthread.h: ... here. New.
15151 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15152 * server.c (myresume, process_serial_event): Likewise.
15153 * thread-db.c (thread_db_find_new_threads): Likewise.
15154 * tracepoint.c (run_inferior_command): Likewise.
15155
15156 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15157
15158 * server.c (handle_search_memory_1): Include access length in
15159 warning message.
15160
15161 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15162
15163 * linux-crisv32-low.c: Fix compile errors.
15164
15165 2012-09-04 Yao Qi <yao@codesourcery.com>
15166
15167 * tracepoint.c (cmd_qtsv): Adjust debug message.
15168 Don't check CUR_TPOINT.
15169
15170 2012-08-28 Yao Qi <yao@codesourcery.com>
15171
15172 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15173 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15174 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15175 Remove declarations of xmalloc, xreallloc, xstrdup and
15176 freeargv.
15177 * Makefile.in (libiberty_h): New.
15178 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15179 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15180
15181 2012-08-23 Yao Qi <yao@codesourcery.com>
15182
15183 * server.h: Remove declaration of 'xsnprintf'.
15184
15185 2012-08-22 Keith Seitz <keiths@redhat.com>
15186
15187 * server.h: Include build-gnulib-gbserver/config.h.
15188 * gdbreplay.c: Likewise.
15189
15190 2012-08-08 Doug Evans <dje@google.com>
15191
15192 * Makefile.in (SFILES): Add gdb_vecs.c.
15193 (OBS): Add gdb_vecs.o.
15194 (gdb_vecs_h, host_defs_h): New variables.
15195 (thread-db.o): Add $(gdb_vecs_h) dependency.
15196 (gdb_vecs.o): New rule.
15197 * thread-db.c: #include "gdb_vecs.h".
15198 (thread_db_load_search): Use a vector to iterate over path elements.
15199 Handle text appearing after "$pdir".
15200
15201 * configure.ac: Add check for strstr.
15202 * config.in: Regenerate.
15203 * configure: Regenerate.
15204
15205 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15206
15207 * hostio.c (handle_pread): If pread fails, fall back to attempting
15208 lseek/read.
15209 (handle_pwrite): Likewise for pwrite.
15210
15211 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15212
15213 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15214 between unsupported TYPE and unimplementable ADDR/LEN combination.
15215 (arm_insert_point): Act on new return value.
15216
15217 2012-07-31 Pedro Alves <palves@redhat.com>
15218
15219 * server.c (process_point_options): Only skip tokens if we find
15220 one that is unrecognized. Don't treat 'X' specially while
15221 skipping unrecognized tokens.
15222
15223 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15224
15225 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15226 to 4-byte-align HW breakpoint addresses for Thumb.
15227
15228 2012-07-27 Yao Qi <yao@codesourcery.com>
15229
15230 PR remote/14161.
15231
15232 * server.h: Declare gdb_agent_about_to_close.
15233 * target.c (kill_inferior): Include "agent.h".
15234 New. Send command 'kill'.
15235 * target.h (kill_inferior): Removed macro.
15236 * tracepoint.c (gdb_agent_about_to_close): New.
15237 (gdb_agent_helper_thread): Handle command 'close'.
15238 Wait endlessly until the inferior stops.
15239 Install gdb_agent_remove_socket to atexit hook.
15240 (agent_socket_name): New static variable.
15241 (gdb_agent_socket_init): Replace local variable 'name' with
15242 'agent_socket_name'.
15243 (gdb_agent_remove_socket): New.
15244
15245 2012-07-27 Yao Qi <yao@codesourcery.com>
15246
15247 * server.c (process_point_options): Stop at 'X' when parsing.
15248
15249 2012-07-19 Michael Eager <eager@eagercon.com>
15250
15251 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15252 to hw_execute.
15253 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15254 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15255 hardware breakpoint.
15256
15257 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15258
15259 * gdbserver/linux-low.c (initialize_low): Call
15260 linux_ptrace_init_warnings.
15261
15262 2012-07-02 Doug Evans <dje@google.com>
15263
15264 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15265 pointer to int.
15266
15267 2012-07-02 Stan Shebs <stan@codesourcery.com>
15268
15269 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15270 (ax.o): Add it to build rule.
15271 (ax-ipa.o): Ditto.
15272 (OBS): Add format.o.
15273 (IPA_OBS): Add format.o.
15274 * server.c (handle_query): Claim support for breakpoint commands.
15275 (process_point_options): Add command case.
15276 (process_serial_event): Leave running if there are printfs in
15277 effect.
15278 * mem-break.h (any_persistent_commands): Declare.
15279 (add_breakpoint_commands): Declare.
15280 (gdb_no_commands_at_breakpoint): Declare.
15281 (run_breakpoint_commands): Declare.
15282 * mem-break.c (struct point_command_list): New struct.
15283 (struct breakpoint): New field command_list.
15284 (any_persistent_commands): New function.
15285 (add_commands_to_breakpoint): New function.
15286 (add_breakpoint_commands): New function.
15287 (gdb_no_commands_at_breakpoint): New function.
15288 (run_breakpoint_commands): New function.
15289 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15290 locally.
15291 * ax.c: Include format.h.
15292 (ax_printf): New function.
15293 (gdb_eval_agent_expr): Add printf opcode.
15294
15295 2012-06-13 Yao Qi <yao@codesourcery.com>
15296
15297 * server.c (start_inferior): Remove duplicated writes to fields
15298 'last_resume_kind' and 'last_status' of 'current_inferior'.
15299
15300 2012-06-12 Yao Qi <yao@codesourcery.com>
15301 Pedro Alves <palves@redhat.com>
15302
15303 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15304 comment.
15305 * server.c (handle_v_cont): Extend comment.
15306
15307 2012-06-11 Yao Qi <yao@codesourcery.com>
15308
15309 * linux-low.c (linux_attach): Add 'static'.
15310
15311 2012-06-06 Yao Qi <yao@codesourcery.com>
15312
15313 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15314
15315 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15316
15317 Fix gcc -flto compilation warning.
15318 * server.c (main): Make variable multi_mode and attach volatile.
15319
15320 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15321
15322 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15323 if the platform doesn't know about it.
15324
15325 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15326
15327 * Makefile.in (SFILES): Add linux-tile-low.c.
15328 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15329 * configure.srv: Handle tilegx-*-linux*.
15330 * linux-tile-low.c: New file.
15331
15332 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15333
15334 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15335
15336 2012-05-24 Pedro Alves <palves@redhat.com>
15337
15338 PR gdb/7205
15339
15340 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15341
15342 2012-05-24 Pedro Alves <palves@redhat.com>
15343
15344 PR gdb/7205
15345
15346 Replace target_signal with gdb_signal throughout.
15347
15348 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15349
15350 * linux-low.c (linux_store_registers): Avoid the copying sequence
15351 when no data has been retrieved by ptrace.
15352
15353 2012-05-22 Will Deacon <will.deacon@arm.com>
15354
15355 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15356 Include asm/ptrace.h.
15357 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15358 already defined.
15359
15360 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15361
15362 * linux-low.c (linux_store_registers): Don't re-retrieve data
15363 with ptrace that has already been obtained from /proc. Always
15364 copy any data retrieved with ptrace to the buffer supplied.
15365
15366 2012-05-11 Yao Qi <yao@codesourcery.com>
15367 Pedro Alves <palves@redhat.com>
15368
15369 * linux-low.c (enum stopping_threads_kind): New.
15370 (stopping_threads): Change type to `enum stopping_threads_kind'.
15371 (handle_extended_wait): If stopping and suspending threads, leave
15372 the new_lwp suspended too.
15373 (linux_wait_for_event): Adjust.
15374 (stop_all_lwps): Set `stopping_threads' to
15375 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15376 whether we're suspending threads or just stopping them. Assert no
15377 recursion happens.
15378
15379 2012-04-29 Yao Qi <yao@codesourcery.com>
15380
15381 * server.h: Move some code to ...
15382 * gdbthread.h: ... here. New.
15383 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15384 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15385 (nto-low.o, win32-low.o): Likewise.
15386 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15387 * regcache.c, remote-utils.c, server.c: Likewise.
15388 * target.c, tracepoint.c, win32-low.c: Likewise.
15389
15390 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15391
15392 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15393 (PTRACE_ARG4_TYPE): Likewise.
15394 (PTRACE_XFER_TYPE): Likewise.
15395 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15396 ptrace to PTRACE_ARG3_TYPE.
15397 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15398 (PTRACE_ARG4_TYPE): Likewise.
15399 (PTRACE_XFER_TYPE): Likewise.
15400 (linux_detach_one_lwp): Cast fourth argument of
15401 ptrace to long then PTRACE_ARG4_TYPE.
15402 (regsets_fetch_inferior_registers): Cast third argument of
15403 ptrace to long then PTRACE_ARG3_TYPE.
15404 (regsets_store_inferior_registers): Likewise.
15405
15406 2012-04-20 Pedro Alves <palves@redhat.com>
15407
15408 * configure: Regenerate.
15409
15410 2012-04-19 Pedro Alves <palves@redhat.com>
15411
15412 * Makefile.in (GNULIB_BUILDDIR): New.
15413 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15414 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15415 (all, install-only, uninstall, clean-info, all-lib, clean): No
15416 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15417 (maintainer-clean realclean distclean): Use subdir_do.
15418 (subdir_do): New.
15419 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15420 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15421 * acinclude.m4: Include acx_configure_dir.m4.
15422 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15423 calls. Call AC_PROG_RANLIB. Configure gnulib using
15424 ACX_CONFIGURE_DIR.
15425 (GNULIB): New.
15426 (GNULIB_STDINT_H): Adjust.
15427 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15428 * gdbreplay.c: Include build-gnulib/config.h.
15429 * server.h: Likewise.
15430 * aclocal.m4: Regenerate.
15431 * config.in: Regenerate.
15432 * configure: Regenerate.
15433
15434 2012-04-19 Pedro Alves <palves@redhat.com>
15435
15436 * Makefile.in (LIBGNU, INCGNU): Adjust.
15437 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15438 (all, install-only, uninstall, clean-info, all-lib, clean)
15439 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15440 * configure.ac: Adjust AC_OUTPUT output.
15441 * aclocal.m4: Regenerate.
15442 * configure: Regenerate.
15443
15444 2012-04-19 Pedro Alves <palves@redhat.com>
15445
15446 * Makefile.in (generated_files): New.
15447 (server_h): Remove the explicit dependency on config.h, and depend
15448 on $generated_files.
15449
15450 2012-04-19 Pedro Alves <palves@redhat.com>
15451
15452 * Makefile.in (INCGNU): Add -Ignulib.
15453
15454 2012-04-19 Pedro Alves <palves@redhat.com>
15455
15456 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15457 (INCGNU): ... this, and spell out -I here.
15458 (GNULIB_LIB): Rename to ...
15459 (LIBGNU): ... this.
15460 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15461
15462 2012-04-19 Pedro Alves <palves@redhat.com>
15463
15464 * config.in: Regenerate.
15465
15466 2012-04-19 Pedro Alves <palves@redhat.com>
15467
15468 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15469 * server.h (memmem): Remove declaration.
15470 * config.in: Regenerate.
15471 * configure: Regenerate.
15472
15473 2012-04-19 Yao Qi <yao@codesourcery.com>
15474
15475 * Makefile.in (SFILES): Add common/vec.c.
15476 (OBS): Add vec.o.
15477 (vec.o): New rule.
15478
15479 2012-04-19 Yao Qi <yao@codesourcery.com>
15480
15481 * remote-utils.c (prepare_resume_reply): Replace with macro
15482 target_core_of_thread.
15483 * server.c (handle_qxfer_threads_proper): Likewise.
15484 * target.h (traget_core_of_thread): New macro.
15485
15486 2012-04-18 Pedro Alves <palves@redhat.com>
15487
15488 * aclocal.m4: Regenerate.
15489 * configure: Regenerate.
15490
15491 2012-04-16 Yao Qi <yao@codesourcery.com>
15492
15493 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15494 duplicated on address.
15495
15496 2012-04-16 Yao Qi <yao@codesourcery.com>
15497
15498 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15499 (struct tracepoint_action_ops) <send>: New field.
15500 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15501 (agent_expr_send, x_tracepoint_action_send): New.
15502 (l_tracepoint_action_send): New.
15503 (cmd_qtdp): Download and install tracepoint
15504 according to `use_agent'.
15505 (run_inferior_command): Add one more parameter `len'.
15506 Update callers.
15507 (tracepoint_send_agent): New.
15508 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15509
15510 2012-04-16 Yao Qi <yao@codesourcery.com>
15511
15512 * tracepoint.c (download_tracepoints): Moved to ...
15513 (cmd_qtstart): ... here.
15514
15515 2012-04-14 Yao Qi <yao@codesourcery.com>
15516
15517 * tracepoint.c: Include inttypes.h.
15518 (struct collect_memory_action): Use sized types.
15519 (struct tracepoint): Likewise.
15520 (cmd_qtdp, stop_tracing): Update print specifiers.
15521 (cmd_qtp, response_tracepoint): Likewise.
15522 (collect_data_at_tracepoint): Likewise.
15523 (collect_data_at_step): Likewise.
15524
15525 2012-04-14 Yao Qi <yao@codesourcery.com>
15526
15527 Import gnulib module inttypes.
15528 * aclocal.m4, config.in, configure: Regenerated.
15529
15530 2012-04-14 Yao Qi <yao@codesourcery.com>
15531
15532 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15533 Makefile and config.status at last.
15534
15535 2012-04-13 Yao Qi <yao@codesourcery.com>
15536
15537 * tracepoint.c: Include stdint.h unconditionally.
15538
15539 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15540
15541 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15542 on BFD_HAVE_SYS_PROCFS_TYPE.
15543 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15544 * configure: Regenerate.
15545 * config.in: Likewise.
15546
15547 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15548
15549 * Makefile.in (clean): Also remove x32.c x32-linux.c
15550 x32-avx.c x32-avx-linux.c.
15551 (x32.o): New target.
15552 (x32.c): Likewise.
15553 (x32-linux.o): Likewise.
15554 (x32-linux.c): Likewise.
15555 (x32-avx.o): Likewise.
15556 (x32-avx.c): Likewise.
15557 (x32-avx-linux.o): Likewise.
15558 (x32-avx-linux.c): Likewise.
15559
15560 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15561 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15562 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15563 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15564 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15565 i386/x32-avx-linux.xml.
15566
15567 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15568 (init_registers_x32_avx_linux): Likwise.
15569 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15570 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15571
15572 2012-04-13 Pedro Alves <palves@redhat.com>
15573
15574 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15575 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15576 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15577 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15578 the sub-make.
15579
15580 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15581
15582 * linux-x86-low.c (compat_x32_clock_t): New.
15583 (compat_x32_siginfo_t): Likewise.
15584 (compat_x32_siginfo_from_siginfo): Likewise.
15585 (siginfo_from_compat_x32_siginfo): Likewise.
15586 (linux_is_elf64): Likewise.
15587 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15588 and siginfo_from_compat_x32_siginfo for x32.
15589 (x86_arch_setup): Set linux_is_elf64.
15590
15591 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15592
15593 PR gdb/13969
15594 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15595 e_machine field.
15596 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15597 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15598 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15599 compatible with process.
15600
15601 2012-04-12 Yao Qi <yao@codesourcery.com>
15602
15603 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15604 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15605 (install-only, install-info, clean): Handle sub dir gnulib.
15606 (all-lib, am--refresh): New targets.
15607 (memmem.o): Remove target.
15608 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15609 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15610 (AC_REPLACE_FUNCS): Remove memmem.
15611 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15612 (AC_OUTPUT): Generate Makefile in gnulib/.
15613 * aclocal.m4, config.in, configure: Regenerated.
15614
15615 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15616
15617 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15618
15619 2012-04-05 Pedro Alves <palves@redhat.com>
15620
15621 -Werror=strict-aliasing
15622
15623 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15624 pointer.
15625
15626 2012-04-04 Pedro Alves <palves@redhat.com>
15627
15628 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15629 (sparc_store_gregset_from_stack, sparc_store_gregset)
15630 (sparc_breakpoint_at): Fix formatting.
15631
15632 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15633
15634 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15635 are available.
15636 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15637 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15638 * config.in: Regenerate.
15639 * configure: Likewise.
15640
15641 2012-03-29 Pedro Alves <palves@redhat.com>
15642
15643 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15644 Correct ptrace arguments.
15645
15646 2012-03-28 Pedro Alves <palves@redhat.com>
15647
15648 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15649 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15650 (IA64_FR1_REGNUM): New defines.
15651 (ia64_fetch_register): New.
15652 (the_low_target): Install it.
15653 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15654 field.
15655 * linux-low.c (linux_fetch_registers): Try the
15656 the_low_target.fetch_register hook first.
15657
15658 * linux-arm-low.c (the_low_target): Adjust.
15659 * linux-bfin-low.c (the_low_target): Adjust.
15660 * linux-cris-low.c (the_low_target): Adjust.
15661 * linux-crisv32-low.c (the_low_target): Adjust.
15662 * linux-m32r-low.c (the_low_target): Adjust.
15663 * linux-m68k-low.c (the_low_target): Adjust.
15664 * linux-mips-low.c (the_low_target): Adjust.
15665 * linux-ppc-low.c (the_low_target): Adjust.
15666 * linux-s390-low.c (the_low_target): Adjust.
15667 * linux-sh-low.c (the_low_target): Adjust.
15668 * linux-sparc-low.c (the_low_target): Adjust.
15669 * linux-tic6x-low.c (the_low_target): Adjust.
15670 * linux-x86-low.c (the_low_target): Adjust.
15671 * linux-xtensa-low.c (the_low_target): Adjust.
15672
15673 2012-03-26 Pedro Alves <palves@redhat.com>
15674
15675 * server.c (handle_qxfer_libraries): Don't bail early if
15676 the_target->qxfer_libraries_svr4 is not NULL.
15677
15678 2012-03-26 Pedro Alves <palves@redhat.com>
15679
15680 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15681
15682 2012-03-23 Pedro Alves <palves@redhat.com>
15683
15684 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15685 "library-list-svr4" element's start tag when the the DSO list is
15686 empty.
15687
15688 2012-03-23 Pedro Alves <palves@redhat.com>
15689
15690 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15691 a variable whose type size is the same as the inferior's pointer
15692 size.
15693
15694 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15695
15696 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15697 struct siginfo.
15698 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15699 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15700 * linux-low.h: Include <signal.h>.
15701 (struct siginfo): Remove forward declaration.
15702 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15703 struct siginfo.
15704
15705 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15706
15707 * .gitignore: Ignore more files.
15708
15709 2012-03-19 Pedro Alves <palves@redhat.com>
15710 Jan Kratochvil <jan.kratochvil@redhat.com>
15711
15712 * server.c (cont_thread, general_thread): Add describing comments.
15713 (start_inferior): Clear `cont_thread'.
15714 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15715 of a process.
15716
15717 2012-03-15 Yao Qi <yao@codesourcery.com>
15718
15719 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15720 handling to ...
15721 (cmd_qtdp): ... here.
15722
15723 2012-03-15 Yao Qi <yao@codesourcery.com>
15724
15725 * tracepoint.c (struct tracepoint_action_ops): New.
15726 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15727 (m_tracepoint_action_download): New.
15728 (r_tracepoint_action_download): New.
15729 (x_tracepoint_action_download): New.
15730 (l_tracepoint_action_download): New.
15731 (add_tracepoint_action): Install `action->ops' according type.
15732 (download_tracepoint_1): Move code `download' function pointer
15733 of various tracepoint_action_ops.
15734
15735 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15736
15737 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15738 linux_ptrace_attach_warnings.
15739
15740 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15741
15742 * Makefile.in (linux-ptrace.o): New.
15743 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15744 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15745 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15746 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15747 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15748 of these targets.
15749 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15750
15751 2012-03-08 Yao Qi <yao@codesourcery.com>
15752 Pedro Alves <palves@redhat.com>
15753
15754 Fix PR server/13392.
15755 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15756 offset of JMP insn.
15757 * tracepoint.c (remove_tracepoint): New.
15758 (cmd_qtdp): Call remove_tracepoint when failed to install.
15759
15760 2012-03-07 Pedro Alves <palves@redhat.com>
15761
15762 * linux-low.c (get_detach_signal): New.
15763 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15764 Pass on pending signals to PTRACE_DETACH. Check the result of the
15765 ptrace call.
15766 * server.c (program_signals, program_signals_p): New.
15767 (handle_general_set): Handle QProgramSignals.
15768 * server.h (program_signals, program_signals_p): Declare.
15769
15770 2012-03-05 Pedro Alves <palves@redhat.com>
15771 Jan Kratochvil <jan.kratochvil@redhat.com>
15772
15773 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15774 New comment why.
15775
15776 2012-03-03 Yao Qi <yao@codesourcery.com>
15777
15778 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15779 agent_look_up_symbols.
15780
15781 2012-03-03 Yao Qi <yao@codesourcery.com>
15782
15783 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15784 (linux-x86-low.o): Likewise.
15785 * server.h: Remove in_process_agent_loaded.
15786 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15787 common/agent.c.
15788 Update callers.
15789
15790 2012-03-03 Yao Qi <yao@codesourcery.com>
15791
15792 * tracepoint.c (gdb_agent_capability): New global.
15793 (in_process_agent_loaded_ust): Renamed to
15794 `in_process_agent_supports_ust'.
15795 Update callers.
15796 (in_process_agent_supports_ust): Call agent_capability_check.
15797 (clear_installed_tracepoints): Assert that agent supports
15798 agent.
15799
15800 2012-03-03 Yao Qi <yao@codesourcery.com>
15801
15802 * linux-low.c (linux_supports_agent): New.
15803 (linux_target_ops): Initialize field `supports_agent' with
15804 linux_supports_agent.
15805 * target.h (struct target_ops) <supports_agent>: New.
15806 (target_supports_agent): New macro.
15807 * server.c (handle_general_set): Handle packet 'QAgent'.
15808 (handle_query): Send `QAgent+'.
15809 * Makefile.in (server.o): Depends on agent.h.
15810
15811 2012-03-03 Yao Qi <yao@codesourcery.com>
15812
15813 * Makefile.in (OBS): Add agent.o.
15814 Add new rule for agent.o.
15815 Track dependence of tracepoint.c on agent.h.
15816 * tracepoint.c (run_inferior_command_1):
15817 (run_inferior_command): Call agent_run_command.
15818 (gdb_ust_connect_sync_socket): Deleted. Move it to
15819 common/agent.c.
15820 (resume_thread, stop_thread): Likewise.
15821 (gdb_ust_socket_init): Renamed to ...
15822 (gdb_agent_socket_init): ... New.
15823 (gdb_ust_thread): Renamed to ...
15824 (gdb_agent_helper_thread): ... New.
15825 (gdb_ust_init): Move some code to ...
15826 (gdb_agent_init): ... here. New.
15827 [HAVE_UST]: Call gdb_ust_init.
15828 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15829 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15830 * config.in, configure: Regenerated.
15831
15832 2012-03-02 Pedro Alves <palves@redhat.com>
15833
15834 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15835 * linux-low.c (struct simple_pid_list): New.
15836 (stopped_pids): New a struct simple_pid_list pointer.
15837 (add_to_pid_list, pull_pid_from_list): New.
15838 (handle_extended_wait): Don't assume the first signal new children
15839 report is SIGSTOP. Adjust call to pull_pid_from_list.
15840 (linux_wait_for_lwp): Adjust.
15841
15842 2012-03-02 Yao Qi <yao@codesourcery.com>
15843
15844 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15845 debug log.
15846
15847 2012-03-02 Yao Qi <yao@codesourcery.com>
15848
15849 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15850 `stop_pc' and `tpoint'. Update caller.
15851
15852 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15853
15854 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15855 * linux-low.c (use_linux_regsets): New macro.
15856 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15857 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15858 (linux_register_in_regsets): New function.
15859 (usr_fetch_inferior_registers): Skip registers covered by
15860 regsets.
15861 (usr_store_inferior_registers): Likewise.
15862 (usr_fetch_inferior_registers): New macro.
15863 (usr_store_inferior_registers): Likewise.
15864 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15865 (linux_store_registers): Likewise.
15866 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15867 prototype.
15868 (init_registers_mips64_dsp_linux): Likewise.
15869 (init_registers_mips_linux): New macro.
15870 (init_registers_mips_dsp_linux): Likewise.
15871 (mips_dsp_num_regs): Likewise.
15872 (DSP_BASE, DSP_CONTROL): New fallback macros.
15873 (mips_base_regs): New macro.
15874 (mips_regmap): Use it. Fix the size.
15875 (mips_dsp_regmap): New variable.
15876 (mips_dsp_regset_bitmap): Likewise.
15877 (mips_arch_setup): New function.
15878 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15879 than mips_regmap.
15880 (mips_cannot_store_register): Likewise.
15881 (the_low_target): Update .arch_setup, .num_regs and .regmap
15882 initializers. Add .regset_bitmap initializer.
15883 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15884 initializer.
15885 * linux-bfin-low.c (the_low_target): Likewise.
15886 * linux-cris-low.c (the_low_target): Likewise.
15887 * linux-crisv32-low.c (the_low_target): Likewise.
15888 * linux-ia64-low.c (the_low_target): Likewise.
15889 * linux-m32r-low.c (the_low_target): Likewise.
15890 * linux-m68k-low.c (the_low_target): Likewise.
15891 * linux-ppc-low.c (the_low_target): Likewise.
15892 * linux-s390-low.c (the_low_target): Likewise.
15893 * linux-sh-low.c (the_low_target): Likewise.
15894 * linux-sparc-low.c (the_low_target): Likewise.
15895 * linux-tic6x-low.c (the_low_target): Likewise.
15896 * linux-x86-low.c (the_low_target): Likewise.
15897 * linux-xtensa-low.c (the_low_target): Likewise.
15898 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15899 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15900 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15901 srv_xmlfiles.
15902 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15903 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15904
15905 2012-02-29 Yao Qi <yao@codesourcery.com>
15906 Pedro Alves <palves@redhat.com>
15907
15908 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15909 `step_over_finished' is true.
15910
15911 2012-02-27 Pedro Alves <palves@redhat.com>
15912
15913 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15914 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15915
15916 2012-02-27 Pedro Alves <palves@redhat.com>
15917
15918 PR server/9684
15919 * linux-low.c (pid_is_stopped): New.
15920 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15921
15922 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15923
15924 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15925 of conditions.
15926
15927 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15928
15929 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15930
15931 2012-02-24 Luis Machado <lgustavo@codesourcery>
15932
15933 * server.c (handle_query): Advertise support for target-side
15934 breakpoint condition evaluation.
15935 (process_point_options): New function.
15936 (process_serial_event): When inserting a breakpoint, check for
15937 a target-side condition that should be evaluated.
15938
15939 * mem-break.c: Include regcache.h and ax.h.
15940 (point_cond_list_t): New data structure.
15941 (breakpoint) <cond_list>: New field.
15942 (find_gdb_breakpoint_at): Make non-static.
15943 (delete_gdb_breakpoint_at): Clear any target-side
15944 conditions.
15945 (clear_gdb_breakpoint_conditions): New function.
15946 (add_condition_to_breakpoint): Likewise.
15947 (add_breakpoint_condition): Likewise.
15948 (gdb_condition_true_at_breakpoint): Likewise.
15949 (gdb_breakpoint_here): Return result directly instead
15950 of going through a local variable.
15951
15952 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15953 (clear_gdb_breakpoint_conditions): Likewise.
15954 (add_breakpoint_condition): Likewise.
15955 (gdb_condition_true_at_breakpoint): Likewise.
15956
15957 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15958 (need_step_over_p): Take target-side breakpoint condition into
15959 consideration.
15960
15961 2012-02-24 Luis Machado <lgustavo@codesourcery>
15962
15963 * server.h: Include tracepoint.h.
15964 (agent_mem_read, agent_get_trace_state_variable_value,
15965 agent_set_trace_state_variable_value,
15966 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15967 get_set_tsv_func_addr): New prototypes.
15968
15969 * ax.h: New include file.
15970 * ax.c: New source file.
15971
15972 * tracepoint.c: Include ax.h.
15973 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15974 agent_expr, eval_result_type): Move to ax.h.
15975 (parse_agent_expr): Rename to ...
15976 (gdb_parse_agent_expr): ... this, make it non-static and move
15977 to ax.h.
15978 (unparse_agent_expr) Rename to ...
15979 (gdb_unparse_agent_expr): ... this, make it non-static and move
15980 to ax.h.
15981 (eval_agent_expr): Rename to ...
15982 (eval_tracepoint_agent_expr): ... this.
15983 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15984 forward declarations.
15985 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15986 (agent_get_trace_state_variable_value): New function.
15987 (agent_set_trace_state_variable_value): New function.
15988 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15989 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15990 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15991 (condition_true_at_tracepoint): Likewise.
15992 (parse_agent_expr): Rename to ...
15993 (gdb_parse_agent_expr): ... this and move to ax.c.
15994 (unparse_agent_expr): Rename to ...
15995 (gdb_unparse_agent_expr): ... this and move to ax.c.
15996 (gdb_agent_op_name): Move to ax.c.
15997 (eval_agent_expr): Rename to ...
15998 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15999 and move to ax.c.
16000 (eval_tracepoint_agent_expr): New function.
16001 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
16002 non-static.
16003 (current_insn_ptr, emit_error, struct bytecode_address): Move to
16004 ax.c.
16005 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
16006 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
16007 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
16008 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
16009 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
16010 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
16011 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
16012 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
16013 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
16014 (compile_bytecodes): Remove forward declaration.
16015 (is_goto_target): Move to ax.c.
16016 (compile_bytecodes): Move to ax.c and call
16017 agent_get_trace_state_variable_value (...) and
16018 agent_set_trace_state_variable_value (...).
16019
16020 * Makefile.in: Update ax.c and IPA dependencies.
16021
16022 2012-02-24 Pedro Alves <palves@redhat.com>
16023
16024 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
16025 (cmd_bigqtbuffer_circular): ... this. Only handle
16026 'QTBuffer:circular:'.
16027 (handle_tracepoint_general_set): Adjust.
16028
16029 2012-02-16 Yao Qi <yao@codesourcery.com>
16030
16031 * inferiors.c: Move code to ...
16032 * dll.c: .... here. New.
16033 * server.h: Declare clear_dlls.
16034 * Makefile.in (SFILES): Add dll.c.
16035 (OBS): Add dll.o
16036 (dll.o): New rule.
16037
16038 2012-02-11 Yao Qi <yao@codesourcery.com>
16039
16040 * server.c: (handle_monitor_command): Add a new parameter
16041 `own_buf'.
16042 (handle_query): Update caller.
16043
16044 2012-02-09 Joel Brobecker <brobecker@adacore.com>
16045
16046 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
16047 * configure, config.in: Regenerate.
16048 * hostio.c: Provide an alternate implementation if HAVE_READLINK
16049 is not defined.
16050
16051 2012-02-02 Pedro Alves <palves@redhat.com>
16052
16053 Try SIGKILL first, then PTRACE_KILL.
16054 * linux-low.c (linux_kill_one_lwp): New.
16055 (linux_kill_one_lwp): Rename to ...
16056 (kill_one_lwp_callback): ... this. Use the new
16057 linux_kill_one_lwp.
16058
16059 2012-02-02 Pedro Alves <palves@redhat.com>
16060
16061 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
16062 inferior.
16063
16064 2012-01-27 Pedro Alves <palves@redhat.com>
16065
16066 * linux-low.c (linux_child_pid_to_exec_file): Delete.
16067 (elf_64_file_p): Make static.
16068 (linux_pid_exe_is_elf_64_file): New.
16069 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
16070 Delete declarations.
16071 (linux_pid_exe_is_elf_64_file): Declare.
16072 * linux-x86-low.c (x86_arch_setup): Use
16073 linux_pid_exe_is_elf_64_file.
16074
16075 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16076
16077 * linux-low.c (linux_wait_for_event_1): Rename to ...
16078 (linux_wait_for_event): ... here and merge it with former
16079 linux_wait_for_event - new variable wait_ptid, use it.
16080 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
16081
16082 2012-01-23 Pedro Alves <palves@redhat.com>
16083
16084 * server.c (main): Avoid yet another case of infinite loop while
16085 detaching/killing after a longjmp.
16086
16087 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16088
16089 Code cleanup.
16090 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
16091
16092 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
16093
16094 * hostio.c (handle_readlink): New function.
16095 (handle_vFile): Call it to handle "vFile:readlink" packets.
16096
16097 2012-01-20 Pedro Alves <palves@redhat.com>
16098 Ulrich Weigand <ulrich.weigand@linaro.org>
16099
16100 * server.c (handle_v_requests): Only support vAttach and vRun to
16101 start multiple processes when in extended protocol mode.
16102
16103 2012-01-17 Pedro Alves <palves@redhat.com>
16104
16105 * tracepoint.c (initialize_tracepoint): Use mmap instead of
16106 memalign plus mprotect to allocate the scratch buffer.
16107
16108 2012-01-13 Pedro Alves <palves@redhat.com>
16109
16110 * server.c (attach_inferior): Clear `cont_thread'.
16111
16112 2012-01-13 Pedro Alves <palves@redhat.com>
16113
16114 * server.c (main): Avoid infinite loop while detaching/killing
16115 after a longjmp.
16116
16117 2012-01-09 Doug Evans <dje@google.com>
16118
16119 * server.c (start_inferior): Set last_ptid in --wrapper case.
16120
16121 2012-01-06 Yao Qi <yao@codesourcery.com>
16122
16123 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
16124 defined.
16125 [IN_PROCESS_AGENT] (debug_agent): New global variable.
16126
16127 2012-01-04 Yao Qi <yao@codesourcery.com>
16128
16129 * tracepoint.c (cmd_qtdp): Print debug message
16130 for static tracepoint.
16131
16132 2012-01-04 Yao Qi <yao@codesourcery.com>
16133
16134 * tracepoint.c (trace_vdebug): Differentiate debug message
16135 between gdbserver and IPA.
16136
16137 2012-01-03 Yao Qi <yao@codesourcery.com>
16138
16139 * tracepoint.c (tracepoint_was_hit): Don't collect for
16140 static tracepoint.
16141
16142 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16143
16144 * terminal.h: Reformat copyright header.
16145
16146 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16147
16148 * server.c (gdbserver_version): Update copyright year.
16149 * gdbreplay.c (gdbreplay_version): Likewise.
16150
16151 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16152
16153 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16154
16155 Revert:
16156 2011-12-18 Hui Zhu <teawater@gmail.com>
16157 * linux-low.c (linux_create_inferior): Save return value to ret.
16158
16159 2011-12-18 Hui Zhu <teawater@gmail.com>
16160
16161 * linux-low.c (linux_create_inferior): Save return value to ret.
16162
16163 2011-12-16 Doug Evans <dje@google.com>
16164
16165 * linux-low.c (linux_create_inferior): If stdio connection,
16166 redirect stdin from /dev/null, stdout to stderr.
16167 * remote-utils.c (remote_is_stdio): New static global.
16168 (remote_connection_is_stdio): New function.
16169 (remote_prepare): Handle stdio connection.
16170 (remote_open): Ditto.
16171 (remote_close): Don't close stdin for stdio connections.
16172 (read_prim,write_prim): New functions. Replace all calls to
16173 read/write to these.
16174 * server.c (main): Watch for "-" argument. Move call to
16175 remote_prepare before start_inferior.
16176 * server.h (STDIO_CONNECTION_NAME): New macro.
16177 (remote_connection_is_stdio): Declare.
16178
16179 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16180 in debugging output.
16181
16182 2011-12-15 Yao Qi <yao@codesourcery.com>
16183
16184 * tracepoint.c: Include sys/syscall.h.
16185 (gdb_ust_thread): Remove preprocessor conditional.
16186
16187 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16188
16189 * linux-low.c (linux_detach_one_lwp): Call
16190 the_low_target.prepare_to_resume before detaching.
16191
16192 2011-12-14 Yao Qi <yao@codesourcery.com>
16193
16194 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16195 of write.
16196
16197 2011-12-14 Yao Qi <yao@codesourcery.com>
16198
16199 * i386-low.c (i386_low_stopped_data_address): Initialize local
16200 variable `control'.
16201
16202 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16203
16204 PR remote/13492
16205
16206 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16207 DR_CONTROL unless necessary. Extend comments.
16208 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16209 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16210
16211 2011-12-13 Yao Qi <yao@codesourcery.com>
16212
16213 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16214 macros.
16215 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16216
16217 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16218
16219 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16220 Print new debug message for such case.
16221
16222 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16223
16224 Fix overlapping memcpy.
16225 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16226 the read_inferior_memory transfer.
16227 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16228 write_inferior_memory transfer.
16229 (set_fast_tracepoint_jump): New variable buf. Use it for the
16230 read_inferior_memory and write_inferior_memory transfers.
16231 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16232 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16233 Use it for the write_inferior_memory transfer.
16234 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16235 buffers.
16236
16237 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16238
16239 * linux-low.c (fetch_register, store_register): Make code
16240 consistent, fix formatting.
16241
16242 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16243
16244 * linux-low.c (usr_store_inferior_registers): Factor out code
16245 to handle individual registers into...
16246 (store_register): ... this new function.
16247
16248 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16249
16250 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16251 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16252 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16253 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16254 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16255 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16256 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16257 (srv_xmlfiles): Add new XML files.
16258
16259 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16260 and <sys/uio.h>.
16261 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16262 (init_registers_s390_linux32v1): Add prototype.
16263 (init_registers_s390_linux32v2): Likewise.
16264 (init_registers_s390_linux64v1): Likewise.
16265 (init_registers_s390_linux64v2): Likewise.
16266 (init_registers_s390x_linux64v1): Likewise.
16267 (init_registers_s390x_linux64v2): Likewise.
16268 (s390_num_regs): Increment to 52.
16269 (s390_regmap): Add orig_r2 register.
16270 (s390_num_regs_3264): Increment to 68.
16271 (s390_regmap_3264): Add orig_r2 register.
16272 (s390_collect_ptrace_register): Handle orig_r2 register.
16273 (s390_supply_ptrace_register): Likewise.
16274 (s390_fill_last_break): New function.
16275 (s390_store_last_break): Likewise.
16276 (s390_fill_system_call): New function.
16277 (s390_store_system_call): Likewise.
16278 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16279 register sets.
16280 (s390_check_regset): New function.
16281 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16282 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16283 Update target_regsets for available register sets.
16284
16285 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16286 Jan Kratochvil <jan.kratochvil@redhat.com>
16287
16288 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16289 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16290 New.
16291 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16292 * linux-low.h (struct process_info_private): New member r_debug.
16293 * server.c (handle_qxfer_libraries): Call
16294 the_target->qxfer_libraries_svr4.
16295 (handle_qxfer_libraries_svr4): New function.
16296 (qxfer_packets): New entry "libraries-svr4".
16297 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16298 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16299 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16300 PACKET_qXfer_libraries_svr4.
16301
16302 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16303
16304 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16305 PSW address/mask between 8-byte and 16-byte formats.
16306 (s390_supply_ptrace_register): Likewise.
16307 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16308 basic addressing mode bit.
16309
16310 2011-11-24 Stan Shebs <stan@codesourcery.com>
16311
16312 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16313
16314 2011-11-17 Stan Shebs <stan@codesourcery.com>
16315
16316 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16317 (tracing_start_time): New global.
16318 (tracing_stop_time): New global.
16319 (tracing_user_name): New global.
16320 (tracing_notes): New global.
16321 (tracing_stop_note): New global.
16322 (cmd_qtstart): Set traceframe_usage, start_time.
16323 (stop_tracing): Set stop_time.
16324 (cmd_qtstatus): Report additional status.
16325 (cmd_qtp): New function.
16326 (handle_tracepoint_query): Call it.
16327 (cmd_qtnotes): New function.
16328 (handle_tracepoint_general_set): Call it.
16329 (get_timestamp): Rename from tsv_get_timestamp.
16330
16331 2011-11-14 Stan Shebs <stan@codesourcery.com>
16332 Kwok Cheung Yeung <kcy@codesourcery.com>
16333
16334 * linux-x86-low.c (small_jump_insn): New.
16335 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16336 trampoline and error message, build a trampoline and issue a small
16337 jump instruction to it.
16338 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16339 trampoline and error message.
16340 (x86_get_min_fast_tracepoint_insn_len): New.
16341 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16342 * linux-low.h (struct linux_target_ops): Add arguments to
16343 install_fast_tracepoint_jump_pad operation, add new operation.
16344 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16345 arguments.
16346 (linux_get_min_fast_tracepoint_insn_len): New function.
16347 (linux_target_op): Add new operation.
16348 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16349 (gdb_trampoline_buffer_end): Ditto.
16350 (gdb_trampoline_buffer_error): Ditto.
16351 (struct ipa_sym_addresses): Add fields for new IPA variables.
16352 (symbol_list): Add entries for new IPA variables.
16353 (struct tracepoint): Add fields to hold the address range of the
16354 trampoline used by the tracepoint.
16355 (trampoline_buffer_head): New static variable.
16356 (trampoline_buffer_tail): Ditto.
16357 (claim_trampoline_space): New function.
16358 (have_fast_tracepoint_trampoline_buffer): New function.
16359 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16360 structure.
16361 (install_fast_tracepoint): Ditto, also add error buffer argument.
16362 (cmd_qtminftpilen): New function.
16363 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16364 (fast_tracepoint_from_trampoline_address): New function.
16365 (fast_tracepoint_collecting): Handle trampoline as part of jump
16366 pad space.
16367 (set_trampoline_buffer_space): New function.
16368 (initialize_tracepoint): Initialize new IPA variables.
16369 * target.h (struct target_ops): Add arguments to
16370 install_fast_tracepoint_jump_pad operation, add new
16371 get_min_fast_tracepoint_insn_len operation.
16372 (target_get_min_fast_tracepoint_insn_len): New.
16373 (install_fast_tracepoint_jump_pad): Add arguments.
16374 * server.h (IPA_BUFSIZ): Define.
16375 * linux-i386-ipa.c: Include extra header files.
16376 (initialize_fast_tracepoint_trampoline_buffer): New function.
16377 (initialize_low_tracepoint): Call it.
16378 * server.h (set_trampoline_buffer_space): Declare.
16379 (claim_trampoline_space): Ditto.
16380 (have_fast_tracepoint_trampoline_buffer): Ditto.
16381
16382 2011-11-14 Yao Qi <yao@codesourcery.com>
16383
16384 * server.c (handle_query): Handle InstallInTrace for qSupported.
16385 * tracepoint.c (add_tracepoint): Sort list.
16386 (install_tracepoint, download_tracepoint): New.
16387 (cmd_qtdp): Call them to install and download tracepoints.
16388 (sort_tracepoints): Removed.
16389 (cmd_qtstart): Update.
16390
16391 2011-11-14 Yao Qi <yao@codesourcery.com>
16392
16393 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16394 * mem-break.h: Declare.
16395 * tracepoint.c (cmd_qtstart): Move some code to ...
16396 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16397 New.
16398 (download_tracepoints): Move some code to ...
16399 (download_tracepoint_1): ... here. New.
16400
16401 2011-11-08 Yao Qi <yao@codesourcery.com>
16402
16403 * remote-utils.c (relocate_instruction): A comment fix.
16404
16405 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16406
16407 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16408 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16409 dr_status_mirror and dr_control_mirror from debug_reg_state.
16410 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16411 (i386_initial_stuff): Remove use of deleted globals.
16412 (i386_get_thread_context, i386_set_thread_context,
16413 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16414 from debug_reg_state.
16415
16416 2011-11-05 Yao Qi <yao@codesourcery.com>
16417
16418 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16419 address as TPOINT's.
16420
16421 2011-11-02 Stan Shebs <stan@codesourcery.com>
16422
16423 * tracepoint.c (agent_mem_read_string): New function.
16424 (eval_agent_expr): Call it for tracenz.
16425 * server.c (handle_query): Report support for tracenz.
16426
16427 2011-11-02 Yao Qi <yao@codesourcery.com>
16428
16429 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16430
16431 2011-11-02 Yao Qi <yao@codesourcery.com>
16432
16433 * target.h: Fix a typo in comment.
16434
16435 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16436
16437 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16438 clobber the breakpoints' shadows with fast tracepoint jumps.
16439 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16440 * target.c (write_inferior_memory): Also pass MYADDR down to
16441 check_mem_write.
16442
16443 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16444
16445 * configure.ac: Check support for personality routine.
16446 * configure: Regenerate.
16447 * config.in: Likewise.
16448 * linux-low.c: Include <sys/personality.h>.
16449 Define ADDR_NO_RANDOMIZE if necessary.
16450 (linux_create_inferior): Disable address space randomization when
16451 forking inferior, if requested.
16452 (linux_supports_disable_randomization): New function.
16453 (linux_target_ops): Install it.
16454 * server.h (disable_randomization): Declare.
16455 * server.c (disable_randomization): New global variable.
16456 (handle_general_set): Handle QDisableRandomization.
16457 (handle_query): Likewise for qSupported.
16458 (main): Support --disable-randomization and --no-disable-randomization
16459 command line arguments.
16460 * target.h (struct target_ops): Add supports_disable_randomization.
16461 (target_supports_disable_randomization): New macro.
16462
16463 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16464
16465 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16466 ifdef check.
16467 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16468 [!PT_GETDSBT] (target_loadmap): New definition.
16469 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16470 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16471 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16472 and PT_GETDSBT to LINUX_LOADMAP.
16473 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16474 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16475
16476 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16477
16478 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16479 (arm_linux_hwbp_cap): New static variable.
16480 (arm_linux_get_hwbp_cap): Replace by ...
16481 (arm_linux_init_hwbp_cap): ... this new function.
16482 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16483 (arm_linux_get_hw_watchpoint_count): Likewise.
16484 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16485 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16486 (arm_prepare_to_resume): Use perror_with_name instead of error.
16487
16488 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16489
16490 * linux-arm-low.c: Include <signal.h>.
16491 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16492 (struct arm_linux_hwbp_cap): New data type.
16493 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16494 (struct arm_linux_hw_breakpoint): New data type.
16495 (MAX_BPTS, MAX_WPTS): Define.
16496 (struct arch_process_info, struct arch_lwp_info): New data types.
16497 (arm_linux_get_hwbp_cap): New function.
16498 (arm_linux_get_hw_breakpoint_count): Likewise.
16499 (arm_linux_get_hw_watchpoint_count): Likewise.
16500 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16501 (arm_hwbp_control_initialize): Likewise.
16502 (arm_hwbp_control_is_enabled): Likewise.
16503 (arm_hwbp_control_is_initialized): Likewise.
16504 (arm_hwbp_control_disable): Likewise.
16505 (arm_linux_hw_breakpoint_equal): Likewise.
16506 (arm_linux_hw_point_initialize): Likewise.
16507 (struct update_registers_data): New data structure.
16508 (update_registers_callback: New function.
16509 (arm_insert_point): Likewise.
16510 (arm_remove_point): Likewise.
16511 (arm_stopped_by_watchpoint): Likewise.
16512 (arm_stopped_data_address): Likewise.
16513 (arm_new_process): Likewise.
16514 (arm_new_thread): Likewise.
16515 (arm_prepare_to_resume): Likewise.
16516 (the_low_target): Register arm_insert_point, arm_remove_point,
16517 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16518 arm_new_thread, and arm_prepare_to_resume.
16519
16520 2011-09-15 Stan Shebs <stan@codesourcery.com>
16521
16522 * server.h (struct emit_ops): Add compare-goto fields.
16523 * tracepoint.c (gdb_agent_op_sizes): New table.
16524 (emit_eq_goto): New function.
16525 (emit_ne_goto): New function.
16526 (emit_lt_goto): New function.
16527 (emit_le_goto): New function.
16528 (emit_gt_goto): New function.
16529 (emit_ge_goto): New function.
16530 (is_goto_target): New function.
16531 (compile_bytecodes): Recognize special cases of compare-goto
16532 combinations and call specialized emitters for them.
16533 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16534 (amd64_emit_ne_goto): New function.
16535 (amd64_emit_lt_goto): New function.
16536 (amd64_emit_le_goto): New function.
16537 (amd64_emit_gt_goto): New function.
16538 (amd64_emit_ge_goto): New function.
16539 (amd64_emit_ops): Add the new functions.
16540 (i386_emit_eq_goto): New function.
16541 (i386_emit_ne_goto): New function.
16542 (i386_emit_lt_goto): New function.
16543 (i386_emit_le_goto): New function.
16544 (i386_emit_gt_goto): New function.
16545 (i386_emit_ge_goto): New function.
16546 (i386_emit_ops): Add the new functions.
16547
16548 2011-09-08 Stan Shebs <stan@codesourcery.com>
16549
16550 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16551 (i386_emit_epilogue): Restore %ebx.
16552
16553 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16554
16555 * server.c (step_thread): Remove definition.
16556 (process_serial_event): Don't handle Hs.
16557 * server.h (step_thread): Remove declaration.
16558 * target.c (set_desired_inferior): Remove use of step_thread.
16559
16560 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16561
16562 * linux-low.c: Include linux-procfs.h.
16563 (linux_attach_lwp_1): Update comments.
16564 (linux_attach): Scan for existing threads when attaching to a
16565 process that is the tgid.
16566 * Makefile.in: Update dependencies.
16567
16568 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16569
16570 * configure.srv: Add linux-procfs.o dependencies.
16571
16572 2011-08-14 Yao Qi <yao@codesourcery.com>
16573
16574 * target.h (struct target_ops): Fix indent.
16575 * win32-low.c (win32_target_ops): Fix comment.
16576
16577 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16578 Yao Qi <yao@codesourcery.com>
16579
16580 * Makefile.in (clean): Remove tic6x-*.c files.
16581 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16582 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16583 (tic6x-c64xp-linux.c): Likewise.
16584 * configure.srv: Add support for tic6x-*-uclinux.
16585 * linux-tic6x-low.c: New.
16586 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16587
16588 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16589 Yao Qi <yao@codesourcery.com>
16590
16591 * target.h (struct target_ops): Add read_loadmap.
16592 * linux-low.c (struct target_loadseg): New type.
16593 (struct target_loadmap): New type.
16594 (linux_read_loadmap): New function.
16595 (linux_target_ops): Add linux_read_loadmap.
16596 * server.c (handle_query): Support qXfer:fdpic:read packet.
16597 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16598 to NULL.
16599
16600 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16601
16602 * win32-low.c: Include <stdint.h>.
16603
16604 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16605
16606 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16607 to the inferior here.
16608 (i386_remove_aligned_watchpoint): Ditto.
16609 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16610 fit part of the watchpoint in the debug registers.
16611 (i386_update_inferior_debug_regs): New.
16612 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16613 registers, and only update the inferior on success.
16614 (i386_low_remove_watchpoint): Ditto.
16615
16616 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16617
16618 * linux-low.c (compare_ints, unique, list_threads, show_process,
16619 linux_core_of_thread): Delete.
16620 (linux_target_ops): Change linux_core_of_thread to
16621 linux_common_core_of_thread.
16622 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16623 * utils.c (malloc_failure): Change type of argument.
16624 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16625 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16626 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16627 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16628 (IPA_OBJS): Add common-utils-ipa.o.
16629 (ptid_h, linux_osdata_h): New macros.
16630 (server_h): Add common/common-utils.h, common/xml-utils.h,
16631 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16632 common/ptid.h.
16633 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16634 ptid.o, buffer.o): New rules.
16635 (linux-low.o): Add common/linux-osdata.h as a dependency.
16636 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16637 * configure.ac: Add AC_HEADER_DIRENT check.
16638 * config.in: Regenerate.
16639 * configure: Regenerate.
16640 * remote-utils.c (xml_escape_text): Delete.
16641 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16642 buffer_xml_printf): Move to common/buffer.c.
16643 * server.c (main): Remove call to initialize_inferiors.
16644 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16645 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16646 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16647 internal_error, gdb_assert, gdb_assert_fail): Delete.
16648 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16649 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16650 common/buffer.h.
16651 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16652 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16653 initialize_inferiors): Delete.
16654
16655 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16656
16657 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16658 symbol error.
16659
16660 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16661
16662 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16663 assertion.
16664 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16665
16666 2011-05-26 Yao Qi <yao@codesourcery.com>
16667
16668 * Makefile.in (thread-db.o): Track dependence to
16669 common/gdb_thread_db.h.
16670 * thread-db.c: include gdb_thread_db.h from right place.
16671
16672 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16673
16674 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16675 __FILE__ and __LINE__ to internal_error.
16676
16677 2011-05-13 Doug Evans <dje@google.com>
16678
16679 * thread-db.c (try_thread_db_load_from_sdir): New function.
16680 (try_thread_db_load_from_dir): New function.
16681 (thread_db_load_search): Handle $sdir, ignore $pdir.
16682 Remove trying of system directories if search of
16683 libthread-db-search-path fails, that is now done via $sdir.
16684
16685 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16686
16687 * server.c (handle_query): Add EnableDisableTracepoints to the list
16688 of supported features.
16689 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16690 tracepoints.
16691 (cmd_qtenable_disable): New.
16692 (cmd_qtstart): Install tracepoints even if disabled.
16693 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16694 receiving a QTEnable or QTDisable packet.
16695 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16696 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16697 tracepoints.
16698 (gdb_probe): Skip data collection if static tracepoint is disabled.
16699
16700 2011-05-10 Doug Evans <dje@google.com>
16701
16702 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16703
16704 2011-05-04 Doug Evans <dje@google.com>
16705
16706 * linux-low.c (linux_join): Skip process lookup.
16707 * spu-low.c (spu_join): Ditto.
16708 * server.c (join_inferiors_callback): Delete.
16709 (process_serial_event): For 'D' packet (detach) call join_inferior
16710 directly.
16711
16712 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16713
16714 * README: Don't mention xscale*-*-linux*.
16715 * configure.srv (xscale*-*-linux*): Don't handle target.
16716
16717 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16718
16719 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16720 casting pointers.
16721 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16722 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16723 (i386_emit_void_call_2): Likewise.
16724
16725 2011-04-26 Yao Qi <yao@codesourcery.com>
16726
16727 * linux-low.c: Move common macros to linux-ptrace.h.
16728 Include linux-ptrace.h.
16729 * Makefile.in (linux_ptrace_h): New.
16730 (linux-low.o): Depends on linux-ptrace.h.
16731
16732 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16733
16734 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16735 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16736 (remote_prepare): New function with most of the TCP code from ...
16737 (remote_open): ... here. Detect PORT here unconditionally. Move also
16738 setting transport_is_reliable.
16739 * server.c (run_once): New variable.
16740 (gdbserver_usage): Document it.
16741 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16742 the first run if RUN_ONCE.
16743 * server.h (run_once, remote_prepare): New declarations.
16744
16745 2011-04-19 Tom Tromey <tromey@redhat.com>
16746
16747 * win32-low.c (handle_load_dll): Remove duplicate "the".
16748
16749 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16750
16751 Remove support for old Cygwin 1.5 versions.
16752 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16753 function to avoid warning.
16754 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16755 warning.
16756
16757 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16758
16759 * gdbserver/server.h (Macro _): Define it if not available.
16760
16761 2011-03-14 Michael Snyder <msnyder@vmware.com>
16762
16763 * hostio.c (handle_close): Remove unnecessary null test.
16764
16765 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16766
16767 * Makefile.in (maintainer-clean realclean distclean): Remove
16768 "make ... subdir_do" command.
16769
16770 2011-03-10 Michael Snyder <msnyder@vmware.com>
16771
16772 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16773
16774 * server.c (handle_v_run): Free alloced buffer on early return.
16775
16776 2011-03-09 Yao Qi <yao@codesourcery.com>
16777
16778 Revert:
16779 2011-03-04 Yao Qi <yao@codesourcery.com>
16780
16781 * Makefile.in: Remove GNU make feature --directory.
16782
16783 2011-03-05 Yao Qi <yao@codesourcery.com>
16784
16785 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16786 (subdir_do): New make target. Copied from gdb/Makefile.
16787 (maintainer-clean, realclean, distclean, clean): Call corresponding
16788 make targets in common/Makefile.
16789
16790 2011-02-11 Yao Qi <yao@codesourcery.com>
16791
16792 * configure.ac: Call AC_PROG_RANLIB.
16793 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16794 * configure: Regenerate.
16795
16796 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16797
16798 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16799
16800 2011-03-06 Yao Qi <yao@codesourcery.com>
16801
16802 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16803
16804 2011-03-05 Yao Qi <yao@codesourcery.com>
16805
16806 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16807 (subdir_do): New make target. Copied from gdb/Makefile.
16808 (maintainer-clean, realclean, distclean, clean): Call corresponding
16809 make targets in common/Makefile.
16810
16811 2011-03-04 Yao Qi <yao@codesourcery.com>
16812
16813 * Makefile.in: Remove GNU make feature --directory.
16814
16815 2011-03-04 Michael Snyder <msnyder@vmware.com>
16816
16817 * server.c (queue_stop_reply): Call xmalloc not malloc.
16818
16819 2011-03-02 Michael Snyder <msnyder@vmware.com>
16820
16821 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16822
16823 2011-02-28 Michael Snyder <msnyder@vmware.com>
16824
16825 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16826 (cmd_qtframe): Ditto.
16827 (cmd_qtbuffer): Ditto.
16828 (cmd_bigqtbuffer): Ditto.
16829
16830 * utils.c (decimal2str): Initialize 'width' to nine, then
16831 don't mess with it.
16832
16833 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16834
16835 * hostio.c (require_data): Free *data, not data.
16836
16837 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16838
16839 * hostio.c (require_data): Use free, not xfree.
16840
16841 2011-02-27 Michael Snyder <msnyder@vmware.com>
16842
16843 * server.c (handle_query): Discard unused value.
16844
16845 * hostio.c (require_data): Free malloc memory before returning
16846 error.
16847
16848 2011-02-26 Michael Snyder <msnyder@vmware.com>
16849
16850 * linux-low.c (list_threads): Call closedir for dirent.
16851
16852 2011-02-27 Michael Snyder <msnyder@vmware.com>
16853
16854 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16855 a case statement falls through.
16856
16857 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16858
16859 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16860 in comparison.
16861
16862 2011-02-26 Michael Snyder <msnyder@vmware.com>
16863
16864 * utils.c (decimal2str): Eliminate dead code and dead param.
16865 (pulongest): Drop dead param from call to decimal2str.
16866 (plongest): Ditto.
16867
16868 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16869
16870 Revert the following patch (not approved yet):
16871 2011-02-21 Hui Zhu <teawater@gmail.com>
16872 * tracepoint.c (tp_printf): New function.
16873 (eval_agent_expr): Handle gdb_agent_op_printf.
16874
16875 2011-02-21 Hui Zhu <teawater@gmail.com>
16876
16877 * tracepoint.c (tp_printf): New function.
16878 (eval_agent_expr): Handle gdb_agent_op_printf.
16879
16880 2011-02-18 Tom Tromey <tromey@redhat.com>
16881
16882 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16883 (tracepoint.o): Likewise.
16884 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16885 (gdb_agent_op_names): Likewise.
16886
16887 2011-02-18 Tom Tromey <tromey@redhat.com>
16888
16889 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16890 gdb_agent_op_rot>: New constants.
16891 (gdb_agent_op_names): Add pick and roll.
16892 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16893 cases.
16894
16895 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16896
16897 * aclocal.m4: Regenerated with aclocal-1.11.1.
16898
16899 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16900
16901 * server.c (handle_qxfer_traceframe_info): New.
16902 (qxfer_packets): Register "traceframe-info".
16903 (handle_query): Report support for qXfer:traceframe-info:read+.
16904 * tracepoint.c (match_blocktype): New.
16905 (traceframe_find_block_type): Rename to ...
16906 (traceframe_walk_blocks): ... this. Add callback filter argument,
16907 and use it.
16908 (traceframe_find_block_type): New, reimplemented on top of
16909 traceframe_walk_blocks.
16910 (build_traceframe_info_xml): New.
16911 (traceframe_read_info): New.
16912 * server.h (traceframe_read_info): Declare.
16913
16914 2011-02-11 Yao Qi <yao@codesourcery.com>
16915
16916 * configure.ac: Call AC_PROG_RANLIB.
16917 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16918 * configure: Regenerate.
16919
16920 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16921
16922 * server.c (gdb_read_memory): Change return semantics to allow
16923 partial transfers.
16924 (handle_search_memory_1): Adjust.
16925 (process_serial_event) <'m' packet>: Handle partial transfers.
16926 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16927
16928 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16929
16930 * regcache.c (init_register_cache): Initialize
16931 regcache->register_status.
16932 (free_register_cache): Release regcache->register_status.
16933 (regcache_cpy): Copy register_status.
16934 (registers_to_string): Print 'x's for unavailable registers.
16935 (supply_register): Mark the register's status valid or
16936 unavailable, depending on whether a buffer was passed in or not.
16937 (supply_register_zeroed): New.
16938 (supply_regblock): Mark the registers' status valid or
16939 unavailable, depending on whether a buffer was passed in or not.
16940 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16941 (struct regcache): New `register_status' field.
16942 (supply_register_zeroed): Declare.
16943 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16944 supply_register_zeroed, rather than passing a NULL buffer to
16945 supply_register.
16946 * tracepoint.c (fetch_traceframe_registers): Update comment.
16947
16948 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16949
16950 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16951 buffer explicit.
16952
16953 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16954
16955 * server.h (decode_xfer_write): Change prototype.
16956 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16957 and don't extract the annex here.
16958 * server.c (decode_xfer_read): Remove `annex' parameter,
16959 and don't extract the annex here.
16960 (decode_xfer): New.
16961 (struct qxfer): New.
16962 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16963 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16964 (handle_qxfer_statictrace): New functions, abstracted out from
16965 handle_query, and made to use the struct qxfer interface.
16966 (handle_threads_qxfer_proper): Rename to ...
16967 (handle_qxfer_threads_proper): ... this.
16968 (handle_threads_qxfer): Rename to ...
16969 (handle_qxfer_threads): ... this. Adjust.
16970 (qxfer_packets): New array.
16971 (handle_qxfer): New function.
16972 (handle_query): Use handle_qxfer.
16973
16974 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16975
16976 * gdbreplay.c: Shorten lines of >= 80 columns.
16977 * linux-low.c: Ditto.
16978 * linux-ppc-low.c: Ditto.
16979 * linux-s390-low.c: Ditto.
16980 * linux-sparc-low.c: Ditto.
16981 * linux-x86-low.c: Ditto.
16982 * linux-xtensa-low.c: Ditto.
16983 * mem-break.c: Ditto.
16984 * nto-low.c: Ditto.
16985 * regcache.h: Ditto.
16986 * remote-utils.c: Ditto.
16987 * server.c: Ditto.
16988 * server.h: Ditto.
16989 * thread-db.c: Ditto.
16990 * tracepoint.c: Ditto.
16991 * utils.c: Ditto.
16992 * win32-low.h: Ditto.
16993
16994 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16995
16996 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16997 update.
16998
16999 2011-01-01 Joel Brobecker <brobecker@adacore.com>
17000
17001 * server.c (gdbserver_version): Update copyright year in version
17002 output.
17003 * gdbreplay.c (gdbreplay_version): Ditto.
17004
17005 2010-12-29 Jie Zhang <jie.zhang@analog.com>
17006
17007 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
17008 * linux-bfin-low.c: New file.
17009 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
17010 PT_DATA_ADDR for BFIN targets.
17011 * Makefile.in (SFILES): Add linux-bfin-low.c.
17012 (clean): Remove reg-bfin.c.
17013 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
17014 * README: Mention supported Blackfin targets.
17015
17016 2010-12-23 Mike Frysinger <vapier@gentoo.org>
17017
17018 * .gitignore: New file.
17019
17020 2010-11-16 Mike Frysinger <vapier@gentoo.org>
17021
17022 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
17023
17024 2010-10-22 Jie Zhang <jie@codesourcery.com>
17025
17026 * Makefile.in: Add FLAGS_TO_PASS variable.
17027 (install): Remove dependency of install-only and recursively
17028 invoke make for install-only.
17029
17030 2010-10-04 Doug Evans <dje@google.com>
17031
17032 * Makefile.in (uninstall): Use $(DESTDIR).
17033
17034 2010-09-24 Pedro Alves <pedro@codesourcery.com>
17035
17036 PR gdb/11842
17037
17038 * linux-x86-low.c (compat_siginfo_from_siginfo)
17039 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
17040 si_code is < 0. Check for si_code == SI_TIMER before checking for
17041 si_code < 0.
17042
17043 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17044
17045 * lynx-i386-low.c: New file.
17046 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
17047
17048 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17049
17050 * lynx-low.c (ptrace_request_to_str): Remove handling for
17051 request values that have been removed in LynxOS 5.x.
17052
17053 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17054
17055 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
17056 <ptrace.h>
17057
17058 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
17059
17060 * configure.ac: Add --enable-inprocess-agent option.
17061 * configure: Rebuilt.
17062
17063 2010-09-06 Yao Qi <yao@codesourcery.com>
17064
17065 * linux-low.c (linux_kill): Remove unused variable.
17066 (linux_stabilize_threads): Likewise.
17067 * server.c (start_inferior): Likewise.
17068 (queue_stop_reply_callback): Likewise.
17069 * tracepoint.c (do_action_at_tracepoint): Likewise.
17070
17071 2010-09-06 Yao Qi <yao@codesourcery.com>
17072
17073 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
17074 on return.
17075
17076 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
17077
17078 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
17079
17080 2010-09-06 Pedro Alves <pedro@codesourcery.com>
17081
17082 * Makefile.in (install-only): Replace $IPA_DEPFILES with
17083 "$(IPA_DEPFILES)".
17084
17085 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17086
17087 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
17088 gdbserver/lynx-ppc-low.c: New files.
17089 * Makefile.in (lynx_low_h): New variable.
17090 (lynx-low.o, lynx-ppc-low.o): New rules.
17091 * configure.ac: On LynxOS, link with -lnetinet.
17092 * configure.srv: Add handling of powerpc-*-lynxos* targets.
17093 * configure: regenerate.
17094
17095 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17096
17097 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
17098 * configure.ac: Add check for vasprintf and vsnprintf.
17099 * configure, config.in: Regenerate.
17100 * server.h (vasprintf, vsnprintf): Add conditional declarations.
17101
17102 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17103
17104 * gdbreplay.c: Move include of alloca.h up, next to include of
17105 malloc.h.
17106 * server.h: Add include of malloc.h.
17107 * mem-break.c: Remove include of malloc.h.
17108 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
17109
17110 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17111
17112 * Makefile.in (memmem.o): Build with -Wno-error.
17113
17114 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17115
17116 * utils.c (xsnprintf): Make non-static.
17117 * server.h: Add xsnprintf declaration.
17118 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
17119 replace calls to snprintf by calls to xsnprintf throughout.
17120
17121 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17122
17123 * configure.ac: Add configure check for alloca.
17124 * configure, config.in: Regenerate.
17125 * server.h: Include alloca.h if it exists.
17126 * gdbreplay.c: Include alloca.h if it exists.
17127
17128 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17129
17130 * linux-low.c (__SIGRTMIN): Define if not already defined.
17131 (linux_create_inferior): Check for __ANDROID__ rather than
17132 __SIGRTMIN.
17133 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17134 are already deferred.
17135 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17136 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17137 stopped and already has a pending signal to report.
17138 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17139 a pending signal to report or is moving out of a jump pad.
17140 (linux_init_signals): Check for __ANDROID__ rather than
17141 __SIGRTMIN.
17142
17143 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17144
17145 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17146 debug_threads check. Avoid a linear search when not doing debug
17147 output.
17148
17149 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17150
17151 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17152 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17153 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17154 (process_event): Change local fd's type to gdb_fildes_t.
17155 (create_file_handler): Adjust prototype.
17156 (delete_file_handler): Adjust prototype.
17157 (handle_file_event): Adjust prototype. Use pfildes.
17158 (create_file_event): Adjsut prototype.
17159 * remote-utils.c (remote_desc, listen_desc): Change type to
17160 gdb_fildes_t.
17161 * server.h: New gdb_fildes_t typedef.
17162 [USE_WIN32API]: Include winsock2.h.
17163 (delete_file_handler, add_file_handler): Adjust prototypes.
17164 (pfildes): Declare.
17165 * utils.c (pfildes): New.
17166
17167 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17168
17169 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17170 * configure: Regenerate.
17171
17172 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17173
17174 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17175 (linux_done_accessing_memory): ... this.
17176 (linux_target_ops): Adjust.
17177 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17178 * nto-low.c (nto_target_ops): Adjust comment.
17179 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17180 * spu-low.c (spu_target_ops): Adjust comment.
17181 * target.h (target_ops): Rename unprepare_to_access_memory field
17182 to done_accessing_memory.
17183 (unprepare_to_access_memory): Rename to ...
17184 (done_accessing_memory): ... this.
17185
17186 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17187
17188 * linux-low.c (linux_prepare_to_access_memory): New.
17189 (linux_unprepare_to_access_memory): New.
17190 (linux_target_ops): Install them.
17191 * server.c (read_memory): Rename to ...
17192 (gdb_read_memory): ... this. Use
17193 prepare_to_access_memory/prepare_to_access_memory.
17194 (write_memory): Rename to ...
17195 (gdb_write_memory): ... this. Use
17196 prepare_to_access_memory/prepare_to_access_memory.
17197 (handle_search_memory_1): Adjust.
17198 (process_serial_event): Adjust.
17199 * target.h (struct target_ops): New fields
17200 prepare_to_access_memory and unprepare_to_access_memory.
17201 (prepare_to_access_memory, unprepare_to_access_memory): New.
17202 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17203 prepare_to_access_memory/prepare_to_access_memory.
17204 * nto-low.c (nto_target_ops): Adjust.
17205 * spu-low.c (spu_target_ops): Adjust.
17206 * win32-low.c (win32_target_ops): Adjust.
17207
17208 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17209
17210 * Makefile.in (WARN_CFLAGS): Get it from configure.
17211 (WERROR_CFLAGS): New.
17212 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17213 * configure.ac: Introduce --enable-werror, which adds -Werror to
17214 the compiler command line. Enabled by default. Disable with
17215 --disable-werror. Add -Wdeclaration-after-statement
17216 Wpointer-arith and -Wformat-nonliteral to warning flags.
17217 * configure: Regenerate.
17218
17219 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17220
17221 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17222
17223 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17224
17225 * gdbreplay.c (remote_error): New.
17226 (gdbchar): New.
17227 (expect): Use gdbchar. Check for error reading from GDB.
17228 Clarify sync error output.
17229 (play): Check for errors writing to GDB.
17230 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17231 * remote-utils.c (getpkt): Check for errors writing to the remote
17232 descriptor.
17233
17234 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17235
17236 * linux-low.c (linux_wait_1): Move non-debugging code out of
17237 `debug_threads' control.
17238
17239 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17240
17241 * linux-low.c (linux_wait_1): Don't set last_status here.
17242 * server.c (push_event, queue_stop_reply_callback): Assert we're
17243 not pushing a TARGET_WAITKIND_IGNORE event.
17244 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17245 (myresume, handle_target_event): Set the thread's last_resume_kind
17246 and last_status from the target returned status.
17247
17248 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17249
17250 PR threads/10729
17251
17252 * linux-x86-low.c (update_debug_registers_callback): New.
17253 (i386_dr_low_set_addr): Use it.
17254 (i386_dr_low_get_addr): New.
17255 (i386_dr_low_set_control): Use update_debug_registers_callback.
17256 (i386_dr_low_get_control): New.
17257 (i386_dr_low_get_status): Adjust.
17258 * linux-low.c (linux_stop_lwp): New.
17259 * linux-low.h (linux_stop_lwp): Declare.
17260
17261 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17262 argument instead of a i386_debug_reg_state.
17263 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17264 a i386_debug_reg_state.
17265 (i386_insert_aligned_watchpoint): Adjust.
17266 (i386_remove_aligned_watchpoint): Adjust.
17267 (i386_low_stopped_data_address): Read the debug registers from the
17268 inferior instead of from the mirrors.
17269 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17270 (i386_dr_low_get_addr): Declare.
17271 (i386_dr_low_get_control): Declare.
17272 (i386_dr_low_get_status): Change prototype.
17273
17274 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17275 (i386_dr_low_get_addr): New.
17276 (i386_dr_low_get_control): New.
17277 (i386_dr_low_get_status): Adjust prototype. Return
17278 dr_status_mirror.
17279 (i386_initial_stuff): Clear dr_status_mirror and
17280 dr_control_mirror.
17281 (i386_get_thread_context): Adjust.
17282 (i386_set_thread_context): Adjust.
17283 (i386_thread_added): Adjust.
17284
17285 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17286
17287 * linux-low.h (linux_thread_area): Delete declaration.
17288
17289 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17290
17291 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17292 after its termination.
17293
17294 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17295
17296 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17297 (gdb_wants_all_stopped): Delete.
17298 (linux_wait_1): Don't call them.
17299 * server.c (handle_v_cont): Tag all threads as want-stopped.
17300 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17301 stopped as "client-wants-stopped".
17302
17303 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17304
17305 * Makefile.in (signals_h): New.
17306 (server_h): Depend on it.
17307 (server.o): Don't depend on $(signals_def).
17308 (signals.o): Depend on $(signals_def).
17309
17310 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17311
17312 * Makefile.in (signals_def): New.
17313 (server_h): Append include/gdb/signals.h and signals_def.
17314 (server.o): Append signals_def.
17315
17316 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17317
17318 * server.c (handle_target_event): Use target_signal_to_host for
17319 resume_info.sig initialization.
17320 * target.h (struct thread_resume) <sig>: New comment.
17321
17322 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17323
17324 * server.c (handle_query): strcpy() the returned string from paddress()
17325 instead of sprintf().
17326 * utils.c (paddress): Return phex_nz().
17327
17328 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17329
17330 * server.c (handle_v_cont): Call mourn_inferior if process
17331 just exited.
17332 (myresume): Likewise.
17333
17334 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17335
17336 Static tracepoints, and integration with UST.
17337
17338 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17339 * mem-break.c (uninsert_all_breakpoints)
17340 (reinsert_all_breakpoints): New.
17341 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17342 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17343 (gdb_agent_ust_loaded, helper_thread_id)
17344 (gdb_agent_helper_thread_id): New macros.
17345 (struct ipa_sym_addresses): Add addr_ust_loaded,
17346 addr_helper_thread_id, addr_cmd_buf.
17347 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17348 (in_process_agent_loaded_ust): New.
17349 (write_e_ust_not_loaded): New.
17350 (maybe_write_ipa_ust_not_loaded): New.
17351 (struct collect_static_trace_data_action): New.
17352 (enum tracepoint_type) <static_tracepoint>: New.
17353 (struct tracepoint) <handle>: Mention static tracepoints.
17354 (struct static_tracepoint_ctx): New.
17355 (CMD_BUF_SIZE): New.
17356 (add_tracepoint_action): Handle static tracepoint actions.
17357 (unprobe_marker_at): New.
17358 (clear_installed_tracepoints): Handle static tracepoints.
17359 (cmd_qtdp): Handle static tracepoints.
17360 (probe_marker_at): New.
17361 (cmd_qtstart): Handle static tracepoints.
17362 (response_tracepoint): Handle static tracepoints.
17363 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17364 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17365 (get_context_regcache): Handle static tracepoints.
17366 (do_action_at_tracepoint): Handle static tracepoint actions.
17367 (traceframe_find_block_type): Handle static trace data blocks.
17368 (traceframe_read_sdata): New.
17369 (download_tracepoints): Download static tracepoint actions.
17370 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17371 (GDB_PROBE_NAME): New.
17372 (ust_ops): New.
17373 (GET_UST_SYM): New.
17374 (USTF): New.
17375 (dlsym_ust): New.
17376 (ust_marker_to_static_tracepoint): New.
17377 (gdb_probe): New.
17378 (collect_ust_data_at_tracepoint): New.
17379 (gdb_ust_probe): New.
17380 (UNIX_PATH_MAX, SOCK_DIR): New.
17381 (gdb_ust_connect_sync_socket): New.
17382 (resume_thread, stop_thread): New.
17383 (run_inferior_command): New.
17384 (init_named_socket): New.
17385 (gdb_ust_socket_init): New.
17386 (cstr_to_hexstr): New.
17387 (next_st): New.
17388 (first_marker, next_marker): New.
17389 (response_ust_marker): New.
17390 (cmd_qtfstm, cmd_qtsstm): New.
17391 (unprobe_marker_at, probe_marker_at): New.
17392 (cmd_qtstmat, gdb_ust_thread): New.
17393 (gdb_ust_init): New.
17394 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17395 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17396 (ST_REGENTRY): New.
17397 (x86_64_st_collect_regmap): New.
17398 (X86_64_NUM_ST_COLLECT_GREGS): New.
17399 (AMD64_RIP_REGNUM): New.
17400 (supply_static_tracepoint_registers): New.
17401 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17402 (ST_REGENTRY): New.
17403 (i386_st_collect_regmap): New.
17404 (i386_NUM_ST_COLLECT_GREGS): New.
17405 (supply_static_tracepoint_registers): New.
17406 * server.c (handle_query): Handle qXfer:statictrace:read.
17407 <qSupported>: Report support for StaticTracepoints, and
17408 qXfer:statictrace:read features.
17409 * server.h (traceframe_read_sdata)
17410 (supply_static_tracepoint_registers): Declare.
17411 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17412 (unpack_varlen_hex): Include in IPA build.
17413 * Makefile.in (ustlibs, ustinc): New.
17414 (IPA_OBJS): Add remote-utils-ipa.o.
17415 ($(IPA_LIB)): Link -ldl and -lpthread.
17416 (UST_CFLAGS): New.
17417 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17418 * config.in, configure: Regenerate.
17419
17420 2010-06-20 Ian Lance Taylor <iant@google.com>
17421 Pedro Alves <pedro@codesourcery.com>
17422
17423 * linux-x86-low.c (always_true): Delete.
17424 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17425 trying to fool the compiler with always_true.
17426
17427 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17428
17429 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17430 conditions in gdbserver.
17431
17432 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17433
17434 * spu-low.c (spu_read_memory): Wrap around local store limit.
17435 (spu_write_memory): Likewise.
17436
17437 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17438
17439 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17440 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17441 LONGEST uses.
17442 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17443 uses.
17444 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17445 uses with LONGEST uses.
17446
17447 2010-06-14 Stan Shebs <stan@codesourcery.com>
17448 Pedro Alves <pedro@codesourcery.com>
17449
17450 Bytecode compiler.
17451
17452 * linux-x86-low.c: Include limits.h.
17453 (add_insns): New.
17454 (always_true): New.
17455 (EMIT_ASM): New.
17456 (EMIT_ASM32): New.
17457 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17458 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17459 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17460 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17461 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17462 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17463 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17464 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17465 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17466 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17467 (amd64_emit_void_call_2): New.
17468 (amd64_emit_ops): New.
17469 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17470 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17471 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17472 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17473 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17474 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17475 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17476 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17477 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17478 (i386_emit_stack_adjust, i386_emit_int_call_1)
17479 (i386_emit_void_call_2): New.
17480 (i386_emit_ops): New.
17481 (x86_emit_ops): New.
17482 (the_low_target): Install x86_emit_ops.
17483 * server.h (struct emit_ops): New.
17484 (get_raw_reg_func_addr): Declare.
17485 (current_insn_ptr, emit_error): Declare.
17486 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17487 (set_trace_state_variable_value): New defines.
17488 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17489 addr_get_trace_state_variable_value and
17490 addr_set_trace_state_variable_value.
17491 (symbol_list): New fields for get_raw_reg,
17492 get_trace_state_variable_value and set_trace_state_variable_value.
17493 (condfn): New typedef.
17494 (struct tracepoint): New field `compiled_cond'.
17495 (do_action_at_tracepoint): Clear compiled_cond.
17496 (get_trace_state_variable_value, set_trace_state_variable_value):
17497 Export in the IPA.
17498 (condition_true_at_tracepoint): If there's a compiled condition,
17499 run that.
17500 (current_insn_ptr, emit_error): New globals.
17501 (struct bytecode_address): New.
17502 (get_raw_reg_func_addr): New.
17503 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17504 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17505 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17506 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17507 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17508 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17509 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17510 (compile_tracepoint_condition, compile_bytecodes): New.
17511 * target.h (emit_ops): Forward declare.
17512 (struct target_ops): New field emit_ops.
17513 (target_emit_ops): New.
17514 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17515 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17516 * linux-low.c (linux_emit_ops): New.
17517 (linux_target_ops): Install it.
17518 * linux-low.h (struct linux_target_ops): New field emit_ops.
17519
17520 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17521
17522 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17523 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17524
17525 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17526 Stan Shebs <stan@codesourcery.com>
17527
17528 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17529 (all): Depend on $(extra_libraries).
17530 (install-only): Install the IPA.
17531 (IPA_OBJS, IPA_LIB): New.
17532 (clean): Remove the IPA lib.
17533 (IPAGENT_CFLAGS): New.
17534 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17535 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17536 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17537 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17538 * configure.ac: Check for atomic builtins support in the compiler.
17539 (IPA_DEPFILES, extra_libraries): Define.
17540 * configure.srv (ipa_obj): Add description.
17541 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17542 (i[34567]86-*-linux*): Set ipa_obj.
17543 (x86_64-*-linux*): Set ipa_obj.
17544 * linux-low.c (stabilizing_threads): New.
17545 (supports_fast_tracepoints): New.
17546 (linux_detach): Stabilize threads before detaching.
17547 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17548 the lwp is either not stabilizing, or is moving out of a jump pad.
17549 (linux_fast_tracepoint_collecting): New.
17550 (maybe_move_out_of_jump_pad): New.
17551 (enqueue_one_deferred_signal): New.
17552 (dequeue_one_deferred_signal): New.
17553 (linux_wait_for_event_1): If moving out of a jump pad, defer
17554 pending signals to later.
17555 (linux_stabilize_threads): New.
17556 (linux_wait_1): Check if threads need moving out of jump pads, and
17557 do it if so.
17558 (stuck_in_jump_pad_callback): New.
17559 (move_out_of_jump_pad_callback): New.
17560 (lwp_running): New.
17561 (linux_resume_one_lwp): Handle moving out of jump pads.
17562 (linux_set_resume_request): Dequeue deferred signals.
17563 (need_step_over_p): Also step over fast tracepoint jumps.
17564 (start_step_over): Also uninsert fast tracepoint jumps.
17565 (finish_step_over): Also reinsert fast tracepoint jumps.
17566 (linux_install_fast_tracepoint_jump): New.
17567 (linux_target_ops): Install linux_stabilize_threads and
17568 linux_install_fast_tracepoint_jump_pad.
17569 * linux-low.h (linux_target_ops) <get_thread_area,
17570 install_fast_tracepoint_jump_pad>: New fields.
17571 (struct lwp_info) <collecting_fast_tracepoint,
17572 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17573 (linux_get_thread_area): Declare.
17574 * linux-x86-low.c (jump_insn): New.
17575 (x86_get_thread_area): New.
17576 (append_insns): New.
17577 (push_opcode): New.
17578 (amd64_install_fast_tracepoint_jump_pad): New.
17579 (i386_install_fast_tracepoint_jump_pad): New.
17580 (x86_install_fast_tracepoint_jump_pad): New.
17581 (the_low_target): Install x86_get_thread_area and
17582 x86_install_fast_tracepoint_jump_pad.
17583 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17584 (struct fast_tracepoint_jump): New.
17585 (fast_tracepoint_jump_insn): New.
17586 (fast_tracepoint_jump_shadow): New.
17587 (find_fast_tracepoint_jump_at): New.
17588 (fast_tracepoint_jump_here): New.
17589 (delete_fast_tracepoint_jump): New.
17590 (set_fast_tracepoint_jump): New.
17591 (uninsert_fast_tracepoint_jumps_at): New.
17592 (reinsert_fast_tracepoint_jumps_at): New.
17593 (set_breakpoint_at): Use write_inferior_memory.
17594 (uninsert_raw_breakpoint): Use write_inferior_memory.
17595 (check_mem_read): Mask out fast tracepoint jumps.
17596 (check_mem_write): Mask out fast tracepoint jumps.
17597 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17598 (set_fast_tracepoint_jump): Declare.
17599 (delete_fast_tracepoint_jump)
17600 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17601 (reinsert_fast_tracepoint_jumps_at): Declare.
17602 * regcache.c: Don't compile many functions when building the
17603 in-process agent library.
17604 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17605 the register buffer in the heap.
17606 (free_register_cache): If the register buffer isn't owned by the
17607 regcache, don't free it.
17608 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17609 pre-existing register caches.
17610 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17611 type.
17612 (convert_ascii_to_int): : Constify `from' parameter type.
17613 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17614 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17615 the needed buffer in-place.
17616 (relocate_instruction): New.
17617 * server.c (handle_query) <qSymbols>: If the target supports
17618 tracepoints, give it a chance of looking up symbols. Report
17619 support for fast tracepoints.
17620 (handle_status): Stabilize threads.
17621 (process_serial_event): Adjust.
17622 * server.h (struct fast_tracepoint_jump): Forward declare.
17623 (struct process_info) <fast_tracepoint_jumps>: New field.
17624 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17625 (decode_X_packet, decode_M_packet): Adjust.
17626 (relocate_instruction): Declare.
17627 (in_process_agent_loaded): Declare.
17628 (tracepoint_look_up_symbols): Declare.
17629 (struct fast_tpoint_collect_status): Declare.
17630 (fast_tracepoint_collecting): Declare.
17631 (force_unlock_trace_buffer): Declare.
17632 (handle_tracepoint_bkpts): Declare.
17633 (initialize_low_tracepoint)
17634 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17635 * target.h (struct target_ops) <stabilize_threads,
17636 install_fast_tracepoint_jump_pad>: New fields.
17637 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17638 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17639 [HAVE_STDINT_H]: Include stdint.h.
17640 (trace_debug_1): Rename to ...
17641 (trace_vdebug): ... this.
17642 (trace_debug): Rename to ...
17643 (trace_debug_1): ... this. Add `level' parameter.
17644 (trace_debug): New.
17645 (ATTR_USED, ATTR_NOINLINE): New.
17646 (IP_AGENT_EXPORT): New.
17647 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17648 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17649 (about_to_request_buffer_space, trace_buffer_is_full)
17650 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17651 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17652 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17653 (traceframe_write_count, traceframes_created)
17654 (trace_state_variables)
17655 New renaming defines.
17656 (struct ipa_sym_addresses): New.
17657 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17658 (symbol_list): New.
17659 (ipa_sym_addrs): New.
17660 (all_tracepoint_symbols_looked_up): New.
17661 (in_process_agent_loaded): New.
17662 (write_e_ipa_not_loaded): New.
17663 (maybe_write_ipa_not_loaded): New.
17664 (tracepoint_look_up_symbols): New.
17665 (debug_threads) [IN_PROCESS_AGENT]: New.
17666 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17667 (UNKNOWN_SIDE_EFFECTS): New.
17668 (stop_tracing): New.
17669 (flush_trace_buffer): New.
17670 (stop_tracing_bkpt): New.
17671 (flush_trace_buffer_bkpt): New.
17672 (read_inferior_integer): New.
17673 (read_inferior_uinteger): New.
17674 (read_inferior_data_pointer): New.
17675 (write_inferior_data_pointer): New.
17676 (write_inferior_integer): New.
17677 (write_inferior_uinteger): New.
17678 (struct collect_static_trace_data_action): Delete.
17679 (enum tracepoint_type): New.
17680 (struct tracepoint) <type>: New field `type'.
17681 <actions_str, step_actions, step_actions_str>: Only include in
17682 GDBserver.
17683 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17684 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17685 (tracepoints): Use IP_AGENT_EXPORT.
17686 (last_tracepoint): Don't include in the IPA.
17687 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17688 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17689 (alloced_trace_state_variables): New.
17690 (trace_state_variables): Use IP_AGENT_EXPORT.
17691 (traceframe_t): Delete unused variable.
17692 (circular_trace_buffer): Don't include in the IPA.
17693 (trace_buffer_start): Delete.
17694 (struct trace_buffer_control): New.
17695 (trace_buffer_free): Delete.
17696 (struct ipa_trace_buffer_control): New.
17697 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17698 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17699 New.
17700 (trace_buffer_ctrl): New.
17701 (TRACE_BUFFER_CTRL_CURR): New.
17702 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17703 Reimplement as macros.
17704 (trace_buffer_wrap): Delete.
17705 (traceframe_write_count, traceframe_read_count)
17706 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17707 (struct tracepoint_hit_ctx) <type>: New field.
17708 (struct fast_tracepoint_ctx): New.
17709 (memory_barrier): New.
17710 (cmpxchg): New.
17711 (record_tracepoint_error): Update atomically in the IPA.
17712 (clear_inferior_trace_buffer): New.
17713 (about_to_request_buffer_space): New.
17714 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17715 updating the same buffer.
17716 (add_tracepoint): Default the tracepoint's type to trap
17717 tracepoint, and orig_size to -1.
17718 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17719 internal variables.
17720 (create_trace_state_variable): New parameter `gdb'. Handle it.
17721 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17722 (cmd_qtdp): Handle fast tracepoints.
17723 (cmd_qtdv): Adjust.
17724 (max_jump_pad_size): New.
17725 (gdb_jump_pad_head): New.
17726 (get_jump_space_head): New.
17727 (claim_jump_space): New.
17728 (sort_tracepoints): New.
17729 (MAX_JUMP_SIZE): New.
17730 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17731 IPA.
17732 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17733 support. Upload fast traceframes, and delete internal IPA
17734 breakpoints.
17735 (stop_tracing_handler): New.
17736 (flush_trace_buffer_handler): New.
17737 (cmd_qtstop): Upload fast tracepoints.
17738 (response_tracepoint): Handle fast tracepoints.
17739 (tracepoint_finished_step): Upload fast traceframes. Set the
17740 tracepoint hit context's tracepoint type.
17741 (handle_tracepoint_bkpts): New.
17742 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17743 type. Add comment about fast tracepoints.
17744 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17745 non-existing action_str field.
17746 (get_context_regcache): Handle fast tracepoints.
17747 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17748 to the regcache.
17749 (fast_tracepoint_from_jump_pad_address): New.
17750 (fast_tracepoint_from_ipa_tpoint_address): New.
17751 (collecting_t): New.
17752 (force_unlock_trace_buffer): New.
17753 (fast_tracepoint_collecting): New.
17754 (collecting): New.
17755 (gdb_collect): New.
17756 (write_inferior_data_ptr): New.
17757 (target_tp_heap): New.
17758 (target_malloc): New.
17759 (download_agent_expr): New.
17760 (UALIGN): New.
17761 (download_tracepoints): New.
17762 (download_trace_state_variables): New.
17763 (upload_fast_traceframes): New.
17764 (IPA_FIRST_TRACEFRAME): New.
17765 (IPA_NEXT_TRACEFRAME_1): New.
17766 (IPA_NEXT_TRACEFRAME): New.
17767 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17768 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17769 (gdb_jump_pad_buffer_end): New.
17770 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17771 (initialize_tracepoint): Adjust.
17772 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17773 buffer. Initialize the low module.
17774 * utils.c (PREFIX, TOOLNAME): New.
17775 (malloc_failure): Use PREFIX.
17776 (error): In the IPA, an error causes an exit.
17777 (fatal, warning): Use PREFIX.
17778 (internal_error): Use TOOLNAME.
17779 (NUMCELLS): Increase to 10.
17780 * configure, config.in: Regenerate.
17781
17782 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17783
17784 * server.c (handle_query) <qSupported>: Do two passes over the
17785 qSupported string to avoid nesting strtok.
17786
17787 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17788
17789 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17790 (CDEPS): New.
17791 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17792 -Wl,--dynamic-list.
17793 * configure: Regenerate.
17794 * proc-service.list: New.
17795
17796 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17797
17798 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17799 New comment.
17800
17801 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17802
17803 * gdbreplay.c (remote_open): Check error return from socket() call by
17804 its equality to -1 not by it being negative.
17805 * remote-utils.c (remote_open): Likewise.
17806
17807 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17808
17809 * config.h: Regenerate.
17810
17811 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17812
17813 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17814 doesn't provide PTRACE_GET_THREAD_AREA.
17815
17816 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17817
17818 * linux-m68k-low.c: Include <asm/ptrace.h>
17819 (ps_get_thread_area): Implement.
17820
17821 2010-05-03 Doug Evans <dje@google.com>
17822
17823 * event-loop.c (struct callback_event): New struct.
17824 (callback_list): New global.
17825 (append_callback_event, delete_callback_event): New functions.
17826 (process_callback): New function.
17827 (start_event_loop): Call it.
17828 * remote-utils.c (NOT_SCHEDULED): Define.
17829 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17830 moved out of readchar.
17831 (readchar): Rewrite. Call reschedule before returning.
17832 (reset_readchar): New function.
17833 (remote_close): Call it.
17834 (process_remaining, reschedule): New functions.
17835 * server.h (callback_handler_func): New typedef.
17836 (append_callback_event, delete_callback_event): Declare.
17837
17838 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17839
17840 * proc-service.c (ps_pglobal_lookup): Use
17841 thread_db_look_up_one_symbol.
17842 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17843 parameter. Use it instead of all_symbols_looked_up.
17844 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17845 field.
17846 (all_symbols_looked_up): Don't declare.
17847 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17848 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17849 field.
17850 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17851 Set all_symbols_looked_up here.
17852 (thread_db_look_up_one_symbol): New.
17853 (thread_db_get_tls_address): Adjust.
17854 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17855 thread_db object on the heap, and tentatively set it in the
17856 process structure.
17857 (thread_db_init): Don't set all_symbols_looked_up here.
17858 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17859
17860 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17861
17862 * linux-low.c (linux_kill, linux_detach): Adjust.
17863 (status_pending_p_callback): Remove redundant statement. Check
17864 for !TARGET_WAITIKIND_IGNORE, instead of
17865 TARGET_WAITKIND_STOPPED.
17866 (handle_tracepoints): Make sure LWP is locked. Adjust.
17867 (linux_wait_for_event_1): Adjust.
17868 (linux_cancel_breakpoints): New.
17869 (unsuspend_one_lwp): New.
17870 (unsuspend_all_lwps): New.
17871 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17872 (send_sigstop_callback): Change return type to int, add new
17873 `except' parameter and handle it.
17874 (suspend_and_send_sigstop_callback): New.
17875 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17876 pass them down. If SUSPEND, also increment the lwp's suspend
17877 count.
17878 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17879 (need_step_over_p): Don't consider suspended LWPs.
17880 (start_step_over): Adjust.
17881 (proceed_one_lwp): Change return type to int, add new `except'
17882 parameter and handle it.
17883 (unsuspend_and_proceed_one_lwp): New.
17884 (proceed_all_lwps): Use find_inferior instead of
17885 for_each_inferior.
17886 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17887 also decrement the suspend count of LWPs. Pass `except' down,
17888 instead of hacking its suspend count.
17889 (linux_pause_all): Add `freeze' parameter. Adjust.
17890 (linux_unpause_all): New.
17891 (linux_target_ops): Install linux_unpause_all.
17892 * server.c (handle_status): Adjust.
17893 * target.h (struct target_ops): New fields `unpause_all' and
17894 `cancel_breakpoints'. Add new parameter to `pause_all'.
17895 (pause_all): Add new `freeze' parameter.
17896 (unpause_all): New.
17897 (cancel_breakpoints): New.
17898 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17899 cancel breakpoints.
17900 (cmd_qtstart): Pause threads.
17901 (stop_tracing): Pause threads, and cancel breakpoints.
17902 * win32-low.c (win32_target_ops): Adjust.
17903
17904 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17905
17906 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17907 the inferior right away from here...
17908 (linux_wait_1): ... to here, and adjust to check the thread's
17909 last_resume_kind instead of the lwp's step or stop_expected flags.
17910
17911 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17912
17913 * README: Use consistent `GDB' and `GDBserver' spellings.
17914
17915 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17916
17917 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17918 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17919 (linux_detach_one_lwp): Assume the lwp is stopped.
17920 (any_thread_of): Delete.
17921 (linux_detach): Stop all lwps here. Don't blindly delete all
17922 breakpoints.
17923 (delete_lwp_callback): New.
17924 (linux_mourn): Delete all lwps of the process that is gone.
17925 (linux_wait_1): Don't delete the last lwp of the process here.
17926 * mem-break.h (mark_breakpoints_out): Declare.
17927 * mem-break.c (mark_breakpoints_out): New.
17928 (free_all_breakpoints): Use it.
17929 * server.c (handle_target_event): If the process is gone, mark
17930 breakpoints out.
17931 * thread-db.c (struct thread_db) <create_bp>: New field.
17932 (thread_db_enable_reporting): Fix prototype. Store a thread event
17933 breakpoint reference in the thread_db struct.
17934 (thread_db_load_search): Clear the thread_db object.
17935 (try_thread_db_load_1): Ditto.
17936 (switch_to_process): New.
17937 (disable_thread_event_reporting): Use it.
17938 (remove_thread_event_breakpoints): New.
17939 (thread_db_detach, thread_db_mourn): Use it.
17940
17941 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17942
17943 * linux-low.c (linux_enable_event_reporting): New.
17944 (linux_wait_for_event_1, handle_extended_wait): Use it.
17945
17946 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17947
17948 * linux-low.c (linux_kill_one_lwp, linux_kill)
17949 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17950 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17951 SIGSTOP even if the LWP is stopped.
17952 (send_sigstop_callback): New.
17953 (stop_all_lwps): Use send_sigstop_callback instead.
17954 (linux_resume_one_thread): Adjust.
17955 (proceed_one_lwp): Still proceed an LWP that the client has
17956 requested to stop, if we haven't reported it as stopped yet. Make
17957 sure that LWPs the client want stopped, have a pending SIGSTOP.
17958
17959 2010-04-26 Doug Evans <dje@google.com>
17960
17961 * server.c (handle_general_set): Make static.
17962
17963 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17964 Print received char after testing for error/eof instead of before.
17965 (input_interrupt): Tweak comment.
17966
17967 2010-04-23 Doug Evans <dje@google.com>
17968
17969 * server.c (start_inferior): Print inferior argv if --debug.
17970
17971 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17972
17973 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17974 * nto-x86-low.c: Include server.h
17975
17976 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17977
17978 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17979 be consistent with other sources of this directory.
17980 (init_registers_amd64): Correct name of source file of this function
17981 in the comment.
17982
17983 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17984
17985 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17986 64-bit executables.
17987
17988 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17989
17990 * win32-i386-low.c: Add 64-bit support.
17991 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17992 (init_registers_amd64): Declare.
17993 (mappings): Add 64-bit version of array.
17994 (init_windows_x86): New function.
17995 (the_low_target): Change init_arch field to init_windows_x86.
17996
17997 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17998
17999 * win32-low.c: Adapt to support also 64-bit architecture.
18000 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
18001 (get_image_name): Use SIZE_T type for local variable `done'.
18002 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
18003 (toolhelp_get_dll_name): Idem.
18004 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
18005 Use uintptr_t typecast to avoid warning.
18006 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
18007 (handle_exception): Use phex_nz to avoid warning.
18008 (win32_wait): Remove unused local variable `process'.
18009
18010 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18011
18012 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
18013 `amd64-avx.o'.
18014
18015 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
18016
18017 * configure.ac: Use `ws2_32' library for srv_mingw.
18018 * configure: Regenerate.
18019 * gdbreplay.c: Include winsock2.h instead of winsock.h.
18020 * remote-utils.c: Likewise.
18021
18022 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
18023
18024 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
18025 if __x86_64__ is defined.
18026
18027 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18028
18029 * configure: Regenerate.
18030
18031 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18032
18033 * server.c (handle_query): Handle 'qGetTIBAddr' query.
18034 * target.h (target_ops): New get_tib_address field.
18035 * win32-low.h (win32_thread_info): Add thread_local_base field.
18036 * win32-low.c (child_add_thread): Add tlb argument.
18037 Set thread_local_base field to TLB.
18038 (get_child_debug_event): Adapt to child_add_thread change.
18039 (win32_get_tib_address): New function.
18040 (win32_target_ops): Set get_tib_address field to
18041 win32_get_tib_address.
18042 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
18043
18044 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18045
18046 * linux-low.c (linux_mourn): Also remove the process.
18047 * server.c (handle_target_event): Don't remove the process here.
18048 * nto-low.c (nto_mourn): New.
18049 (nto_target_ops): Install it.
18050 * spu-low.c (spu_mourn): New.
18051 (spu_target_ops): Install it.
18052 * win32-low.c (win32_mourn): New.
18053 (win32_target_ops): Install it.
18054
18055 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18056
18057 * server.h (buffer_xml_printf): Remove redundant `;'.
18058
18059 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18060
18061 * regcache.c (set_register_cache): Invalidate regcaches before
18062 changing the register cache layout.
18063 (regcache_invalidate_one): Allow a NULL regcache.
18064 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
18065 regcaches before changing the register cache layout or the target
18066 regsets.
18067
18068 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
18069
18070 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
18071 variable warning on Linux/x86-64.
18072
18073 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18074
18075 GDBserver disconnected tracing support.
18076
18077 * linux-low.c (linux_remove_process): Delete.
18078 (add_lwp): Don't set last_resume_kind here.
18079 (linux_kill): Use `mourn'.
18080 (linux_detach): Use `thread_db_detach', and `mourn'.
18081 (linux_mourn): New.
18082 (linux_attach_lwp_1): Adjust comment.
18083 (linux_attach): last_resume_kind moved the thread_info; adjust.
18084 (status_pending_p_callback): Adjust.
18085 (linux_wait_for_event_1): Adjust.
18086 (count_events_callback, select_singlestep_lwp_callback)
18087 (select_event_lwp_callback, cancel_breakpoints_callback)
18088 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
18089 (proceed_one_lwp): Adjust.
18090 (linux_async): Add debug output.
18091 (linux_thread_stopped): New.
18092 (linux_pause_all): New.
18093 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
18094 linux_pause_all.
18095 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
18096 (thread_db_free): Delete declaration.
18097 (thread_db_detach, thread_db_mourn): Declare.
18098 * thread-db.c (thread_db_init): Use thread_db_mourn.
18099 (thread_db_free): Delete, split in two.
18100 (disable_thread_event_reporting): New.
18101 (thread_db_detach): New.
18102 (thread_db_mourn): New.
18103
18104 * server.h (struct thread_info) <last_resume_kind>: New field.
18105 <attached>: Add comment.
18106 <gdb_detached>: New field.
18107 (handler_func): Change return type to int.
18108 (handle_serial_event, handle_target_event): Ditto.
18109 (gdb_connected): Declare.
18110 (tracing): Delete.
18111 (disconnected_tracing): Declare.
18112 (stop_tracing): Declare.
18113
18114 * server.c (handle_query) <qSupported>: Report support for
18115 disconnected tracing.
18116 (queue_stop_reply_callback): Account for running threads.
18117 (gdb_wants_thread_stopped): New.
18118 (gdb_wants_all_threads_stopped): New.
18119 (gdb_reattached_process): New.
18120 (handle_status): Clear the `gdb_detached' flag of all processes.
18121 In all-stop, stop all threads.
18122 (main): Be sure to leave tfind mode. Handle disconnected tracing.
18123 (process_serial_event): If the remote connection breaks, or if an
18124 exit was forced with "monitor exit", force an event loop exit.
18125 Handle disconnected tracing on detach.
18126 (handle_serial_event): Adjust.
18127 (handle_target_event): If GDB isn't connected, forward events back
18128 to the inferior, unless the last process exited, in which case,
18129 exit gdbserver. Adjust interface.
18130
18131 * remote-utils.c (remote_open): Don't block in accept. Instead
18132 register an event loop source on the listen socket file
18133 descriptor. Refactor bits into ...
18134 (listen_desc): ... this new global.
18135 (gdb_connected): ... this new function.
18136 (enable_async_notification): ... this new function.
18137 (handle_accept_event): ... this new function.
18138 (remote_close): Clear remote_desc.
18139
18140 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18141
18142 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18143 New fields.
18144 (mourn_inferior): Define.
18145 (target_process_qsupported): Avoid the dangling else problem.
18146 (thread_stopped): Define.
18147 (pause_all): Define.
18148 (target_waitstatus_to_string): Declare.
18149 * target.c (target_waitstatus_to_string): New.
18150
18151 * tracepoint.c (tracing): Make extern.
18152 (disconnected_tracing): New.
18153 (stop_tracing): Make extern. Handle tracing stops due to GDB
18154 disconnecting.
18155 (cmd_qtdisconnected): New.
18156 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18157 (handle_tracepoint_general_set): Handle QTDisconnected.
18158
18159 * event-loop.c (event_handler_func): Change return type to int.
18160 (process_event): Bail out if the event handler wants the event
18161 loop to stop.
18162 (handle_file_event): Ditto.
18163 (start_event_loop): Bail out if the event handler wants the event
18164 loop to stop.
18165
18166 * nto-low.c (nto_target_ops): Adjust.
18167 * spu-low.c (spu_wait): Don't remove the process here.
18168 (spu_target_ops): Adjust.
18169 * win32-low.c (win32_wait): Don't remove the process here.
18170 (win32_target_ops): Adjust.
18171
18172 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18173
18174 * regcache.c (realloc_register_cache): Invalidate inferior's
18175 regcache before recreating it.
18176
18177 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18178
18179 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18180
18181 2010-04-09 Stan Shebs <stan@codesourcery.com>
18182 Pedro Alves <pedro@codesourcery.com>
18183
18184 * server.h (LONGEST): New.
18185 (struct thread_info) <while_stepping>: New field.
18186 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18187 Declare.
18188 (initialize_tracepoint, handle_tracepoint_general_set)
18189 (handle_tracepoint_query, tracepoint_finished_step)
18190 (tracepoint_was_hit, release_while_stepping_state_list):
18191 (current_traceframe): Declare.
18192 * server.c (handle_general_set): Handle tracepoint packets.
18193 (read_memory): New.
18194 (write_memory): New.
18195 (handle_search_memory_1): Use read_memory.
18196 (handle_query): Report support for conditional tracepoints, trace
18197 state variables, and tracepoint sources. Handle tracepoint
18198 queries.
18199 (main): Initialize the tracepoints module.
18200 (process_serial_event): Handle traceframe reads/writes.
18201
18202 * linux-low.c (handle_tracepoints): New.
18203 (linux_wait_1): Call it.
18204 (linux_resume_one_lwp): Handle while-stepping.
18205 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18206 (linux_target_ops): Install them.
18207 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18208 New field.
18209 * linux-x86-low.c (x86_supports_tracepoints): New.
18210 (the_low_target). Install it.
18211
18212 * mem-break.h (delete_breakpoint): Declare.
18213 * mem-break.c (delete_breakpoint): Make external.
18214
18215 * target.h (struct target_ops): Add `supports_tracepoints',
18216 `read_pc', and `write_pc' fields.
18217 (target_supports_tracepoints): Define.
18218 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18219 (phex_nz): New.
18220
18221 * regcache.h (struct regcache) <registers_owned>: New field.
18222 (init_register_cache, regcache_cpy): Declare.
18223 (regcache_read_pc, regcache_write_pc): Declare.
18224 (register_cache_size): Declare.
18225 (supply_regblock): Declare.
18226 * regcache.c (init_register_cache): New.
18227 (new_register_cache): Use it.
18228 (regcache_cpy): New.
18229 (register_cache_size): New.
18230 (supply_regblock): New.
18231 (regcache_read_pc, regcache_write_pc): New.
18232
18233 * tracepoint.c: New.
18234
18235 * Makefile.in (OBS): Add tracepoint.o.
18236 (tracepoint.o): New rule.
18237
18238 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18239
18240 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18241 (i386-mmx.o): New.
18242 (i386-mmx.c): Likewise.
18243 (i386-mmx-linux.o): Likewise.
18244 (i386-mmx-linux.c): Likewise.
18245
18246 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18247 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18248 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18249 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18250
18251 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18252 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18253 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18254
18255 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18256
18257 * Makefile.in (clean): Updated.
18258 (i386-avx.o): New.
18259 (i386-avx.c): Likewise.
18260 (i386-avx-linux.o): Likewise.
18261 (i386-avx-linux.c): Likewise.
18262 (amd64-avx.o): Likewise.
18263 (amd64-avx.c): Likewise.
18264 (amd64-avx-linux.o): Likewise.
18265 (amd64-avx-linux.c): Likewise.
18266
18267 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18268 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18269 (srv_amd64_regobj): Add amd64-avx.o.
18270 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18271 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18272 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18273 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18274 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18275 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18276 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18277
18278 * i387-fp.c: Include "i386-xstate.h".
18279 (i387_xsave): New.
18280 (i387_cache_to_xsave): Likewise.
18281 (i387_xsave_to_cache): Likewise.
18282 (x86_xcr0): Likewise.
18283
18284 * i387-fp.h (i387_cache_to_xsave): Likewise.
18285 (i387_xsave_to_cache): Likewise.
18286 (x86_xcr0): Likewise.
18287
18288 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18289 * linux-crisv32-low.c (target_regsets): Likewise.
18290 * linux-m68k-low.c (target_regsets): Likewise.
18291 * linux-mips-low.c (target_regsets): Likewise.
18292 * linux-ppc-low.c (target_regsets): Likewise.
18293 * linux-s390-low.c (target_regsets): Likewise.
18294 * linux-sh-low.c (target_regsets): Likewise.
18295 * linux-sparc-low.c (target_regsets): Likewise.
18296 * linux-xtensa-low.c (target_regsets): Likewise.
18297
18298 * linux-low.c: Include <sys/uio.h>.
18299 (regsets_fetch_inferior_registers): Support nt_type.
18300 (regsets_store_inferior_registers): Likewise.
18301 (linux_process_qsupported): New.
18302 (linux_target_ops): Add linux_process_qsupported.
18303
18304 * linux-low.h (regset_info): Add nt_type.
18305 (linux_target_ops): Add process_qsupported.
18306
18307 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18308 and <sys/uio.h>.
18309 (init_registers_i386_avx_linux): New.
18310 (init_registers_amd64_avx_linux): Likewise.
18311 (xmltarget_i386_linux_no_xml): Likewise.
18312 (xmltarget_amd64_linux_no_xml): Likewise.
18313 (PTRACE_GETREGSET): Likewise.
18314 (PTRACE_SETREGSET): Likewise.
18315 (x86_fill_xstateregset): Likewise.
18316 (x86_store_xstateregset): Likewise.
18317 (use_xml): Likewise.
18318 (x86_linux_update_xmltarget): Likewise.
18319 (x86_linux_process_qsupported): Likewise.
18320 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18321 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18322 init_registers_i386_linux here. Call
18323 x86_linux_update_xmltarget.
18324 (the_low_target): Add x86_linux_process_qsupported.
18325
18326 * server.c (handle_query): Call target_process_qsupported.
18327
18328 * target.h (target_ops): Add process_qsupported.
18329 (target_process_qsupported): New.
18330
18331 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18332
18333 * inferiors.c (add_thread): Set last_status kind to
18334 TARGET_WAITKIND_IGNORE.
18335 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18336 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18337 (linux_wait_1): Move `thread' local definition to block that uses
18338 it. Don't NULL initialize `event_child'.
18339 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18340 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18341 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18342
18343 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18344
18345 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18346 an extended waitstatus, or by a watchpoint.
18347 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18348 thread was stepping or has been stopped by a watchpoint.
18349
18350 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18351
18352 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18353 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18354 of another, then delete the previous, and validate all
18355 breakpoints.
18356 (validate_inserted_breakpoint): New.
18357 (delete_disabled_breakpoints): New.
18358 (validate_breakpoints): New.
18359 (check_mem_read): Validate breakpoints before trusting their
18360 shadow. Delete disabled breakpoints.
18361 (check_mem_write): Validate breakpoints before trusting they
18362 should be inserted. Delete disabled breakpoints.
18363 * mem-break.h (validate_breakpoints):
18364 * server.c (handle_query): Validate breakpoints when we see a
18365 qSymbol query.
18366
18367 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18368
18369 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18370 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18371 if we could tell there's a GDB breakpoint at stop_pc.
18372 (need_step_over_p): Don't do a step over if we find a GDB
18373 breakpoint at the resume PC.
18374
18375 * mem-break.c (struct raw_breakpoint): New.
18376 (enum bkpt_type): New type `gdb_breakpoint'.
18377 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18378 fields. New field `raw'.
18379 (find_raw_breakpoint_at): New.
18380 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18381 breakpoint instead.
18382 (set_breakpoint_at): Adjust.
18383 (delete_raw_breakpoint): New.
18384 (release_breakpoint): New.
18385 (delete_breakpoint): Rename to...
18386 (delete_breakpoint_1): ... this. Add proc parameter. Use
18387 release_breakpoint. Return ENOENT.
18388 (delete_breakpoint): Reimplement.
18389 (find_breakpoint_at): Delete.
18390 (find_gdb_breakpoint_at): New.
18391 (delete_breakpoint_at): Delete.
18392 (set_gdb_breakpoint_at): New.
18393 (delete_gdb_breakpoint_at): New.
18394 (gdb_breakpoint_here): New.
18395 (set_reinsert_breakpoint): Use release_breakpoint.
18396 (uninsert_breakpoint): Rename to ...
18397 (uninsert_raw_breakpoint): ... this.
18398 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18399 (reinsert_raw_breakpoint): Change parameter type to
18400 raw_breakpoint.
18401 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18402 instead.
18403 (check_breakpoints): Adjust. Use release_breakpoint.
18404 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18405 (breakpoint_inserted_here): Ditto.
18406 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18407 Don't trust the breakpoint's shadow if it is not inserted.
18408 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18409 (delete_all_breakpoints): Adjust.
18410 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18411 use delete_breakpoint_1.
18412
18413 * mem-break.h (breakpoints_supported): Delete declaration.
18414 (set_gdb_breakpoint_at): Declare.
18415 (gdb_breakpoint_here): Declare.
18416 (delete_breakpoint_at): Delete.
18417 (delete_gdb_breakpoint_at): Declare.
18418
18419 * server.h (struct raw_breakpoint): Forward declare.
18420 (struct process_info): New field `raw_breakpoints'.
18421
18422 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18423 breakpoints.
18424
18425 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18426
18427 * linux-low.c (status_pending_p_callback): Fix comment.
18428 (linux_wait_for_event_1): Move most of the internal breakpoint
18429 handling from here...
18430 (linux_wait_1): ... to here.
18431 (count_events_callback): New.
18432 (select_singlestep_lwp_callback): New.
18433 (select_event_lwp_callback): New.
18434 (cancel_breakpoints_callback): New.
18435 (select_event_lwp): New.
18436 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18437 priority to all LWPs that have had events that should be reported
18438 to the client. Cancel breakpoints when about to reporting the
18439 event to the client, not while stopping lwps. No longer cancel
18440 finished single-steps here.
18441 (cancel_finished_single_step): Delete.
18442 (cancel_finished_single_steps): Delete.
18443
18444 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18445
18446 * mem-break.c (enum bkpt_type): New.
18447 (struct breakpoint): New field `type'.
18448 (set_breakpoint_at): Change return type to struct breakpoint
18449 pointer. Set type to `other_breakpoint' by default.
18450 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18451 in the breakpoint list.
18452 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18453 (reinsert_breakpoint): Rename to ...
18454 (reinsert_raw_breakpoint): ... this.
18455 (reinsert_breakpoints_at): Adjust.
18456 * mem-break.h (struct breakpoint): Declare.
18457 (set_breakpoint_at): Change return type to struct breakpoint
18458 pointer.
18459
18460 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18461
18462 * server.c (handle_query): Assign, not compare.
18463
18464 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18465
18466 Teach linux gdbserver to step-over-breakpoints.
18467
18468 * linux-low.c (can_hardware_single_step): New.
18469 (supports_breakpoints): New.
18470 (handle_extended_wait): If stopping threads, read the stop pc of
18471 the new cloned LWP.
18472 (get_pc): New.
18473 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18474 low target doesn't support retrieving the PC.
18475 (add_lwp): Set last_resume_kind to resume_continue.
18476 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18477 (linux_attach): Don't clear stop_expected. Set the lwp's
18478 last_resume_kind to resume_stop.
18479 (linux_detach_one_lwp): Don't check for removed breakpoints.
18480 (check_removed_breakpoint): Delete.
18481 (status_pending_p): Rename to ...
18482 (status_pending_p_callback): ... this. Don't check for removed
18483 breakpoints. Don't consider threads that are stopped from GDB's
18484 perspective.
18485 (linux_wait_for_lwp): Always read the stop_pc here.
18486 (cancel_breakpoint): New.
18487 (step_over_bkpt): New global.
18488 (linux_wait_for_event_1): Implement stepping over breakpoints.
18489 (gdb_wants_lwp_stopped): New.
18490 (gdb_wants_all_stopped): New.
18491 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18492 single-step traps here. Store the thread's last reported target
18493 wait status.
18494 (send_sigstop): Don't clear stop_expected. Always set it,
18495 instead.
18496 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18497 (cancel_finished_single_step): New.
18498 (cancel_finished_single_steps): New.
18499 (wait_for_sigstop): Don't cancel finished single-step traps here.
18500 (linux_resume_one_lwp): Don't check for removed breakpoints.
18501 Don't set `step' on non-hardware step archs.
18502 (linux_set_resume_request): Ignore resume_stop requests if already
18503 stopping or stopped. Set the lwp's last_resume_kind.
18504 (resume_status_pending_p): Don't check for removed breakpoints.
18505 (need_step_over_p): New.
18506 (start_step_over): New.
18507 (finish_step_over): New.
18508 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18509 requests. Clear the thread's last reported target waitstatus.
18510 Don't use the `suspended' flag. Don't consider pending breakpoints.
18511 (linux_resume): Start a step-over if necessary.
18512 (proceed_one_lwp): New.
18513 (proceed_all_lwps): New.
18514 (unstop_all_lwps): New.
18515 * linux-low.h (struct lwp_info): Rewrite comment for the
18516 `suspended' flag. Add the `stop_pc' field. Delete the
18517 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18518 Add `'last_resume_kind' and `need_step_over' fields.
18519 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18520 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18521 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18522 (set_raw_breakpoint_at): New.
18523 (set_breakpoint_at): Rewrite to use it.
18524 (reinsert_breakpoint_handler): Delete.
18525 (set_reinsert_breakpoint): New.
18526 (reinsert_breakpoint_by_bp): Delete.
18527 (delete_reinsert_breakpoints): New.
18528 (uninsert_breakpoint): Rewrite.
18529 (uninsert_breakpoints_at): New.
18530 (reinsert_breakpoint): Rewrite.
18531 (reinsert_breakpoints_at): New.
18532 (check_breakpoints): Rewrite.
18533 (breakpoint_here): New.
18534 (breakpoint_inserted_here): New.
18535 (check_mem_read): Adjust.
18536 * mem-break.h (breakpoints_supported, breakpoint_here)
18537 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18538 (reinsert_breakpoint_by_bp): Delete declaration.
18539 (delete_reinsert_breakpoints): Declare.
18540 (reinsert_breakpoint): Delete declaration.
18541 (reinsert_breakpoints_at): Declare.
18542 (uninsert_breakpoint): Delete declaration.
18543 (uninsert_breakpoints_at): Declare.
18544 (check_breakpoints): Adjust prototype.
18545 * server.h: Adjust include order.
18546 (struct thread_info): Declare here. Add a `last_status' field.
18547
18548 2010-03-23 Michael Snyder <msnyder@vmware.com>
18549
18550 * server.c (crc32): New function.
18551 (handle_query): Add handling for 'qCRC:' request.
18552
18553 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18554
18555 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18556 lwp had been stopped by a watchpoint.
18557
18558 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18559
18560 * server.h (internal_error): Declare.
18561 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18562 * utils.c (internal_error): New function.
18563
18564 2010-03-15 Andreas Schwab <schwab@redhat.com>
18565
18566 * configure.srv: Fix typo setting srv_regobj.
18567
18568 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18569
18570 * linux-low.c (fetch_register): Avoid passing a non string literal
18571 format to `error'.
18572 (usr_store_inferior_registers): Ditto.
18573
18574 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18575
18576 * linux-low.c (linux_write_memory): Bail out early if peeking
18577 memory failed.
18578
18579 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18580
18581 * linux-low.h (struct lwp_info): New fields
18582 `stopped_by_watchpoint' and `stopped_data_address'.
18583 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18584 here, and cache them in the lwp object.
18585 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18586 directly.
18587 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18588 field.
18589 (linux_stopped_by_watchpoint): Rewrite.
18590 (linux_stopped_data_address): Rewrite.
18591
18592 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18593
18594 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18595 switching the current inferior, not before.
18596
18597 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18598
18599 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18600 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18601 i386-linux.c and amd64-linux.c.
18602 (reg-i386.o): Removed.
18603 (reg-i386.c): Likewise.
18604 (reg-i386-linux.o): Likewise.
18605 (reg-i386-linux.c): Likewise.
18606 (reg-x86-64.o): Likewise.
18607 (reg-x86-64.c): Likewise.
18608 (reg-x86-64-linux.o): Likewise.
18609 (reg-x86-64-linux.c): Likewise.
18610 (i386.o): New.
18611 (i386.c): Likewise.
18612 (i386-linux.o): Likewise.
18613 (i386-linux.c): Likewise.
18614 (amd64.o): Likewise.
18615 (amd64.c): Likewise.
18616 (amd64-linux.o): Likewise.
18617 (amd64-linux.c): Likewise.
18618
18619 * configure.srv (srv_i386_regobj): New.
18620 (srv_i386_linux_regobj): Likewise.
18621 (srv_amd64_regobj): Likewise.
18622 (srv_amd64_linux_regobj): Likewise.
18623 (srv_i386_32bit_xmlfiles): Likewise.
18624 (srv_i386_64bit_xmlfiles): Likewise.
18625 (srv_i386_xmlfiles): Likewise.
18626 (srv_amd64_xmlfiles): Likewise.
18627 (srv_i386_linux_xmlfiles): Likewise.
18628 (srv_amd64_linux_xmlfiles): Likewise.
18629 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18630 srv_xmlfiles to $srv_i386_xmlfiles.
18631 (i[34567]86-*-mingw32ce*): Likewise.
18632 (i[34567]86-*-mingw*): Likewise.
18633 (i[34567]86-*-nto*): Likewise.
18634 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18635 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18636 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18637 (x86_64-*-linux*): Likewise.
18638
18639 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18640 (init_registers_amd64_linux): New.
18641 (x86_arch_setup): Replace init_registers_x86_64_linux with
18642 init_registers_amd64_linux.
18643
18644 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18645
18646 * configure.ac: Check for libdl. If it is not available link against
18647 static libthread_db.
18648 * configure: Regenerate.
18649
18650 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18651
18652 PR9605
18653
18654 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18655 handing a read watchpoint.
18656 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18657
18658 2010-02-12 Doug Evans <dje@google.com>
18659
18660 * linux-low.c (linux_supports_tracefork_flag): Document.
18661 (linux_look_up_symbols): Add comment.
18662
18663 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18664
18665 * regcache.c (supply_register): Clear regcache if buf is NULL.
18666
18667 2010-02-02 Nicolas Roche <roche@sourceware.org>
18668 Joel Brobecker <brobecker@adacore.com>
18669
18670 * inferiors.c (find_inferior): Add function documentation.
18671 (unloaded_dll): Handle the case where the unloaded dll has not
18672 been previously registered in the dll list.
18673
18674 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18675
18676 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18677 (thumb2_breakpoint): New.
18678 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18679
18680 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18681
18682 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18683 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18684 breakpoints.
18685
18686 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18687
18688 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18689
18690 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18691
18692 * linux-s390-low.c (s390_collect_ptrace_register)
18693 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18694
18695 2010-01-21 Doug Evans <dje@google.com>
18696
18697 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18698 (PTRACE_ARG4_TYPE): New macro.
18699 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18700 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18701 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18702 (usr_store_inferior_registers): Ditto.
18703 (linux_read_memory, linux_write_memory): Ditto.
18704 (linux_test_for_tracefork): Ditto.
18705
18706 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18707 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18708
18709 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18710
18711 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18712 target.
18713
18714 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18715
18716 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18717 prototype to take a regcache. Adjust.
18718
18719 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18720
18721 * regcache.h (struct thread_info): Forward declare.
18722 (struct regcache): New.
18723 (new_register_cache): Adjust prototype.
18724 (get_thread_regcache): Declare.
18725 (free_register_cache): Adjust prototype.
18726 (registers_to_string, registers_from_string): Ditto.
18727 (supply_register, supply_register_by_name, collect_register)
18728 (collect_register_as_string, collect_register_by_name): Ditto.
18729 * regcache.c (struct inferior_regcache_data): Delete.
18730 (get_regcache): Rename to ...
18731 (get_thread_regcache): ... this. Adjust. Switch inferior before
18732 fetching registers.
18733 (regcache_invalidate_one): Adjust.
18734 (regcache_invalidate): Fix prototype.
18735 (new_register_cache): Return the new register cache.
18736 (free_register_cache): Change prototype.
18737 (realloc_register_cache): Adjust.
18738 (registers_to_string): Change prototype to take a regcache. Adjust.
18739 (registers_from_string): Ditto.
18740 (register_data): Ditto.
18741 (supply_register): Ditto.
18742 (supply_register_by_name): Ditto.
18743 (collect_register): Ditto.
18744 (collect_register_as_string): Ditto.
18745 (collect_register_by_name): Ditto.
18746 * server.c (process_serial_event): Adjust.
18747 * linux-low.h (regset_fill_func, regset_store_func): Change
18748 prototype.
18749 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18750 Change prototype.
18751 * linux-low.c (get_stop_pc): Adjust.
18752 (check_removed_breakpoint): Adjust.
18753 (linux_wait_for_event): Adjust.
18754 (linux_resume_one_lwp): Adjust.
18755 (fetch_register): Add regcache parameter. Adjust.
18756 (usr_store_inferior_registers): Ditto.
18757 (regsets_fetch_inferior_registers): Ditto.
18758 (regsets_store_inferior_registers): Ditto.
18759 (linux_fetch_registers, linux_store_registers): Ditto.
18760 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18761 regcache. Adjust.
18762 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18763 Ditto.
18764 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18765 prototype to take a regcache.
18766 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18767 * remote-utils.c (convert_ascii_to_int, outreg)
18768 (prepare_resume_reply): Change prototype to take a regcache.
18769 Adjust.
18770 * target.h (struct target_ops) <fetch_registers, store_registers>:
18771 Change prototype to take a regcache.
18772 (fetch_inferior_registers, store_inferior_registers): Change
18773 prototype to take a regcache. Adjust.
18774 * proc-service.c (ps_lgetregs): Adjust.
18775 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18776 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18777 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18778 take a regcache. Adjust.
18779 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18780 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18781 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18782 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18783 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18784 (cris_cannot_fetch_register):
18785 (cris_breakpoint_at): Change prototype to take a regcache.
18786 Adjust.
18787 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18788 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18789 to take a regcache. Adjust.
18790 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18791 Adjust.
18792 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18793 take a regcache. Adjust.
18794 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18795 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18796 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18797 * linux-mips-low.c (mips_get_pc):
18798 (mips_set_pc): Change prototype to take a regcache. Adjust.
18799 (mips_reinsert_addr): Adjust.
18800 (mips_collect_register): Change prototype to take a regcache.
18801 Adjust.
18802 (mips_supply_register):
18803 (mips_collect_register_32bit, mips_supply_register_32bit)
18804 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18805 (mips_store_fpregset): Ditto.
18806 * linux-ppc-low.c (ppc_supply_ptrace_register)
18807 (ppc_supply_ptrace_register): Ditto.
18808 (parse_spufs_run): Adjust.
18809 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18810 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18811 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18812 take a regcache. Adjust.
18813 * linux-s390-low.c (s390_collect_ptrace_register)
18814 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18815 (s390_set_pc): Change prototype to take a regcache. Adjust.
18816 (s390_arch_setup): Adjust.
18817 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18818 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18819 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18820 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18821 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18822 regcache. Adjust.
18823 (sparc_breakpoint_at): Adjust.
18824 * linux-xtensa-low.c (xtensa_fill_gregset):
18825 (xtensa_store_gregset):
18826 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18827 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18828 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18829 prototype to take a regcache. Adjust.
18830 * win32-arm-low.c (arm_fetch_inferior_register)
18831 (arm_store_inferior_register): Change prototype to take a
18832 regcache. Adjust.
18833 * win32-i386-low.c (i386_fetch_inferior_register)
18834 (i386_store_inferior_register): Change prototype to take a
18835 regcache. Adjust.
18836 * win32-low.c (child_fetch_inferior_registers)
18837 (child_store_inferior_registers): Change prototype to take a
18838 regcache. Adjust.
18839 (win32_wait): Adjust.
18840 (win32_fetch_inferior_registers): Change prototype to take a
18841 regcache. Adjust.
18842 (win32_store_inferior_registers): Adjust.
18843 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18844 store_inferior_register>: Change prototype to take a regcache.
18845
18846 2010-01-20 Doug Evans <dje@google.com>
18847
18848 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18849 #ifdef.
18850 (linux_wait_for_event1, linux_init_signals): Ditto.
18851 (W_STOPCODE): Provide definition if missing.
18852
18853 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18854
18855 * linux-low.c (linux_core_of_thread): New.
18856 (compare_ints, show_process, list_threads): New.
18857 (linux_qxfer_osdata): Report threads and cores.
18858 (linux_target_op): Register linux_core_of_thread.
18859 * remote-utils.c (prepare_resume_reply): Report the core.
18860 (buffer_xml_printf): Support %d specifier.
18861 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18862 New.
18863 (handle_query): Handle qXfer:threads. Announce availability
18864 thereof.
18865 * target.h (struct target_ops): New field core_of_thread.
18866
18867 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18868
18869 * Makefile.in (clean): Remove new generated files.
18870 (reg-s390.o, reg-s390.c): Remove rules.
18871 (reg-s390x.o, reg-s390x.c): Likewise.
18872 (s390-linux32.o, s390-linux32.c): Add rules.
18873 (s390-linux64.o, s390-linux64.c): Likewise.
18874 (s390x-linux64.o, s390x-linux64.c): Likewise.
18875 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18876 * linux-s390-low.c: Include <elf.h>.
18877 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18878 (init_registers_s390): Remove prototype.
18879 (init_registers_s390x): Likewise.
18880 (init_registers_s390_linux32): Add prototype.
18881 (init_registers_s390_linux64): Likewise.
18882 (init_registers_s390x_linux64): Likewise.
18883 (s390_num_regs_3264): New define.
18884 (s390_regmap_3264): New global variable.
18885 (s390_cannot_fetch_register): Remove obsolete check.
18886 (s390_cannot_store_register): Likewise.
18887 (s390_collect_ptrace_register): Handle upper/lower register halves.
18888 (s390_supply_ptrace_register): Likewise.
18889 (s390_fill_gregset): Update to register number changes.
18890 (s390_get_hwcap): New routine.
18891 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18892 Install appropriate regmap and register set.
18893
18894 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18895
18896 * server.c (gdbserver_version): Update copyright year to 2010.
18897 * gdbreplay.c (gdbreplay_version): Likewise.
18898
18899 2009-12-28 Doug Evans <dje@google.com>
18900
18901 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18902 elf/external.h. Include <elf.h> instead but only if necessary.
18903
18904 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18905
18906 * linux-low.c (linux_remove_process): Remove `detaching'
18907 parameter. Don't release/detach from thread_db here.
18908 (linux_kill): Release/detach from thread_db here, ...
18909 (linux_detach): ... and here, before actually detaching.
18910 (linux_wait_1): ... and here, when a process exits.
18911 * thread-db.c (any_thread_of): New.
18912 (thread_db_free): Switch the current inferior to a thread of the
18913 passed in process.
18914
18915 2009-12-21 Doug Evans <dje@google.com>
18916
18917 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18918
18919 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18920 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18921 warning ifndef __NR_tkill. Move setting of errno there too.
18922 Delete unnecessary resetting of errno after syscall.
18923 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18924
18925 * configure.ac: Check for dladdr.
18926 * config.in: Regenerate.
18927 * configure: Regenerate.
18928 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18929 (try_thread_db_load): Update.
18930
18931 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18932
18933 2009-12-18 Doug Evans <dje@google.com>
18934
18935 * event-loop.c: Include unistd.h if it exists.
18936
18937 * linux-low.c (my_waitpid): Move definition away from being in
18938 between linux_tracefork_child/linux_test_for_tracefork.
18939
18940 * gdb_proc_service.h (psaddr_t): Fix type.
18941 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18942 signature to match glibc.
18943
18944 2009-12-16 Doug Evans <dje@google.com>
18945
18946 * linux-low.c (linux_read_memory): Fix argument to read.
18947
18948 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18949
18950 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18951 events, don't leave current_inferior pointing at null.
18952
18953 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18954
18955 * win32-low.c (LOG): Delete.
18956 (OUTMSG): Output to stderr.
18957 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18958 on compile time LOG macro.
18959 (win32_wait): Fix debug output.
18960
18961 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18962
18963 * win32-low.c (win32_add_one_solib): If the dll name is
18964 "ntdll.dll", prepend the system directory to the dll path.
18965
18966 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18967
18968 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18969
18970 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18971 Vladimir Prus <vladimir@codesourcery.com>
18972
18973 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18974 * configure.ac: Check for __mcoldfire__ and set
18975 gdb_cv_m68k_is_coldfire.
18976 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18977 reg-cf.o and reg-m68k.o.
18978 * configure: Regenerated.
18979
18980 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18981
18982 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18983 Pass it to thread_db_free.
18984 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18985 proper `detaching' argument to linux_remove_process.
18986 * linux-low.h (thread_db_free): Add `detaching' parameter.
18987 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18988 to thread_db_free.
18989 (thread_db_free): Add `detaching' parameter. Only
18990 call td_ta_clear_event if detaching from process.
18991
18992 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18993
18994 * thread-db.c (thread_db_free): Fix typo.
18995
18996 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18997
18998 PR gdb/10838
18999 * thread-db.c (thread_db_free): Call td_ta_clear_event.
19000
19001 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
19002
19003 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
19004 with an i686 compiler.
19005 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
19006 needed.
19007 * configure: Rebuilt.
19008
19009 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
19010
19011 PR gdb/10783
19012
19013 * server.c (handle_search_memory_1): Correct read_addr initialization
19014 in loop for searching subsequent chunks.
19015
19016 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
19017
19018 * configure.ac: New --with-libthread-db option.
19019 * thread-db.c: Allow direct dependence on libthread_db.
19020 (thread_db_free): Adjust.
19021 * config.in: Regenerate.
19022 * configure: Likewise.
19023
19024 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
19025
19026 PR gdb/10757
19027 * thread-db.c (attach_thread): New function.
19028 (maybe_attach_thread): Return success/failure.
19029 (find_new_threads_callback): Adjust.
19030 (thread_db_find_new_threads): Loop until no new threads.
19031
19032 2009-10-13 Pedro Alves <pedro@codesourcery.com>
19033
19034 * proc-service.c (ps_lgetregs): Formatting.
19035
19036 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
19037
19038 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
19039 * configure.ac: Adjust.
19040 * linux-low.h (struct process_info_private): Move members to struct
19041 thread_db.
19042 (thread_db_free, thread_db_handle_monitor_command): New prototype.
19043 * linux-low.c (linux_remove_process): Adjust.
19044 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
19045 * server.c (handle_query): Move code ...
19046 (handle_monitor_command): ... here. New function.
19047 * target.h (struct target_ops): New member.
19048 * thread-db.c (struct thread_db): New.
19049 (libthread_db_search_path): New variable.
19050 (thread_db_create_event, thread_db_enable_reporting)
19051 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
19052 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
19053 (try_thread_db_load_1, dladdr_to_soname): New functions.
19054 (try_thread_db_load, thread_db_load_search): New functions.
19055 (thread_db_init): Search for libthread_db.
19056 (thread_db_free): New function.
19057 (thread_db_handle_monitor_command): Likewise.
19058 * config.in: Regenerate.
19059 * configure: Regenerate.
19060
19061 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
19062
19063 * spu-low.c (spu_kill): Wait for inferior to terminate.
19064 Call clear_inferiors.
19065 (spu_detach): Call clear_inferiors.
19066
19067 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19068
19069 * aclocal.m4: Regenerate.
19070 * config.in: Likewise.
19071 * configure: Likewise.
19072
19073 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19074
19075 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
19076 (parse_spufs_run): New function.
19077 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
19078 (ppc_breakpoint_at): Handle SPU breakpoints.
19079
19080 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19081
19082 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
19083 (SPUFS_MAGIC): Define.
19084 (spu_enumerate_spu_ids): New function.
19085 (linux_qxfer_spu): New function.
19086 (linux_target_ops): Install linux_qxfer_spu.
19087
19088 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19089
19090 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
19091 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
19092 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
19093 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
19094 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
19095 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
19096 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
19097 (init_registers_powerpc_cell32l): Add prototype.
19098 (init_registers_powerpc_cell64l): Likewise.
19099 (ppc_arch_setup): Detect Cell/B.E. architecture.
19100
19101 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19102
19103 * Makefile.in (datarootdir): New variable.
19104
19105 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19106
19107 * linux-low.c (linux_write_memory): Update debugging output.
19108 * Makefile.in (clean): Add new descriptions.
19109 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
19110 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
19111 * configure.srv: Add new files for arm*-*-linux*.
19112 * linux-arm-low.c: Add new declarations.
19113 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
19114 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
19115 (HWCAP_VFPv3D16): New.
19116 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
19117 instead of __IWMMXT__.
19118 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
19119 (arm_arch_setup): New.
19120 (target_regsets): Remove #ifdef. Add VFP regset.
19121 (the_low_target): Use arm_arch_setup.
19122
19123 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19124
19125 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
19126 the main thread again.
19127
19128 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
19129
19130 Adding Neutrino gdbserver.
19131 * configure: Regenerated.
19132 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19133 * configure.srv (i[34567]86-*-nto*): New target.
19134 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19135 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19136 (nto_comctrl) [__QNX__]: New function.
19137 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19138
19139 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19140
19141 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19142 srv_tgtobj.
19143
19144 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19145 Pedro Alves <pedro@codesourcery.com>
19146
19147 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19148 don't support CONTEXT_EXTENDED_REGISTERS.
19149 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19150 (the_low_target): Install them.
19151 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19152 failing with ERROR_PIPE_NOT_CONNECTED.
19153
19154 2009-06-30 Doug Evans <dje@google.com>
19155 Pierre Muller <muller@ics.u-strasbg.fr>
19156
19157 Add h/w watchpoint support to x86-linux, win32-i386.
19158 * Makefile.in (SFILES): Add i386-low.c
19159 (i386_low_h): Define.
19160 (i386-low.o): Add dependencies.
19161 (linux-x86-low.o): Add i386-low.h dependency.
19162 (win32-i386-low.o): Ditto.
19163 * i386-low.c: New file.
19164 * i386-low.h: New file.
19165 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19166 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19167 * linux-low.c (linux_add_process): Initialize arch_private.
19168 (linux_remove_process): Free arch_private.
19169 (add_lwp): Initialize arch_private.
19170 (delete_lwp): Free arch_private.
19171 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19172 provided.
19173 * linux-low.h (process_info_private): New member arch_private.
19174 (lwp_info): New member arch_private.
19175 (linux_target_ops): New members new_process, new_thread,
19176 prepare_to_resume.
19177 (ptid_of): New macro.
19178 * linux-x86-low.c: Include stddef.h, i386-low.h.
19179 (arch_process_info): New struct.
19180 (arch_lwp_info): New struct.
19181 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19182 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19183 (i386_dr_low_get_status): New function.
19184 (x86_insert_point, x86_remove_point): New functions.
19185 (x86_stopped_by_watchpoint): New function.
19186 (x86_stopped_data_address): New function.
19187 (x86_linux_new_process, x86_linux_new_thread): New functions.
19188 (x86_linux_prepare_to_resume): New function.
19189 (the_low_target): Add entries for insert_point, remove_point,
19190 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19191 prepare_to_resume.
19192 * server.c (debug_hw_points): New global.
19193 (monitor_show_help): Document set debug-hw-points.
19194 (handle_query): Process "set debug-hw-points".
19195 * server.h (debug_hw_points): Declare.
19196 (paddress): Declare.
19197 * utils.c (NUMCELLS, CELLSIZE): New macros.
19198 (get_sell, xsnprintf, paddress): New functions.
19199 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19200 remove_point, stopped_by_watchpoint, stopped_data_address.
19201 * win32-i386-low.c: Include i386-low.h.
19202 (debug_reg_state): Replaces dr.
19203 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19204 (i386_dr_low_get_status): New function.
19205 (i386_insert_point, i386_remove_point): New functions.
19206 (i386_stopped_by_watchpoint): New function.
19207 (i386_stopped_data_address): New function.
19208 (i386_initial_stuff): Update.
19209 (get_thread_context,set_thread_context,i386_thread_added): Update.
19210 (the_low_target): Add entries for insert_point,
19211 remove_point, stopped_by_watchpoint, stopped_data_address.
19212 * win32-low.c (win32_insert_watchpoint): New function.
19213 (win32_remove_watchpoint): New function.
19214 (win32_stopped_by_watchpoint): New function.
19215 (win32_stopped_data_address): New function.
19216 (win32_target_ops): Add entries for insert_watchpoint,
19217 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19218 * win32-low.h (win32_target_ops): New members insert_point,
19219 remove_point, stopped_by_watchpoint, stopped_data_address.
19220
19221 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19222
19223 * server.c (process_serial_event): Re-return unsupported, not
19224 error, if the type isn't recognized. Re-allow supporting only
19225 insert or remove packets. Also call require_running for
19226 breakpoints. Add missing break statement to default case. Tidy.
19227 * target.h (struct target_ops): Rename insert_watchpoint to
19228 insert_point, and remove_watchpoint to remove_point.
19229
19230 * linux-low.h (struct linux_target_ops): Likewise.
19231 * linux-low.c (linux_insert_watchpoint): Rename to ...
19232 (linux_insert_point): ... this. Adjust.
19233 (linux_remove_watchpoint): Rename to ...
19234 (linux_remove_point): ... this. Adjust.
19235 (linux_target_ops): Adjust.
19236 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19237 (cris_insert_point): ... this.
19238 (cris_remove_watchpoint): Rename to ...
19239 (cris_remove_point): ... this.
19240 (the_low_target): Adjust.
19241
19242 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19243
19244 * server.c (handle_v_kill): Pass signal_pid to
19245 kill_inferior if multi_process is zero.
19246
19247 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19248
19249 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19250 * target.h (target_ops): Comment for *_watchpoint to make it clear
19251 the functions can get types '0' and '1'.
19252
19253 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19254
19255 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19256 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19257 * regcache.c (get_regcache): Likewise.
19258 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19259 * win32-low.c (child_fetch_inferior_registers): Remove check for
19260 regno 0.
19261
19262 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19263 Pedro Alves <pedro@codesourcery.com>
19264
19265 * target.h (struct target_ops) <supports_multi_process>: New
19266 callback.
19267 (target_supports_multi_process): New.
19268 * server.c (handle_query): Even if GDB reports support, only
19269 enable multi-process if the target also supports it. Report
19270 multi-process support only if the target backend supports it.
19271 * linux-low.c (linux_supports_multi_process): New function.
19272 (linux_target_ops): Install it as target_supports_multi_process
19273 callback.
19274
19275 2009-05-24 Doug Evans <dje@google.com>
19276
19277 Global renaming of find_thread_pid to find_thread_ptid.
19278 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19279 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19280 All callers updated.
19281
19282 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19283 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19284 directly.
19285
19286 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19287 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19288 (linux_resume_one_lwp): Ditto.
19289
19290 2009-05-23 Doug Evans <dje@google.com>
19291
19292 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19293 from struct inferior_list_entry * to struct lwp_info *.
19294 All callers updated.
19295
19296 2009-05-13 Doug Evans <dje@google.com>
19297
19298 * linux-x86-low.c: Don't include assert.h.
19299 (x86_siginfo_fixup): Use fatal, not assert.
19300 (x86_arch_setup): Fix comment.
19301
19302 2009-05-12 Doug Evans <dje@google.com>
19303
19304 Biarch support for i386/amd64 gdbserver.
19305 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19306 Add linux-x86-low.c.
19307 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19308 (linux-x86-low.o): Add.
19309 * linux-x86-64-low.c: Delete.
19310 * linux-i386-low.c: Delete.
19311 * linux-x86-low.c: New file.
19312 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19313 linux-x86-low.o.
19314 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19315 linux-x86-low.o.
19316 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19317 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19318 (linux_child_pid_to_exec_file): New function.
19319 (elf_64_header_p, elf_64_file_p): New functions.
19320 (siginfo_fixup): New function.
19321 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19322 give target a chance to convert layout.
19323 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19324 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19325
19326 2009-05-07 Doug Evans <dje@google.com>
19327
19328 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19329 (regsets_store_inferior_registers): Ditto.
19330
19331 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19332
19333 PR server/10048
19334
19335 * linux-low.c (must_set_ptrace_flags): Delete.
19336 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19337 of the global.
19338 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19339 `lwp->must_set_ptrace_flags' instead.
19340 (linux_wait_for_event_1): Set ptrace options here.
19341 (linux_wait_1): ... not here.
19342
19343 2009-04-30 Doug Evans <dje@google.com>
19344
19345 * inferiors.c (started_inferior_callback): New function.
19346 (attached_inferior_callback): New function.
19347 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19348 * server.c (print_started_pid, print_attached_pid): New functions.
19349 (detach_or_kill_for_exit): New function.
19350 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19351 * server.h (have_started_inferiors_p): Declare.
19352 (have_attached_inferiors_p): Declare.
19353
19354 * inferiors.c (remove_process): Fix memory leak, free process.
19355 * linux-low.c (linux_remove_process): New function.
19356 (linux_kill): Call it instead of remove_process.
19357 (linux_detach, linux_wait_1): Ditto.
19358
19359 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19360
19361 * configure.srv: Add x86 Windows CE target.
19362
19363 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19364
19365 * inferiors.c (get_thread_process): Make global.
19366 * server.h (get_thread_process): Add prototype.
19367 * thread-db.c (find_one_thread): Use get_thread_process
19368 instead of current_process.
19369 (thread_db_get_tls_address): Do not crash if called when
19370 thread layer is not yet initialized.
19371
19372 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19373
19374 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19375 * spu-low.c (current_tid): Rename to ...
19376 (current_ptid): ... this.
19377 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19378 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19379 ptid_get_lwp (current_ptid) instead of current_tid.
19380 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19381 instead of current_tid. Use find_process_pid to verify pid
19382 argument is valid. Pass proper argument to remove_process.
19383 (spu_thread_alive): Compare current_ptid instead of current_tid.
19384 (spu_resume): Likewise.
19385
19386 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19387
19388 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19389 variable.
19390
19391 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19392
19393 Implement the multiprocess extensions, and add linux multiprocess
19394 support.
19395
19396 * server.h (ULONGEST): Declare.
19397 (struct ptid, ptid_t): New.
19398 (minus_one_ptid, null_ptid): Declare.
19399 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19400 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19401 (struct inferior_list_entry): Change `id' type from unsigned from
19402 to ptid_t.
19403 (struct sym_cache, struct breakpoint, struct
19404 process_info_private): Forward declare.
19405 (struct process_info): Declare.
19406 (current_process): Declare.
19407 (all_processes): Declare.
19408 (initialize_inferiors): Declare.
19409 (add_thread): Adjust to use ptid_t.
19410 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19411 (add_process, remove_process, find_thread_pid): Declare.
19412 (find_inferior_id): Adjust to use ptid_t.
19413 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19414 (multi_process): Declare.
19415 (push_event): Adjust to use ptid_t.
19416 (read_ptid, write_ptid): Declare.
19417 (prepare_resume_reply): Adjust to use ptid_t.
19418 (clear_symbol_cache): Declare.
19419 * inferiors.c (all_processes): New.
19420 (null_ptid, minus_one_ptid): New.
19421 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19422 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19423 (add_thread): Change unsigned long to ptid. Remove gdb_id
19424 parameter. Adjust.
19425 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19426 (gdb_id_to_thread): Rename to ...
19427 (find_thread_pid): ... this. Change unsigned long to ptid.
19428 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19429 (loaded_dll, pull_pid_from_list): Adjust.
19430 (add_process, remove_process, find_process_pid)
19431 (get_thread_process, current_process, initialize_inferiors): New.
19432 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19433 (struct target_waitstatus) <related_pid>: Ditto.
19434 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19435 return type to int.
19436 (struct target_ops) <join>: Add `pid' argument.
19437 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19438 (struct target_ops) <wait>: Add `ptid' field. Change return type
19439 to ptid.
19440 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19441 (mywait): Add `ptid' argument. Change return type to ptid_t.
19442 (target_pid_to_str): Declare.
19443 * target.c (set_desired_inferior): Adjust to use ptids.
19444 (mywait): Add new `ptid' argument. Adjust.
19445 (target_pid_to_str): New.
19446 * mem-break.h (free_all_breakpoints): Declare.
19447 * mem-break.c (breakpoints): Delelete.
19448 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19449 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19450 to use per-process breakpoint list.
19451 (free_all_breakpoints): New.
19452 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19453 (symbol_cache, all_symbols_looked_up): Delete.
19454 (hexchars): New.
19455 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19456 read_ptid): New.
19457 (prepare_resume_reply): Change ptid argument's type from unsigned
19458 long to ptid_t. Adjust. Implement W;process and X;process.
19459 (free_sym_cache, clear_symbol_cache): New.
19460 (look_up_one_symbol): Adjust to per-process symbol cache. *
19461 * server.c (cont_thread, general_thread, step_thread): Change type
19462 to ptid_t.
19463 (attached): Delete.
19464 (multi_process): New.
19465 (last_ptid): Change type to ptid_t.
19466 (struct vstop_notif) <ptid>: Change type to ptid_t.
19467 (queue_stop_reply, push_event): Change `ptid' argument's type to
19468 ptid_t.
19469 (discard_queued_stop_replies): Add `pid' argument.
19470 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19471 changes. Don't reference the `attached' global.
19472 (attach_inferior): Adjust to mywait interface changes.
19473 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19474 features. Handle and report "multiprocess+". Handle
19475 "qAttached:PID".
19476 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19477 changes.
19478 (handle_v_kill): New.
19479 (handle_v_stopped): Adjust to use target_pid_to_str.
19480 (handle_v_requests): Allow multiple attaches and runs when
19481 multiprocess extensions are in effect. Handle "vKill".
19482 (myresume): Adjust to use ptids.
19483 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19484 (handle_status): Adjust to discard_queued_stop_replies interface
19485 change.
19486 (first_thread_of, kill_inferior_callback)
19487 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19488 (main): Call initialize_inferiors. Adjust to use ptids, killing
19489 and detaching from all inferiors. Handle multiprocess packet
19490 variants.
19491 * linux-low.h: Include gdb_proc_service.h.
19492 (struct process_info_private): New.
19493 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19494 <lwpid_of>: Use ptid_get_lwp.
19495 (get_lwp_thread): Adjust.
19496 (struct lwp_info): Add `dead' member.
19497 (find_lwp_pid): Declare.
19498 * linux-low.c (thread_db_active): Delete.
19499 (new_inferior): Adjust comment.
19500 (inferior_pid): Delete.
19501 (linux_add_process): New.
19502 (handle_extended_wait): Adjust.
19503 (add_lwp): Change unsigned long to ptid.
19504 (linux_create_inferior): Add process to processes table. Adjust
19505 to use ptids. Don't set new_inferior here.
19506 (linux_attach_lwp): Rename to ...
19507 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19508 it. Adjust to use ptids.
19509 (linux_attach_lwp): New.
19510 (linux_attach): Add process to processes table. Don't set
19511 new_inferior here.
19512 (struct counter): New.
19513 (second_thread_of_pid_p, last_thread_of_process_p): New.
19514 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19515 multiple processes.
19516 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19517 processes. Remove process from process table.
19518 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19519 to multiple processes.
19520 (any_thread_of): New.
19521 (linux_detach): Add `pid' argument, and handle it. Remove process
19522 from processes table.
19523 (linux_join): Add `pid' argument. Handle it.
19524 (linux_thread_alive): Change unsighed long argument to ptid_t.
19525 Consider dead lwps as not being alive.
19526 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19527 threads we're not interested in.
19528 (same_lwp, find_lwp_pid): New.
19529 (linux_wait_for_lwp): Change `pid' argument's type from int to
19530 ptid_t. Adjust.
19531 (linux_wait_for_event): Rename to ...
19532 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19533 from int to ptid_t. Adjust.
19534 (linux_wait_for_event): New.
19535 (linux_wait_1): Add `ptid' argument. Change return type to
19536 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19537 that exit from the process table.
19538 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19539 Adjust.
19540 (mark_lwp_dead): New.
19541 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19542 stopping all threads, mark its main lwp as dead.
19543 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19544 ptids.
19545 (fetch_register, usr_store_inferior_registers)
19546 (regsets_fetch_inferior_registers)
19547 (regsets_store_inferior_registers, linux_read_memory)
19548 (linux_write_memory): Inline `inferior_pid'.
19549 (linux_look_up_symbols): Adjust to use per-process
19550 `thread_db_active'.
19551 (linux_request_interrupt): Adjust to use ptids.
19552 (linux_read_auxv): Inline `inferior_pid'.
19553 (initialize_low): Don't reference thread_db_active.
19554 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19555 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19556 (ps_getpid): Return the pid of the current inferior.
19557 * thread-db.c (proc_handle, thread_agent): Delete.
19558 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19559 per-process data.
19560 (find_one_thread): Change argument type to ptid_t. Adjust to
19561 per-process data.
19562 (maybe_attach_thread): Adjust to per-process data and ptids.
19563 (thread_db_find_new_threads): Ditto.
19564 (thread_db_init): Ditto.
19565 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19566 processes table. Adjust to use ptids.
19567 (spu_kill, spu_detach): Adjust interface. Remove process from
19568 processes table.
19569 (spu_join, spu_thread_alive): Adjust interface.
19570 (spu_wait): Adjust interface. Remove process from processes
19571 table. Adjust to use ptids.
19572 * win32-low.c (current_inferior_tid): Delete.
19573 (current_inferior_ptid): New.
19574 (debug_event_ptid): New.
19575 (thread_rec): Take a ptid. Adjust.
19576 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19577 (child_delete_thread): Ditto.
19578 (do_initial_child_stuff): Add `attached' argument. Add process to
19579 processes table.
19580 (child_fetch_inferior_registers, child_store_inferior_registers):
19581 Adjust.
19582 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19583 (win32_attach): Pass 1 to do_initial_child_stuff.
19584 (win32_kill): Adjust interface. Remove process from processes
19585 table.
19586 (win32_detach): Ditto.
19587 (win32_join): Adjust interface.
19588 (win32_thread_alive): Take a ptid.
19589 (win32_resume): Adjust to use ptids.
19590 (get_child_debug_event): Ditto.
19591 (win32_wait): Adjust interface. Remove exiting process from
19592 processes table.
19593
19594 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19595
19596 Non-stop mode support.
19597
19598 * server.h (non_stop): Declare.
19599 (gdb_client_data, handler_func): Declare.
19600 (delete_file_handler, add_file_handler, start_event_loop):
19601 Declare.
19602 (handle_serial_event, handle_target_event, push_event)
19603 (putpkt_notif): Declare.
19604 * target.h (enum resume_kind): New.
19605 (struct thread_resume): Replace `step' field by `kind' field.
19606 (TARGET_WNOHANG): Define.
19607 (struct target_ops) <wait>: Add `options' argument.
19608 <supports_non_stop, async, start_non_stop>: New fields.
19609 (target_supports_non_stop, target_async): New.
19610 (start_non_stop): Declare.
19611 (mywait): Add `options' argument.
19612 * target.c (mywait): Add `options' argument. Print child exit
19613 notifications here.
19614 (start_non_stop): New.
19615 * server.c (non_stop, own_buf, mem_buf): New globals.
19616 (struct vstop_notif): New.
19617 (notif_queue): New global.
19618 (queue_stop_reply, push_event, discard_queued_stop_replies)
19619 (send_next_stop_reply): New.
19620 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19621 interface changes.
19622 (attach_inferior): In non-stop mode, don't wait for the target
19623 here.
19624 (handle_general_set): Handle QNonStop.
19625 (handle_query): When handling qC, return the current general
19626 thread, instead of the first thread of the list.
19627 (handle_query): If the backend supports non-stop mode, include
19628 QNonStop+ in the qSupported query response.
19629 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19630 and non-stop mode.
19631 (handle_v_attach, handle_v_run): Handle non-stop mode.
19632 (handle_v_stopped): New.
19633 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19634 (myresume): Adjust to use resume_kind. Handle non-stop.
19635 (queue_stop_reply_callback): New.
19636 (handle_status): Handle non-stop mode.
19637 (main): Clear non_stop flag on reconnection. Use the event-loop.
19638 Refactor serial protocol handling from here ...
19639 (process_serial_event): ... to this new function. When GDB
19640 selects any thread, select one here. In non-stop mode, wait until
19641 GDB acks all pending events before exiting.
19642 (handle_serial_event, handle_target_event): New.
19643 * remote-utils.c (remote_open): Install remote_desc in the event
19644 loop.
19645 (remote_close): Remove remote_desc from the event loop.
19646 (putpkt_binary): Rename to...
19647 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19648 (putpkt_binary): New as wrapper around putpkt_binary_1.
19649 (putpkt_notif): New.
19650 (prepare_resume_reply): In non-stop mode, don't change the
19651 general_thread.
19652 * event-loop.c: New.
19653 * Makefile.in (OBJ): Add event-loop.o.
19654 (event-loop.o): New rule.
19655
19656 * linux-low.h (pid_of): Moved here.
19657 (lwpid_of): New.
19658 (get_lwp_thread): Use lwpid_of.
19659 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19660 * linux-low.c (pid_of): Delete.
19661 (inferior_pid): Use lwpid_of.
19662 (linux_event_pipe): New.
19663 (target_is_async_p): New.
19664 (delete_lwp): New.
19665 (handle_extended_wait): Use lwpid_of.
19666 (add_lwp): Don't set lwpid field.
19667 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19668 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19669 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19670 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19671 first. Adjust to linux_wait_for_event interface changes. Use
19672 lwpid_of.
19673 (linux_detach): Don't delete the main lwp here.
19674 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19675 (status_pending_p): Don't consider explicitly suspended lwps.
19676 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19677 pointer. Add OPTIONS argument. Change return type to int. Use
19678 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19679 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19680 pointer. Add status pointer argument. Return a pid instead of a
19681 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19682 changes. In non-stop mode, don't switch to a random thread.
19683 (linux_wait): Rename to...
19684 (linux_wait_1): ... this. Add target_options argument, and handle
19685 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19686 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19687 clean exit and signal exit code. Don't stop all threads in
19688 non-stop mode. In all-stop mode, only stop all threads when
19689 reporting a stop to GDB. Handle explicit thread stop requests.
19690 (async_file_flush, async_file_mark): New.
19691 (linux_wait): New.
19692 (send_sigstop): Use lwpid_of.
19693 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19694 interface changes. In non-stop mode, don't switch to a random
19695 thread.
19696 (linux_resume_one_lwp): Use lwpid_of.
19697 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19698 (linux_resume_one_thread): ... this. Handle resume_stop. In
19699 non-stop mode, don't look for pending flag in all threads.
19700 (resume_status_pending_p): Don't consider explicitly suspended
19701 threads.
19702 (my_waitpid): Reimplement. Emulate __WALL.
19703 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19704 Use lwpid_of.
19705 (sigchld_handler, linux_supports_non_stop, linux_async)
19706 (linux_start_non_stop): New.
19707 (linux_target_ops): Register linux_supports_non_stop, linux_async
19708 and linux_start_non_stop.
19709 (initialize_low): Install SIGCHLD handler.
19710 * thread-db.c (thread_db_create_event, find_one_thread)
19711 (thread_db_get_tls_address): Use lwpid_of.
19712 * win32-low.c (win32_detach): Adjust to use resume_kind.
19713 (win32_wait): Add `options' argument.
19714 * spu-low.c (spu_resume): Adjust to use resume_kind.
19715 (spu_wait): Add `options' argument.
19716
19717 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19718
19719 Decouple target code from remote protocol.
19720
19721 * target.h (enum target_waitkind): New.
19722 (struct target_waitstatus): New.
19723 (struct target_ops) <wait>: Return an unsigned long. Take a
19724 target_waitstatus pointer instead of a char pointer.
19725 (mywait): Likewise.
19726 * target.c (mywait): Change prototype to return an unsigned long.
19727 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19728 * server.h (thread_from_wait, old_thread_from_wait): Delete
19729 declarations.
19730 (prepare_resume_reply): Change prototype to take a
19731 target_waitstatus.
19732 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19733 (last_status, last_ptid): New.
19734 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19735 pid instead of a signal.
19736 (attach_inferior): Remove "status" and "signal" parameters.
19737 Adjust.
19738 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19739 not as an address.
19740 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19741 (handle_v_requests, myresume): Remove "status" and "signal"
19742 parameters. Adjust.
19743 (handle_status): New.
19744 (main): Delete local `status'. Adjust.
19745 * remote-utils.c: Include target.h.
19746 (prepare_resume_reply): Change prototype to take a
19747 target_waitstatus. Adjust.
19748
19749 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19750 interface.
19751 * spu-low.c (spu_wait): Adjust.
19752 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19753 Delete.
19754 (win32_wait): Adjust.
19755
19756 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19757
19758 * target.h (struct thread_resume): Delete leave_stopped member.
19759 (struct target_ops): Add a `n' argument to the `resume' callback.
19760 * server.c (start_inferior): Adjust.
19761 (handle_v_cont, myresume): Adjust.
19762 * linux-low.c (check_removed_breakpoint): Adjust to resume
19763 interface change, and to removed leave_stopped field.
19764 (resume_ptr): Delete.
19765 (struct thread_resume_array): New.
19766 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19767 resume interface change.
19768 (linux_continue_one_thread, linux_queue_one_thread)
19769 (resume_status_pending_p): Check if the resume field is NULL
19770 instead of checking the leave_stopped member.
19771 (linux_resume): Adjust to the target resume interface change.
19772 * spu-low.c (spu_resume): Adjust to the target resume interface
19773 change.
19774 * win32-low.c (win32_detach, win32_resume): Ditto.
19775
19776 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19777
19778 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19779 flag.
19780 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19781 pending.
19782 (linux_continue_one_thread): Only preserve the stepping flag if
19783 there's a pending breakpoint.
19784
19785 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19786
19787 * server.c (main): After the inferior having exited, call
19788 remote_close before exiting gdbserver.
19789
19790 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19791
19792 Fix size of FPSCR in Power 7 processors.
19793 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19794 (PPC_FEATURE_HAS_DFP): New #define.
19795 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19796 size of the FPSCR.
19797
19798 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19799
19800 * server.c (handle_query) Whitespace and formatting.
19801
19802 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19803
19804 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19805 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19806 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19807 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19808 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19809 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19810 Makefile.in, configure.ac: Fix whitespace throughout.
19811 * configure: Regenerate.
19812
19813 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19814
19815 * inferiors.c (find_inferior): Make it safe for the callback
19816 function to delete the currently iterated inferior.
19817
19818 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19819
19820 * Makefile.in (linuw_low_h): Move higher.
19821 (thread-db.o): Depend on $(linux_low_h).
19822
19823 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19824
19825 Rename "process" to "lwp" throughout.
19826
19827 * linux-low.c (all_processes): Rename to...
19828 (all_lwps): ... this.
19829 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19830 (add_process): Rename to ...
19831 (add_lwp): ... this. Adjust.
19832 (linux_create_inferior): Adjust.
19833 (linux_attach_lwp): Adjust.
19834 (linux_attach): Adjust.
19835 (linux_kill_one_process): Rename to ...
19836 (linux_kill_one_lwp): ... this. Adjust.
19837 (linux_kill): Adjust.
19838 (linux_detach_one_process): Rename to ...
19839 (linux_detach_one_lwp): ... this. Adjust.
19840 (linux_detach): Adjust.
19841 (check_removed_breakpoint): Adjust.
19842 (status_pending_p): Adjust.
19843 (linux_wait_for_process): Rename to ...
19844 (linux_wait_for_lwp): ... this. Adjust.
19845 (linux_wait_for_event): Adjust.
19846 (send_sigstop): Adjust.
19847 (wait_for_sigstop): Adjust.
19848 (stop_all_processes): Rename to ...
19849 (stop_all_lwps): ... this.
19850 (linux_resume_one_process): Rename to ...
19851 (linux_resume_one_lwp): ... this. Adjust.
19852 (linux_set_resume_request, linux_continue_one_thread)
19853 (linux_queue_one_thread, resume_status_pending_p)
19854 (usr_store_inferior_registers, regsets_store_inferior_registers)
19855 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19856 Adjust.
19857 * linux-low.h (get_process): Rename to ...
19858 (get_lwp): ... this. Adjust.
19859 (get_thread_process): Rename to ...
19860 (get_thread_lwp): ... this. Adjust.
19861 (get_process_thread): Rename to ...
19862 (get_lwp_thread): ... this. Adjust.
19863 (struct process_info): Rename to ...
19864 (struct lwp_info): ... this.
19865 (all_processes): Rename to ...
19866 (all_lwps): ... this.
19867 * proc-service.c (ps_lgetregs): Adjust.
19868 * thread-db.c (thread_db_create_event, find_one_thread)
19869 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19870
19871 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19872
19873 * server.c (handle_query): Handle "qAttached".
19874
19875 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19876
19877 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19878 GPLv3, update license URL.
19879
19880 2009-03-01 Doug Evans <dje@google.com>
19881
19882 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19883 (server_h): Add gdb_signals.h.
19884 (signals.o): Update.
19885 * server.h (target_signal_from_host,target_signal_to_host_p)
19886 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19887
19888 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19889
19890 * remote-utils.c (getpkt): Also generate remote-debug
19891 information if noack_mode is set.
19892
19893 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19894
19895 * server.c (handle_query): Report qXfer:siginfo:read and
19896 qXfer:siginfo:write as supported and handle them.
19897 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19898 * linux-low.c (linux_xfer_siginfo): New.
19899 (linux_target_ops): Set it.
19900
19901 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19902
19903 * server.c (gdbserver_usage): Mention --remote-debug.
19904 (main): Accept '--remote-debug' switch.
19905
19906 2009-01-18 Doug Evans <dje@google.com>
19907
19908 * regcache.c (new_register_cache): No need to check result of xcalloc.
19909 * server.c (handle_search_memory): Back out calls to xmalloc,
19910 result is checked and error is returned to user upon failure.
19911 (handle_query): Ditto. Add more checks for result of malloc.
19912 (handle_v_cont): Check result of malloc, report error back to
19913 user upon failure.
19914 (handle_v_run): Ditto. Call freeargv.
19915 * server.h (freeargv): Declare.
19916 * utils.c (freeargv): New fn.
19917
19918 2009-01-15 Doug Evans <dje@google.com>
19919
19920 * gdbreplay.c (perror_with_name): Make arg const char *.
19921 * server.h (target_signal_to_name): Make return type const char *.
19922 * thread-db.c (thread_db_err_str): Make return type const char *.
19923 * utils.c (perror_with_name): Make arg const char *.
19924
19925 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19926
19927 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19928 when handling a EXIT_PROCESS_DEBUG_EVENT.
19929
19930 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19931
19932 * gdbreplay.c (gdbreplay_version): Update copyright year.
19933 * server.c (gdbserver_version): Likewise.
19934
19935 2009-01-05 Doug Evans <dje@google.com>
19936
19937 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19938 (handle_extended_wait): Improve comment.
19939
19940 2008-12-13 Doug Evans <dje@google.com>
19941
19942 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19943 * server.h (ATTR_MALLOC): New macro.
19944 (xmalloc,xcalloc,xstrdup): Declare.
19945 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19946 * inferiors.c: Ditto.
19947 * linux-low.c: Ditto.
19948 * mem-break.c: Ditto.
19949 * regcache.c: Ditto.
19950 * remote-utils.c: Ditto.
19951 * server.c: Ditto.
19952 * target.c: Ditto.
19953 * win32-low.c: Ditto.
19954
19955 2008-12-12 Doug Evans <dje@google.com>
19956
19957 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19958 in debugging printf.
19959
19960 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19961
19962 2008-12-09 Doug Evans <dje@google.com>
19963
19964 * linux-low.h (struct process_info): Delete member tid, unused.
19965 * thread-db.c (find_one_thread): Update.
19966 (maybe_attach_thread): Update.
19967
19968 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19969
19970 * target.h (struct target_ops): Add qxfer_osdata member.
19971 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19972 and dirent.h.
19973 (linux_qxfer_osdata): New functions.
19974 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19975 callback.
19976 * server.c (handle_query): Handle "qXfer:osdata:read:".
19977 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19978 (buffer_xml_printf): New functions.
19979 * server.h (struct buffer): New.
19980 (buffer_grow_str, buffer_grow_str0): New macros.
19981 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19982 (buffer_xml_printf): Declare.
19983
19984 2008-11-24 Doug Evans <dje@google.com>
19985
19986 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19987
19988 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19989
19990 * server.c (handle_v_run): Always use the supplied argument list.
19991
19992 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19993
19994 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19995 (xtensa_regmap_table): Add entry for scompare1.
19996
19997 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19998
19999 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
20000 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
20001 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
20002 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
20003 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
20004 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
20005 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
20006 XML target descriptions.
20007 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
20008 when inferior is running on an ISA 2.05 or later processor. Add
20009 special case to return offset for full 64-bit slot of FPSCR when
20010 in 32-bits.
20011
20012 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
20013
20014 * Makefile.in (SFILES, clean): Added sparc64 files.
20015 (reg-sparc64.o, reg-sparc64.c): New.
20016 * configure.srv (sparc*-*-linux*): New configuration.
20017 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
20018 syscall arguments for SPARC.
20019 (regsets_store_inferior_registers): Likewise.
20020 * linux-sparc-low.c: New file.
20021
20022 2008-10-21 Doug Evans <dje@google.com>
20023
20024 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
20025 (READLINE_DIR,READLINE_DEP): Delete.
20026 (INTERNAL_CFLAGS): Update.
20027 (LINTFLAGS): Update.
20028
20029 2008-10-10 Pedro Alves <pedro@codesourcery.com>
20030
20031 * server.c (handle_v_run): If GDB didn't specify an argv, use the
20032 whole argv from the last run, not just argv[0].
20033
20034 2008-09-08 Pedro Alves <pedro@codesourcery.com>
20035
20036 * regcache.c (new_register_cache): Return NULL if the register
20037 cache size isn't known yet.
20038 (free_register_cache): Avoid dereferencing a NULL regcache.
20039
20040 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20041
20042 * configure.srv: Merge MIPS and MIPS64.
20043
20044 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
20045
20046 * Makefile.in (uninstall): Apply $(EXEEXT) too.
20047
20048 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
20049
20050 * Makefile.in: Add required vsx dependencies.
20051
20052 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
20053 Declare init_registers_powerpc_vsx32l.
20054 Declare init_registers_powerpc_vsx64l.
20055 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
20056 (ppc_arch_setup): Check for VSX in hwcap.
20057 (ppc_fill_vsxregset): New function.
20058 (ppc_store_vsxregset): New function.
20059 Add new VSX entry in regset_info target_regsets.
20060
20061 * configure.srv: Add new VSX dependencies.
20062
20063 2008-08-12 Pedro Alves <pedro@codesourcery.com>
20064
20065 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
20066 (remote_open): Set or clear transport_is_reliable.
20067 (putpkt_binary): Don't expect acks in noack mode.
20068 (getpkt): Don't send ack/nac in noack mode.
20069 * server.c (handle_general_set): Handle QStartNoAckMode.
20070 (handle_query): If connected by tcp pass QStartNoAckMode+ in
20071 qSupported.
20072 (main): Reset noack_mode on every connection.
20073 * server.h (noack_mode): Declare.
20074
20075 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
20076
20077 * Makefile.in (GDBREPLAY_OBS): New variable.
20078 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
20079
20080 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
20081 Daniel Jacobowitz <dan@codesourcery.com>
20082
20083 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
20084 (usr_store_inferior_registers): Likewise.
20085 (regsets_store_inferior_registers): Likewise.
20086
20087 2008-07-31 Rolf Jansen <rj@surtec.com>
20088 Pedro Alves <pedro@codesourcery.com>
20089
20090 * configure.ac: Check for memmem declaration.
20091 * server.c [HAVE_MALLOC_H]: Include malloc.h.
20092 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
20093 (disable_packet_qfThreadInfo): Unconditionally compile.
20094 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
20095 * configure, config.in: Regenerate.
20096
20097 2008-07-28 Doug Kwan <dougkwan@google.com>
20098
20099 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
20100 (linux_write_memory): Remove declaration of errno.
20101
20102 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
20103
20104 * linux-low.c (handle_extended_wait): Do not use "status"
20105 variable uninitialized.
20106
20107 2008-07-07 Pedro Alves <pedro@codesourcery.com>
20108
20109 * server.c (handle_v_attach): Inhibit reporting dll changes.
20110
20111 2008-06-27 Pedro Alves <pedro@codesourcery.com>
20112
20113 * remote-utils.c (prepare_resume_reply): If requested, don't
20114 output "thread:TID" in the T stop reply.
20115
20116 * server.c (disable_packet_vCont, disable_packet_Tthread)
20117 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
20118 (handle_query): If requested, disable support for qC, qfThreadInfo
20119 and qsThreadInfo.
20120 (handle_v_requests): If requested, disable support for vCont.
20121 (gdbserver_show_disableable): New.
20122 (main): Handle --disable-packet and --disable-packet=LIST.
20123
20124 * server.h (disable_packet_vCont, disable_packet_Tthread)
20125 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
20126
20127 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
20128
20129 * server.c (gdbserver_usage): Mention --version.
20130
20131 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20132
20133 * Makefile.in (gdbreplay.o): New rule.
20134
20135 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20136
20137 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20138 message, not gdbserver.
20139
20140 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20141 Nathan Sidwell <nathan@codesourcery.com>
20142 Joseph Myers <joseph@codesourcery.com>
20143
20144 * acinclude.m4: Include ../../config/acx.m4.
20145 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20146 * configure, config.in: Regenerate.
20147 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20148 * server.c (gdbserver_version): Print PKGVERSION.
20149 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20150 (main): Adjust gdbserver_usage calls.
20151 * gdbreplay.c (version, host_name): Add declarations.
20152 (gdbreplay_version, gdbreplay_usage): New.
20153 (main): Accept --version and --help options.
20154
20155 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20156
20157 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20158 (arm_breakpoint_at): Handle Thumb.
20159 (the_low_target): Add comment.
20160
20161 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20162
20163 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20164
20165 2008-05-09 Doug Evans <dje@google.com>
20166
20167 * server.h (decode_search_memory_packet): Declare.
20168 * remote-utils.c (decode_search_memory_packet): New fn.
20169 * server.c (handle_search_memory_1): New fn.
20170 (handle_search_memory): New fn.
20171 (handle_query): Process qSearch:memory packets.
20172
20173 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20174
20175 * regcache.c (registers_length): Remove.
20176 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20177 full register packet.
20178 * regcache.h (registers_length): Remove prototype.
20179 * server.h (PBUFSIZ): Define to 16384.
20180
20181 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20182
20183 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20184 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20185 powerpc-64l.o, and powerpc-altivec64l.o.
20186 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20187 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20188 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20189 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20190 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20191 to srv_xmlfiles.
20192
20193 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20194 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20195 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20196 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20197 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20198 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20199 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20200 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20201 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20202 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20203 (clean): Update.
20204
20205 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20206 (init_registers_powerpc_32l): ... this new prototype.
20207 (init_registers_powerpc_32): Remove, replace by ...
20208 (init_registers_powerpc_altivec32l): ... this new prototype.
20209 (init_registers_powerpc_e500): Remove, replace by ...
20210 (init_registers_powerpc_e500l): ... this new prototype.
20211 (init_registers_ppc64): Remove, replace by ...
20212 (init_registers_powerpc_64l): ... this new prototype.
20213 (init_registers_powerpc_64): Remove, replace by ...
20214 (init_registers_powerpc_altivec64l): ... this new prototype.
20215 (ppc_num_regs): Set to 73.
20216 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20217 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20218 (ppc_cannot_store_register): Handle orig_r3 and trap.
20219 (ppc_arch_setup): Update init_registers_... calls.
20220 (ppc_fill_gregset): Handle orig_r3 and trap.
20221
20222 * inferiors.c (clear_inferiors): Reset current_inferior.
20223
20224 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20225
20226 * acinclude.m4: Add override.m4.
20227 * configure: Regenerate.
20228
20229 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20230
20231 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20232 initial call to init_register_ppc64.
20233
20234 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20235
20236 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20237 single powerpc*-*-linux* case.
20238 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20239
20240 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20241
20242 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20243 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20244 from reg_xmlfiles.
20245 * linux-ppc-low.c: Include <elf.h>.
20246 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20247 (ppc_hwcap): New global variable.
20248 (ppc_regmap): Remove __SPE__ #ifdef sections.
20249 (ppc_regmap_e500): New global variable.
20250 (ppc_cannot_store_register): Update __SPE__ special case.
20251 (ppc_get_hwcap): New function.
20252 (ppc_arch_setup): Use it to determine whether inferior supports
20253 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20254 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20255 Do not access registers if target does not support AltiVec.
20256 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20257 Do not access registers if target does not support SPE.
20258 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20259
20260 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20261
20262 * linux-low.c (disabled_regsets, num_regsets): New.
20263 (use_regsets_p): Delete.
20264 (linux_wait_for_process): Clear disabled_regsets.
20265 (regsets_fetch_inferior_registers): Check and set it.
20266 (regsets_store_inferior_registers): Likewise.
20267 (linux_fetch_registers, linux_store_registers): Do not use
20268 use_regsets_p.
20269 (initialize_low): Allocate disabled_regsets.
20270
20271 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20272
20273 * Makefile.in (LIBOBJS): New.
20274 (OBS): Use LIBOBJS.
20275 (memmem.o): New rule.
20276 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20277 * configure: Regenerated.
20278
20279 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20280
20281 * server.c (handle_query): Never return "unsupported" for
20282 qXfer:features:read queries.
20283
20284 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20285
20286 * server.c (get_features_xml): Fix inverted condition.
20287 (handle_query): Always support qXfer:feature:read.
20288
20289 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20290
20291 * server.c (wrapper_argv): New.
20292 (start_inferior): Handle wrapper_argv. If set, expect an extra
20293 trap.
20294 (gdbserver_usage): Document --wrapper.
20295 (main): Parse --wrapper.
20296
20297 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20298
20299 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20300 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20301 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20302 (ppc_set_pc): Likewise.
20303 (ppc_arch_setup): New function.
20304 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20305 of collect_register.
20306 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20307
20308 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20309
20310 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20311 instead of linux-ppc64-low.o.
20312 * linux-ppc64-low.c: Remove file.
20313 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20314 (linux-ppc64-low.o): Remove rule.
20315
20316 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20317 (init_registers_powerpc_64): Likewise.
20318 (ppc_regmap): Conditionally define depending on __powerpc64__.
20319 (ppc_cannot_store_register): Do not special-case "fpscr" when
20320 compiled on __powerpc64__.
20321 (ppc_collect_ptrace_register): New function.
20322 (ppc_supply_ptrace_register): New function.
20323 (ppc_breakpoint): Change type to "unsigned int".
20324 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20325 (the_low_target): Conditionally provide initializers for the
20326 arch_setup member depending on __powerpc64__. Install
20327 collect_ptrace_register and supply_ptrace_register members.
20328
20329 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20330
20331 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20332 * server.c (gdbserver_xmltarget): Define.
20333 (get_features_xml): Use it to replace "target.xml" and arch_string.
20334
20335 * configure.srv: Remove srv_xmltarget. Add XML files that were
20336 mentioned there to srv_xmlfiles instead. Remove conditional tests
20337 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20338 srv_xmlfiles and srv_regobj to include all possible choices.
20339 * configure.ac (srv_xmltarget): Remove.
20340 (srv_xmlfiles): Do not add "target.xml".
20341 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20342 checks for supplementary target information.
20343 * configure: Regenerate.
20344 * Makefile.in (XML_TARGET): Remove.
20345 (target.xml): Remove rule.
20346 (clean): Do not clean up target.xml.
20347 (.PRECIOUS): Do not mention target.xml.
20348
20349 * target.h (struct target_ops): Remove arch_string member.
20350 * linux-low.c (linux_arch_string): Remove.
20351 (linux_target_ops): Remove arch_string initializer.
20352 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20353 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20354 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20355 * spu-low.c (spu_arch_string): Remove.
20356 (spu_target_ops): Remove arch_string initializer.
20357 * win32-low.c (win32_arch_string): Remove.
20358 (win32_target_ops): Remove arch_string initializer.
20359 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20360 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20361 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20362
20363 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20364
20365 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20366 by collect_ptrace_register and supply_ptrace_register hooks.
20367 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20368 instead of checking for the_low_target.left_pad_xfer.
20369 (usr_store_inferior_registers): Use collect_ptrace_register callback
20370 instead of checking for the_low_target.left_pad_xfer.
20371
20372 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20373 (s390_supply_ptrace_register): Likewise.
20374 (s390_fill_gregset): Call s390_collect_ptrace_register.
20375 (the_low_target): Update.
20376
20377 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20378 (ppc_supply_ptrace_register): Likewise.
20379 (the_low_target): Update.
20380
20381 * linux-i386-low.c (the_low_target): Update.
20382 * linux-x86-64-low.c (the_low_target): Update.
20383
20384 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20385
20386 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20387 reg-s390.o and reg-s390x.o.
20388
20389 * linux-low.c (new_inferior): New global variable.
20390 (linux_create_inferior, linux_attach): Set it.
20391 (linux_wait_for_process): Call the_low_target.arch_setup after the
20392 target has stopped for the first time.
20393 (initialize_low): Do not call the_low_target.arch_setup.
20394
20395 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20396 (s390_set_pc): Likewise.
20397 (s390_arch_setup): New function.
20398 (the_low_target): Use s390_arch_setup as arch_setup routine.
20399
20400 * regcache.c (realloc_register_cache): New function.
20401 (set_register_cache): Call it for each existing regcache.
20402
20403 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20404
20405 * server.h (init_registers): Remove prototype.
20406
20407 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20408 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20409 instead of init_registers ().
20410 * linux-arm-low.c (init_registers_arm): Add prototype.
20411 (init_registers_arm_with_iwmmxt): Likewise.
20412 (the_low_target): Add initializer for arch_setup field.
20413 * linux-cris-low.c (init_registers_cris): Add prototype.
20414 (the_low_target): Add initializer for arch_setup field.
20415 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20416 (the_low_target): Add initializer for arch_setup field.
20417 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20418 (the_low_target): Add initializer for arch_setup field.
20419 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20420 (the_low_target): Add initializer for arch_setup field.
20421 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20422 (the_low_target): Add initializer for arch_setup field.
20423 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20424 (the_low_target): Add initializer for arch_setup field.
20425 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20426 (init_registers_mips64_linux): Likewise.
20427 (the_low_target): Add initializer for arch_setup field.
20428 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20429 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20430 (the_low_target): Add initializer for arch_setup field.
20431 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20432 (init_registers_powerpc_64): Likewise.
20433 (the_low_target): Add initializer for arch_setup field.
20434 * linux-s390-low.c (init_registers_s390): Add prototype.
20435 (init_registers_s390x): Likewise.
20436 (the_low_target): Add initializer for arch_setup field.
20437 * linux-sh-low.c (init_registers_sh): Add prototype.
20438 (the_low_target): Add initializer for arch_setup field.
20439 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20440 (the_low_target): Add initializer for arch_setup field.
20441 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20442 (the_low_target): Add initializer for arch_setup field.
20443
20444 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20445 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20446 instead of init_registers ().
20447 * win32-arm-low.c (init_registers_arm): Add prototype.
20448 (the_low_target): Add initializer for arch_setup field.
20449 * win32-i386-low.c (init_registers_i386): Add prototype.
20450 (the_low_target): Add initializer for arch_setup field.
20451
20452 * spu-low.c (init_registers_spu): Add prototype.
20453 (initialize_low): Call initialie_registers_spu () instead of
20454 initialize_registers ().
20455
20456 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20457
20458 * server.c (handle_v_requests): When handling the vRun and vAttach
20459 packets, if already debugging a process, don't kill it. Return an
20460 error instead.
20461
20462 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20463
20464 * server.c (handle_query): Correct length check.
20465
20466 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20467
20468 * win32-low.c (do_initial_child_stuff): Add process handle
20469 parameter. Set current_process_handle and current_process_id from the
20470 parameters. Clear globals.
20471 (win32_create_inferior): Don't set current_process_handle and
20472 current_process_id here. Instead pass them on the call to
20473 do_initial_child_stuff.
20474 (win32_attach): Likewise.
20475 (win32_clear_inferiors): New.
20476 (win32_kill): Don't close the current process handle or the
20477 current thread handle here. Instead call win32_clear_inferiors.
20478 (win32_detach): Don't open a new handle to the process. Call
20479 win32_clear_inferiors.
20480 (win32_join): Don't rely on current_process_handle; open a new
20481 handle using the process id.
20482 (win32_wait): Call win32_clear_inferiors when the inferior process
20483 has exited.
20484
20485 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20486
20487 * server.c (monitor_show_help): Add "exit".
20488
20489 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20490
20491 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20492 (clean): Add reg-xtensa.c.
20493 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20494 * configure.srv (xtensa*-*-linux*) New target.
20495 * linux-xtensa-low.c: New.
20496 * xtensa-xtregs.c: New.
20497
20498 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20499
20500 * hostio.c: Don't include errno.h.
20501 (errno_to_fileio_errno): Move to hostio-errno.
20502 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20503 error number outputting to the target->hostio_last_error callback.
20504 (hostio_packet_error): Use FILEIO_EINVAL directly.
20505 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20506 calls to hostio_error.
20507 * hostio-errno.c: New.
20508 * server.h (hostio_last_error_from_errno): Declare.
20509 * target.h (target_ops): Add hostio_last_error member.
20510 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20511 as hostio_last_error handler.
20512 * spu-low.c (spu_target_ops): Likewise.
20513 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20514 (wince_hostio_last_error): New functions.
20515 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20516 as hostio_last_error handler.
20517 (win32_target_ops) [!_WIN32_WCE]: Register
20518 hostio_last_error_from_errno as hostio_last_error handler.
20519 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20520 (hostio-errno.o): New rule.
20521 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20522 * configure.srv (srv_hostio_err_objs): New variable. Default to
20523 hostio-errno.o.
20524 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20525 * configure: Regenerate.
20526
20527 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20528
20529 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20530 (linux_kill, linux_detach): Clean up the process list.
20531 * remote-utils.c (remote_open): Improve port number parsing.
20532 (putpkt_binary, input_interrupt): Only send interrupts if the target
20533 is running.
20534 * server.c (extended_protocol): Make static.
20535 (attached): Define earlier.
20536 (exit_requested, response_needed, program_argv): New variables.
20537 (target_running): New.
20538 (start_inferior): Clear attached here.
20539 (attach_inferior): Set attached here.
20540 (require_running): Define.
20541 (handle_query): Use require_running and target_running. Implement
20542 "monitor exit".
20543 (handle_v_attach, handle_v_run): New.
20544 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20545 (gdbserver_usage): Update.
20546 (main): Redo argument parsing. Handle --debug and --multi. Handle
20547 --attach along with other options or after the port. Save
20548 program_argv. Support no initial program. Resynchronize
20549 communication with GDB after an error. Handle "monitor exit".
20550 Use require_running and target_running. Always allow the extended
20551 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20552 restart in extended mode.
20553 * README: Refer to the GDB manual. Update --attach usage.
20554
20555 2007-12-20 Andreas Schwab <schwab@suse.de>
20556
20557 * linux-low.c (STACK_SIZE): Define.
20558 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20559 (linux_test_for_tracefork): Likewise.
20560
20561 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20562
20563 * linux-low.c (linux_wait_for_event): Update messages. Do not
20564 reinsert auto-delete breakpoints.
20565 * mem-break.c (struct breakpoint): Change return type of handler to
20566 int.
20567 (set_breakpoint_at): Update handler type.
20568 (reinsert_breakpoint_handler): Return 1 instead of calling
20569 delete_breakpoint.
20570 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20571 setting a new one.
20572 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20573 * mem-break.h (set_breakpoint_at): Update handler type.
20574 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20575 * win32-low.c (auto_delete_breakpoint): New.
20576 (get_child_debug_event): Use it.
20577
20578 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20579
20580 * configure.ac: Check for pread and pwrite.
20581 * hostio.c (handle_pread): Fall back to lseek and read.
20582 (handle_pwrite): Fall back to lseek and write.
20583 * config.in, configure: Regenerated.
20584
20585 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20586
20587 * server.c (myresume): Add own_buf argument.
20588 (main): Update calls.
20589
20590 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20591
20592 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20593 * remote-utils.c (remote_open): Do not call disable_async_io.
20594 (block_async_io): Delete.
20595 (unblock_async_io): Make static.
20596 (initialize_async_io): New.
20597 * server.c (handle_v_cont): Handle async I/O here.
20598 (myresume): Likewise. Move other common resume tasks here...
20599 (main): ... from here. Call initialize_async_io. Disable async
20600 I/O before the main loop.
20601 * server.h (initialize_async_io): Declare.
20602 (block_async_io, unblock_async_io): Delete prototypes.
20603 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20604
20605 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20606
20607 * remote-utils.c (readchar): Allow binary data in received messages.
20608
20609 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20610
20611 * win32-low.c (attaching): New global.
20612 (win32_create_inferior): Clear the `attaching' global.
20613 (win32_attach): Set the `attaching' global.
20614 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20615 attaching. Only set a breakpoint at the entry point if not
20616 attaching.
20617
20618 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20619
20620 * server.c (main): Don't report dll events on the initial
20621 connection on attaches.
20622
20623 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20624
20625 * server.c (main): Relax numerical bases supported for the pid of
20626 the --attach command line argument.
20627
20628 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20629
20630 * win32-low.c (win32_attach): Call OpenProcess before
20631 DebugActiveProcess, not after. Add last error output to error
20632 call.
20633
20634 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20635
20636 * win32-low.c (win32_get_thread_context)
20637 (win32_set_thread_context): New functions.
20638 (thread_rec): Use win32_get_thread_context.
20639 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20640 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20641 field.
20642
20643 2007-12-03 Leo Zayas
20644 Pedro Alves <pedro_alves@portugalmail.pt>
20645
20646 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20647 global variables.
20648 (child_add_thread): Minor cleanup.
20649 (child_continue): Resume artificially suspended threads before
20650 calling ContinueDebugEvent.
20651 (suspend_one_thread): New.
20652 (fake_breakpoint_event): New.
20653 (get_child_debug_event): Change return type to int. Check here if
20654 gdb sent an interrupt request. If a soft interrupt was requested,
20655 fake a breakpoint event. Return 0 if there is no event to handle,
20656 and 1 otherwise.
20657 (win32_wait): Don't check here if gdb sent an interrupt request.
20658 Ensure there is a valid event to handle.
20659 (win32_request_interrupt): Add soft interruption method as last
20660 resort.
20661
20662 2007-12-03 Leo Zayas
20663 Pedro Alves <pedro_alves@portugalmail.pt>
20664
20665 * win32-low.h (win32_thread_info): Add descriptions to the
20666 structure members. Replace `suspend_count' counter by a
20667 `suspended' flag.
20668 * win32-low.c (thread_rec): Update condition of when to get the
20669 context from the inferior. Rely on ContextFlags being set if it
20670 has already been retrieved. Only suspend the inferior thread if
20671 we haven't already. Warn if that fails.
20672 (continue_one_thread): s/suspend_count/suspended/. Only call
20673 ResumeThread once. Warn if that fails.
20674
20675 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20676
20677 * win32-low.c (win32_wait): Don't read from the inferior when it
20678 has already exited.
20679
20680 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20681
20682 * Makefile.in (win32_low_h): New variable.
20683 (win32-low.o): Add dependency on $(win32_low_h).
20684 (win32-arm-low.o, win32-i386-low.o): New rules.
20685
20686 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20687
20688 * hostio.c: Correct copyright year.
20689
20690 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20691
20692 * Makefile.in (OBS): Add hostio.o.
20693 (hostio.o): New rule.
20694 * server.h (handle_vFile): Declare.
20695 * hostio.c: New file.
20696 * server.c (handle_v_requests): Take packet_len and new_packet_len
20697 for binary packets. Call handle_vFile.
20698 (main): Update call to handle_v_requests.
20699
20700 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20701
20702 * linux-low.c: Include <sched.h>.
20703
20704 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20705
20706 * linux-low.c (linux_tracefork_grandchild): New.
20707 (linux_tracefork_child): Use clone.
20708 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20709
20710 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20711
20712 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20713
20714 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20715
20716 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20717
20718 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20719
20720 * inferiors.c (change_inferior_id): Delete.
20721 (add_pid_to_list, pull_pid_from_list): New.
20722 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20723 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20724 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20725 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20726 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20727 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20728 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20729 (using_threads): Always set to 1.
20730 (handle_extended_wait): New.
20731 (add_process): Do not set TID.
20732 (linux_create_inferior): Set must_set_ptrace_flags.
20733 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20734 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20735 (linux_thread_alive): Rename TID argument to LWPID.
20736 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20737 (linux_wait_for_event): Do not use TID or check using_threads. Update
20738 call to dead_thread_notify. Call handle_extended_wait.
20739 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20740 (send_sigstop): Delete sigstop_sent.
20741 (wait_for_sigstop): Avoid TID.
20742 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20743 (linux_test_for_tracefork): New.
20744 (linux_lookup_signals): Use thread_db_active and
20745 linux_supports_tracefork_flag.
20746 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20747 * linux-low.h (get_process_thread): Avoid TID.
20748 (struct process_ifo): Move thread_known and tid to the end. Remove
20749 sigstop_sent.
20750 (linux_attach_lwp, thread_db_init): Update prototypes.
20751 * server.h (change_inferior_id): Delete prototype.
20752 (add_pid_to_list, pull_pid_from_list): New prototypes.
20753 * thread-db.c (thread_db_use_events): New.
20754 (find_first_thread): Rename to...
20755 (find_one_thread): ...this. Update callers and messages. Do not
20756 call fatal. Check thread_db_use_events. Do not call
20757 change_inferior_id or new_thread_notify.
20758 (maybe_attach_thread): Update. Do not call new_thread_notify.
20759 (thread_db_init): Set thread_db_use_events. Check use_events.
20760 * utils.c (fatal, warning): Correct message prefix.
20761
20762 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20763
20764 * Makefile.in (clean): Remove new files.
20765 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20766 (powerpc-64.o, powerpc-64.c): New rules.
20767 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20768 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20769 with SPE.
20770 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20771 SPE targets.
20772 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20773 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20774 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20775 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20776 (target_regsets): Add AltiVec and SPE register sets.
20777 * configure.ac: Check for AltiVec and SPE.
20778 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20779 (ppc_fill_vrregset, ppc_store_vrregset): New.
20780 (target_regsets): Add AltiVec register set.
20781 * configure: Regenerated.
20782
20783 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20784
20785 * linux-low.c (O_LARGEFILE): Define.
20786 (linux_read_memory): Use /proc/PID/mem.
20787 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20788 * configure, config.in: Regenerated.
20789
20790 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20791
20792 * linux-low.c (linux_wait_for_event): Do not pass signals while
20793 single-stepping.
20794
20795 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20796
20797 * win32-low.c (create_process): New.
20798 (win32_create_inferior): Use create_process instead of
20799 CreateProcess. If create_process failed retry appending an ".exe"
20800 suffix. Store the GetLastError result immediatelly after
20801 create_process calls and use it on the call to error.
20802
20803 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20804
20805 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20806
20807 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20808
20809 * configure.ac: Switch license to GPLv3.
20810
20811 2007-08-01 Michael Snyder <msnyder@access-company.com>
20812
20813 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20814
20815 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20816
20817 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20818 typedef.
20819 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20820 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20821 CloseToolhelp32Snapshot.
20822 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20823 CloseToolhelp32Snapshot.
20824
20825 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20826
20827 * server.c (main): Check for inferior exit before main loop.
20828
20829 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20830
20831 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20832 instead of on tmp_desc.
20833
20834 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20835 Daniel Jacobowitz <dan@codesourcery.com>
20836
20837 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20838 (add_thread): Minor cleanups.
20839 (clear_inferiors): Move lower in the file. Clear the DLL
20840 list.
20841 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20842 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20843 (xml_escape_text): New.
20844 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20845 for qSupported.
20846 (handle_v_cont): Report errors.
20847 (gdbserver_version): Update.
20848 (main): Correct size of own_buf. Do not report initial DLL events.
20849 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20850 (unloaded_dll, xml_escape_text): New.
20851 * win32-low.c (enum target_waitkind): Update comments.
20852 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20853 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20854 (win32_EnumProcessModules, win32_GetModuleInformation)
20855 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20856 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20857 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20858 (win32_Module32First, win32_Module32Next, load_toolhelp)
20859 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20860 (get_child_debug_event): Handle DLL events.
20861 (win32_wait): Likewise.
20862
20863 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20864
20865 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20866 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20867
20868 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20869
20870 * win32-low.c (handle_output_debug_string): Ignore event if not
20871 waiting.
20872
20873 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20874
20875 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20876
20877 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20878
20879 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20880
20881 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20882
20883 * inferiors.c (change_inferior_id): Add comment.
20884 * linux-low.c (check_removed_breakpoint): Add an early
20885 prototype. Improve debug output.
20886 (linux_attach): Doc update.
20887 (linux_detach_one_process, linux_detach): Clean up before releasing
20888 each process.
20889 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20890 * linux-low.h (struct process_info): Doc improvement.
20891 * mem-break.c (delete_all_breakpoints): New.
20892 * mem-break.h (delete_all_breakpoints): New prototype.
20893 * thread-db.c (find_first_thread): New.
20894 (thread_db_create_event): Call it instead of
20895 thread_db_find_new_threads. Clean up unused variables.
20896 (maybe_attach_thread): Remove first thread handling.
20897 (thread_db_find_new_threads): Use find_first_thread.
20898 (thread_db_get_tls_address): Likewise.
20899
20900 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20901
20902 * thread-db.c (thread_db_find_new_threads): Add prototype.
20903 (thread_db_create_event): Check for the main thread before adding
20904 a new thread.
20905 (maybe_attach_thread): Only enable event reporting if TID == 0.
20906 (thread_db_get_tls_address): Check for new threads.
20907
20908 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20909
20910 * linux-low.c (linux_create_inferior): Try execv before execvp.
20911 * spu-low.c (spu_create_inferior): Likewise.
20912
20913 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20914
20915 * linux-low.c (linux_create_inferior): Change execv to execvp.
20916 * spu-low.c (spu_create_inferior): Likewies.
20917
20918 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20919
20920 * Makefile.in (clean): Clean new files instead of deleted ones.
20921 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20922 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20923 rules.
20924 * configure.srv: Specify XML files and new regformats for MIPS and
20925 MIPS64 GNU/Linux.
20926 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20927 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20928 an entry for the restart register.
20929 (mips_cannot_fetch_register, mips_cannot_store_register)
20930 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20931 register names to match the XML descriptions.
20932 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20933 restart register instead of $0.
20934
20935 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20936 Markus Deuling <deuling@de.ibm.com>
20937
20938 * remote-utils.c (decode_xfer_write): New function.
20939 * server.h (decode_xfer_write): Add prototype.
20940 * server.c (handle_query): Add PACKET_LEN argument. Support
20941 qXfer:spu:read and qXfer:spu:write packets.
20942 (main): Pass packet_len to handle_query.
20943 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20944 * target.h (target_ops): Add qxfer_spu.
20945
20946 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20947
20948 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20949 accessing non-seekable spufs files.
20950
20951 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20952
20953 * server.c (handle_query): Add reply for qC packet.
20954
20955 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20956 Leo Zayas <lerele@champenstudios@com>
20957
20958 * server.h (check_remote_input_interrupt_request): New function.
20959 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20960 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20961 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20962 (check_remote_input_interrupt_request): New function.
20963 * server.h (check_remote_input_interrupt_request): Declare.
20964 * win32-low.c (winapi_DebugBreakProcess,
20965 winapi_GenerateConsoleCtrlEvent): New typedefs.
20966 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20967 to 250 ms.
20968 (win32_wait): Check for remote interrupt request
20969 with check_remote_input_interrupt_request.
20970 (win32_request_interrupt): New function.
20971 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20972
20973 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20974
20975 * win32-low.c (debug_registers_changed,
20976 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20977 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20978 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20979 (thread_rec): Get context using the low target.
20980 (child_add_thread): Call thread_added on the low target,
20981 which does the same thing.
20982 (regptr): Delete.
20983 (do_initial_child_stuff): Remove debug registers references.
20984 Set context using the low target. Resume threads after
20985 setting the contexts.
20986 (child_continue): Remove dead variable. Remove debug
20987 registers references.
20988 (child_fetch_inferior_registers): Go through the low target.
20989 (do_child_store_inferior_registers): Remove.
20990 (child_store_inferior_registers): Go through the low target.
20991 (win32_resume): Remove debug registers references.
20992 Set context using the low target.
20993 (handle_exception): Change return type to void. Don't record
20994 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20995 first chance exception.
20996 (get_child_debug_event): Change return type to void. Remove
20997 goto loop. Always return after waiting for debug event.
20998 (win32_wait): Convert to switch statement. Handle spurious
20999 events.
21000
21001 * win32-i386-low.c (debug_registers_changed,
21002 debug_registers_used): New.
21003 (initial_stuff): Rename to ...
21004 (i386_initial_stuff): ... this. Clear debug registers
21005 state variables.
21006 (store_debug_registers): Delete.
21007 (i386_get_thread_context): New.
21008 (load_debug_registers): Delete.
21009 (i386_set_thread_context): New.
21010 (i386_thread_added): New.
21011 (single_step): Rename to ...
21012 (i386_single_step): ... this.
21013 (do_fetch_inferior_registers): Rename to ...
21014 (i386_fetch_inferior_register): ... this.
21015 (i386_store_inferior_register): New.
21016 (the_low_target): Adapt to new interface.
21017
21018 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
21019 (arm_get_thread_context): New.
21020 (arm_set_thread_context): New.
21021 (regptr): New.
21022 (do_fetch_inferior_registers): Rename to ...
21023 (arm_fetch_inferior_register): ... this.
21024 (arm_store_inferior_register): New.
21025 (arm_wince_breakpoint): Reimplement as unsigned long.
21026 (arm_wince_breakpoint_len): Define.
21027 (the_low_target): Adapt to new interface.
21028
21029 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
21030 load_debug_registers. Add get_thread_context, set_thread_context,
21031 thread_added and store_inferior_register. Rename
21032 fetch_inferior_registers to fetch_inferior_register.
21033 (regptr): Remove declaration.
21034
21035 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21036
21037 * linux-low.c (linux_detach): Change return type to int. Return 0.
21038 * spu-low.c (spu_detach): Likewise.
21039
21040 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21041
21042 * target.h (target_ops): Change return type of detach to int.
21043 Add join.
21044 (join_inferior): New.
21045 * server.c (main): Don't skip detach support on mingw32.
21046 If the inferior doesn't support detaching return error.
21047 Call join_inferior instead of using waitpid.
21048 * linux-low.c (linux_join): New.
21049 (linux_target_op): Add linux_join.
21050 * spu-low.c (spu_join): New.
21051 (spu_target_ops): Add spu_join.
21052 * win32-low.c (win32_detach): Adapt to new interface.
21053 Reopen current_process_handle before detaching. Issue a child
21054 resume before detaching.
21055 (win32_join): New.
21056 (win32_target_op): Add win32_join.
21057
21058 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21059
21060 * win32-low.c (win32-attach): Fix return value.
21061 * target.h (target_ops): Describe ATTACH return values.
21062
21063 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21064
21065 * win32-low.c (GETPROCADDRESS): Define.
21066 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
21067 (winapi_DebugSetProcessKillOnExit): Likewise.
21068 (win32_create_inferior): Force usage of ansi CreateProcessA.
21069 (win32_attach): Use GETPROCADDRESS.
21070 (win32_detach): Likewise.
21071
21072 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21073
21074 * win32-low.c (win32_wait): Don't use WSTOPSIG.
21075
21076 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
21077
21078 * win32-low.c: Commit leftover changes from 2007-03-29.
21079
21080 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21081
21082 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
21083 fields short instead of int. Add explicit padding.
21084 (i387_cache_to_fsave): Remove unnecessary casts.
21085 (i387_fsave_to_cache): Doc fix.
21086 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
21087
21088 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21089
21090 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
21091 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
21092
21093 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21094
21095 * configure.srv (arm*-*-mingw32ce*): Move near the other
21096 arm targets.
21097
21098 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21099
21100 * configure.ac: Add errno checking.
21101 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
21102 sys/file.h and malloc.h.
21103 (AC_CHECK_DECLS): Add perror.
21104 (srv_mingwce): Handle.
21105 * configure.srv (i[34567]86-*-cygwin*): Add
21106 win32-i386-low.o to srv_tgtobj.
21107 (i[34567]86-*-mingw*): Likewise.
21108 (arm*-*-mingw32ce*): Add case.
21109 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21110 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
21111 [__MINGW32CE__] (strerror): New function.
21112 [__MINGW32CE__] (errno): Define to GetLastError.
21113 [__MINGW32CE__] (COUNTOF): New macro.
21114 (remote_open): Remove extra close call.
21115 * mem-break.c (delete_breakpoint_at): New function.
21116 * mem-break.h (delete_breakpoint_at): Declare.
21117 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21118 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
21119 [USE_WIN32API] (read, write): Add char* casts.
21120 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
21121 * server.h: Include wincecompat.h on Windows CE.
21122 [HAVE_ERRNO_H]: Check.
21123 (perror): Declare if not declared.
21124 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
21125 (perror_with_name): Remove errno declaration.
21126 * wincecompat.h: New.
21127 * wincecompat.c: New.
21128 * win32-low.h: New.
21129 * win32-arm-low.c: New.
21130 * win32-i386-low.c: New.
21131 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21132 (OUTMSG2): Make it safe.
21133 (_T): New macro.
21134 (COUNTOF): New macro.
21135 (NUM_REGS): Get it from the low target.
21136 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21137 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21138 (thread_rec): Let low target handle debug registers.
21139 (child_add_thread): Likewise.
21140 (child_init_thread_list): Likewise.
21141 (continue_one_thread): Likewise.
21142 (regptr): New.
21143 (do_child_fetch_inferior_registers): Move to ...
21144 * win32-i386-low.c: ... here, and rename to ...
21145 (do_fetch_inferior_registers): ... this.
21146 * win32-low.c (child_fetch_inferior_registers):
21147 Go through the low target.
21148 (do_child_store_inferior_registers): Use regptr.
21149 (strwinerror): New function.
21150 (win32_create_inferior): Handle Windows CE.
21151 Use strwinerror instead of strerror on Windows error
21152 codes. Add program to the error output.
21153 Don't close the main thread handle on Windows CE.
21154 (win32_attach): Use coredll.dll on Windows CE.
21155 (win32_kill): Close current process and current
21156 thread handles.
21157 (win32_detach): Use coredll.dll on Windows CE.
21158 (win32_resume): Let low target handle debug registers, and
21159 step request.
21160 (handle_exception): Add/Remove initial breakpoint. Avoid
21161 non-existant WSTOPSIG on Windows CE.
21162 (win32_read_inferior_memory): Cast to remove warning.
21163 (win32_arch_string): Go through the low target.
21164 (initialize_low): Call set_breakpoint_data with the low
21165 target's breakpoint.
21166 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21167 FOP_REGNUM, mappings): Move to ...
21168 * win32-i386-low.c: ... here.
21169 * win32-low.c (win32_thread_info): Move to ...
21170 * win32-low.h: ... here.
21171 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21172 win32-arm-low.c and wincecompat.c.
21173 (all:): Add $EXEEXT.
21174 (install-only:): Likewise.
21175 (gdbserver:): Likewise.
21176 (gdbreplay:): Likewise.
21177 * config.in: Regenerate.
21178 * configure: Regenerate.
21179
21180 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21181
21182 * win32-low.c: Rename typedef thread_info to
21183 win32_thread_info throughout.
21184
21185 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21186
21187 * win32-i386-low.c: Rename to ...
21188 * win32-low.c: ... this.
21189 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21190 * Makefile.in: Likewise.
21191
21192 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21193
21194 * remote-utils.c (monitor_output): Constify msg parameter.
21195 * server.h (monitor_output): Likewise.
21196 * win32-i386-low.c (handle_output_debug_string): New.
21197 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21198 handle_output_debug_string.
21199 (get_child_debug_event): Likewise.
21200
21201 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21202
21203 * server.c (main): Correct strtoul check.
21204
21205 2007-03-27 Jon Ringle <jon@ringle.org>
21206
21207 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21208
21209 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21210
21211 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21212
21213 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21214
21215 * terminal.h: Check HAVE_SGTTY_H.
21216
21217 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21218
21219 * remote-utils.c (remote_open): Print out the assigned port number.
21220
21221 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21222
21223 * remote-utils.c (monitor_output): New function.
21224 * server.c (debug_threads): Define here.
21225 (monitor_show_help): New function.
21226 (handle_query): Handle qRcmd.
21227 (main): Do not handle 'd' packet.
21228 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21229 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21230 of debug_threads.
21231
21232 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21233
21234 * Makefile.in (EXEEXT): New.
21235 (clean): Use $(EXEEXT).
21236
21237 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21238
21239 * target.h (target_ops): Rename send_signal to request_interrupt,
21240 and remove enum target_signal parameter.
21241 * linux-low.c (linux_request_interrupt): Rename from
21242 linux_send_signal, and always send SIGINT.
21243 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21244 and always send SIGINT.
21245 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21246 of send_signal.
21247 (input_interrupt): Likewise.
21248
21249 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21250
21251 * server.c (get_features_xml): Check if target implemented
21252 arch_string.
21253 * win32-i386-low.c (win32_arch_string): New.
21254 (win32_target_ops): Add win32_arch_string as arch_string member.
21255
21256 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21257
21258 * spu-low.c (spu_arch_string): New.
21259 (spu_target_ops): Add spu_arch_string.
21260
21261 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21262
21263 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21264 * configure.ac: Do not check for terminal.h.
21265 * configure, config.in: Regenerated.
21266
21267 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21268
21269 * Makefile.in (OBS): Add $(XML_BUILTIN).
21270 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21271 (clean): Update.
21272 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21273 (arm-with-iwmmxt.c): New.
21274 * config.in, configure: Regenerate.
21275 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21276 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21277 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21278 (arm*-*-linux*): Add iWMMXt and regset support.
21279 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21280 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21281 (arm_store_wmmxregset, target_regsets): New.
21282 * server.c (get_features_xml): Take annex argument. Check builtin
21283 XML documents.
21284 (handle_query): Handle multiple annexes.
21285
21286 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21287
21288 * remote-utils.c [USE_WIN32API] (read, write): Define.
21289 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21290 write.
21291
21292 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21293
21294 * linux-i386-low.c (the_low_target): Set arch_string.
21295 * linux-x86-64-low.c (the_low_target): Likewise.
21296 * linux-low.c (linux_arch_string): New.
21297 (linux_target_ops): Add it.
21298 * linux-low.h (struct linux_target_ops): Add arch_string.
21299 * server.c (write_qxfer_response): Use const void * for DATA.
21300 (get_features_xml): New.
21301 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21302 * target.h (struct target_ops): Add arch_string method.
21303
21304 2007-01-03 Denis Pilat <denis.pilat@st.com>
21305 Daniel Jacobowitz <dan@codesourcery.com>
21306
21307 * linux-low.c (linux_kill): Handle being called with no threads.
21308 * win32-i386-low.c (win32_kill): Likewise.
21309 (get_child_debug_event): Clear current_process_handle.
21310
21311 2006-12-30 Denis PILAT <denis.pilat@st.com>
21312 Daniel Jacobowitz <dan@codesourcery.com>
21313
21314 * remote-utils.c (remote_open): Check the type of specified
21315 serial port devices before opening them.
21316 * server.c (main): Kill the inferior if an error occurs during
21317 the first remote_open.
21318
21319 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21320
21321 * README: Update supported targets.
21322
21323 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21324
21325 * Makefile.in (clean): Remove reg-mips64.c.
21326 (reg-mips64.c, reg-mips64.o): New rules.
21327 * configure.srv: Handle mips64. Include regset support for mips.
21328 * linux-mips-low.c (union mips_register): New.
21329 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21330 (mips_breakpoint, mips_breakpoint_at): Use int.
21331 (mips_collect_register, mips_supply_register)
21332 (mips_collect_register_32bit, mips_supply_register_32bit)
21333 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21334 (mips_store_fpregset, target_regsets): New.
21335 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21336
21337 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21338
21339 * configure.srv: Add target "spu*-*-*".
21340 * Makefile.in (clean): Remove reg-spu.c.
21341 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21342 * spu-low.c: New file.
21343
21344 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21345
21346 * configure.ac: Correct td_thr_tls_get_addr test.
21347 * configure: Regenerated.
21348
21349 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21350
21351 * linux-low.c (linux_wait_for_event): Reformat. Use the
21352 pass_signals array.
21353 * remote-utils.c (decode_address_to_semicolon): New.
21354 * server.c (pass_signals, handle_general_set): New.
21355 (handle_query): Mention QPassSignals for qSupported.
21356 (main): Call handle_general_set.
21357 * server.h (pass_signals, decode_address_to_semicolon): New.
21358
21359 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21360
21361 * server.c (handle_query): Correct error handling for read_auxv.
21362
21363 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21364
21365 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21366 and srv_linux_thread_db to yes.
21367 * linux-s390-low.c (s390_fill_gregset): New function.
21368 (target_regsets): Define data structure.
21369
21370 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21371
21372 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21373 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21374 * config.in, configure: Regenerated.
21375 * inferiors.c (gdb_id_to_thread): New function.
21376 (gdb_id_to_thread_id): Use it.
21377 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21378 * linux-low.h (struct process_info): Add th member.
21379 (thread_db_get_tls_address): New prototype.
21380 * remote-utils.c (decode_address): Make non-static.
21381 * server.c (handle_query): Handle qGetTLSAddr.
21382 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21383 * target.h (struct target_ops): Add get_tls_address.
21384 * thread-db.c (maybe_attach_thread): Save the thread handle.
21385 (thread_db_get_tls_address): New.
21386
21387 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21388
21389 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21390 (linux_resume_one_process): Take a siginfo_t *. Update all
21391 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21392 (struct pending_signals): Add a siginfo_t.
21393 (linux_wait_for_process): Always set last_status.
21394 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21395 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21396 * linux-low.h (struct process_info): Add last_status.
21397
21398 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21399
21400 * remote-utils.c (try_rle): New function.
21401 (putpkt_binary): Use it.
21402
21403 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21404
21405 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21406 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21407 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21408 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21409 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21410 point registers.
21411
21412 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21413
21414 * server.c (terminal_fd): New variable.
21415 (old_foreground_pgrp): Likewise.
21416 (restore_old_foreground_pgrp): New function.
21417 (start_inferior): Record the terminal file descriptor in terminal_fd
21418 and its original foreground group in old_foreground_pgrp. Register
21419 restore_old_foreground_pgrp with atexit().
21420
21421 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21422
21423 * server.c (handle_query): Correct qPart to qXfer.
21424
21425 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21426
21427 * configure.ac: Check for more headers which are missing on
21428 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21429 * configure.srv: Add Cygwin and mingw32.
21430 * remote-utils.c: Don't include headers unconditionally which
21431 are missing on mingw32. Include <winsock.h> for mingw32.
21432 (remote_open): Adjust for mingw32 support. Flush
21433 standard error after writing to it.
21434 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21435 (unblock_async_io, enable_async_io, disable_async_io)
21436 (readchar, getpkt): Update for Winsock support.
21437 (prepare_resume_reply): Expect a protocol signal number.
21438 * server.c: Disable <sys/wait.h> on mingw32.
21439 (start_inferior): Adjust for mingw32 support. Flush
21440 standard error after writing to it.
21441 (attach_inferior): Likewise. Use protocol signal
21442 numbers.
21443 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21444 and names.
21445 * win32-i386-low.c: New file.
21446 * Makefile.in (XM_CLIBS): Set.
21447 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21448 (win32-i386-low.o): New dependency rule.
21449 * linux-low.c (linux_wait): Use target signal numbers.
21450 * target.h (struct target_ops): Doc fix.
21451 * server.h (target_signal_to_name): New prototype.
21452 * gdbreplay.c: Don't include headers unconditionally which
21453 are missing on mingw32. Include <winsock.h> for mingw32.
21454 (remote_close, remote_open): Adjust for Winsock support.
21455 * configure, config.in: Regenerated.
21456
21457 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21458
21459 * server.c (decode_xfer_read, write_qxfer_response): New.
21460 (handle_query): Take a packet length argument. Handle
21461 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21462 the qSupported response.
21463 (main): Update call to handle_query.
21464
21465 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21466
21467 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21468 (putpkt_binary): Renamed from putpkt and adjusted for binary
21469 data.
21470 (putpkt): New wrapper for putpkt_binary.
21471 (readchar): Don't mask off the high bit.
21472 (decode_X_packet): New function.
21473 * server.c (main): Call putpkt_binary if a handler sets the packet
21474 length. Save the length of the incoming packet. Handle 'X'.
21475 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21476
21477 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21478
21479 * server.c (handle_query): Handle qSupported.
21480
21481 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21482
21483 * remote-utils.c (all_symbols_looked_up): New variable.
21484 (look_up_one_symbol): Check it.
21485 * server.h (look_up_one_symbol): New declaration.
21486 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21487
21488 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21489
21490 * Makefile.in (linux-arm-low.o): Update dependencies.
21491 * linux-arm-low.c: Include "gdb_proc_service.h".
21492 (PTRACE_GET_THREAD_AREA): Define.
21493 (ps_get_thread_area): New function.
21494
21495 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21496
21497 * configure.srv (m68k*-*-uclinux*): New target.
21498 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21499 (linux_resume_one_process): Remove extraneous cast.
21500 (linux_read_offsets): New.
21501 (linux_target_op): Add linux_read_offsets on mmuless systems.
21502 * server.c (handle_query): Add qOffsets logic.
21503 * target.h (struct target_ops): Add read_offsets.
21504
21505 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21506
21507 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21508 (PTRACE_GET_THREAD_AREA): Define.
21509 (ps_get_thread_area): New function.
21510 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21511 (linux-x86-64-low.o): Update.
21512
21513 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21514
21515 * configure.ac: Remove checks for prfpregset_t.
21516 * gdb_proc_service.h: New file.
21517 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21518 new "gdb_proc_service.h".
21519 * proc-service.c: Likewise.
21520 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21521 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21522 * Makefile.in (gdb_proc_service_h): Updated.
21523 * configure, config.in: Regenerated.
21524
21525 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21526
21527 * remote-utils.c (prepare_resume_reply): Move declaration
21528 of gdb_id_from_wait to the top of the block.
21529
21530 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21531
21532 * linux-low.c (regsets_store_inferior_registers): Read the regset
21533 from the target before filling it.
21534
21535 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21536
21537 * server.c (attach_inferior): Return SIGTRAP for a successful
21538 attach.
21539
21540 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21541
21542 * Makefile.in (OBS): Add version.o.
21543 (STAGESTUFF): Delete.
21544 (version.o): Add dependencies.
21545 (version.c): Replace rule.
21546 (clean): Remove version.c.
21547 * server.c (gdbserver_version): New.
21548 (gdbserver_usage): Use printf.
21549 (main): Handle --version and --help.
21550 * server.h (version, host_name): Add declarations.
21551
21552 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21553
21554 * linux-arm-low.c:
21555 * linux-arm-low.c:
21556 * inferiors.c:
21557 * i387-fp.h:
21558 * i387-fp.c:
21559 * gdbreplay.c:
21560 * regcache.c:
21561 * proc-service.c:
21562 * mem-break.h:
21563 * mem-break.c:
21564 * linux-x86-64-low.c:
21565 * linux-sh-low.c:
21566 * linux-s390-low.c:
21567 * linux-ppc64-low.c:
21568 * linux-ppc-low.c:
21569 * linux-mips-low.c:
21570 * linux-m68k-low.c:
21571 * linux-m32r-low.c:
21572 * linux-low.h:
21573 * linux-low.c:
21574 * linux-ia64-low.c:
21575 * linux-i386-low.c:
21576 * linux-crisv32-low.c:
21577 * thread-db.c:
21578 * terminal.h:
21579 * target.h:
21580 * target.c:
21581 * server.h:
21582 * server.c:
21583 * remote-utils.c:
21584 * regcache.h:
21585 * utils.c:
21586 * Makefile.in:
21587 * configure.ac:
21588 * gdbserver.1: Add (C) after Copyright. Update the FSF
21589 address.
21590
21591 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21592
21593 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21594 (arm_breakpoint_at): Recognize both breakpoints.
21595 (the_low_target): Use the correct breakpoint instruction.
21596
21597 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21598
21599 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21600 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21601 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21602 (the_low_target): Update.
21603
21604 2005-10-25 Andreas Schwab <schwab@suse.de>
21605
21606 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21607
21608 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21609 (ia64_num_regs): Reduce to 462.
21610
21611 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21612
21613 * acinclude.m4: Correct quoting.
21614 * aclocal.m4: Regenerated.
21615
21616 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21617 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21618 (thread_db_init): Call thread_db_err_str.
21619 * configure.ac: Check for TD_VERSION.
21620 * config.in, configure: Regenerated.
21621
21622 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21623
21624 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21625
21626 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21627
21628 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21629 is not available. Define HAVE_PTRACE_GETREGS if it is.
21630 * config.in, configure: Regenerated.
21631 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21632 * linux-i386-low.c, linux-m68k-low.c: Update to use
21633 HAVE_PTRACE_GETREGS.
21634 * linux-low.c (regsets_fetch_inferior_registers)
21635 (regsets_store_inferior_registers): Only return 0 if we processed
21636 GENERAL_REGS.
21637 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21638 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21639
21640 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21641
21642 * inferiors.c (struct thread_info): Add gdb_id.
21643 (add_thread): Add gdb_id argument.
21644 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21645 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21646 calls to add_thread.
21647 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21648 * server.c (handle_query): Use thread_to_gdb_id.
21649 (handle_v_cont, main): Use gdb_id_to_thread_id.
21650 * server.h (add_thread): Update prototype.
21651 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21652 prototypes.
21653
21654 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21655
21656 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21657 left-padded registers.
21658 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21659 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21660
21661 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21662
21663 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21664 * configure: Regenerate.
21665 * config.in: Regenerate.
21666 * server.h (NEED_DECLARATION_STRERROR):
21667 Replace with !HAVE_DECL_STRERROR.
21668
21669 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21670
21671 * linux-low.c (linux_wait, linux_send_signal): Don't test
21672 an unsigned long variable for > 0 if it could be MAX_ULONG.
21673 * server.c (myresume): Likewise.
21674 * target.c (set_desired_inferior): Likewise.
21675
21676 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21677
21678 * configure.ac: Simplify and improve check for socklen_t.
21679 * configure, config.in: Regenerate.
21680
21681 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21682
21683 * acconfig.h: Remove.
21684 * configure.ac: Add a test for socklen_t. Use three-argument
21685 AC_DEFINE throughout.
21686 * config.in: Regenerated using autoheader 2.59.
21687 * configure: Regenerated.
21688
21689 * gdbreplay.c (socklen_t): Provide a default.
21690 (remote_open): Use socklen_t.
21691 * remote-utils.c (socklen_t): Provide a default.
21692 (remote_open): Use socklen_t.
21693 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21694 unsigned char.
21695
21696 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21697 char for buffers.
21698 * linux-low.c (linux_read_memory, linux_write_memory)
21699 (linux_read_auxv): Likewise.
21700 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21701 (check_mem_write): Likewise.
21702 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21703 Likewise.
21704 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21705 (registers_from_string, register_data): Likewise.
21706 * server.c (handle_query, main): Likewise.
21707 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21708 (decode_M_packet): Likewise.
21709 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21710 * target.h (struct target_ops): Update read_memory, write_memory,
21711 and read_auxv.
21712 (read_inferior_memory, write_inferior_memory): Update.
21713 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21714 to unsigned char *.
21715 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21716 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21717 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21718 linux-s390-low.c, linux-sh-low.c: Update for changes in
21719 read_inferior_memory and the_low_target->breakpoint.
21720
21721 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21722
21723 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21724 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21725 * configure.srv: Add powerpc64-*-linux*.
21726 * linux-ppc64-low.c: New file.
21727
21728 2005-05-23 Orjan Friberg <orjanf@axis.com>
21729
21730 * linux-cris-low.c: New file with support for CRIS.
21731 * linux-crisv32-low.c: Ditto for CRISv32.
21732 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21733 (clean): Add reg-cris.c and reg-crisv32.c.
21734 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21735 reg-crisv32.o, and reg-crisv32.c to make rules.
21736 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21737 recognized targets.
21738
21739 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21740
21741 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21742 of sizeof (PTRACE_XFER_TYPE).
21743 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21744
21745 2005-05-12 Orjan Friberg <orjanf@axis.com>
21746
21747 * target.h (struct target_ops): Add insert_watchpoint,
21748 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21749 pointers for hardware watchpoint support.
21750 * linux-low.h (struct linux_target_ops): Ditto.
21751 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21752 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21753 to linux_target_ops.
21754 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21755 reply packet.
21756 * server.c (main): Recognize 'Z' and 'z' packets.
21757
21758 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21759
21760 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21761 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21762 (the_low_target): Add new members.
21763
21764 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21765
21766 * proc-service.c (ps_lgetregs): Search all_processes instead of
21767 all_threads.
21768
21769 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21770
21771 * server.c (start_inferior): Change return type to int.
21772 (attach_inferior): Change sigptr to int *.
21773 (handle_v_cont, handle_v_requests): Change signal to int *.
21774 (main): Change signal to int.
21775
21776 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21777
21778 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21779 * configure.srv: Add m32r*-*-linux*.
21780 * linux-m32r-low.c: New file.
21781
21782 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21783
21784 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21785
21786 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21787
21788 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21789 Take unsigned long arguments for PIDs.
21790 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21791 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21792 (wait_for_sigstop, linux_resume_one_process)
21793 (regsets_fetch_inferior_registers, linux_send_signal)
21794 (linux_read_auxv): Likewise. Update the types of variables holding
21795 PIDs. Update format string specifiers.
21796 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21797 * remote-utils.c (prepare_resume_reply): Likewise.
21798 * server.c (cont_thread, general_thread, step_thread)
21799 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21800 unsigned long.
21801 (handle_query): Update format specifiers.
21802 (handle_v_cont, main): Use strtoul for thread IDs.
21803 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21804 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21805 (general_thread, step_thread, thread_from_wait)
21806 (old_thread_from_wait): Update.
21807 * target.h (struct thread_resume): Use unsigned long for THREAD.
21808 (struct target_ops): Use unsigned long for arguments to attach and
21809 thread_alive.
21810
21811 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21812
21813 * acinclude.m4: Include bfd/bfd.m4 directly.
21814 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21815 <agriffis@toolchain.org>.
21816 * aclocal.m4, configure: Regenerated.
21817
21818 2005-01-07 Andrew Cagney <cagney@gnu.org>
21819
21820 * configure.ac: Rename configure.in, require autoconf 2.59.
21821 * configure: Re-generate.
21822
21823 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21824
21825 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21826 LIBS when finished.
21827 * aclocal.m4: Regenerated.
21828 * configure: Regenerated.
21829
21830 2004-11-21 Andreas Schwab <schwab@suse.de>
21831
21832 * linux-m68k-low.c (m68k_num_gregs): Define.
21833 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21834 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21835 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21836 (m68k_breakpoint_at): New. Add to the_low_target.
21837
21838 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21839 srv_linux_thread_db to yes.
21840
21841 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21842
21843 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21844 (ARCH_SET_FS): Likewise.
21845 (ARCH_GET_FS): Likewise.
21846 (ARCH_GET_GS): Likewise.
21847
21848 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21849
21850 * linux-i386-low.c (ps_get_thread_area): New.
21851 * linux-x86-64-low.c (ps_get_thread_area): New.
21852 * linux-low.c: Include <sys/syscall.h>.
21853 (linux_kill_one_process): Don't kill the first thread here.
21854 (linux_kill): Kill the first thread here.
21855 (kill_lwp): New function.
21856 (send_sigstop, linux_send_signal): Use it.
21857 * proc-service.c: Clean up #ifdefs.
21858 (fpregset_info): Delete.
21859 (ps_lgetregs): Update and enable implementation.
21860 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21861 implementations.
21862 * remote-utils.c (struct sym_cache, symbol_cache): New.
21863 (input_interrupt): Print a clearer message.
21864 (async_io_enabled): New variable.
21865 (enable_async_io, disable_async_io): Use it. Update comments.
21866 (look_up_one_symbol): Use the symbol cache.
21867 * thread-db.c (thread_db_look_up_symbols): New function.
21868 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21869
21870 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21871
21872 * configure.in: Test for -rdynamic.
21873 * configure: Regenerated.
21874 * Makefile (INTERNAL_LDFLAGS): New.
21875 (gdbserver, gdbreplay): Use it.
21876
21877 2004-09-02 Andrew Cagney <cagney@gnu.org>
21878
21879 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21880
21881 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21882
21883 * linux-low.c (linux_wait): Clear all_processes list also.
21884
21885 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21886
21887 * linux-low.c: Include <errno.h>. Remove extern declaration of
21888 errno.
21889
21890 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21891
21892 * gdbreplay.c, server.h, utils.c: Update copyright years.
21893
21894 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21895
21896 * server.c (main): Print child status or termination signal from
21897 variable 'signal', not 'sig'.
21898
21899 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21900
21901 * linux-low.c (linux_read_memory): Change return type to
21902 int. Check for and return error from ptrace().
21903 * target.c (read_inferior_memory): Change return type to int. Pass
21904 back return status from the_target->read_memory().
21905 * target.h (struct target_ops): Adapt *read_memory() prototype.
21906 Update comment.
21907 (read_inferior_memory): Adapt prototype.
21908 * server.c (main): Return an error packet if
21909 read_inferior_memory() returns an error.
21910
21911 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21912
21913 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21914 Unify with other clean targets.
21915
21916 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21917
21918 * server.c (handle_v_cont): Call set_desired_inferior.
21919
21920 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21921
21922 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21923
21924 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21925
21926 * linux-low.c (linux_wait): Unblock async I/O.
21927 (linux_resume): Block and enable async I/O.
21928 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21929 * server.h (block_async_io, unblock_async_io): Add prototypes.
21930
21931 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21932
21933 * remote-utils.c (remote_open): Print a status notice after
21934 opening a TCP port.
21935 * server.c (attach_inferior): Print a status notice after
21936 attaching.
21937
21938 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21939
21940 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21941
21942 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21943
21944 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21945 error packet.
21946 * server.c, target.h: Update copyright years.
21947
21948 2004-02-25 Roland McGrath <roland@redhat.com>
21949
21950 * target.h (struct target_ops): New member `read_auxv'.
21951 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21952 * linux-low.c (linux_read_auxv): New function.
21953 (linux_target_ops): Initialize `read_auxv' member to that.
21954
21955 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21956
21957 Committed by Jim Blandy <jimb@redhat.com>.
21958
21959 * linux-s390-low.c (s390_num_regs): Update.
21960 (s390_regmap): Remove control registers. Use __s390x__ predefine
21961 instead of GPR_SIZE to distiguish s390 and s390x targets.
21962
21963 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21964
21965 * linux-low.c: Update copyright year.
21966 (check_removed_breakpoint): Clear pending_is_breakpoint.
21967 (linux_set_resume_request, linux_queue_one_thread)
21968 (resume_status_pending_p): New functions.
21969 (linux_continue_one_thread): Use process->resume.
21970 (linux_resume): Only resume threads if there are no pending events.
21971 * linux-low.h (struct process_info): Add resume request
21972 pointer.
21973
21974 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21975
21976 * regcache.c (new_register_cache): Clear the allocated register
21977 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21978
21979 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21980
21981 * linux-low.c (linux_resume): Take a struct thread_resume *
21982 argument.
21983 (linux_wait): Update call.
21984 (resume_ptr): New static variable.
21985 (linux_continue_one_thread): Renamed from
21986 linux_continue_one_process. Use resume_ptr.
21987 (linux_resume): Use linux_continue_one_thread.
21988 * server.c (handle_v_cont, handle_v_requests): New functions.
21989 (myresume): New function.
21990 (main): Handle 'v' case.
21991 * target.h (struct thread_resume): New type.
21992 (struct target_ops): Change argument of "resume" to struct
21993 thread_resume *.
21994 (myresume): Delete macro.
21995
21996 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21997
21998 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21999 (uninstall): Support DESTDIR.
22000
22001 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
22002
22003 * configure.srv: Add xscale*linux copy of arm*linux entry.
22004
22005 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
22006
22007 * linux-arm-low.c (arm_reinsert_addr): New function.
22008 (the_low_target): Add arm_reinsert_addr.
22009
22010 2003-07-08 Mark Kettenis <kettenis@gnu.org>
22011
22012 * mem-break.c: Remove whitespace at end of file.
22013
22014 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22015
22016 * configure.in: Check whether we need to prototype strerror.
22017 * server.h: Optionally prototype strerror.
22018 * gdbreplay.c (perror_with_name): Use strerror.
22019 * linux-low.c (linux_attach_lwp): Use strerror.
22020 * utils.c (perror_with_name): Use strerror.
22021 * config.in, configure: Regenerated.
22022
22023 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22024
22025 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
22026 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
22027
22028 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
22029
22030 * Makefile.in (SFILES): Update.
22031 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
22032 low-sun3.c: Remove files.
22033
22034 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
22035
22036 * linux-low.c: Move comment to linux_thread_alive where it belonged.
22037 (linux_detach_one_process, linux_detach): New functions.
22038 (linux_target_ops): Add linux_detach.
22039 * server.c (main): Handle 'D' packet.
22040 * target.h (struct target_ops): Add "detach" member.
22041 (detach_inferior): Define.
22042
22043 2003-06-13 Mark Kettenis <kettenis@gnu.org>
22044
22045 From Kelley Cook <kelleycook@wideopenwest.com>:
22046 * configure.srv: Accept i[34567]86 variants.
22047
22048 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
22049
22050 * linux-low.c (linux_wait_for_event): Correct comment typos.
22051 (linux_resume_one_process): Call check_removed_breakpoint.
22052 (linux_send_signal): New function.
22053 (linux_target_ops): Add linux_send_signal.
22054 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
22055 of kill.
22056 * target.h (struct target_ops): Add send_signal.
22057
22058 2003-05-29 Jim Blandy <jimb@redhat.com>
22059
22060 * linux-low.c (usr_store_inferior_registers): Transfer buf in
22061 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
22062 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
22063 away part of the register's value.
22064
22065 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
22066
22067 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
22068 (linux_wait_for_event, linux_init_signals): Likewise.
22069
22070 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
22071
22072 * configure.in: Check for stdlib.h.
22073 * configure: Regenerated.
22074 * config.in: Regenerated.
22075
22076 2003-01-04 Andreas Schwab <schwab@suse.de>
22077
22078 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
22079
22080 2003-01-02 Andrew Cagney <ac131313@redhat.com>
22081
22082 * Makefile.in: Remove obsolete code.
22083
22084 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
22085
22086 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
22087 defined(PT_FPR0_HI).
22088
22089 2002-11-17 Stuart Hughes <seh@zee2.com>
22090
22091 * linux-arm-low.c (arm_num_regs): Increase.
22092 (arm_regmap): Include status register.
22093
22094 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
22095
22096 * linux-low.c (register_addr): Remove incorrect -1 check.
22097
22098 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
22099
22100 * linux-low.c (linux_create_inferior): Call setpgid. Return
22101 the new PID.
22102 (unstopped_p, linux_signal_pid): Remove.
22103 (linux_target_ops): Remove linux_signal_pid.
22104 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
22105 global instead of target method.
22106 * target.h (struct target_ops): Remove signal_pid. Update comment
22107 for create_inferior.
22108 * server.c (signal_pid): New variable.
22109 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
22110 gdbserver. Set the child to be the foreground process group.
22111 (attach_inferior): Set signal_pid.
22112
22113 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
22114
22115 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
22116
22117 2002-08-20 Jim Blandy <jimb@redhat.com>
22118
22119 * Makefile.in (LDFLAGS): Allow the configure script to establish a
22120 default for this.
22121
22122 2002-08-01 Andrew Cagney <cagney@redhat.com>
22123
22124 * Makefile.in: Make chill references obsolete.
22125
22126 2002-07-24 Kevin Buettner <kevinb@redhat.com>
22127
22128 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
22129 * configure: Regenerate.
22130 * config.in: Regenerate.
22131
22132 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22133
22134 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22135 (perror_with_name, remote_close, remote_open, expect, play): Static.
22136
22137 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22138
22139 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22140 byte offsets instead of an array of indexes.
22141 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22142
22143 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22144
22145 * regcache.c: Add comment.
22146
22147 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22148
22149 * thread-db.c: New file.
22150 * proc-service.c: New file.
22151 * acinclude.m4: New file.
22152 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22153 proc-service.o, and thread-db.o.
22154 (linux-low.o): Add USE_THREAD_DB.
22155 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22156 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22157 * aclocal.m4: Regenerated.
22158 * config.in: Regenerated.
22159 * configure: Regenerated.
22160 * configure.in: Check for proc_service.h, sys/procfs.h,
22161 thread_db.h, and linux/elf.h headrs.
22162 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22163 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22164 Check for -lthread_db and thread support.
22165 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22166 PowerPC, and SuperH.
22167 * i387-fp.c: Constify arguments.
22168 * i387-fp.h: Likewise.
22169 * inferiors.c: (struct thread_info): Renamed from
22170 `struct inferior_info'. Remove PID member. Use generic inferior
22171 list header. All uses updated.
22172 (inferiors, signal_pid): Removed.
22173 (all_threads): New variable.
22174 (get_thread): Define.
22175 (add_inferior_to_list): New function.
22176 (for_each_inferior): New function.
22177 (change_inferior_id): New function.
22178 (add_inferior): Removed.
22179 (remove_inferior): New function.
22180 (add_thread): New function.
22181 (free_one_thread): New function.
22182 (remove_thread): New function.
22183 (clear_inferiors): Use for_each_inferior and free_one_thread.
22184 (find_inferior): New function.
22185 (find_inferior_id): New function.
22186 (inferior_target_data): Update argument type.
22187 (set_inferior_target_data): Likewise.
22188 (inferior_regcache_data): Likewise.
22189 (set_inferior_regcache_data): Likewise.
22190 * linux-low.c (linux_bp_reinsert): Remove.
22191 (all_processes, stopping_threads, using_thrads)
22192 (struct pending_signals, debug_threads, pid_of): New.
22193 (inferior_pid): Replace with macro.
22194 (struct inferior_linux_data): Remove.
22195 (get_stop_pc, add_process): New functions.
22196 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22197 Use add_process and add_thread.
22198 (linux_attach_lwp): New function, based on old linux_attach. Use
22199 add_process and add_thread. Set stop_expected for new threads.
22200 (linux_attach): New function.
22201 (linux_kill_one_process): New function.
22202 (linux_kill): Kill all LWPs.
22203 (linux_thread_alive): Use find_inferior_id.
22204 (check_removed_breakpoints, status_pending_p): New functions.
22205 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22206 Update. Use WNOHANG. Wait for cloned processes also. Update process
22207 struct for the found process.
22208 (linux_wait_for_event): New function.
22209 (linux_wait): Use it. Support LWPs.
22210 (send_sigstop, wait_for_sigstop, stop_all_processes)
22211 (linux_resume_one_process, linux_continue_one_process): New functions.
22212 (linux_resume): Support LWPs.
22213 (REGISTER_RAW_SIZE): Remove.
22214 (fetch_register): Use register_size instead. Call supply_register.
22215 (usr_store_inferior_registers): Likewise. Call collect_register.
22216 Fix recursive case.
22217 (regsets_fetch_inferior_registers): Improve error message.
22218 (regsets_store_inferior_registers): Add debugging.
22219 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22220 (unstopped_p, linux_signal_pid): New functions.
22221 (linux_target_ops): Add linux_signal_pid.
22222 (linux_init_signals): New function.
22223 (initialize_low): Call it. Initialize using_threads.
22224 * regcache.c (inferior_regcache_data): Add valid
22225 flag.
22226 (get_regcache): Fetch registers lazily. Add fetch argument
22227 and update all callers.
22228 (regcache_invalidate_one, regcache_invalidate): New
22229 functions.
22230 (new_register_cache): Renamed from create_register_cache.
22231 Return the new regcache.
22232 (free_register_cache): Change argument to a void *.
22233 (registers_to_string, registers_from_string): Call get_regcache
22234 with fetch flag set.
22235 (register_data): Make static. Pass fetch flag to get_regcache.
22236 (supply_register): Call get_regcache with fetch flag clear.
22237 (collect_register): Call get_regcache with fetch flag set.
22238 (collect_register_as_string): New function.
22239 * regcache.h: Update.
22240 * remote-utils.c (putpkt): Flush after debug output and use
22241 stderr.
22242 Handle input interrupts while waiting for an ACK.
22243 (input_interrupt): Use signal_pid method.
22244 (getpkt): Flush after debug output and use stderr.
22245 (outreg): Use collect_register_as_string.
22246 (new_thread_notify, dead_thread_notify): New functions.
22247 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22248 and general_thread.
22249 (look_up_one_symbol): Flush after debug output.
22250 * server.c (step_thread, server_waiting): New variables.
22251 (start_inferior): Don't use signal_pid. Update call to mywait.
22252 (attach_inferior): Update call to mywait.
22253 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22254 (main): Don't fetch/store registers explicitly. Use
22255 set_desired_inferior. Support proposed ``Hs'' packet. Update
22256 calls to mywait.
22257 * server.h: Update.
22258 (struct inferior_list, struct_inferior_list_entry): New.
22259 * target.c (set_desired_inferior): New.
22260 (write_inferior_memory): Constify.
22261 (mywait): New function.
22262 * target.h: Update.
22263 (struct target_ops): New signal_pid method.
22264 (mywait): Removed macro, added prototype.
22265
22266 * linux-low.h (regset_func): Removed.
22267 (regset_fill_func, regset_store_func): New.
22268 (enum regset_type): New.
22269 (struct regset_info): Add type field. Use new operation types.
22270 (struct linux_target_ops): stop_pc renamed to get_pc.
22271 Add decr_pc_after_break and breakpoint_at.
22272 (get_process, get_thread_proess, get_process_thread)
22273 (strut process_info, all_processes, linux_attach_lwp)
22274 (thread_db_init): New.
22275
22276 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22277 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22278 (the_low_target): Add new members.
22279 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22280 (i386_store_fpxregset): Constify.
22281 (target_regsets): Add new kind identifier.
22282 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22283 (i386_set_pc): Add debugging.
22284 (i386_breakpoint_at): New function.
22285 (the_low_target): Add new members.
22286 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22287 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22288 (mips_breakpoint_at): New.
22289 (the_low_target): Add new members.
22290 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22291 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22292 (the_low_target): Add new members.
22293 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22294 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22295 (the_low_target): Add new members.
22296 * linux-x86-64-low.c (target_regsets): Add new kind
22297 identifier.
22298
22299 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22300
22301 From Martin Pool <mbp@samba.org>:
22302 * server.c (gdbserver_usage): New function.
22303 (main): Call it.
22304
22305 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22306
22307 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22308 stop_at -> stop_pc.
22309
22310 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22311
22312 * Makefile.in: Remove obsolete code.
22313
22314 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22315
22316 * linux-low.c (regsets_fetch_inferior_registers),
22317 (regsets_store_inferior_registers): Removed cast to int from
22318 ptrace() calls.
22319 * regcache.h: Added declaration of struct inferior_info.
22320
22321 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22322
22323 * inferiors.c (struct inferior_info): Add regcache_data.
22324 (add_inferior): Call create_register_cache.
22325 (clear_inferiors): Call free_register_cache.
22326 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22327 * regcache.c (struct inferior_regcache_data): New.
22328 (registers): Remove.
22329 (get_regcache): New function.
22330 (create_register_cache, free_register_cache): New functions.
22331 (set_register_cache): Don't initialize the register cache here.
22332 (registers_to_string, registers_from_string, register_data): Call
22333 get_regcache.
22334 * regcache.h: Add prototypes.
22335 * server.h: Likewise.
22336
22337 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22338
22339 * mem-break.c: New file.
22340 * mem-break.h: New file.
22341 * Makefile.in: Add mem-break.o rule; update server.h
22342 dependencies.
22343 * inferiors.c (struct inferior_info): Add target_data
22344 member.
22345 (clear_inferiors): Free target_data member if set.
22346 (inferior_target_data, set_inferior_target_data): New functions.
22347 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22348 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22349 * linux-low.c (linux_bp_reinsert): New variable.
22350 (struct inferior_linux_data): New.
22351 (linux_create_inferior): Use set_inferior_target_data.
22352 (linux_attach): Likewise. Call add_inferior.
22353 (linux_wait_for_one_inferior): New function.
22354 (linux_wait): Call it.
22355 (linux_write_memory): Add const.
22356 (initialize_low): Call set_breakpoint_data.
22357 * linux-low.h (struct linux_target_ops): Add breakpoint
22358 handling members.
22359 * server.c (attach_inferior): Remove extra add_inferior
22360 call.
22361 * server.h: Include mem-break.h. Update inferior.c
22362 prototypes.
22363 * target.c (read_inferior_memory)
22364 (write_inferior_memory): New functions.
22365 * target.h (read_inferior_memory)
22366 (write_inferior_memory): Change macros to prototypes.
22367 (struct target_ops): Update comments. Add const to write_memory
22368 definition.
22369
22370 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22371
22372 * linux-low.c (usr_store_inferior_registers): Support
22373 registers which are allowed to fail to store.
22374 * linux-low.h (linux_target_ops): Likewise.
22375 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22376 (ppc_cannot_store_register): FPSCR may not be storable.
22377
22378 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22379
22380 * server.h: Include <string.h> if HAVE_STRING_H.
22381 * ChangeLog: Correct paths in last ChangeLog entry.
22382
22383 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22384
22385 * linux-low.h: Remove obsolete prototypes.
22386 (struct linux_target_ops): New.
22387 (extern the_low_target): New.
22388 * linux-low.c (num_regs, regmap): Remove declarations.
22389 (register_addr): Use the_low_target explicitly.
22390 (fetch_register): Likewise.
22391 (usr_fetch_inferior_registers): Likewise.
22392 (usr_store_inferior_registers): Likewise.
22393 * linux-arm-low.c (num_regs): Remove.
22394 (arm_num_regs): Define.
22395 (arm_regmap): Renamed from regmap, made static.
22396 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22397 made static.
22398 (arm_cannot_store_register): Renamed from cannot_store_register,
22399 made static.
22400 (the_low_target): New.
22401 * linux-i386-low.c (num_regs): Remove.
22402 (i386_num_regs): Define.
22403 (i386_regmap): Renamed from regmap, made static.
22404 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22405 made static.
22406 (i386_cannot_store_register): Renamed from cannot_store_register,
22407 made static.
22408 (the_low_target): New.
22409 * linux-ia64-low.c (num_regs): Remove.
22410 (ia64_num_regs): Define.
22411 (ia64_regmap): Renamed from regmap, made static.
22412 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22413 made static.
22414 (ia64_cannot_store_register): Renamed from cannot_store_register,
22415 made static.
22416 (the_low_target): New.
22417 * linux-m68k-low.c (num_regs): Remove.
22418 (m68k_num_regs): Define.
22419 (m68k_regmap): Renamed from regmap, made static.
22420 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22421 made static.
22422 (m68k_cannot_store_register): Renamed from cannot_store_register,
22423 made static.
22424 (the_low_target): New.
22425 * linux-mips-low.c (num_regs): Remove.
22426 (mips_num_regs): Define.
22427 (mips_regmap): Renamed from regmap, made static.
22428 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22429 made static.
22430 (mips_cannot_store_register): Renamed from cannot_store_register,
22431 made static.
22432 (the_low_target): New.
22433 * linux-ppc-low.c (num_regs): Remove.
22434 (ppc_num_regs): Define.
22435 (ppc_regmap): Renamed from regmap, made static.
22436 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22437 made static.
22438 (ppc_cannot_store_register): Renamed from cannot_store_register,
22439 made static.
22440 (the_low_target): New.
22441 * linux-s390-low.c (num_regs): Remove.
22442 (s390_num_regs): Define.
22443 (s390_regmap): Renamed from regmap, made static.
22444 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22445 made static.
22446 (s390_cannot_store_register): Renamed from cannot_store_register,
22447 made static.
22448 (the_low_target): New.
22449 * linux-sh-low.c (num_regs): Remove.
22450 (sh_num_regs): Define.
22451 (sh_regmap): Renamed from regmap, made static.
22452 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22453 made static.
22454 (sh_cannot_store_register): Renamed from cannot_store_register,
22455 made static.
22456 (the_low_target): New.
22457 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22458 (the_low_target): New.
22459
22460 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22461
22462 * Makefile.in: Add stamp-h target.
22463 * configure.in: Create stamp-h.
22464 * configure: Regenerated.
22465
22466 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22467
22468 * inferiors.c: New file.
22469 * target.c: New file.
22470 * target.h: New file.
22471 * Makefile.in: Add target.o and inferiors.o. Update
22472 dependencies.
22473 * linux-low.c (inferior_pid): New static variable,
22474 moved from server.c.
22475 (linux_create_inferior): Renamed from create_inferior.
22476 Call add_inferior. Return 0 on success instead of a PID.
22477 (linux_attach): Renamed from myattach.
22478 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22479 (linux_thread_alive): Renamed from mythread_alive.
22480 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22481 child dies.
22482 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22483 (regsets_store_inferior_registers): Correct error message.
22484 Add missing ``return 0''.
22485 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22486 (linux_store_registers): Renamed from store_inferior_registers.
22487 (linux_read_memory): Renamed from read_inferior_memory.
22488 (linux_write_memory): Renamed from write_inferior_memory.
22489 (linux_target_ops): New structure.
22490 (initialize_low): Call set_target_ops ().
22491 * remote-utils.c (unhexify): New function.
22492 (hexify): New function.
22493 (input_interrupt): Send signals to ``signal_pid''.
22494 * server.c (inferior_pid): Remove.
22495 (start_inferior): Update create_inferior call.
22496 (attach_inferior): Call add_inferior.
22497 (handle_query): New function.
22498 (main): Call handle_query for `q' packets.
22499 * server.h: Include "target.h". Remove obsolete prototypes.
22500 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22501
22502 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22503
22504 * Makefile.in: Add WARN_CFLAGS. Update configury
22505 dependencies.
22506 * configure.in: Check for <string.h>
22507 * configure: Regenerate.
22508 * config.in: Regenerate.
22509 * gdbreplay.c: Include needed system headers.
22510 (remote_open): Remove strchr prototype.
22511 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22512 * regcache.c (supply_register): Change buf argument to const void *.
22513 (supply_register_by_name): Likewise.
22514 (collect_register): Change buf argument to void *.
22515 (collect_register_by_name): Likewise.
22516 * regcache.h: Add missing prototypes.
22517 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22518 * server.c (handle_query): New function.
22519 (attached): New static variable, moved out of main.
22520 (main): Quiet longjmp clobber warnings.
22521 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22522 * utils.c (error): Remove NORETURN.
22523 (fatal): Likewise.