gdb, gdbserver, gdbsupport: fix leading space vs tabs issues
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-11-02 Simon Marchi <simon.marchi@efficios.com>
2
3 * ax.cc: Fix indentation.
4 * dll.cc: Fix indentation.
5 * inferiors.h: Fix indentation.
6 * linux-low.cc: Fix indentation.
7 * linux-nios2-low.cc: Fix indentation.
8 * linux-ppc-ipa.cc: Fix indentation.
9 * linux-ppc-low.cc: Fix indentation.
10 * linux-x86-low.cc: Fix indentation.
11 * linux-xtensa-low.cc: Fix indentation.
12 * regcache.cc: Fix indentation.
13 * server.cc: Fix indentation.
14 * tracepoint.cc: Fix indentation.
15
16 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
17
18 * acinclude.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
19 AC_LANG_PROGRAM.
20 * configure: Re-generate.
21
22 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
23
24 * configure: Re-generate.
25
26 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
27
28 * configure: Re-generate.
29
30 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
31
32 * configure: Re-generate.
33
34 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
35
36 * configure: Re-generate.
37
38 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
39
40 * configure.ac: Modernize.
41 * configure: Re-generate.
42
43 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
44
45 * configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
46 AC_CANONICAL_SYSTEM.
47 * configure: Re-generate.
48
49 2020-10-26 Pedro Alves <pedro@palves.net>
50
51 * netbsd-low.cc (netbsd_waitpid, netbsd_process_target::kill)
52 (netbsd_qxfer_libraries_svr4): Use gdb::handle_eintr without
53 explicit type.
54
55 2020-10-25 Simon Marchi <simon.marchi@polymtl.ca>
56
57 * acinclude.m4: Update ptrace.m4 path.
58
59 2020-10-24 Simon Marchi <simon.marchi@polymtl.ca>
60
61 * config.in: Re-generate.
62 * configure: Re-generate.
63
64 2020-10-21 Simon Marchi <simon.marchi@polymtl.ca>
65
66 * server.cc (handle_general_set): Don't use sprintf with
67 argument overlapping buffer.
68
69 2020-10-20 Tom Tromey <tromey@adacore.com>
70
71 PR gdb/26742:
72 * inferiors.cc (remove_thread): Clear current_thread before
73 freeing the thread.
74
75 2020-10-13 Kamil Rytarowski <n54@gmx.com>x
76
77 * netbsd-low.cc (netbsd_tdesc): Remove.
78 (netbsd_add_process): Likewise.
79 (netbsd_process_target::create_inferior): Update.
80
81 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
82
83 * linux-arc-low.cc (arc_linux_read_description): Release the
84 unique_ptr returned from arc_create_target_description.
85
86 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
87
88 * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
89 or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
90
91 2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
92
93 * linux-low.cc (linux_process_target::handle_extended_wait):
94 Release the unique_ptr returned from allocate_target_description.
95 * linux-riscv-low.cc (riscv_target::low_arch_setup): Likewise.
96 * linux-x86-low.cc (tdesc_amd64_linux_no_xml): Change type.
97 (tdesc_i386_linux_no_xml): Change type.
98 (x86_linux_read_description): Borrow pointer from unique_ptr
99 object.
100 (x86_target::get_ipa_tdesc_idx): Likewise.
101 (initialize_low_arch): Likewise.
102 * tdesc.cc (allocate_target_description): Update return type.
103
104 2020-10-07 Tom Tromey <tromey@adacore.com>
105
106 * server.cc (handle_search_memory): Remove dead code.
107
108 2020-10-07 Tom Tromey <tromey@adacore.com>
109
110 * server.cc (handle_search_memory_1): Remove.
111 (handle_search_memory): Use simple_search_memory.
112
113 2020-10-07 Simon Marchi <simon.marchi@efficios.com>
114
115 * Makefile.in (COMPILE): Add CXXFLAGS.
116 (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
117 (gdbserver$(EXEEXT)): Add CXXFLAGS.
118 (gdbreplay$(EXEEXT)): Add CXXFLAGS.
119 ($(IPA_LIB)): Add CXXFLAGS.
120 (IPAGENT_COMPILE): Add CXXFLAGS.
121
122 2020-10-07 Anton Kolesov <anton.kolesov@synopsys.com>
123
124 * configure.srv: Support ARC architecture.
125 * Makefile.in: Add linux-arc-low.cc and arch/arc.o.
126 * linux-arc-low.cc: New file.
127
128 2020-10-07 Kamil Rytarowski <n54@gmx.com>
129
130 * netbsd-low.cc (get_dynamic, get_r_debug, read_one_ptr)
131 (netbsd_qxfer_libraries_svr4): Remove "target" argument and update.
132 (netbsd_process_target::qxfer_libraries_svr4): Update.
133
134 2020-10-07 Kamil Rytarowski <n54@gmx.com>
135
136 * netbsd-low.cc: Fix whitespace formatting.
137 * netbsd-amd64-low.cc: Likewise.
138
139 2020-10-07 Kamil Rytarowski <n54@gmx.com>
140
141 * netbsd-low.cc (netbsd_process_target::read_memory)
142 (netbsd_process_target::write_memory): Update.
143
144 2020-10-07 Kamil Rytarowski <n54@gmx.com>
145
146 * netbsd-aarch64-low.cc: Add.
147 * Makefile.in (SFILES): Register "netbsd-aarch64-low.c".
148 * configure.srv: Add aarch64*-*-netbsd*.
149
150 2020-10-06 Shahab Vahedi <shahab@synopsys.com>
151
152 * regcache.cc (register_data): Remove unused "fetch" argument.
153
154 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
155
156 * server.cc (handle_monitor_command): Handle "set
157 debug-event-loop".
158 (captured_main): Handle "--debug-event-loop".
159 (monitor_show_help): Mention new setting.
160 (gdbserver_usage): Mention new flag.
161
162 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
163
164 * linux-low.cc (linux_process_target::async): Pass name to
165 add_file_handler.
166 * remote-utils.cc (handle_accept_event): Likewise.
167 (remote_open): Likewise.
168
169 2020-10-01 Kamil Rytarowski <n54@gmx.com>
170
171 * netbsd-i386-low.cc: Add.
172 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
173 * configure.srv: Add i[34567]86-*-netbsd*.
174
175 2020-10-01 Kamil Rytarowski <n54@gmx.com>
176
177 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
178 (netbsd_target_regsets): Now const.
179 (the_low_target): Remove.
180 (class netbsd_amd64_target, the_netbsd_amd64_target)
181 (the_netbsd_target): Add.
182 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
183 low_arch_setup ().
184 (netbsd_process_target::fetch_registers)
185 (netbsd_process_target::store_registers, initialize_low): Update.
186 (the_netbsd_target): Remove.
187 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
188 (the_low_target, netbsd_tdesc): Remove.
189 (netbsd_process_target::get_regs_info)
190 (netbsd_process_target::low_arch_setup): Add.
191
192 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
193
194 * win32-low.cc: Remove local wow64_process variable.
195 * win32-low.h: Remove local wow64_process variable.
196
197 2020-09-18 Tom Tromey <tromey@adacore.com>
198
199 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
200 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
201 (netbsd_process_target::wait): Change type of target_options.
202 * win32-low.h (class win32_process_target) <wait>: Update.
203 * win32-low.cc (win32_process_target::wait): Update.
204 * target.h (class process_stratum_target) <wait>: Update.
205 (mywait): Update.
206 * target.cc (mywait, target_wait): Change type of "options".
207 * linux-low.h (class linux_process_target) <wait, wait_1>:
208 Update.
209 * linux-low.cc (linux_process_target::wait)
210 (linux_process_target::wait_1): Update.
211
212 2020-09-15 Tom Tromey <tromey@adacore.com>
213
214 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
215 (xmltarget_amd64_linux_no_xml): Now arrays.
216
217 2020-09-14 Tom Tromey <tromey@adacore.com>
218
219 * tracepoint.cc (eval_result_names): Now const.
220 * ax.cc (gdb_agent_op_names): Now const.
221
222 2020-09-10 Kamil Rytarowski <n54@gmx.com>
223
224 * netbsd-low.cc: Add.
225 * netbsd-low.h: Likewise.
226 * netbsd-amd64-low.cc: Likewise.
227 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
228 "netbsd-amd64-low.cc".
229 * configure.srv: Add x86_64-*-netbsd*.
230
231 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
232
233 * server.cc (captured_main): Accept multiple `--selftest=`
234 options. Pass all `--selftest=` arguments to run_tests.
235
236 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
237
238 * configure, config.in: Regenerate.
239
240 2020-07-26 Eli Zaretskii <eliz@gnu.org>
241
242 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
243 When checking whether socklen_t type is defined, use ws2tcpip.h if
244 it is available and sys/socket.h isn't.
245 * configure: Regenerate.
246 * config.in: Regenerate.
247
248 2020-07-22 Pedro Alves <pedro@palves.net>
249
250 * inferiors.cc (switch_to_process): New, moved here from
251 thread-db.cc, and made extern.
252 * inferiors.h (switch_to_process): Declare.
253 * server.cc: Include "gdbsupport/scoped_restore.h".
254 (handle_qxfer_threads_proper): Now returns bool. Prepare to
255 access memory around target calls.
256 (handle_qxfer_threads): Handle errors.
257 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
258
259 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
260
261 * linux-low.cc (stopped_pids): Make static.
262
263 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
264
265 * tdesc.cc (allocate_target_description): Add header comment.
266 (target_desc_deleter::operator()): New function.
267 * tdesc.h (struct target_desc): Declare as final.
268
269 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
270
271 * server.cc (handle_query): Use std::vector of
272 std::string for `qsupported` vector. Use separate
273 vector for unknowns.
274 * target.h (class process_stratum_target) <process_qsupported>:
275 Change parameters to array_view of const char *.
276 (target_process_qsupported): Remove `count` parameter.
277 * target.cc (process_stratum_target::process_qsupported): Change
278 parameters to array_view of const char *.
279 * linux-x86-low.cc (class x86_target) <process_qsupported>:
280 Likewise.
281
282 2020-06-29 Tom de Vries <tdevries@suse.de>
283
284 * ax.h: Include gdbsupport/debug_agent.h.
285
286 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
287
288 * tdesc.cc (struct tdesc_compatible_info): New struct.
289 (tdesc_compatible_info_list): New function.
290 (tdesc_compatible_info_arch_name): New function.
291
292 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
293
294 Use std::list to stop pending signal instead of manually-created
295 linked list.
296 * linux-low.h: Include <list>.
297 (struct pending_signal): Move here from linux-low.cc.
298 (struct lwp_info) <pending_signals>
299 <pending_signals_to_report>: Update the type.
300 * linux-low.cc (struct pending_signals): Remove.
301 (linux_process_target::delete_lwp)
302 (linux_process_target::add_lwp)
303 (enqueue_one_deferred_signal)
304 (dequeue_one_deferred_signal)
305 (enqueue_pending_signal)
306 (linux_process_target::resume_one_lwp_throw)
307 (linux_process_target::thread_needs_step_over)
308 (linux_process_target::resume_one_thread)
309 (linux_process_target::proceed_one_lwp): Update the use of pending
310 signal list.
311
312 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
313
314 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
315 Remove.
316
317 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
318
319 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
320 * configure.srv: Remove mingw32ce cases.
321 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
322 * win32-low.h (to_back_slashes): Remove.
323 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
324
325 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
326
327 * Makefile.in (SFILES): linux-tile-low.cc.
328 * configure.srv: Remove tilegx case.
329 * linux-tile-low.cc: Remove.
330
331 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
332
333 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
334 * configure.srv: Remove m32r case.
335 * linux-m32r-low.cc: Remove.
336
337 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
338
339 * Makefile.in (SFILES): Remove linux-cris-low.c.
340 * configure.srv: Remove cris cases.
341 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
342
343 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
344
345 * Makefile.in (SFILES): Remove linux-bfin-low.c.
346 * configure.srv: Remove bfin case.
347 * linux-bfin-low.cc: Remove.
348 * linux-low.cc: Remove BFIN-conditional code.
349
350 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
351
352 * configure: Re-generate.
353 * configure.ac: Remove srv_qnx test.
354 * configure.srv: Remove nto case.
355 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
356 * remote-utils.c: Remove __QNX__-guarded code.
357
358 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
359
360 * configure: Re-generate.
361 * configure.ac: Remove srv_lynxos test.
362 * configure.srv: Remove lynxos cases.
363 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
364 Remove.
365
366 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
367
368 * README: Fix a few outdated or incoherent things.
369
370 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
371
372 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
373 (win32_clear_inferiors): Use open_process_used.
374 (get_child_debug_event): Likewise.
375
376 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
377
378 PR gdbserver/25893
379 * linux-low.cc (linux_process_target::create_inferior),
380 lynx-low.cc (lynx_process_target::create_inferior),
381 win32-low.cc (win32_process_target::create_inferior): Use
382 construct_inferior_arguments instead of stringify_argv
383 to get string representation which properly escapes
384 special characters.
385 * server.cc (handle_v_run): Just pass empty program arg
386 as such, since any further processing is now handled via
387 construct_inferior_arguments.
388
389 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
390
391 * nto-low.cc (nto_process_target::create_inferior): Pass
392 argv to spawnp function as char **.
393
394 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
395
396 * server.cc (captured_main), (handle_v_run): No longer
397 insert extra NULL element to args vector.
398
399 2020-05-23 Pedro Alves <palves@redhat.com>
400
401 * gdb-safe-ctype.h: New.
402
403 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
404
405 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
406 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
407 (ia64_target::low_breakpoint_at): Ditto.
408
409 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
410
411 * win32-i386-low.cc (i386_supports_z_point_type): Handle
412 Z_PACKET_HW_BP z_type.
413 (i386_insert_point): Handle raw_bkpt_type type.
414 (i386_remove_point): Likewise.
415
416 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
417
418 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
419 Add arch/i386.o.
420 * win32-arm-low.cc (arm_num_regs): New function.
421 (struct win32_target_ops): Use arm_num_regs.
422 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
423 processes.
424 (i386_get_thread_context): Likewise.
425 (i386_prepare_to_resume): Likewise.
426 (i386_thread_added): Likewise.
427 (i386_single_step): Likewise.
428 (i386_fetch_inferior_register): Likewise.
429 (i386_store_inferior_register): Likewise.
430 (i386_arch_setup): Likewise.
431 (i386_win32_num_regs): New function.
432 (struct win32_target_ops): Use i386_win32_num_regs.
433 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
434 processes.
435 (win32_require_context): Likewise.
436 (child_add_thread): Likewise.
437 (do_initial_child_stuff): Likewise.
438 (continue_one_thread): Likewise.
439 (win32_process_target::resume): Likewise.
440 (load_psapi): Likewise.
441 (win32_add_all_dlls): Likewise.
442 (maybe_adjust_pc): Likewise.
443 (win32_process_target::qxfer_siginfo): Likewise.
444 (initialize_low): Likewise.
445 * win32-low.h (struct win32_target_ops): Change num_regs to
446 callback function.
447
448 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
449
450 * configure.ac: Remove check for fs_base/gs_base in
451 user_regs_struct.
452 * configure: Re-generate.
453 * config.in: Re-generate.
454 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
455 x86_store_gregset): Adjust.
456
457 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
458
459 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
460 comparison.
461
462 2020-04-16 Tom Tromey <tromey@adacore.com>
463
464 * win32-low.cc (windows_nat::handle_access_violation): New
465 function.
466
467 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
468
469 * win32-low.cc (get_child_debug_event): Fix format string warning.
470
471 2020-04-13 Tom Tromey <tom@tromey.com>
472
473 * server.h (gdb_fildes_t): Remove typedef.
474 * remote-utils.c (remote_desc, list_desc): Now int.
475 (INVALID_DESCRIPTOR): Remove.
476 (gdb_connected, remote_close)
477 (check_remote_input_interrupt_request): Update.
478 * utils.h (pfildes): Don't declare.
479 * utils.c (pfildes): Remove.
480
481 2020-04-13 Tom Tromey <tom@tromey.com>
482
483 * server.h (handle_serial_event, handle_target_event): Update.
484 * server.c: Don't call initialize_event_loop.
485 (keep_processing_events): New global.
486 (handle_serial_event): Return void. Set keep_processing_events.
487 (handle_target_event): Return void.
488 (start_event_loop): Move from event-loop.c. Rewrite.
489 * remote-utils.c (handle_accept_event): Return void.
490 (reset_readchar): Use delete_timer.
491 (process_remaining): Return void.
492 (reschedule): Use create_timer.
493 * event-loop.h: Remove.
494 * event-loop.cc: Remove.
495 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
496
497 2020-04-13 Tom Tromey <tom@tromey.com>
498
499 * server.c (invoke_async_signal_handlers)
500 (check_async_event_handlers, flush_streams, gdb_select): New
501 functions.
502
503 2020-04-13 Tom Tromey <tom@tromey.com>
504
505 * configure: Rebuild.
506 * config.in: Rebuild.
507
508 2020-04-08 Tom Tromey <tromey@adacore.com>
509
510 PR gdb/22992
511 * win32-low.c (child_continue): Call matching_pending_stop.
512 (get_child_debug_event): Call fetch_pending_stop. Push pending
513 stop when needed.
514
515 2020-04-08 Tom Tromey <tromey@adacore.com>
516
517 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
518 (win32_process_target::supports_stopped_by_sw_breakpoint):
519 Declare.
520 * win32-low.c (win32_supports_z_point_type): Always handle
521 Z_PACKET_SW_BP.
522 (win32_insert_point): Call insert_memory_breakpoint when needed.
523 (win32_remove_point): Call remove_memory_breakpoint when needed.
524 (win32_process_target::stopped_by_sw_breakpoint)
525 (win32_process_target::supports_stopped_by_sw_breakpoint): New
526 methods.
527 (win32_target_ops): Update.
528 (maybe_adjust_pc): New function.
529 (win32_wait): Call maybe_adjust_pc.
530
531 2020-04-08 Tom Tromey <tromey@adacore.com>
532
533 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
534 field.
535 * win32-i386-low.c (the_low_target): Update.
536 * win32-arm-low.c (the_low_target): Update.
537
538 2020-04-08 Tom Tromey <tromey@adacore.com>
539
540 * win32-low.h (win32_process_target::read_pc)
541 (win32_process_target::write_pc): Declare.
542 * win32-low.c (win32_process_target::read_pc)
543 (win32_process_target::write_pc): New methods.
544 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
545 functions.
546 (the_low_target): Update.
547 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
548 functions.
549 (the_low_target): Update.
550
551 2020-04-08 Tom Tromey <tromey@adacore.com>
552
553 * win32-low.c (win32_kill, get_child_debug_event): Use
554 wait_for_debug_event.
555
556 2020-04-08 Tom Tromey <tromey@adacore.com>
557
558 * win32-low.c (child_continue): Call continue_last_debug_event.
559
560 2020-04-08 Tom Tromey <tromey@adacore.com>
561
562 * win32-low.c (handle_exception): Remove.
563 (windows_nat::handle_ms_vc_exception): New function.
564 (get_child_debug_event): Add "continue_status" parameter.
565 Update.
566 (win32_wait): Update.
567
568 2020-04-08 Tom Tromey <tromey@adacore.com>
569
570 * win32-low.c (windows_nat::handle_load_dll): Rename from
571 handle_load_dll. No longer static.
572 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
573 No longer static.
574
575 2020-04-08 Tom Tromey <tromey@adacore.com>
576
577 * win32-low.c (handle_output_debug_string): Add parameter. Change
578 return type.
579 (win32_kill, get_child_debug_event): Update.
580
581 2020-04-08 Tom Tromey <tromey@adacore.com>
582
583 * win32-low.c (current_process_handle, current_process_id)
584 (main_thread_id, last_sig, current_event, siginfo_er): Move to
585 nat/windows-nat.c.
586
587 2020-04-08 Tom Tromey <tromey@adacore.com>
588
589 * win32-low.c (get_image_name): Remove.
590 (handle_load_dll): Update.
591
592 2020-04-08 Tom Tromey <tromey@adacore.com>
593
594 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
595 No longer static. Change parameters.
596 (child_add_thread, child_fetch_inferior_registers)
597 (child_store_inferior_registers, win32_resume)
598 (win32_get_tib_address): Update.
599
600 2020-04-08 Tom Tromey <tromey@adacore.com>
601
602 * win32-low.h (struct win32_target_ops): Use qualified names where
603 needed.
604 * win32-i386-low.c: Add "using namespace".
605 * win32-low.c: Add "using namespace".
606 * win32-arm-low.c: Add "using namespace".
607
608 2020-04-08 Tom Tromey <tromey@adacore.com>
609
610 * win32-low.c (delete_thread_info): Don't call CloseHandle.
611
612 2020-04-08 Tom Tromey <tromey@adacore.com>
613
614 * win32-low.c (win32_require_context, suspend_one_thread): Use
615 windows_thread_info::suspend.
616 (continue_one_thread): Use windows_thread_info::resume.
617 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
618
619 2020-04-08 Tom Tromey <tromey@adacore.com>
620
621 * win32-i386-low.c (update_debug_registers)
622 (i386_prepare_to_resume, i386_thread_added): Update.
623
624 2020-04-08 Tom Tromey <tromey@adacore.com>
625
626 * win32-low.c (child_add_thread): Use new.
627 (delete_thread_info): Use delete.
628
629 2020-04-08 Tom Tromey <tromey@adacore.com>
630
631 * win32-low.h (struct windows_thread_info): Remove.
632
633 2020-04-08 Tom Tromey <tromey@adacore.com>
634
635 * win32-low.h (struct windows_thread_info): Rename from
636 win32_thread_info. Remove typedef.
637 (struct win32_target_ops, win32_require_context): Update.
638 * win32-low.c (win32_get_thread_context)
639 (win32_set_thread_context, win32_prepare_to_resume)
640 (win32_require_context, thread_rec, child_add_thread)
641 (delete_thread_info, continue_one_thread)
642 (child_fetch_inferior_registers, child_store_inferior_registers)
643 (win32_resume, suspend_one_thread, win32_get_tib_address):
644 Update.
645 * win32-i386-low.c (update_debug_registers)
646 (win32_get_current_dr, i386_get_thread_context)
647 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
648 (i386_fetch_inferior_register, i386_store_inferior_register):
649 Update.
650 * win32-arm-low.c (arm_get_thread_context)
651 (arm_fetch_inferior_register, arm_store_inferior_register):
652 Update.
653
654 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
655
656 * linux-low.h (struct linux_target_ops): Remove.
657 (the_low_target): Remove.
658 * linux-x86-low.cc (the_low_target): Remove.
659 * linux-aarch64-low.cc (the_low_target): Ditto.
660 * linux-arm-low.cc (the_low_target): Ditto.
661 * linux-bfin-low.cc (the_low_target): Ditto.
662 * linux-cris-low.cc (the_low_target): Ditto.
663 * linux-crisv32-low.cc (the_low_target): Ditto.
664 * linux-ia64-low.cc (the_low_target): Ditto.
665 * linux-m32r-low.cc (the_low_target): Ditto.
666 * linux-m68k-low.cc (the_low_target): Ditto.
667 * linux-mips-low.cc (the_low_target): Ditto.
668 * linux-nios2-low.cc (the_low_target): Ditto.
669 * linux-ppc-low.cc (the_low_target): Ditto.
670 * linux-riscv-low.cc (the_low_target): Ditto.
671 * linux-s390-low.cc (the_low_target): Ditto.
672 * linux-sh-low.cc (the_low_target): Ditto.
673 * linux-sparc-low.cc (the_low_target): Ditto.
674 * linux-tic6x-low.cc (the_low_target): Ditto.
675 * linux-tile-low.cc (the_low_target): Ditto.
676 * linux-xtensa-low.cc (the_low_target): Ditto.
677
678 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
679
680 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
681 linux target define the op by overriding the declaration in
682 process_stratum_target.
683
684 * linux-low.h (struct linux_target_ops): Remove the op.
685 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
686 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
687 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
688 (x86_get_ipa_tdesc_idx): Turn into...
689 (x86_target::get_ipa_tdesc_idx): ...this.
690 (the_low_target): Remove the op field.
691 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
692 (ppc_get_ipa_tdesc_idx): Turn into...
693 (ppc_target::get_ipa_tdesc_idx): ...this.
694 (the_low_target): Remove the op field.
695 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
696 (s390_get_ipa_tdesc_idx): Turn into...
697 (s390_target::get_ipa_tdesc_idx): ...this.
698 (the_low_target): Remove the op field.
699
700 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
701
702 Turn the 'get_syscall_trapinfo' linux target op into a method
703 of process_stratum_target.
704
705 * linux-low.h (struct linux_target_ops): Remove the op.
706 (class linux_process_target) <get_syscall_trapinfo>
707 <gdb_catch_this_syscall>
708 <low_supports_catch_syscall>
709 <low_get_syscall_trapinfo>: Declare.
710 * linux-low.cc (get_syscall_trapinfo): Turn into...
711 (linux_process_target::get_syscall_trapinfo): ...this.
712 (linux_process_target::low_get_syscall_trapinfo): Define.
713 (gdb_catch_this_syscall_p): Turn into...
714 (linux_process_target::gdb_catch_this_syscall): ...this.
715 (linux_process_target::low_supports_catch_syscall): Define.
716
717 Update the callers below.
718
719 (linux_process_target::wait_1)
720 (linux_process_target::supports_catch_syscall)
721
722 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
723 <low_get_syscall_trapinfo>: Declare.
724 (x86_target::low_supports_catch_syscall): Define.
725 (x86_get_syscall_trapinfo): Turn into...
726 (x86_target::low_get_syscall_trapinfo): ...this.
727 (the_low_target): Remove the op field.
728 * linux-aarch64-low.cc (class aarch64_target)
729 <low_supports_catch_syscall>
730 <low_get_syscall_trapinfo>: Declare.
731 (aarch64_target::low_supports_catch_syscall): Define.
732 (aarch64_get_syscall_trapinfo): Turn into...
733 (aarch64_target::low_get_syscall_trapinfo): ...this.
734 (the_low_target): Remove the op field.
735 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
736 <low_get_syscall_trapinfo>: Declare.
737 (arm_target::low_supports_catch_syscall): Define.
738 (arm_get_syscall_trapinfo): Turn into...
739 (arm_target::low_get_syscall_trapinfo): ...this.
740 (the_low_target): Remove the op field.
741 * linux-ppc-low.cc (the_low_target): Remove the op field.
742 * linux-s390-low.cc (the_low_target): Remove the op field.
743
744 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
745
746 Remove the 'supports_hardware_single_step' linux target op and
747 override the process_stratum_target's op definition in
748 linux_process_target to return true.
749
750 * linux-low.h (struct linux_target_ops): Remove the op.
751 (class linux_process_target) <finish_step_over>
752 <maybe_hw_step>: Declare.
753 * linux-low.cc (can_hardware_single_step): Remove.
754 (maybe_hw_step): Turn into...
755 (linux_process_target::maybe_hw_step): ...this.
756 (finish_step_over): Turn into...
757 (linux_process_target::finish_step_over): ...this.
758 (linux_process_target::supports_hardware_single_step): Update
759 to return true.
760
761 Update the callers below.
762
763 (linux_process_target::single_step)
764 (linux_process_target::resume_one_lwp_throw)
765
766 * linux-arm-low.cc (class arm_target)
767 <supports_hardware_single_step>: Declare.
768 (arm_supports_hardware_single_step): Turn into...
769 (arm_target::supports_hardware_single_step): ...this.
770 (the_low_target): Remove the op field.
771 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
772 (the_low_target): Remove the op field.
773 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
774 Remove.
775 (the_low_target): Remove the op field.
776 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
777 (the_low_target): Remove the op field.
778 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
779 (the_low_target): Remove the op field.
780 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
781 (the_low_target): Remove the op field.
782 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
783 (the_low_target): Remove the op field.
784 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
785 (the_low_target): Remove the op field.
786 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
787 (the_low_target): Remove the op field.
788 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
789 (the_low_target): Remove the op field.
790 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
791 (the_low_target): Remove the op field.
792 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
793 (the_low_target): Remove the op field.
794 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
795 Remove.
796 (the_low_target): Remove the op field.
797
798 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
799
800 Turn the 'supports_range_stepping' linux target op into a method
801 of linux_process_target.
802
803 * linux-low.h (struct linux_target_ops): Remove the op.
804 (class linux_process_target) <low_supports_range_stepping>: Declare.
805 * linux-low.cc (linux_process_target::low_supports_range_stepping):
806 Define.
807 (linux_process_target::supports_range_stepping): Update the call
808 site.
809 * linux-x86-low.cc (class x86_target)
810 <low_supports_range_stepping>: Declare.
811 (x86_supports_range_stepping): Turn into...
812 (x86_target::low_supports_range_stepping): ...this.
813 (the_low_target): Remove the op field.
814 * linux-aarch64-low.cc (class aarch64_target)
815 <low_supports_range_stepping>: Declare.
816 (aarch64_supports_range_stepping): Turn into...
817 (aarch64_target::low_supports_range_stepping): ...this.
818 (the_low_target): Remove the op field.
819 * linux-arm-low.cc (the_low_target): Remove the op field.
820 * linux-bfin-low.cc (the_low_target): Ditto.
821 * linux-crisv32-low.cc (the_low_target): Ditto.
822 * linux-m32r-low.cc (the_low_target): Ditto.
823 * linux-m68k-low.cc (the_low_target): Ditto.
824 * linux-ppc-low.cc (the_low_target): Ditto.
825 * linux-s390-low.cc (the_low_target): Ditto.
826 * linux-sh-low.cc (the_low_target): Ditto.
827 * linux-tic6x-low.cc (the_low_target): Ditto.
828 * linux-tile-low.cc (the_low_target): Ditto.
829 * linux-xtensa-low.cc (the_low_target): Ditto.
830
831 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
832
833 Remove the 'emit_ops' linux target ops and let the concrete
834 linux target define the op by overriding the declaration of
835 process_stratum_target.
836
837 * linux-low.h (struct linux_target_ops): Remove the op.
838 (class linux_process_target) <emit_ops>: Remove.
839 * linux-low.cc (linux_process_target::emit_ops): Remove.
840 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
841 (x86_emit_ops): Turn into...
842 (x86_target::emit_ops): ...this.
843 (the_low_target): Remove the op field.
844 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
845 (aarch64_emit_ops): Turn into...
846 (aarch64_target::emit_ops): ...this.
847 (the_low_target): Remove the op field.
848 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
849 (ppc_emit_ops): Turn into...
850 (ppc_target::emit_ops): ...this.
851 (the_low_target): Remove the op field.
852 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
853 (s390_emit_ops): Turn into...
854 (s390_target::emit_ops): ...this.
855 (the_low_target): Remove the op field.
856 * linux-arm-low.cc (the_low_target): Remove the op field.
857 * linux-bfin-low.cc (the_low_target): Ditto.
858 * linux-crisv32-low.cc (the_low_target): Ditto.
859 * linux-m32r-low.cc (the_low_target): Ditto.
860 * linux-m68k-low.cc (the_low_target): Ditto.
861 * linux-sh-low.cc (the_low_target): Ditto.
862 * linux-tic6x-low.cc (the_low_target): Ditto.
863 * linux-tile-low.cc (the_low_target): Ditto.
864 * linux-xtensa-low.cc (the_low_target): Ditto.
865
866 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
867
868 Remove the 'install_fast_tracepoint_jump_pad' and
869 'get_min_fast_tracepoint_insn_len' linux target ops to let the
870 concrete linux target define the ops by overriding the declarations
871 of process_stratum_target.
872
873 * linux-low.h (struct linux_target_ops): Remove the ops.
874 (class linux_process_target) <supports_fast_tracepoints>
875 <install_fast_tracepoint_jump_pad>
876 <get_min_fast_tracepoint_insn_len>: Remove.
877 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
878 (linux_process_target::install_fast_tracepoint_jump_pad)
879 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
880 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
881 <install_fast_tracepoint_jump_pad>
882 <get_min_fast_tracepoint_insn_len>: Declare.
883 (x86_target::supports_fast_tracepoints): Define.
884 (x86_install_fast_tracepoint_jump_pad): Turn into...
885 (x86_target::install_fast_tracepoint_jump_pad): ...this.
886 (x86_get_min_fast_tracepoint_insn_len): Turn into...
887 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
888 (the_low_target): Remove the op fields.
889 * linux-aarch64-low.cc (class aarch64_target)
890 <supports_fast_tracepoints>
891 <install_fast_tracepoint_jump_pad>
892 <get_min_fast_tracepoint_insn_len>: Declare.
893 (aarch64_target::supports_fast_tracepoints): Define.
894 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
895 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
896 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
897 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
898 (the_low_target): Remove the op fields.
899 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
900 <install_fast_tracepoint_jump_pad>
901 <get_min_fast_tracepoint_insn_len>: Declare.
902 (ppc_target::supports_fast_tracepoints): Define.
903 (ppc_install_fast_tracepoint_jump_pad): Turn into...
904 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
905 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
906 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
907 (the_low_target): Remove the op fields.
908 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
909 <install_fast_tracepoint_jump_pad>
910 <get_min_fast_tracepoint_insn_len>: Declare.
911 (s390_target::supports_fast_tracepoints): Define.
912 (s390_install_fast_tracepoint_jump_pad): Turn into...
913 (s390_target::install_fast_tracepoint_jump_pad): ...this.
914 (s390_get_min_fast_tracepoint_insn_len): Turn into...
915 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
916 (the_low_target): Remove the op fields.
917 * linux-arm-low.cc (the_low_target): Remove the op fields.
918 * linux-bfin-low.cc (the_low_target): Ditto.
919 * linux-crisv32-low.cc (the_low_target): Ditto.
920 * linux-m32r-low.cc (the_low_target): Ditto.
921 * linux-m68k-low.cc (the_low_target): Ditto.
922 * linux-sh-low.cc (the_low_target): Ditto.
923 * linux-tic6x-low.cc (the_low_target): Ditto.
924 * linux-tile-low.cc (the_low_target): Ditto.
925 * linux-xtensa-low.cc (the_low_target): Ditto.
926
927 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
928
929 Turn the 'get_thread_area' linux target op into a method of
930 process_stratum_target.
931
932 * linux-low.h (struct linux_target_ops): Remove the op.
933 (class linux_process_target) <stuck_in_jump_pad>
934 <linux_fast_tracepoint_collecting>
935 <low_get_thread_area>: Declare.
936 * linux-low.cc (supports_fast_tracepoints): Remove.
937 (linux_fast_tracepoint_collecting): Turn into...
938 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
939 (linux_process_target::low_get_thread_area): Define.
940 (stuck_in_jump_pad_callback): Turn into...
941 (linux_process_target::stuck_in_jump_pad): ...this.
942
943 Update the caller below.
944
945 (linux_process_target::stabilize_threads)
946
947 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
948 Declare.
949 (x86_get_thread_area): Turn into...
950 (x86_target::low_get_thread_area): ...this.
951 (the_low_target): Remove the op field.
952 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
953 Declare.
954 (aarch64_get_thread_area): Turn into...
955 (aarch64_target::low_get_thread_area): ...this.
956 (the_low_target): Remove the op field.
957 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
958 Declare.
959 (ppc_get_thread_area): Turn into...
960 (ppc_target::low_get_thread_area): ...this.
961 (the_low_target): Remove the op field.
962 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
963 Declare.
964 (s390_get_thread_area): Turn into...
965 (s390_target::low_get_thread_area): ...this.
966 (the_low_target): Remove the op field.
967 * linux-arm-low.cc (the_low_target): Remove the op field.
968 * linux-bfin-low.cc (the_low_target): Ditto.
969 * linux-crisv32-low.cc (the_low_target): Ditto.
970 * linux-m32r-low.cc (the_low_target): Ditto.
971 * linux-m68k-low.cc (the_low_target): Ditto.
972 * linux-sh-low.cc (the_low_target): Ditto.
973 * linux-tic6x-low.cc (the_low_target): Ditto.
974 * linux-tile-low.cc (the_low_target): Ditto.
975 * linux-xtensa-low.cc (the_low_target): Ditto.
976
977 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
978
979 Remote the 'supports_tracepoints' linux target op and let the
980 concrete linux target define it by overriding the op declared in
981 process_stratum_target.
982
983 * linux-low.h (struct linux_target_ops): Remove the op.
984 (class linux_process_target) <supports_tracepoints>: Remove.
985 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
986 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
987 Declare.
988 (x86_supports_tracepoints): Turn into...
989 (x86_target::supports_tracepoints): ...this.
990 (the_low_target): Remove the op field.
991 * linux-aarch64-low.cc (class aarch64_target)
992 <supports_tracepoints>: Declare.
993 (aarch64_supports_tracepoints): Turn into...
994 (aarch64_target::supports_tracepoints): ...this.
995 (the_low_target): Remove the op field.
996 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
997 Declare.
998 (ppc_supports_tracepoints): Turn into...
999 (ppc_target::supports_tracepoints): ...this.
1000 (the_low_target): Remove the op field.
1001 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
1002 Declare.
1003 (s390_supports_tracepoints): Turn into...
1004 (s390_target::supports_tracepoints): ...this.
1005 (the_low_target): Remove the op field.
1006 * linux-arm-low.cc (the_low_target): Remove the op field.
1007 * linux-bfin-low.cc (the_low_target): Ditto.
1008 * linux-crisv32-low.cc (the_low_target): Ditto.
1009 * linux-m32r-low.cc (the_low_target): Ditto.
1010 * linux-m68k-low.cc (the_low_target): Ditto.
1011 * linux-sh-low.cc (the_low_target): Ditto.
1012 * linux-tic6x-low.cc (the_low_target): Ditto.
1013 * linux-tile-low.cc (the_low_target): Ditto.
1014 * linux-xtensa-low.cc (the_low_target): Ditto.
1015
1016 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1017
1018 Remove the 'process_qsupported' linux target op and let a concrete
1019 linux target define the op by overriding the op declaration in
1020 process_stratum_target.
1021
1022 * linux-low.h (struct linux_target_ops): Remove the op.
1023 (class linux_process_target) <process_qsupported>: Remove.
1024 * linux-low.cc (linux_process_target::process_qsupported): Remove.
1025 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
1026 (x86_linux_process_qsupported): Turn into...
1027 (x86_target::process_qsupported): ...this.
1028 (the_low_target): Remove the op field.
1029 * linux-aarch64-low.cc (the_low_target): Remove the op
1030 field.
1031 * linux-arm-low.cc (the_low_target): Ditto.
1032 * linux-bfin-low.cc (the_low_target): Ditto.
1033 * linux-crisv32-low.cc (the_low_target): Ditto.
1034 * linux-m32r-low.cc (the_low_target): Ditto.
1035 * linux-m68k-low.cc (the_low_target): Ditto.
1036 * linux-ppc-low.cc (the_low_target): Ditto.
1037 * linux-s390-low.cc (the_low_target): Ditto.
1038 * linux-sh-low.cc (the_low_target): Ditto.
1039 * linux-tic6x-low.cc (the_low_target): Ditto.
1040 * linux-tile-low.cc (the_low_target): Ditto.
1041 * linux-xtensa-low.cc (the_low_target): Ditto.
1042
1043 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1044
1045 Turn the 'prepare_to_resume' linux target op into a method of
1046 linux_process_target.
1047
1048 * linux-low.h (struct linux_target_ops): Remove the op.
1049 (class linux_process_target) <low_prepare_to_resume>: Declare.
1050 * linux-low.cc (linux_process_target::low_prepare_to_resume):
1051 Define.
1052
1053 Update the callers below:
1054
1055 (linux_process_target::resume_one_lwp_throw)
1056 (linux_process_target::low_prepare_to_resume)
1057
1058 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
1059 Declare.
1060 (x86_target::low_prepare_to_resume): Define.
1061 (the_low_target): Remove the op field.
1062 * linux-aarch64-low.cc (class aarch64_target)
1063 <low_prepare_to_resume>: Declare.
1064 (aarch64_target::low_prepare_to_resume): Define.
1065 (the_low_target): Remove the op field.
1066 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
1067 Declare.
1068 (arm_prepare_to_resume): Turn into...
1069 (arm_target::low_prepare_to_resume): ...this.
1070 (the_low_target): Remove the op field.
1071 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
1072 Declare.
1073 (mips_linux_prepare_to_resume): Turn into...
1074 (mips_target::low_prepare_to_resume): ...this.
1075 (the_low_target): Remove the op field.
1076 * linux-bfin-low.cc (the_low_target): Remove the op field.
1077 * linux-crisv32-low.cc (the_low_target): Ditto.
1078 * linux-m32r-low.cc (the_low_target): Ditto.
1079 * linux-m68k-low.cc (the_low_target): Ditto.
1080 * linux-ppc-low.cc (the_low_target): Ditto.
1081 * linux-s390-low.cc (the_low_target): Ditto.
1082 * linux-sh-low.cc (the_low_target): Ditto.
1083 * linux-tic6x-low.cc (the_low_target): Ditto.
1084 * linux-tile-low.cc (the_low_target): Ditto.
1085 * linux-xtensa-low.cc (the_low_target): Ditto.
1086
1087 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1088
1089 Turn the 'new_process', 'delete_process', 'new_thread',
1090 'delete_thread', and 'new_fork' linux target ops into methods
1091 of linux_process_target.
1092
1093 * linux-low.h (struct linux_target_ops): Remove the ops.
1094 (class linux_process_target) <add_linux_process>
1095 <add_lwp>
1096 <delete_lwp>
1097 <attach_lwp>
1098 <detach_one_lwp>
1099 <check_zombie_leaders>
1100 <filter_exit_event>
1101 <low_new_process>
1102 <low_delete_process>
1103 <low_new_thread>
1104 <low_delete_thread>
1105 <low_new_fork>: Declare.
1106 * linux-low.cc (delete_lwp): Turn into...
1107 (linux_process_target::delete_lwp): ...this.
1108 (linux_process_target::low_delete_thread): Define.
1109 (linux_add_process): Turn into...
1110 (linux_process_target::add_linux_process): ...this.
1111 (linux_process_target::low_new_process): Define.
1112 (linux_process_target::low_delete_process): Define.
1113 (linux_process_target::low_new_fork): Define.
1114 (add_lwp): Turn into...
1115 (linux_process_target::add_lwp): ...this.
1116 (linux_process_target::low_new_thread): Define.
1117 (linux_attach_lwp): Turn into...
1118 (linux_process_target::attach_lwp): ...this.
1119 (linux_detach_one_lwp): Turn into...
1120 (linux_process_target::detach_one_lwp): ...this.
1121 (linux_detach_lwp_callback): Remove and inline...
1122 (linux_process_target::detach): ...here.
1123 (check_zombie_leaders): Turn into...
1124 (linux_process_target::check_zombie_leaders): ...this.
1125 (filter_exit_event): Turn into...
1126 (linux_process_target::filter_exit_event): ...this.
1127
1128 Update the callers below.
1129
1130 (linux_process_target::handle_extended_wait)
1131 (linux_process_target::create_inferior)
1132 (attach_proc_task_lwp_callback)
1133 (linux_process_target::attach)
1134 (linux_process_target::detach)
1135 (linux_process_target::mourn)
1136 * thread-db.cc (attach_thread)
1137
1138 * linux-x86-low.cc (class x86_target) <low_new_process>
1139 <low_delete_process>
1140 <low_new_thread>
1141 <low_delete_thread>
1142 <low_new_fork>: Declare.
1143 (x86_linux_new_process): Turn into...
1144 (x86_target::low_new_process): ...this.
1145 (x86_linux_delete_process): Turn into...
1146 (x86_target::low_delete_process): ...this.
1147 (x86_target::low_new_thread): Define.
1148 (x86_target::low_delete_thread): Define.
1149 (x86_linux_new_fork): Turn into...
1150 (x86_target::low_new_fork): ...this.
1151 (the_low_target): Remove the op fields.
1152 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
1153 <low_delete_process>
1154 <low_new_thread>
1155 <low_delete_thread>
1156 <low_new_fork>: Declare.
1157 (aarch64_linux_new_process): Turn into...
1158 (aarch64_target::low_new_process): ...this.
1159 (aarch64_linux_delete_process): Turn into...
1160 (aarch64_target::low_delete_process): ...this.
1161 (aarch64_target::low_new_thread): Define.
1162 (aarch64_target::low_delete_thread): Define.
1163 (aarch64_linux_new_fork): Turn into...
1164 (aarch64_target::low_new_fork): ...this.
1165 (the_low_target): Remove the op fields.
1166 * linux-arm-low.cc (class arm_target) <low_new_process>
1167 <low_delete_process>
1168 <low_new_thread>
1169 <low_delete_thread>
1170 <low_new_fork>: Declare.
1171 (arm_new_process): Turn into...
1172 (arm_target::low_new_process): ...this.
1173 (arm_delete_process): Turn into...
1174 (arm_target::low_delete_process): ...this.
1175 (arm_new_thread): Turn into...
1176 (arm_target::low_new_thread): ...this.
1177 (arm_delete_thread): Turn into...
1178 (arm_target::low_delete_thread): ...this.
1179 (arm_new_fork): Turn into...
1180 (arm_target::low_new_fork): ...this.
1181 (the_low_target): Remove the op fields.
1182 * linux-mips-low.cc (class mips_target) <low_new_process>
1183 <low_delete_process>
1184 <low_new_thread>
1185 <low_delete_thread>
1186 <low_new_fork>: Declare.
1187 (mips_linux_new_process): Turn into...
1188 (mips_target::low_new_process): ...this.
1189 (mips_linux_delete_process): Turn into...
1190 (mips_target::low_delete_process): ...this.
1191 (mips_linux_new_thread): Turn into...
1192 (mips_target::low_new_thread): ...this.
1193 (mips_linux_delete_thread): Turn into...
1194 (mips_target::low_delete_thread): ...this.
1195 (mips_linux_new_fork): Turn into...
1196 (mips_target::low_new_fork): ...this.
1197 (the_low_target): Remove the op fields.
1198 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1199 * linux-crisv32-low.cc (the_low_target): Ditto.
1200 * linux-m32r-low.cc (the_low_target): Ditto.
1201 * linux-m68k-low.cc (the_low_target): Ditto.
1202 * linux-ppc-low.cc (the_low_target): Ditto.
1203 * linux-s390-low.cc (the_low_target): Ditto.
1204 * linux-sh-low.cc (the_low_target): Ditto.
1205 * linux-tic6x-low.cc (the_low_target): Ditto.
1206 * linux-tile-low.cc (the_low_target): Ditto.
1207 * linux-xtensa-low.cc (the_low_target): Ditto.
1208
1209 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1210
1211 Turn the 'siginfo_fixup' linux target op into a method of
1212 linux_process_target.
1213
1214 * linux-low.h (struct linux_target_ops): Remove the op.
1215 (class linux_process_target) <siginfo_fixup>
1216 <low_siginfo_fixup>: Declare.
1217 * linux-low.cc (siginfo_fixup): Turn into...
1218 (linux_process_target::siginfo_fixup): ...this.
1219 (linux_process_target::low_siginfo_fixup): Define.
1220 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1221 (x86_siginfo_fixup): Turn into...
1222 (x86_target::low_siginfo_fixup): ...this.
1223 (the_low_target): Remove the op field.
1224 * linux-aarch64-low.cc (class aarch64_target):
1225 <low_siginfo_fixup>: Declare.
1226 (aarch64_linux_siginfo_fixup): Turn into...
1227 (aarch64_target::low_siginfo_fixup): ...this.
1228 (the_low_target): Remove the op field.
1229 * linux-arm-low.cc (the_low_target): Remove the op field.
1230 * linux-bfin-low.cc (the_low_target): Ditto.
1231 * linux-crisv32-low.cc (the_low_target): Ditto.
1232 * linux-m32r-low.cc (the_low_target): Ditto.
1233 * linux-m68k-low.cc (the_low_target): Ditto.
1234 * linux-mips-low.cc (the_low_target): Ditto.
1235 * linux-ppc-low.cc (the_low_target): Ditto.
1236 * linux-s390-low.cc (the_low_target): Ditto.
1237 * linux-sh-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
1242 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1243
1244 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1245 linux target ops into methods of linux_process_target.
1246
1247 * linux-low.h (struct linux_target_ops): Remove the ops.
1248 (class linux_process_target) <low_collect_ptrace_register>
1249 <low_store_ptrace_register>: Declare.
1250 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1251 (linux_process_target::low_supply_ptrace_register): Define.
1252
1253 Update the callers below.
1254
1255 (linux_process_target::fetch_register)
1256 (linux_process_target::store_register)
1257
1258 * linux-x86-low.cc (the_low_target): Remove the op fields.
1259 * linux-aarch64-low.cc (the_low_target): Ditto.
1260 * linux-arm-low.cc (the_low_target): Ditto.
1261 * linux-bfin-low.cc (the_low_target): Ditto.
1262 * linux-crisv32-low.cc (the_low_target): Ditto.
1263 * linux-m32r-low.cc (the_low_target): Ditto.
1264 * linux-m68k-low.cc (the_low_target): Ditto.
1265 * linux-sh-low.cc (the_low_target): Ditto.
1266 * linux-sparc-low.cc (the_low_target): Ditto.
1267 * linux-tic6x-low.cc (the_low_target): Ditto.
1268 * linux-tile-low.cc (the_low_target): Ditto.
1269 * linux-xtensa-low.cc (the_low_target): Ditto.
1270 * linux-mips-low.cc (class mips_target)
1271 <low_collect_ptrace_register>
1272 <low_supply_ptrace_register>: Declare.
1273 (mips_collect_ptrace_register): Turn into ...
1274 (mips_target::low_collect_ptrace_register): ...this.
1275 (mips_supply_ptrace_register): Turn into...
1276 (mips_target::low_supply_ptrace_register): ...this.
1277 (the_low_target): Remove the op fields.
1278 * linux-ppc-low.cc (class ppc_target)
1279 <low_collect_ptrace_register>
1280 <low_supply_ptrace_register>: Declare.
1281 (ppc_collect_ptrace_register): Turn into ...
1282 (ppc_target::low_collect_ptrace_register): ...this.
1283 (ppc_supply_ptrace_register): Turn into ...
1284 (ppc_target::low_supply_ptrace_register): ...this.
1285 (ppc_fill_gregset): Update for the calls to
1286 low_collect_ptrace_register.
1287 (the_low_target): Remove the op fields.
1288 * linux-s390-low.cc (class s390_target)
1289 <low_collect_ptrace_register>
1290 <low_supply_ptrace_register>: Declare.
1291 (s390_collect_ptrace_register): Turn into ...
1292 (s390_target::low_collect_ptrace_register): ...this.
1293 (s390_supply_ptrace_register): Turn into ...
1294 (s390_target::low_supply_ptrace_register): ...this.
1295 (s390_fill_gregset): Update for the calls to
1296 low_collect_ptrace_register.
1297 (the_low_target): Remove the op fields.
1298
1299 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1300
1301 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1302 target ops into methods of linux_process_target.
1303
1304 * linux-low.h (struct linux_target_ops): Remove the ops.
1305 (class linux_process_target) <check_stopped_by_watchpoint>
1306 <low_stopped_by_watchpoint>
1307 <low_stopped_data_address>: Declare.
1308 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1309 (linux_process_target::check_stopped_by_watchpoint): ...this.
1310 (linux_process_target::low_stopped_by_watchpoint): Define.
1311 (linux_process_target::low_stopped_data_address): Define.
1312 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1313 <low_stopped_data_address>: Declare.
1314 (x86_stopped_by_watchpoint): Turn into...
1315 (x86_target::low_stopped_by_watchpoint): ...this.
1316 (x86_stopped_data_address): Turn into...
1317 (x86_target::low_stopped_data_address): ...this.
1318 (the_low_target): Remove the op fields.
1319 * linux-aarch64-low.cc (class aarch64_target)
1320 <low_stopped_by_watchpoint>
1321 <low_stopped_data_address>: Declare.
1322 (aarch64_stopped_by_watchpoint): Turn into...
1323 (aarch64_target::low_stopped_by_watchpoint): ...this.
1324 (aarch64_stopped_data_address): Turn into...
1325 (aarch64_target::low_stopped_data_address): ...this.
1326 (the_low_target): Remove the op fields.
1327 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1328 <low_stopped_data_address>: Declare.
1329 (arm_stopped_by_watchpoint): Turn into...
1330 (arm_target::low_stopped_by_watchpoint): ...this.
1331 (arm_stopped_data_address): Turn into...
1332 (arm_target::low_stopped_data_address): ...this.
1333 (the_low_target): Remove the op fields.
1334 * linux-crisv32-low.cc (class crisv32_target)
1335 <low_stopped_by_watchpoint>
1336 <low_stopped_data_address>: Declare.
1337 (cris_stopped_by_watchpoint): Turn into...
1338 (crisv32_target::low_stopped_by_watchpoint): ...this.
1339 (cris_stopped_data_address): Turn into...
1340 (crisv32_target::low_stopped_data_address): ...this.
1341 (the_low_target): Remove the op fields.
1342 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1343 <low_stopped_data_address>: Declare.
1344 (mips_stopped_by_watchpoint): Turn into...
1345 (mips_target::low_stopped_by_watchpoint): ...this.
1346 (mips_stopped_data_address): Turn into...
1347 (mips_target::low_stopped_data_address): ...this.
1348 (the_low_target): Remove the op fields.
1349 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1350 * linux-m32r-low.cc (the_low_target): Ditto.
1351 * linux-m68k-low.cc (the_low_target): Ditto.
1352 * linux-ppc-low.cc (the_low_target): Ditto.
1353 * linux-s390-low.cc (the_low_target): Ditto.
1354 * linux-sh-low.cc (the_low_target): Ditto.
1355 * linux-sparc-low.cc (the_low_target): Ditto.
1356 * linux-tic6x-low.cc (the_low_target): Ditto.
1357 * linux-tile-low.cc (the_low_target): Ditto.
1358 * linux-xtensa-low.cc (the_low_target): Ditto.
1359
1360 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1361
1362 Turn the 'insert_point' and 'remove_point' linux target ops into
1363 methods of linux_process_target.
1364
1365 * linux-low.h (struct linux_target_ops): Remove the ops.
1366 (class linux_process_target) <low_insert_point>
1367 <low_remove_point>: Declare.
1368 * linux-low.cc (linux_process_target::low_insert_point)
1369 (linux_process_target::low_remove_point): Define.
1370 (linux_process_target::insert_point)
1371 (linux_process_target::remove_point): Update for calls to
1372 low_insert_point and low_remove_point.
1373 * linux-x86-low.cc (class x86_target) <low_insert_point>
1374 <low_remove_point>: Declare.
1375 (x86_insert_point): Turn into...
1376 (x86_target::low_insert_point): ...this.
1377 (x86_remove_point): Turn into...
1378 (x86_target::low_remove_point): ...this.
1379 (the_low_target): Remove the op fields.
1380 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1381 <low_remove_point>: Declare.
1382 (aarch64_insert_point): Turn into...
1383 (aarch64_target::low_insert_point): ...this.
1384 (aarch64_remove_point): Turn into...
1385 (aarch64_target::low_remove_point): ...this.
1386 (the_low_target): Remove the op fields.
1387 * linux-arm-low.cc (class arm_target) <low_insert_point>
1388 <low_remove_point>: Declare.
1389 (arm_insert_point): Turn into...
1390 (arm_target::low_insert_point): ...this.
1391 (arm_remove_point): Turn into...
1392 (arm_target::low_remove_point): ...this.
1393 (the_low_target): Remove the op fields.
1394 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1395 <low_remove_point>: Declare.
1396 (crisv32_insert_point): Turn into...
1397 (crisv32_target::low_insert_point): ...this.
1398 (crisv32_remove_point): Turn into...
1399 (crisv32_target::low_remove_point): ...this.
1400 (the_low_target): Remove the op fields.
1401 * linux-mips-low.cc (class mips_target) <low_insert_point>
1402 <low_remove_point>: Declare.
1403 (mips_insert_point): Turn into...
1404 (mips_target::low_insert_point): ...this.
1405 (mips_remove_point): Turn into...
1406 (mips_target::low_remove_point): ...this.
1407 (the_low_target): Remove the op fields.
1408 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1409 <low_remove_point>: Declare.
1410 (ppc_insert_point): Turn into...
1411 (ppc_target::low_insert_point): ...this.
1412 (ppc_remove_point): Turn into...
1413 (ppc_target::low_remove_point): ...this.
1414 (the_low_target): Remove the op fields.
1415 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1416 * linux-m32r-low.cc (the_low_target): Ditto.
1417 * linux-m68k-low.cc (the_low_target): Ditto.
1418 * linux-s390-low.cc (the_low_target): Ditto.
1419 * linux-sh-low.cc (the_low_target): Ditto.
1420 * linux-sparc-low.cc (the_low_target): Ditto.
1421 * linux-tic6x-low.cc (the_low_target): Ditto.
1422 * linux-tile-low.cc (the_low_target): Ditto.
1423 * linux-xtensa-low.cc (the_low_target): Ditto.
1424
1425 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1426
1427 Remove the 'supports_z_point_type' linux target op and let the
1428 concrete linux target define it by overriding the op declared in
1429 process_stratum_target.
1430
1431 * linux-low.cc (linux_process_target::supports_z_point_type):
1432 Remove.
1433 * linux-low.h (struct linux_target_ops): Remove the op.
1434 (class linux_process_target) <supports_z_point_type>: Remove.
1435 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1436 Declare.
1437 (x86_supports_z_point_type): Turn into...
1438 (x86_target::supports_z_point_type): ...this.
1439 (the_low_target): Remove the op field.
1440 * linux-aarch64-low.cc (class aarch64_target)
1441 <supports_z_point_type>: Declare.
1442 (aarch64_supports_z_point_type): Turn into...
1443 (aarch64_target::supports_z_point_type): ...this.
1444 (the_low_target): Remove the op field.
1445 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1446 Declare.
1447 (arm_supports_z_point_type): Turn into...
1448 (arm_target::supports_z_point_type): ...this.
1449 (the_low_target): Remove the op field.
1450 * linux-crisv32-low.cc (class crisv32_target)
1451 <supports_z_point_type>: Declare.
1452 (cris_supports_z_point_type): Turn into...
1453 (crisv32_target::supports_z_point_type): ...this.
1454 (the_low_target): Remove the op field.
1455 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1456 Declare.
1457 (mips_supports_z_point_type): Turn into...
1458 (mips_target::supports_z_point_type): ...this.
1459 (the_low_target): Remove the op field.
1460 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1461 Declare.
1462 (ppc_supports_z_point_type): Turn into...
1463 (ppc_target::supports_z_point_type): ...this.
1464 (the_low_target): Remove the op field.
1465 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1466 Declare.
1467 (s390_supports_z_point_type): Turn into...
1468 (s390_target::supports_z_point_type): ...this.
1469 (the_low_target): Remove the op field.
1470 * linux-bfin-low.cc (the_low_target): Remove the op field.
1471 * linux-m32r-low.cc (the_low_target): Ditto.
1472 * linux-m68k-low.cc (the_low_target): Ditto.
1473 * linux-sh-low.cc (the_low_target): Ditto.
1474 * linux-sparc-low.cc (the_low_target): Ditto.
1475 * linux-tic6x-low.cc (the_low_target): Ditto.
1476 * linux-tile-low.cc (the_low_target): Ditto.
1477 * linux-xtensa-low.cc (the_low_target): Ditto.
1478
1479 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1480
1481 Turn the 'breakpoint_at' linux target op into a method of
1482 linux_process_target.
1483
1484 * linux-low.h (struct linux_target_ops): Remove the op.
1485 (class linux_process_target) <low_breakpoint_at>: Declare.
1486
1487 Update the callers below:
1488
1489 * linux-low.cc (linux_process_target::save_stop_reason)
1490 (linux_process_target::thread_still_has_status_pending)
1491 (linux_process_target::wait_1)
1492
1493 * linux-x86-low.cc (class x86_target)
1494 <low_breakpoint_at>: Declare.
1495 (x86_breakpoint_at): Turn into...
1496 (x86_target::low_breakpoint_at): ...this.
1497 (the_low_target): Remove the op field.
1498 * linux-aarch64-low.cc (class aarch64_target)
1499 <low_breakpoint_at>: Declare.
1500 (aarch64_breakpoint_at): Turn into...
1501 (aarch64_target::low_breakpoint_at): ...this.
1502 (the_low_target): Remove the op field.
1503 * linux-arm-low.cc (class arm_target)
1504 <low_breakpoint_at>: Declare.
1505 (arm_target::low_breakpoint_at): Define.
1506 (the_low_target): Remove the op field.
1507 * linux-bfin-low.cc (class bfin_target)
1508 <low_breakpoint_at>: Declare.
1509 (bfin_breakpoint_at): Turn into...
1510 (bfin_target::low_breakpoint_at): ...this.
1511 (the_low_target): Remove the op field.
1512 * linux-cris-low.cc (class cris_target)
1513 <low_breakpoint_at>: Declare.
1514 (cris_breakpoint_at): Turn into...
1515 (cris_target::low_breakpoint_at): ...this.
1516 (the_low_target): Remove the op field.
1517 * linux-crisv32-low.cc (class crisv32_target)
1518 <low_breakpoint_at>: Declare.
1519 (crisv32_breakpoint_at): Turn into...
1520 (crisv32_target::low_breakpoint_at): ...this.
1521 (the_low_target): Remove the op field.
1522 * linux-ia64-low.cc (class ia64_target)
1523 <low_breakpoint_at>: Declare.
1524 (ia64_target::low_breakpoint_at): Define.
1525 * linux-m32r-low.cc (class m32r_target)
1526 <low_breakpoint_at>: Declare.
1527 (m32r_breakpoint_at): Turn into...
1528 (m32r_target::low_breakpoint_at): ...this.
1529 (the_low_target): Remove the op field.
1530 * linux-m68k-low.cc (class m68k_target)
1531 <low_breakpoint_at>: Declare.
1532 (m68k_breakpoint_at): Turn into...
1533 (m68k_target::low_breakpoint_at): ...this.
1534 (the_low_target): Remove the op field.
1535 * linux-mips-low.cc (class mips_target)
1536 <low_breakpoint_at>: Declare.
1537 (mips_breakpoint_at): Turn into...
1538 (mips_target::low_breakpoint_at): ...this.
1539 (the_low_target): Remove the op field.
1540 * linux-nios2-low.cc (class nios2_target)
1541 <low_breakpoint_at>: Declare.
1542 (nios2_breakpoint_at): Turn into...
1543 (nios2_target::low_breakpoint_at): ...this.
1544 (the_low_target): Remove the op field.
1545 * linux-ppc-low.cc (class ppc_target)
1546 <low_breakpoint_at>: Declare.
1547 (ppc_breakpoint_at): Turn into...
1548 (ppc_target::low_breakpoint_at): ...this.
1549 (the_low_target): Remove the op field.
1550 * linux-riscv-low.cc (class riscv_target)
1551 <low_breakpoint_at>: Declare.
1552 (riscv_breakpoint_at): Turn into...
1553 (riscv_target::low_breakpoint_at): ...this.
1554 (the_low_target): Remove the op field.
1555 * linux-s390-low.cc (class s390_target)
1556 <low_breakpoint_at>: Declare.
1557 (s390_breakpoint_at): Turn into...
1558 (s390_target::low_breakpoint_at): ...this.
1559 (the_low_target): Remove the op field.
1560 * linux-sh-low.cc (class sh_target)
1561 <low_breakpoint_at>: Declare.
1562 (sh_breakpoint_at): Turn into...
1563 (sh_target::low_breakpoint_at): ...this.
1564 (the_low_target): Remove the op field.
1565 * linux-sparc-low.cc (class sparc_target)
1566 <low_breakpoint_at>: Declare.
1567 (sparc_breakpoint_at): Turn into...
1568 (sparc_target::low_breakpoint_at): ...this.
1569 (the_low_target): Remove the op field.
1570 * linux-tic6x-low.cc (class tic6x_target)
1571 <low_breakpoint_at>: Declare.
1572 (tic6x_breakpoint_at): Turn into...
1573 (tic6x_target::low_breakpoint_at): ...this.
1574 (the_low_target): Remove the op field.
1575 * linux-tile-low.cc (class tile_target)
1576 <low_breakpoint_at>: Declare.
1577 (tile_breakpoint_at): Turn into...
1578 (tile_target::low_breakpoint_at): ...this.
1579 (the_low_target): Remove the op field.
1580 * linux-xtensa-low.cc (class xtensa_target)
1581 <low_breakpoint_at>: Declare.
1582 (xtensa_breakpoint_at): Turn into...
1583 (xtensa_target::low_breakpoint_at): ...this.
1584 (the_low_target): Remove the op field.
1585
1586 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1587
1588 Turn the 'decr_pc_after_break' linux_target_ops field into
1589 a method of linux_process_target.
1590
1591 * linux-low.h (struct linux_target_ops)
1592 <decr_pc_after_break>: Remove.
1593 (class linux_process_target) <low_decr_pc_after_break>: New method
1594 declaration.
1595 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1596 New method implementation.
1597
1598 Update the users below.
1599
1600 (linux_process_target::save_stop_reason)
1601 (linux_process_target::wait_1)
1602 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1603 New declaration.
1604 (x86_target::low_decr_pc_after_break): New method implementation.
1605 (the_low_target): Remove the field.
1606 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1607 New declaration.
1608 (bfin_target::low_decr_pc_after_break): New method implementation.
1609 (the_low_target): Remove the field.
1610 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1611 New declaration.
1612 (m68k_target::low_decr_pc_after_break): New method implementation.
1613 (the_low_target): Remove the field.
1614 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1615 New declaration.
1616 (s390_target::low_decr_pc_after_break): New method implementation.
1617 (the_low_target): Remove the field.
1618 * linux-aarch64-low.cc (the_low_target): Remove the field.
1619 * linux-arm-low.cc (the_low_target): Remove the field.
1620 * linux-cris-low.cc (the_low_target): Remove the field.
1621 * linux-crisv32-low.cc (the_low_target): Remove the field.
1622 * linux-m32r-low.cc (the_low_target): Remove the field.
1623 * linux-mips-low.cc (the_low_target): Remove the field.
1624 * linux-nios2-low.cc (the_low_target): Remove the field.
1625 * linux-ppc-low.cc (the_low_target): Remove the field.
1626 * linux-riscv-low.cc (the_low_target): Remove the field.
1627 * linux-sh-low.cc (the_low_target): Remove the field.
1628 * linux-sparc-low.cc (the_low_target): Remove the field.
1629 * linux-tic6x-low.cc (the_low_target): Remove the field.
1630 * linux-tile-low.cc (the_low_target): Remove the field.
1631 * linux-xtensa-low.cc (the_low_target): Remove the field.
1632
1633 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1634
1635 Remove the 'supports_software_single_step' linux target op and let
1636 the concrete linux target define it by overriding the op in
1637 process_stratum_target.
1638 Turn the 'get_next_pcs' linux target op into a method of
1639 linux_process_target.
1640
1641 * linux-low.h (struct linux_target_ops): Remove the ops.
1642 (class linux_process_target) <supports_software_single_step>:
1643 Remove.
1644 <low_get_next_pcs>: Declare.
1645 * linux-low.cc (can_software_single_step): Remove.
1646 (linux_process_target::low_get_next_pcs): Define.
1647 (linux_process_target::supports_software_single_step): Remove.
1648
1649 Update the callers below.
1650
1651 (linux_process_target::handle_extended_wait)
1652 (linux_process_target::wait_1)
1653 (linux_process_target::install_software_single_step_breakpoints)
1654 (linux_process_target::single_step)
1655 (linux_process_target::thread_needs_step_over)
1656 (linux_process_target::proceed_one_lwp)
1657 (linux_process_target::supports_range_stepping)
1658
1659 * linux-x86-low.cc (the_low_target): Remove the op field.
1660 * linux-aarch64-low.cc (the_low_target): Ditto.
1661 * linux-bfin-low.cc (the_low_target): Ditto.
1662 * linux-cris-low.cc (the_low_target): Ditto.
1663 * linux-crisv32-low.cc (the_low_target): Ditto.
1664 * linux-m32r-low.cc (the_low_target): Ditto.
1665 * linux-m68k-low.cc (the_low_target): Ditto.
1666 * linux-mips-low.cc (the_low_target): Ditto.
1667 * linux-nios2-low.cc (the_low_target): Ditto.
1668 * linux-ppc-low.cc (the_low_target): Ditto.
1669 * linux-riscv-low.cc (the_low_target): Ditto.
1670 * linux-s390-low.cc (the_low_target): Ditto.
1671 * linux-sh-low.cc (the_low_target): Ditto.
1672 * linux-sparc-low.cc (the_low_target): Ditto.
1673 * linux-tic6x-low.cc (the_low_target): Ditto.
1674 * linux-tile-low.cc (the_low_target): Ditto.
1675 * linux-xtensa-low.cc (the_low_target): Ditto.
1676 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1677 <supports_software_single_step>: Declare.
1678 (arm_target::supports_software_single_step): Define.
1679 (arm_gdbserver_get_next_pcs): Turn into...
1680 (arm_target::low_get_next_pcs): ...this.
1681 (the_low_target): Remove the op field.
1682
1683 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1684
1685 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1686 the concrete linux target define it by overriding the op
1687 in process_stratum_target.
1688
1689 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1690 Remove.
1691 * linux-low.h (struct linux_target_ops): Remove the op.
1692 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1693 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1694 Declare.
1695 (x86_sw_breakpoint_from_kind): Turn into...
1696 (x86_target::sw_breakpoint_from_kind): ...this.
1697 (the_low_target): Remove the op field.
1698 * linux-aarch64-low.cc (class aarch64_target)
1699 <sw_breakpoint_from_kind>: Declare.
1700 (aarch64_sw_breakpoint_from_kind): Turn into...
1701 (aarch64_target::sw_breakpoint_from_kind): ...this.
1702 (the_low_target): Remove the op field.
1703 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1704 Declare.
1705 (arm_target::sw_breakpoint_from_kind): Define.
1706 (the_low_target): Remove the op field.
1707 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1708 Declare.
1709 (bfin_sw_breakpoint_from_kind): Turn into...
1710 (bfin_target::sw_breakpoint_from_kind): ...this.
1711 (the_low_target): Remove the op field.
1712 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1713 Declare.
1714 (cris_sw_breakpoint_from_kind): Turn into...
1715 (cris_target::sw_breakpoint_from_kind): ...this.
1716 (the_low_target): Remove the op field.
1717 * linux-crisv32-low.cc (class crisv32_target)
1718 <sw_breakpoint_from_kind>: Declare.
1719 (cris_sw_breakpoint_from_kind): Turn into...
1720 (crisv32_target::sw_breakpoint_from_kind): ...this.
1721 (the_low_target): Remove the op field.
1722 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1723 Declare.
1724 (ia64_target::sw_breakpoint_from_kind): Define.
1725 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1726 Declare.
1727 (m32r_sw_breakpoint_from_kind): Turn into...
1728 (m32r_target::sw_breakpoint_from_kind): ...this.
1729 (the_low_target): Remove the op field.
1730 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1731 Declare.
1732 (m68k_sw_breakpoint_from_kind): Turn into...
1733 (m68k_target::sw_breakpoint_from_kind): ...this.
1734 (the_low_target): Remove the op field.
1735 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1736 Declare.
1737 (mips_sw_breakpoint_from_kind): Turn into...
1738 (mips_target::sw_breakpoint_from_kind): ...this.
1739 (the_low_target): Remove the op field.
1740 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1741 Declare.
1742 (nios2_sw_breakpoint_from_kind): Turn into...
1743 (nios2_target::sw_breakpoint_from_kind): ...this.
1744 (the_low_target): Remove the op field.
1745 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1746 Declare.
1747 (ppc_sw_breakpoint_from_kind): Turn into...
1748 (ppc_target::sw_breakpoint_from_kind): ...this.
1749 (the_low_target): Remove the op field.
1750 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1751 Declare.
1752 (riscv_sw_breakpoint_from_kind): Turn into...
1753 (riscv_target::sw_breakpoint_from_kind): ...this.
1754 (the_low_target): Remove the op field.
1755 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1756 Declare.
1757 (s390_sw_breakpoint_from_kind): Turn into...
1758 (s390_target::sw_breakpoint_from_kind): ...this.
1759 (the_low_target): Remove the op field.
1760 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1761 Declare.
1762 (sh_sw_breakpoint_from_kind): Turn into...
1763 (sh_target::sw_breakpoint_from_kind): ...this.
1764 (the_low_target): Remove the op field.
1765 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1766 Declare.
1767 (sparc_sw_breakpoint_from_kind): Turn into...
1768 (sparc_target::sw_breakpoint_from_kind): ...this.
1769 (the_low_target): Remove the op field.
1770 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1771 Declare.
1772 (tic6x_sw_breakpoint_from_kind): Turn into...
1773 (tic6x_target::sw_breakpoint_from_kind): ...this.
1774 (the_low_target): Remove the op field.
1775 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1776 Declare.
1777 (tile_sw_breakpoint_from_kind): Turn into...
1778 (tile_target::sw_breakpoint_from_kind): ...this.
1779 (the_low_target): Remove the op field.
1780 * linux-xtensa-low.cc (class xtensa_target)
1781 <sw_breakpoint_from_kind>: Declare.
1782 (xtensa_sw_breakpoint_from_kind): Turn into...
1783 (xtensa_target::sw_breakpoint_from_kind): ...this.
1784 (the_low_target): Remove the op field.
1785
1786 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1787
1788 Remove the 'breakpoint_kind_from_pc' and
1789 'breakpoint_kind_from_current_state' linux target ops, and let the
1790 concrete linux target define them by overriding the ops of
1791 process_stratum_target.
1792
1793 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1794 Remove.
1795 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1796 * linux-low.h (struct linux_target_ops): Remove ops.
1797 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1798 <breakpoint_kind_from_current_state>: Remove.
1799 * linux-x86-low.cc (the_low_target): Remove the op fields.
1800 * linux-bfin-low.cc (the_low_target): Ditto.
1801 * linux-cris-low.cc (the_low_target): Ditto.
1802 * linux-crisv32-low.cc (the_low_target): Ditto.
1803 * linux-m32r-low.cc (the_low_target): Ditto.
1804 * linux-m68k-low.cc (the_low_target): Ditto.
1805 * linux-mips-low.cc (the_low_target): Ditto.
1806 * linux-nios2-low.cc (the_low_target): Ditto.
1807 * linux-ppc-low.cc (the_low_target): Ditto.
1808 * linux-s390-low.cc (the_low_target): Ditto.
1809 * linux-sh-low.cc (the_low_target): Ditto.
1810 * linux-sparc-low.cc (the_low_target): Ditto.
1811 * linux-tic6x-low.cc (the_low_target): Ditto.
1812 * linux-tile-low.cc (the_low_target): Ditto.
1813 * linux-xtensa-low.cc (the_low_target): Ditto.
1814 * linux-aarch64-low.cc (class aarch64_target)
1815 <breakpoint_kind_from_pc>
1816 <breakpoint_kind_from_current_state>: Declare.
1817 (aarch64_breakpoint_kind_from_pc): Turn into...
1818 (aarch64_target::breakpoint_kind_from_pc): ...this.
1819 (aarch64_breakpoint_kind_from_current_state): Turn into...
1820 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1821 (the_low_target): Remove the op fields.
1822 * linux-arm-low.cc (class arm_target):
1823 <breakpoint_kind_from_pc>
1824 <breakpoint_kind_from_current_state>: Declare.
1825 (arm_target::breakpoint_kind_from_pc): Define.
1826 (arm_target::breakpoint_kind_from_current_state): Define.
1827 (the_low_target): Remove the op fields.
1828 * linux-riscv-low.cc (class riscv_target):
1829 <breakpoint_kind_from_pc>: Declare.
1830 (riscv_breakpoint_kind_from_pc): Turn into...
1831 (riscv_target::breakpoint_kind_from_pc): ...this.
1832 (the_low_target): Remove the op fields.
1833
1834 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1835
1836 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1837 of linux_process_target.
1838
1839 * linux-low.h (struct linux_target_ops): Remove the ops.
1840 (class linux_process_target) <low_supports_breakpoints>
1841 <low_get_pc>
1842 <low_set_pc>: Declare.
1843 * linux-low.cc (supports_breakpoints): Turn into...
1844 (linux_process_target::low_supports_breakpoints): ...this.
1845 (linux_process_target::low_get_pc): Define.
1846 (linux_process_target::low_set_pc): Define.
1847
1848 Update the callers below.
1849
1850 (linux_process_target::get_pc)
1851 (linux_process_target::save_stop_reason)
1852 (linux_process_target::maybe_move_out_of_jump_pad)
1853 (linux_process_target::wait_1)
1854 (linux_process_target::resume_one_lwp_throw)
1855 (linux_process_target::resume)
1856 (linux_process_target::proceed_all_lwps)
1857 (linux_process_target::read_pc)
1858 (linux_process_target::write_pc)
1859
1860 * linux-x86-low.cc (class linux_process_target)
1861 <low_supports_breakpoints>
1862 <low_get_pc>
1863 <low_set_pc>: Declare.
1864 (x86_target::low_supports_breakpoints): Define.
1865 (x86_get_pc): Turn into...
1866 (x86_target::low_get_pc): ...this.
1867 (x86_set_pc): Turn into...
1868 (x86_target::low_set_pc): ...this.
1869 (the_low_target): Remove the op fields.
1870 * linux-arm-low.cc (class arm_target)
1871 <low_supports_breakpoints>
1872 <low_get_pc>
1873 <low_set_pc>: Declare.
1874 (arm_target::low_supports_breakpoints)
1875 (arm_target::low_get_pc)
1876 (arm_target::low_set_pc): Define.
1877 (the_low_target): Remove the op fields.
1878 * linux-bfin-low.cc (class bfin_target)
1879 <low_supports_breakpoints>
1880 <low_get_pc>
1881 <low_set_pc>: Declare.
1882 (bfin_target::low_supports_breakpoints)
1883 (bfin_target::low_get_pc)
1884 (bfin_target::low_set_pc): Define.
1885 (the_low_target): Remove the op fields.
1886 * linux-cris-low.cc (class cris_target)
1887 <low_supports_breakpoints>
1888 <low_get_pc>
1889 <low_set_pc>: Declare.
1890 (cris_target::low_supports_breakpoints)
1891 (cris_target::low_get_pc)
1892 (cris_target::low_set_pc): Define.
1893 (the_low_target): Remove the op fields.
1894 * linux-crisv32-low.cc (class crisv32_target)
1895 <low_supports_breakpoints>
1896 <low_get_pc>
1897 <low_set_pc>: Declare.
1898 (crisv32_target::low_supports_breakpoints)
1899 (crisv32_target::low_get_pc)
1900 (crisv32_target::low_set_pc): Define.
1901 (the_low_target): Remove the op fields.
1902 * linux-m32r-low.cc (class m32r_target)
1903 <low_supports_breakpoints>
1904 <low_get_pc>
1905 <low_set_pc>: Declare.
1906 (m32r_target::low_supports_breakpoints)
1907 (m32r_target::low_get_pc)
1908 (m32r_target::low_set_pc): Define.
1909 (the_low_target): Remove the op fields.
1910 * linux-m68k-low.cc (class m68k_target)
1911 <low_supports_breakpoints>
1912 <low_get_pc>
1913 <low_set_pc>: Declare.
1914 (m68k_target::low_supports_breakpoints)
1915 (m68k_target::low_get_pc)
1916 (m68k_target::low_set_pc): Define.
1917 (the_low_target): Remove the op fields.
1918 * linux-nios2-low.cc (class nios2_target)
1919 <low_supports_breakpoints>
1920 <low_get_pc>
1921 <low_set_pc>: Declare.
1922 (nios2_target::low_supports_breakpoints)
1923 (nios2_target::low_get_pc)
1924 (nios2_target::low_set_pc): Define.
1925 (the_low_target): Remove the op fields.
1926 * linux-sh-low.cc (class sh_target)
1927 <low_supports_breakpoints>
1928 <low_get_pc>
1929 <low_set_pc>: Declare.
1930 (sh_target::low_supports_breakpoints)
1931 (sh_target::low_get_pc)
1932 (sh_target::low_set_pc): Define.
1933 (the_low_target): Remove the op fields.
1934 * linux-xtensa-low.cc (class xtensa_target)
1935 <low_supports_breakpoints>
1936 <low_get_pc>
1937 <low_set_pc>: Declare.
1938 (xtensa_target::low_supports_breakpoints)
1939 (xtensa_target::low_get_pc)
1940 (xtensa_target::low_set_pc): Define.
1941 (the_low_target): Remove the op fields.
1942 * linux-sparc-low.cc (class sparc_target)
1943 <low_supports_breakpoints>
1944 <low_get_pc>: Declare.
1945 (sparc_target::low_supports_breakpoints)
1946 (sparc_target::low_get_pc): Define.
1947 (the_low_target): Remove the op fields.
1948 * linux-tile-low.cc (class tile_target)
1949 <low_supports_breakpoints>
1950 <low_get_pc>
1951 <low_set_pc>: Declare.
1952 (tile_target::low_supports_breakpoints)
1953 (tile_target::low_get_pc)
1954 (tile_target::low_set_pc): Define.
1955 (the_low_target): Remove the op fields.
1956 * linux-aarch64-low.cc (class aarch64_target)
1957 <low_supports_breakpoints>
1958 <low_get_pc>
1959 <low_set_pc>: Declare.
1960 (aarch64_target::low_supports_breakpoints): Define.
1961 (aarch64_get_pc): Turn into...
1962 (aarch64_target::low_get_pc): ...this.
1963 (aarch64_set_pc): Turn into...
1964 (aarch64_target::low_set_pc): ...this.
1965 (the_low_target): Remove the op fields.
1966 * linux-mips-low.cc (class mips_target)
1967 <low_supports_breakpoints>
1968 <low_get_pc>
1969 <low_set_pc>: Declare.
1970 (mips_target::low_supports_breakpoints): Define.
1971 (mips_get_pc): Turn into...
1972 (mips_target::low_get_pc): ...this.
1973 (mips_set_pc): Turn into...
1974 (mips_target::low_set_pc): ...this.
1975 (the_low_target): Remove the op fields.
1976 * linux-ppc-low.cc (class ppc_target)
1977 <low_supports_breakpoints>
1978 <low_get_pc>
1979 <low_set_pc>: Declare.
1980 (ppc_target::low_supports_breakpoints): Define.
1981 (ppc_get_pc): Turn into...
1982 (ppc_target::low_get_pc): ...this.
1983 (ppc_set_pc): Turn into...
1984 (ppc_target::low_set_pc): ...this.
1985 (the_low_target): Remove the op fields.
1986 * linux-riscv-low.cc (class riscv_target)
1987 <low_supports_breakpoints>
1988 <low_get_pc>
1989 <low_set_pc>: Declare.
1990 (riscv_target::low_supports_breakpoints): Define.
1991 (riscv_get_pc): Turn into...
1992 (riscv_target::low_get_pc): ...this.
1993 (riscv_set_pc): Turn into...
1994 (riscv_target::low_set_pc): ...this.
1995 (the_low_target): Remove the op fields.
1996 * linux-s390-low.cc (class s390_target)
1997 <low_supports_breakpoints>
1998 <low_get_pc>
1999 <low_set_pc>: Declare.
2000 (s390_target::low_supports_breakpoints): Define.
2001 (s390_get_pc): Turn into...
2002 (s390_target::low_get_pc): ...this.
2003 (s390_set_pc): Turn into...
2004 (s390_target::low_set_pc): ...this.
2005 (the_low_target): Remove the op fields.
2006 * linux-tic6x-low.cc (class tic6x_target)
2007 <low_supports_breakpoints>
2008 <low_get_pc>
2009 <low_set_pc>: Declare.
2010 (tic6x_target::low_supports_breakpoints): Define.
2011 (tic6x_get_pc): Turn into...
2012 (tic6x_target::low_get_pc): ...this.
2013 (tic6x_set_pc): Turn into...
2014 (tic6x_target::low_set_pc): ...this.
2015 (the_low_target): Remove the op fields.
2016
2017 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2018
2019 Turn some more static methods in linux-low into private methods
2020 of linux_process_target.
2021
2022 * linux-low.cc (get_pc): Turn into...
2023 (linux_process_target::get_pc): ...this.
2024 (save_stop_reason): Turn into...
2025 (linux_process_target::save_stop_reason): ...this.
2026 (thread_still_has_status_pending_p): Turn into...
2027 (linux_process_target::thread_still_has_status_pending): ...this.
2028 (status_pending_p_callback): Turn into...
2029 (linux_process_target::status_pending_p_callback): ...this.
2030 (resume_stopped_resumed_lwps): Turn into...
2031 (linux_process_target::resume_stopped_resumed_lwps): ...this.
2032 (install_software_single_step_breakpoints): Turn into...
2033 (linux_process_target::install_software_single_step_breakpoints):
2034 ...this.
2035 (single_step): Turn into...
2036 (linux_process_target::single_step): ...this.
2037 (linux_resume_one_lwp_throw): Turn into...
2038 (linux_process_target::resume_one_lwp_throw): ...this.
2039 (linux_resume_one_lwp): Turn into...
2040 (linux_process_target::resume_one_lwp): ...this.
2041 (resume_status_pending_p): Turn into...
2042 (linux_process_target::resume_status_pending): ...this.
2043 (need_step_over_p): Turn into...
2044 (linux_process_target::thread_needs_step_over): ...this.
2045 (linux_resume_one_thread): Turn into...
2046 (linux_process_target::resume_one_thread): ...this.
2047 (proceed_one_lwp): Turn into...
2048 (linux_process_target::proceed_one_lwp): ...this.
2049 (unsuspend_and_proceed_one_lwp): Turn into...
2050 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
2051
2052 Update the calls/references to the above functions below.
2053
2054 (linux_process_target::handle_extended_wait)
2055 (linux_process_target::filter_event)
2056 (linux_process_target::wait_for_event_filtered)
2057 (linux_process_target::wait_1)
2058 (linux_process_target::move_out_of_jump_pad)
2059 (linux_process_target::start_step_over)
2060 (linux_process_target::resume)
2061 (linux_process_target::proceed_all_lwps)
2062 (regsets_store_inferior_registers)
2063 (linux_process_target::store_register)
2064
2065 * linux-low.h (class linux_process_target)
2066 <get_pc>
2067 <save_stop_reason>
2068 <thread_still_has_status_pending>
2069 <status_pending_p_callback>
2070 <resume_stopped_resumed_lwps>
2071 <install_software_single_step_breakpoints>
2072 <single_step>
2073 <resume_one_lwp_throw>
2074 <resume_one_lwp>
2075 <resume_status_pending>
2076 <thread_needs_step_over>
2077 <resume_one_thread>
2078 <proceed_one_lwp>
2079 <unsuspend_and_proceed_one_lwp>: Declare.
2080
2081 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2082
2083 Turn the 'fetch_register' linux target op into a method of
2084 linux_process_target.
2085
2086 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
2087 (class linux_process_target) <low_fetch_register>: Declare.
2088 * linux-x86-low.cc (the_low_target)
2089 * linux-aarch64-low.cc (the_low_target)
2090 * linux-arm-low.cc (the_low_target)
2091 * linux-bfin-low.cc (the_low_target)
2092 * linux-cris-low.cc (the_low_target)
2093 * linux-crisv32-low.cc (the_low_target)
2094 * linux-m32r-low.cc (the_low_target)
2095 * linux-m68k-low.cc (the_low_target)
2096 * linux-nios2-low.cc (the_low_target)
2097 * linux-ppc-low.cc (the_low_target)
2098 * linux-s390-low.cc (the_low_target)
2099 * linux-sh-low.cc (the_low_target)
2100 * linux-sparc-low.cc (the_low_target)
2101 * linux-tic6x-low.cc (the_low_target)
2102 * linux-tile-low.cc (the_low_target)
2103 * linux-xtensa-low.cc (the_low_target): Remove the op field.
2104 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
2105 Declare.
2106 (ia64_fetch_register): Turn into...
2107 (ia64_target::low_fetch_register): ...this.
2108 (the_low_target): Remove the op field.
2109 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
2110 Declare.
2111 (mips_fetch_register): Turn into...
2112 (mips_target::low_fetch_register): ...this.
2113 (the_low_target): Remove the op field.
2114 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
2115 Declare.
2116 (riscv_fetch_register): Turn into...
2117 (riscv_target::low_fetch_register): ...this.
2118 (the_low_target): Remove the op field.
2119
2120 Update the callers below.
2121
2122 * linux-low.cc (linux_process_target::fetch_registers)
2123 (linux_process_target::low_fetch_register)
2124
2125 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2126
2127 Turn the 'cannot_fetch_register' and 'cannot_store_register'
2128 linux target ops into methods of linux_process_target.
2129
2130 * linux-low.h (struct linux_target_ops): Remove the low target ops.
2131 (class linux_process_target) <fetch_register>
2132 <store_register>
2133 <usr_fetch_inferior_registers>
2134 <usr_store_inferior_registers>
2135 <low_cannot_fetch_register>
2136 <low_cannot_fetch_register> Declare.
2137 * linux-low.cc (fetch_register): Turn into...
2138 (linux_process_target::fetch_register): ...this.
2139 (store_register): Turn into ...
2140 (linux_process_target::store_register): ...this.
2141 (usr_fetch_inferior_registers): Turn into...
2142 (linux_process_target::usr_fetch_inferior_registers): ...this.
2143 (usr_store_inferior_registers): Turn into...
2144 (linux_process_target::usr_store_inferior_registers): ...this.
2145 * linux-x86-low.cc (class x86_target)
2146 <low_cannot_fetch_register>
2147 <low_cannot_store_register>: Declare.
2148 (x86_cannot_store_register): Turn into...
2149 (x86_target::low_cannot_store_register): ...this.
2150 (x86_cannot_fetch_register): Turn into...
2151 (x86_target::low_cannot_fetch_register): ...this.
2152 (the_low_target): Remove the target op fields.
2153 * linux-aarch64-low.cc (class aarch64_target)
2154 <low_cannot_fetch_register>
2155 <low_cannot_store_register>: Declare.
2156 (aarch64_target::low_cannot_fetch_register)
2157 (aarch64_target::low_cannot_store_register): Define.
2158 (the_low_target): Remove the op fields.
2159 * linux-arm-low.cc (class arm_target)
2160 <low_cannot_fetch_register>
2161 <low_cannot_store_register>: Declare.
2162 (arm_cannot_fetch_register): Turn into...
2163 (arm_target::low_cannot_fetch_register): ...this.
2164 (arm_cannot_store_register): Turn into...
2165 (arm_target::low_cannot_store_register): ...this.
2166 (the_low_target): Remove the op fields.
2167 * linux-bfin-low.cc (class bfin_target)
2168 <low_cannot_fetch_register>
2169 <low_cannot_store_register>: Declare.
2170 (bfin_cannot_fetch_register): Turn into...
2171 (bfin_target::low_cannot_fetch_register): ...this.
2172 (bfin_cannot_store_register): Turn into...
2173 (bfin_target::low_cannot_store_register): ...this.
2174 (the_low_target): Remove the op fields.
2175 * linux-cris-low.cc (class cris_target)
2176 <low_cannot_fetch_register>
2177 <low_cannot_store_register>: Declare.
2178 (cris_cannot_fetch_register): Turn into...
2179 (cris_target::low_cannot_fetch_register): ...this.
2180 (cris_cannot_store_register): Turn into...
2181 (cris_target::low_cannot_store_register): ...this.
2182 (the_low_target): Remove the op fields.
2183 * linux-crisv32-low.cc (class crisv32_target)
2184 <low_cannot_fetch_register>
2185 <low_cannot_store_register>: Declare.
2186 (crisv32_target::low_cannot_fetch_register)
2187 (crisv32_target::low_cannot_store_register): Define.
2188 (the_low_target): Remove the op fields.
2189 * linux-ia64-low.cc (class ia64_target)
2190 <low_cannot_fetch_register>
2191 <low_cannot_store_register>: Declare.
2192 (ia64_cannot_fetch_register): Turn into...
2193 (ia64_target::low_cannot_fetch_register): ...this.
2194 (ia64_cannot_store_register): Turn into...
2195 (ia64_target::low_cannot_store_register): ...this.
2196 (the_low_target): Remove the op fields.
2197 * linux-m32r-low.cc (class m32r_target)
2198 <low_cannot_fetch_register>
2199 <low_cannot_store_register>: Declare.
2200 (m32r_cannot_fetch_register): Turn into...
2201 (m32r_target::low_cannot_fetch_register): ...this.
2202 (m32r_cannot_store_register): Turn into...
2203 (m32r_target::low_cannot_store_register): ...this.
2204 (the_low_target): Remove the op fields.
2205 * linux-m68k-low.cc (class m68k_target)
2206 <low_cannot_fetch_register>
2207 <low_cannot_store_register>: Declare.
2208 (m68k_cannot_fetch_register): Turn into...
2209 (m68k_target::low_cannot_fetch_register): ...this.
2210 (m68k_cannot_store_register): Turn into...
2211 (m68k_target::low_cannot_store_register): ...this.
2212 (the_low_target): Remove the op fields.
2213 * linux-mips-low.cc (class mips_target)
2214 <low_cannot_fetch_register>
2215 <low_cannot_store_register>: Declare.
2216 (mips_cannot_fetch_register): Turn into...
2217 (mips_target::low_cannot_fetch_register): ...this.
2218 (mips_cannot_store_register): Turn into...
2219 (mips_target::low_cannot_store_register): ...this.
2220 (get_usrregs_info): Inline at the call sites in
2221 low_cannot_fetch_register and low_cannot_store_register,
2222 and remove.
2223 (the_low_target): Remove the op fields.
2224 * linux-nios2-low.cc (class nios2_target)
2225 <low_cannot_fetch_register>
2226 <low_cannot_store_register>: Declare.
2227 (nios2_cannot_fetch_register): Turn into...
2228 (nios2_target::low_cannot_fetch_register): ...this.
2229 (nios2_cannot_store_register): Turn into...
2230 (nios2_target::low_cannot_store_register): ...this.
2231 (the_low_target): Remove the op fields.
2232 * linux-ppc-low.cc (class ppc_target)
2233 <low_cannot_fetch_register>
2234 <low_cannot_store_register>: Declare.
2235 (ppc_cannot_fetch_register): Turn into...
2236 (ppc_target::low_cannot_fetch_register): ...this.
2237 (ppc_cannot_store_register): Turn into...
2238 (ppc_target::low_cannot_store_register): ...this.
2239 (the_low_target): Remove the op fields.
2240 * linux-riscv-low.cc (class riscv_target)
2241 <low_cannot_fetch_register>
2242 <low_cannot_store_register>: Declare.
2243 (riscv_target::low_cannot_fetch_register)
2244 (riscv_target::low_cannot_store_register): Define.
2245 (the_low_target): Remove the op fields.
2246 * linux-s390-low.cc (class s390_target)
2247 <low_cannot_fetch_register>
2248 <low_cannot_store_register>: Declare.
2249 (s390_cannot_fetch_register): Turn into...
2250 (s390_target::low_cannot_fetch_register): ...this.
2251 (s390_cannot_store_register): Turn into...
2252 (s390_target::low_cannot_store_register): ...this.
2253 (the_low_target): Remove the op fields.
2254 * linux-sh-low.cc (class sh_target)
2255 <low_cannot_fetch_register>
2256 <low_cannot_store_register>: Declare.
2257 (sh_cannot_fetch_register): Turn into...
2258 (sh_target::low_cannot_fetch_register): ...this.
2259 (sh_cannot_store_register): Turn into...
2260 (sh_target::low_cannot_store_register): ...this.
2261 (the_low_target): Remove the op fields.
2262 * linux-sparc-low.cc (class sparc_target)
2263 <low_cannot_fetch_register>
2264 <low_cannot_store_register>: Declare.
2265 (sparc_cannot_fetch_register): Turn into...
2266 (sparc_target::low_cannot_fetch_register): ...this.
2267 (sparc_cannot_store_register): Turn into...
2268 (sparc_target::low_cannot_store_register): ...this.
2269 (the_low_target): Remove the op fields.
2270 * linux-tic6x-low.cc (class tic6x_target)
2271 <low_cannot_fetch_register>
2272 <low_cannot_store_register>: Declare.
2273 (tic6x_cannot_fetch_register): Turn into...
2274 (tic6x_target::low_cannot_fetch_register): ...this.
2275 (tic6x_cannot_store_register): Turn into...
2276 (tic6x_target::low_cannot_store_register): ...this.
2277 (the_low_target): Remove the op fields.
2278 * linux-tile-low.cc (class tile_target)
2279 <low_cannot_fetch_register>
2280 <low_cannot_store_register>: Declare.
2281 (tile_cannot_fetch_register): Turn into...
2282 (tile_target::low_cannot_fetch_register): ...this.
2283 (tile_cannot_store_register): Turn into...
2284 (tile_target::low_cannot_store_register): ...this.
2285 (the_low_target): Remove the op fields.
2286 * linux-xtensa-low.cc (class xtensa_target)
2287 <low_cannot_fetch_register>
2288 <low_cannot_store_register>: Declare.
2289 (xtensa_target::low_cannot_fetch_register)
2290 (xtensa_target::low_cannot_store_register): Define.
2291 (the_low_target): Remove the op fields.
2292
2293 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2294
2295 Turn the 'regs_info' linux target op into a method of
2296 linux_process_target.
2297
2298 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2299 (class linux_process_target) <get_regs_info>: Define.
2300
2301 Update the callers below.
2302
2303 * linux-low.cc (linux_process_target::fetch_registers)
2304 (linux_process_target::store_registers)
2305 * proc-service.cc (gregset_info)
2306
2307 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2308 (x86_linux_regs_info): Turn into ...
2309 (x86_target::get_regs_info): ...this.
2310 (the_low_target): Remove the op field.
2311 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2312 Declare.
2313 (aarch64_regs_info): Turn into ...
2314 (aarch64_target::get_regs_info): ...this.
2315 (the_low_target): Remove the op field.
2316 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2317 (arm_regs_info): Turn into ...
2318 (arm_target::get_regs_info): ...this.
2319 (the_low_target): Remove the op field.
2320 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2321 (bfin_regs_info): Turn into ...
2322 (bfin_target::get_regs_info): ...this.
2323 (the_low_target): Remove the op field.
2324 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2325 (cris_regs_info): Turn into ...
2326 (cris_target::get_regs_info): ...this.
2327 (the_low_target): Remove the op field.
2328 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2329 Declare.
2330 (crisv32_regs_info): Turn into ...
2331 (crisv32_target::get_regs_info): ...this.
2332 (the_low_target): Remove the op field.
2333 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2334 (ia64_regs_info): Turn into ...
2335 (ia64_target::get_regs_info): ...this.
2336 (the_low_target): Remove the op field.
2337 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2338 (m32r_regs_info): Turn into ...
2339 (m32r_target::get_regs_info): ...this.
2340 (the_low_target): Remove the op field.
2341 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2342 (m68k_regs_info): Turn into ...
2343 (m68k_target::get_regs_info): ...this.
2344 (the_low_target): Remove the op field.
2345 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2346 (mips_regs_info): Turn into ...
2347 (mips_target::get_regs_info): ...this.
2348 (the_low_target): Remove the op field.
2349 (get_usrregs_info): Update the call to the op.
2350 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2351 (nios2_regs_info): Turn into ...
2352 (nios2_target::get_regs_info): ...this.
2353 (the_low_target): Remove the op field.
2354 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2355 (ppc_regs_info): Turn into ...
2356 (ppc_target::get_regs_info): ...this.
2357 (the_low_target): Remove the op field.
2358 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2359 (riscv_regs_info): Turn into ...
2360 (riscv_target::get_regs_info): ...this.
2361 (the_low_target): Remove the op field.
2362 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2363 (s390_regs_info): Turn into ...
2364 (s390_target::get_regs_info): ...this.
2365 (the_low_target): Remove the op field.
2366 (s390_collect_ptrace_register)
2367 (s390_supply_ptrace_register)
2368 (s390_fill_gregset): Update the call to the op.
2369 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2370 (sh_regs_info): Turn into ...
2371 (sh_target::get_regs_info): ...this.
2372 (the_low_target): Remove the op field.
2373 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2374 (sparc_regs_info): Turn into ...
2375 (sparc_target::get_regs_info): ...this.
2376 (the_low_target): Remove the op field.
2377 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2378 (tic6x_regs_info): Turn into ...
2379 (tic6x_target::get_regs_info): ...this.
2380 (the_low_target): Remove the op field.
2381 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2382 (tile_regs_info): Turn into ...
2383 (tile_target::get_regs_info): ...this.
2384 (the_low_target): Remove the op field.
2385 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2386 Declare.
2387 (xtensa_regs_info): Turn into ...
2388 (xtensa_target::get_regs_info): ...this.
2389 (the_low_target): Remove the op field.
2390
2391 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2392
2393 Turn the 'arch_setup' linux target op into a method of
2394 linux_process_target.
2395
2396 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2397 (class linux_process_target) <arch_setup_thread>
2398 <low_arch_setup>: New declarations.
2399 * linux-low.cc (linux_arch_setup): Delete.
2400 (linux_arch_setup_thread): Turn into...
2401 (linux_process_target::arch_setup_thread): ... this.
2402
2403 Update the callers below.
2404
2405 (linux_process_target::handle_extended_wait)
2406 (linux_process_target::post_create_inferior)
2407 (linux_process_target::filter_event)
2408
2409 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2410 declaration.
2411 (x86_linux_update_xmltarget): Turn into...
2412 (x86_target::update_xmltarget): ...this.
2413 (x86_linux_process_qsupported): Update the call to
2414 x86_linux_update_xmltarget.
2415 (x86_arch_setup): Turn into ...
2416 (x86_target::low_arch_setup): ...this.
2417 (the_low_target): Remove the op field.
2418 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2419 declaration.
2420 (aarch64_arch_setup): Turn into ...
2421 (aarch64_target::low_arch_setup): ...this.
2422 (the_low_target): Remove the op field.
2423 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2424 declaration.
2425 (arm_arch_setup): Turn into ...
2426 (arm_target::low_arch_setup): ...this.
2427 (the_low_target): Remove the op field.
2428 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2429 declaration.
2430 (bfin_arch_setup): Turn into ...
2431 (bfin_target::low_arch_setup): ...this.
2432 (the_low_target): Remove the op field.
2433 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2434 declaration.
2435 (cris_arch_setup): Turn into ...
2436 (cris_target::low_arch_setup): ...this.
2437 (the_low_target): Remove the op field.
2438 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2439 declaration.
2440 (crisv32_arch_setup): Turn into ...
2441 (crisv32_target::low_arch_setup): ...this.
2442 (the_low_target): Remove the op field.
2443 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2444 declaration.
2445 (ia64_arch_setup): Turn into ...
2446 (ia64_target::low_arch_setup): ...this.
2447 (the_low_target): Remove the op field.
2448 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2449 declaration.
2450 (m32r_arch_setup): Turn into ...
2451 (m32r_target::low_arch_setup): ...this.
2452 (the_low_target): Remove the op field.
2453 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2454 declaration.
2455 (m68k_arch_setup): Turn into ...
2456 (m68k_target::low_arch_setup): ...this.
2457 (the_low_target): Remove the op field.
2458 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2459 declaration.
2460 (mips_arch_setup): Turn into ...
2461 (mips_target::low_arch_setup): ...this.
2462 (the_low_target): Remove the op field.
2463 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2464 declaration.
2465 (nios2_arch_setup): Turn into ...
2466 (nios2_target::low_arch_setup): ...this.
2467 (the_low_target): Remove the op field.
2468 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2469 declaration.
2470 (ppc_arch_setup): Turn into ...
2471 (ppc_target::low_arch_setup): ...this.
2472 (the_low_target): Remove the op field.
2473 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2474 declaration.
2475 (riscv_arch_setup): Turn into ...
2476 (riscv_target::low_arch_setup): ...this.
2477 (the_low_target): Remove the op field.
2478 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2479 declaration.
2480 (s390_arch_setup): Turn into ...
2481 (s390_target::low_arch_setup): ...this.
2482 (the_low_target): Remove the op field.
2483 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2484 declaration.
2485 (sh_arch_setup): Turn into ...
2486 (sh_target::low_arch_setup): ...this.
2487 (the_low_target): Remove the op field.
2488 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2489 declaration.
2490 (sparc_arch_setup): Turn into ...
2491 (sparc_target::low_arch_setup): ...this.
2492 (the_low_target): Remove the op field.
2493 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2494 declaration.
2495 (tic6x_arch_setup): Turn into ...
2496 (tic6x_target::low_arch_setup): ...this.
2497 (the_low_target): Remove the op field.
2498 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2499 declaration.
2500 (tile_arch_setup): Turn into ...
2501 (tile_target::low_arch_setup): ...this.
2502 (the_low_target): Remove the op field.
2503 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2504 declaration.
2505 (xtensa_arch_setup): Turn into ...
2506 (xtensa_target::low_arch_setup): ...this.
2507 (the_low_target): Remove the op field.
2508
2509 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2510
2511 * linux-low.h (the_linux_target): New extern declaration.
2512 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2513 'the_target'.
2514 (the_linux_target): Remove.
2515 * linux-x86-low.cc (class x86_target): New class.
2516 (the_x86_target): New static object.
2517 (the_linux_target): Define as pointer to the_x86_target.
2518 * linux-aarch64-low.cc (class aarch64_target): New class.
2519 (the_aarch64_target): New static object.
2520 (the_linux_target): Define as pointer to the_aarch64_target.
2521 * linux-arm-low.cc (class arm_target): New class.
2522 (the_arm_target): New static object.
2523 (the_linux_target): Define as pointer to the_arm_target.
2524 * linux-bfin-low.cc (class bfin_target): New class.
2525 (the_bfin_target): New static object.
2526 (the_linux_target): Define as pointer to the_bfin_target.
2527 * linux-cris-low.cc (class cris_target): New class.
2528 (the_cris_target): New static object.
2529 (the_linux_target): Define as pointer to the_cris_target.
2530 * linux-crisv32-low.cc (class crisv32_target): New class.
2531 (the_crisv32_target): New static object.
2532 (the_linux_target): Define as pointer to the_crisv32_target.
2533 * linux-ia64-low.cc (class ia64_target): New class.
2534 (the_ia64_target): New static object.
2535 (the_linux_target): Define as pointer to the_ia64_target.
2536 * linux-m32r-low.cc (class m32r_target): New class.
2537 (the_m32r_target): New static object.
2538 (the_linux_target): Define as pointer to the_m32r_target.
2539 * linux-m68k-low.cc (class m68k_target): New class.
2540 (the_m68k_target): New static object.
2541 (the_linux_target): Define as pointer to the_m68k_target.
2542 * linux-mips-low.cc (class mips_target): New class.
2543 (the_mips_target): New static object.
2544 (the_linux_target): Define as pointer to the_mips_target.
2545 * linux-nios2-low.cc (class nios2_target): New class.
2546 (the_nios2_target): New static object.
2547 (the_linux_target): Define as pointer to the_nios2_target.
2548 * linux-ppc-low.cc (class ppc_target): New class.
2549 (the_ppc_target): New static object.
2550 (the_linux_target): Define as pointer to the_ppc_target.
2551 * linux-riscv-low.cc (class riscv_target): New class.
2552 (the_riscv_target): New static object.
2553 (the_linux_target): Define as pointer to the_riscv_target.
2554 * linux-s390-low.cc (class s390_target): New class.
2555 (the_s390_target): New static object.
2556 (the_linux_target): Define as pointer to the_s390_target.
2557 * linux-sh-low.cc (class sh_target): New class.
2558 (the_sh_target): New static object.
2559 (the_linux_target): Define as pointer to the_sh_target.
2560 * linux-sparc-low.cc (class sparc_target): New class.
2561 (the_sparc_target): New static object.
2562 (the_linux_target): Define as pointer to the_sparc_target.
2563 * linux-tic6x-low.cc (class tic6x_target): New class.
2564 (the_tic6x_target): New static object.
2565 (the_linux_target): Define as pointer to the_tic6x_target.
2566 * linux-tile-low.cc (class tile_target): New class.
2567 (the_tile_target): New static object.
2568 (the_linux_target): Define as pointer to the_tile_target.
2569 * linux-xtensa-low.cc (class xtensa_target): New class.
2570 (the_xtensa_target): New static object.
2571 (the_linux_target): Define as pointer to the_xtensa_target.
2572
2573 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2574
2575 Turn some static functions in linux-low.cc into private methods of
2576 linux_process_target.
2577
2578 * linux-low.cc (handle_extended_wait): Turn into ...
2579 (linux_process_target::handle_extended_wait): ...this. Call
2580 'mourn' on 'this' object instead of 'the_target'.
2581 (maybe_move_out_of_jump_pad): Turn into...
2582 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2583 (linux_low_filter_event): Turn into...
2584 (linux_process_target::filter_event): ...this.
2585 (linux_wait_for_event_filtered): Turn into...
2586 (linux_process_target::wait_for_event_filtered): ...this.
2587 (linux_wait_for_event): Turn into...
2588 (linux_process_target::wait_for_event): ...this.
2589 (linux_wait_1): Turn into...
2590 (linux_process_target::wait_1): ...this.
2591 (wait_for_sigstop): Turn into...
2592 (linux_process_target::wait_for_sigstop): ...this.
2593 (move_out_of_jump_pad_callback): Turn into...
2594 (linux_process_target::move_out_of_jump_pad): ...this.
2595 (stop_all_lwps): Turn into...
2596 (linux_process_target::stop_all_lwps): ...this.
2597 (start_step_over): Turn into...
2598 (linux_process_target::start_step_over): ...this.
2599 (complete_ongoing_step_over): Turn into...
2600 (linux_process_target::complete_ongoing_step_over): ...this.
2601 (proceed_all_lwps): Turn into...
2602 (linux_process_target::proceed_all_lwps): ...this.
2603 (unstop_all_lwps): Turn into...
2604 (linux_process_target::unstop_all_lwps): ...this.
2605
2606 * linux-low.h (class linux_process_target)
2607 <handle_extended_wait>
2608 <maybe_move_out_of_jump_pad>
2609 filter_event>
2610 <wait_for_event_filtered>
2611 <wait_for_event>
2612 <wait_1>
2613 <wait_for_sigstop>
2614 <move_out_of_jump_pad>
2615 <stop_all_lwps>
2616 <start_step_over>
2617 <complete_ongoing_step_over>
2618 <proceed_all_lwps>
2619 <unstop_all_lwps>: Declare.
2620
2621 Update the callers below.
2622
2623 * linux-low.cc (linux_process_target::attach): Update.
2624 (linux_process_target::stabilize_threads): Ditto.
2625 (linux_process_target::wait): Ditto.
2626
2627 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2628
2629 * linux-low.h (struct linux_target_ops): Update the comment for
2630 'cannot_store_register' to return 0 or 1.
2631 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2632 of 2.
2633
2634 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2635
2636 * config.in: Re-generate.
2637 * configure: Re-generate.
2638
2639 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2640
2641 * regcache.cc (find_register_by_number): Update.
2642 * tdesc.cc (init_target_desc): Likewise.
2643 * tdesc.h (target_desc::reg_defs): Likewise.
2644
2645 2020-03-12 Tom Tromey <tom@tromey.com>
2646
2647 * configure: Rebuild.
2648 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2649 (WIN32APILIBS): New subst.
2650 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2651 gdbsupport files.
2652 (gdbsupport/%.o): Remove target.
2653 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2654 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2655 (WIN32APILIBS): New variable.
2656 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2657 (gdbreplay$(EXEEXT)): Likewise.
2658
2659 2020-03-12 Tom Tromey <tom@tromey.com>
2660
2661 * config.in, configure: Rebuild.
2662 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2663 * acinclude.m4: Include gettext-sister.m4.
2664 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2665 variables.
2666 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2667 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2668
2669 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2670
2671 * acinclude.m4: Update path to selftest.m4.
2672
2673 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2674
2675 * configure.ac: Don't source bfd/development.sh, move
2676 GDB_AC_COMMON higher.
2677 * configure: Re-generate.
2678
2679 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2680
2681 * configure: Re-generate.
2682
2683 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2684
2685 * configure: Re-generate.
2686
2687 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2688
2689 * .dir-locals.el: New file.
2690
2691 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2692
2693 * .gitattributes: New file.
2694
2695 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2696
2697 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2698 reply into an S reply.
2699 * server.cc (disable_packet_T): New global.
2700 (captured_main): Set new global when appropriate.
2701 * server.h (disable_packet_T): Declare.
2702
2703 2020-02-21 Tom Tromey <tom@tromey.com>
2704
2705 * Makefile.in (mostlyclean): New target.
2706
2707 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2708
2709 * target.h (struct process_stratum_target): Remove.
2710 (class process_target): Rename to ...
2711 (class process_stratum_target): ... this.
2712 * linux-low.h (class linux_process_target): Derive from
2713 'process_stratum_target'.
2714 * linux-low.cc (linux_target_ops): Remove.
2715 (initialize_low): Set the_target to the singleton instance of
2716 linux_process_target.
2717 * lynx-low.h (class lynx_process_target): Derive from
2718 'process_stratum_target'.
2719 * lynx-low.cc (lynx_target_ops): Remove.
2720 (initialize_low): Set the_target to the singleton instance of
2721 lynx_process_target.
2722 * nto-low.h (class nto_process_target): Derive from
2723 'process_stratum_target'.
2724 * nto-low.cc (nto_target_ops): Remove.
2725 (initialize_low): Set the_target to the singleton instance of
2726 nto_process_target.
2727 * win32-low.h (class win32_process_target): Derive from
2728 'process_stratum_target'.
2729 * win32-low.cc (win32_target_ops): Remove.
2730 (initialize_low): Set the_target to the singleton instance of
2731 win32_process_target.
2732
2733 Replace 'the_target->pt' with 'the_target' in the uses below.
2734
2735 * hostio.cc (hostio_error)
2736 (handle_setfs)
2737 (handle_open)
2738 (handle_unlink)
2739 (handle_readlink)
2740 * linux-aarch32-low.cc (arm_breakpoint_at)
2741 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2742 * linux-arm-low.cc (arm_sigreturn_next_pc)
2743 (arm_get_hwcap)
2744 (arm_get_syscall_trapinfo)
2745 * linux-cris-low.cc (cris_breakpoint_at)
2746 * linux-crisv32-low.cc (cris_breakpoint_at)
2747 * linux-low.cc (handle_extended_wait)
2748 (linux_wait_1)
2749 (linux_read_memory)
2750 (linux_process_target::breakpoint_kind_from_pc)
2751 (linux_get_auxv)
2752 * linux-m32r-low.cc (m32r_breakpoint_at)
2753 * linux-mips-low.cc (mips_breakpoint_at)
2754 * linux-nios2-low.cc (nios2_breakpoint_at)
2755 * linux-ppc-low.cc (ppc_breakpoint_at)
2756 * linux-s390-low.cc (s390_get_hwcap)
2757 * linux-sh-low.cc (sh_breakpoint_at)
2758 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2759 (sparc_store_gregset_from_stack)
2760 (sparc_breakpoint_at)
2761 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2762 * linux-tile-low.cc (tile_breakpoint_at)
2763 * linux-x86-low.cc (x86_breakpoint_at)
2764 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2765 * mem-break.cc (bp_size)
2766 (bp_opcode)
2767 (insert_memory_breakpoint)
2768 (set_raw_breakpoint_at)
2769 (delete_raw_breakpoint)
2770 (z_type_supported)
2771 (uninsert_raw_breakpoint)
2772 (reinsert_raw_breakpoint)
2773 (validate_inserted_breakpoint)
2774 * regcache.cc (regcache_read_pc)
2775 (regcache_write_pc)
2776 * remote-utils.cc (putpkt_binary_1)
2777 (input_interrupt)
2778 (getpkt)
2779 (prepare_resume_reply)
2780 * server.cc (handle_general_set)
2781 (handle_detach)
2782 (handle_qxfer_auxv)
2783 (handle_qxfer_exec_file)
2784 (handle_qxfer_libraries_svr4)
2785 (handle_qxfer_osdata)
2786 (handle_qxfer_siginfo)
2787 (handle_qxfer_fdpic)
2788 (handle_query)
2789 (resume)
2790 (handle_v_requests)
2791 (queue_stop_reply_callback)
2792 (captured_main)
2793 * target.cc (prepare_to_access_memory)
2794 (done_accessing_memory)
2795 (read_inferior_memory)
2796 (target_write_memory)
2797 (target_stop_and_wait)
2798 (target_wait)
2799 (target_mourn_inferior)
2800 (target_continue_no_signal)
2801 (target_continue)
2802 (target_supports_multi_process)
2803 (kill_inferior)
2804 * target.h
2805 (target_create_inferior)
2806 (target_post_create_inferior)
2807 (myattach)
2808 (target_supports_fork_events)
2809 (target_supports_vfork_events)
2810 (target_supports_exec_events)
2811 (target_handle_new_gdb_connection)
2812 (detach_inferior)
2813 (mythread_alive)
2814 (fetch_inferior_registers)
2815 (store_inferior_registers)
2816 (join_inferior)
2817 (target_supports_non_stop)
2818 (target_async)
2819 (target_process_qsupported)
2820 (target_supports_catch_syscall)
2821 (target_get_ipa_tdesc_idx)
2822 (target_supports_tracepoints)
2823 (target_supports_fast_tracepoints)
2824 (target_get_min_fast_tracepoint_insn_len)
2825 (target_thread_stopped)
2826 (target_pause_all)
2827 (target_unpause_all)
2828 (target_stabilize_threads)
2829 (target_install_fast_tracepoint_jump_pad)
2830 (target_emit_ops)
2831 (target_supports_disable_randomization)
2832 (target_supports_agent)
2833 (target_enable_btrace)
2834 (target_disable_btrace)
2835 (target_read_btrace)
2836 (target_read_btrace_conf)
2837 (target_supports_range_stepping)
2838 (target_supports_stopped_by_sw_breakpoint)
2839 (target_stopped_by_sw_breakpoint)
2840 (target_supports_stopped_by_hw_breakpoint)
2841 (target_supports_hardware_single_step)
2842 (target_stopped_by_hw_breakpoint)
2843 (target_breakpoint_kind_from_pc)
2844 (target_breakpoint_kind_from_current_state)
2845 (target_supports_software_single_step)
2846 (target_core_of_thread)
2847 (target_thread_name)
2848 (target_thread_handle)
2849 * win32-low.cc (do_initial_child_stuff)
2850
2851 Rename target op default definitions listed below.
2852
2853 * target.cc (process_target::post_create_inferior): Rename as ...
2854 (process_stratum_target::post_create_inferior): ... this.
2855 (process_target::prepare_to_access_memory): Rename as ...
2856 (process_stratum_target::prepare_to_access_memory): ... this.
2857 (process_target::done_accessing_memory): Rename as ...
2858 (process_stratum_target::done_accessing_memory): ... this.
2859 (process_target::look_up_symbols): Rename as ...
2860 (process_stratum_target::look_up_symbols): ... this.
2861 (process_target::supports_read_auxv): Rename as ...
2862 (process_stratum_target::supports_read_auxv): ... this.
2863 (process_target::read_auxv): Rename as ...
2864 (process_stratum_target::read_auxv): ... this.
2865 (process_target::supports_z_point_type): Rename as ...
2866 (process_stratum_target::supports_z_point_type): ... this.
2867 (process_target::insert_point): Rename as ...
2868 (process_stratum_target::insert_point): ... this.
2869 (process_target::remove_point): Rename as ...
2870 (process_stratum_target::remove_point): ... this.
2871 (process_target::stopped_by_sw_breakpoint): Rename as ...
2872 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2873 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2874 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2875 (process_target::stopped_by_hw_breakpoint): Rename as ...
2876 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2877 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2878 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2879 (process_target::supports_hardware_single_step): Rename as ...
2880 (process_stratum_target::supports_hardware_single_step): ... this.
2881 (process_target::stopped_by_watchpoint): Rename as ...
2882 (process_stratum_target::stopped_by_watchpoint): ... this.
2883 (process_target::stopped_data_address): Rename as ...
2884 (process_stratum_target::stopped_data_address): ... this.
2885 (process_target::supports_read_offsets): Rename as ...
2886 (process_stratum_target::supports_read_offsets): ... this.
2887 (process_target::read_offsets): Rename as ...
2888 (process_stratum_target::read_offsets): ... this.
2889 (process_target::supports_get_tls_address): Rename as ...
2890 (process_stratum_target::supports_get_tls_address): ... this.
2891 (process_target::get_tls_address): Rename as ...
2892 (process_stratum_target::get_tls_address): ... this.
2893 (process_target::hostio_last_error): Rename as ...
2894 (process_stratum_target::hostio_last_error): ... this.
2895 (process_target::supports_qxfer_osdata): Rename as ...
2896 (process_stratum_target::supports_qxfer_osdata): ... this.
2897 (process_target::qxfer_osdata): Rename as ...
2898 (process_stratum_target::qxfer_osdata): ... this.
2899 (process_target::supports_qxfer_siginfo): Rename as ...
2900 (process_stratum_target::supports_qxfer_siginfo): ... this.
2901 (process_target::qxfer_siginfo): Rename as ...
2902 (process_stratum_target::qxfer_siginfo): ... this.
2903 (process_target::supports_non_stop): Rename as ...
2904 (process_stratum_target::supports_non_stop): ... this.
2905 (process_target::async): Rename as ...
2906 (process_stratum_target::async): ... this.
2907 (process_target::start_non_stop): Rename as ...
2908 (process_stratum_target::start_non_stop): ... this.
2909 (process_target::supports_multi_process): Rename as ...
2910 (process_stratum_target::supports_multi_process): ... this.
2911 (process_target::supports_fork_events): Rename as ...
2912 (process_stratum_target::supports_fork_events): ... this.
2913 (process_target::supports_vfork_events): Rename as ...
2914 (process_stratum_target::supports_vfork_events): ... this.
2915 (process_target::supports_exec_events): Rename as ...
2916 (process_stratum_target::supports_exec_events): ... this.
2917 (process_target::handle_new_gdb_connection): Rename as ...
2918 (process_stratum_target::handle_new_gdb_connection): ... this.
2919 (process_target::handle_monitor_command): Rename as ...
2920 (process_stratum_target::handle_monitor_command): ... this.
2921 (process_target::core_of_thread): Rename as ...
2922 (process_stratum_target::core_of_thread): ... this.
2923 (process_target::supports_read_loadmap): Rename as ...
2924 (process_stratum_target::supports_read_loadmap): ... this.
2925 (process_target::read_loadmap): Rename as ...
2926 (process_stratum_target::read_loadmap): ... this.
2927 (process_target::process_qsupported): Rename as ...
2928 (process_stratum_target::process_qsupported): ... this.
2929 (process_target::supports_tracepoints): Rename as ...
2930 (process_stratum_target::supports_tracepoints): ... this.
2931 (process_target::read_pc): Rename as ...
2932 (process_stratum_target::read_pc): ... this.
2933 (process_target::write_pc): Rename as ...
2934 (process_stratum_target::write_pc): ... this.
2935 (process_target::supports_thread_stopped): Rename as ...
2936 (process_stratum_target::supports_thread_stopped): ... this.
2937 (process_target::thread_stopped): Rename as ...
2938 (process_stratum_target::thread_stopped): ... this.
2939 (process_target::supports_get_tib_address): Rename as ...
2940 (process_stratum_target::supports_get_tib_address): ... this.
2941 (process_target::get_tib_address): Rename as ...
2942 (process_stratum_target::get_tib_address): ... this.
2943 (process_target::pause_all): Rename as ...
2944 (process_stratum_target::pause_all): ... this.
2945 (process_target::unpause_all): Rename as ...
2946 (process_stratum_target::unpause_all): ... this.
2947 (process_target::stabilize_threads): Rename as ...
2948 (process_stratum_target::stabilize_threads): ... this.
2949 (process_target::supports_fast_tracepoints): Rename as ...
2950 (process_stratum_target::supports_fast_tracepoints): ... this.
2951 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2952 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2953 (process_target::emit_ops): Rename as ...
2954 (process_stratum_target::emit_ops): ... this.
2955 (process_target::supports_disable_randomization): Rename as ...
2956 (process_stratum_target::supports_disable_randomization): ... this.
2957 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2958 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2959 (process_target::qxfer_libraries_svr4): Rename as ...
2960 (process_stratum_target::qxfer_libraries_svr4): ... this.
2961 (process_target::supports_agent): Rename as ...
2962 (process_stratum_target::supports_agent): ... this.
2963 (process_target::enable_btrace): Rename as ...
2964 (process_stratum_target::enable_btrace): ... this.
2965 (process_target::disable_btrace): Rename as ...
2966 (process_stratum_target::disable_btrace): ... this.
2967 (process_target::read_btrace): Rename as ...
2968 (process_stratum_target::read_btrace): ... this.
2969 (process_target::read_btrace_conf): Rename as ...
2970 (process_stratum_target::read_btrace_conf): ... this.
2971 (process_target::supports_range_stepping): Rename as ...
2972 (process_stratum_target::supports_range_stepping): ... this.
2973 (process_target::supports_pid_to_exec_file): Rename as ...
2974 (process_stratum_target::supports_pid_to_exec_file): ... this.
2975 (process_target::pid_to_exec_file): Rename as ...
2976 (process_stratum_target::pid_to_exec_file): ... this.
2977 (process_target::supports_multifs): Rename as ...
2978 (process_stratum_target::supports_multifs): ... this.
2979 (process_target::multifs_open): Rename as ...
2980 (process_stratum_target::multifs_open): ... this.
2981 (process_target::multifs_unlink): Rename as ...
2982 (process_stratum_target::multifs_unlink): ... this.
2983 (process_target::multifs_readlink): Rename as ...
2984 (process_stratum_target::multifs_readlink): ... this.
2985 (process_target::breakpoint_kind_from_pc): Rename as ...
2986 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2987 (process_target::breakpoint_kind_from_current_state): Rename as ...
2988 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2989 (process_target::thread_name): Rename as ...
2990 (process_stratum_target::thread_name): ... this.
2991 (process_target::thread_handle): Rename as ...
2992 (process_stratum_target::thread_handle): ... this.
2993 (process_target::supports_software_single_step): Rename as ...
2994 (process_stratum_target::supports_software_single_step): ... this.
2995 (process_target::supports_catch_syscall): Rename as ...
2996 (process_stratum_target::supports_catch_syscall): ... this.
2997 (process_target::get_ipa_tdesc_idx): Rename as ...
2998 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2999
3000 2020-02-20 Pedro Alves <palves@redhat.com>
3001
3002 * target.cc (set_target_ops): Simply copy the given target pointer
3003 instead of creating a copy of the pointed object.
3004
3005 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3006
3007 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
3008 of process_target.
3009
3010 * target.h (struct process_stratum_target): Remove the target op.
3011 (class process_target): Add the target op.
3012 (target_get_ipa_tdesc_idx): Update the macro.
3013 * target.cc (process_target::get_ipa_tdesc_idx): Define.
3014
3015 Update the derived classes and callers below.
3016
3017 * linux-low.cc (linux_target_ops): Update.
3018 (linux_get_ipa_tdesc_idx): Turn into ...
3019 (linux_process_target::get_ipa_tdesc_idx): ... this.
3020 * linux-low.h (class linux_process_target): Update.
3021 * lynx-low.cc (lynx_target_ops): Update.
3022 * nto-low.cc (nto_target_ops): Update.
3023 * win32-low.cc (win32_target_ops): Update.
3024
3025 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3026
3027 Turn process_stratum_target's supports_catch_syscall op into a
3028 method of process_target.
3029
3030 * target.h (struct process_stratum_target): Remove the target op.
3031 (class process_target): Add the target op.
3032 (target_supports_catch_syscall): Update the macro.
3033 * target.cc (process_target::supports_catch_syscall): Define.
3034
3035 Update the derived classes and callers below.
3036
3037 * linux-low.cc (linux_target_ops): Update.
3038 (linux_supports_catch_syscall): Turn into ...
3039 (linux_process_target::supports_catch_syscall): ... this.
3040 * linux-low.h (class linux_process_target): Update.
3041 * lynx-low.cc (lynx_target_ops): Update.
3042 * nto-low.cc (nto_target_ops): Update.
3043 * win32-low.cc (win32_target_ops): Update.
3044
3045 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3046
3047 Turn process_stratum_target's supports_software_single_step op
3048 into a method of process_target.
3049
3050 * target.h (struct process_stratum_target): Remove the target op.
3051 (class process_target): Add the target op.
3052 (target_supports_software_single_step): Update the macro.
3053 * target.cc (process_target::supports_software_single_step): Define.
3054
3055 Update the derived classes and callers below.
3056
3057 * linux-low.cc (linux_target_ops): Update.
3058 (linux_supports_software_single_step): Turn into ...
3059 (linux_process_target::supports_software_single_step): ... this.
3060 * linux-low.h (class linux_process_target): Update.
3061 * lynx-low.cc (lynx_target_ops): Update.
3062 * nto-low.cc (nto_target_ops): Update.
3063 * win32-low.cc (win32_target_ops): Update.
3064
3065 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3066
3067 Turn process_stratum_target's thread_name and thread_handle ops
3068 into methods of process_target.
3069
3070 * target.h (struct process_stratum_target): Remove the target ops.
3071 (class process_target): Add the target ops.
3072 (target_thread_name): Update the macro.
3073 (target_thread_handle): Update the macro.
3074 * target.cc (process_target::thread_name): Define.
3075 (process_target::thread_handle): Define.
3076
3077 Update the derived classes and callers below.
3078
3079 * linux-low.cc (linux_target_ops): Update.
3080 (linux_process_target::thread_name): Define.
3081 (linux_process_target::thread_handle): Define.
3082 * linux-low.h (class linux_process_target): Update.
3083 * lynx-low.cc (lynx_target_ops): Update.
3084 * nto-low.cc (nto_target_ops): Update.
3085 * win32-low.cc (win32_target_ops): Update.
3086
3087 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3088
3089 Turn process_stratum_target's breakpoint_kind_from_pc,
3090 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
3091 ops into methods of process_target.
3092
3093 * target.h (struct process_stratum_target): Remove the target op.
3094 (class process_target): Add the target op.
3095 (target_breakpoint_kind_from_pc): Update the macro.
3096 (target_breakpoint_kind_from_current_state): Update the macro.
3097 (default_breakpoint_kind_from_pc): Remove declaration.
3098 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
3099 (process_target::breakpoint_kind_from_pc): ... this.
3100 (process_target::breakpoint_kind_from_current_state): Define.
3101
3102 Update the derived classes and callers below.
3103
3104 * mem-break.cc (bp_size): Update.
3105 (bp_opcode): Update.
3106 * linux-low.cc (linux_target_ops): Update.
3107 (linux_wait_1): Update.
3108 (linux_breakpoint_kind_from_pc): Turn into ...
3109 (linux_process_target::breakpoint_kind_from_pc): ... this.
3110 (linux_sw_breakpoint_from_kind): Turn into ...
3111 (linux_process_target::sw_breakpoint_from_kind): ... this.
3112 (linux_breakpoint_kind_from_current_state): Turn into ...
3113 (linux_process_target::breakpoint_kind_from_current_state): ... this.
3114 * linux-low.h (class linux_process_target): Update.
3115 * lynx-low.cc (lynx_target_ops): Update.
3116 (lynx_process_target::sw_breakpoint_from_kind): Define.
3117 * lynx-low.h (class lynx_process_target): Update.
3118 * nto-low.cc (nto_target_ops): Update.
3119 (nto_sw_breakpoint_from_kind): Turn into ...
3120 (nto_process_target::sw_breakpoint_from_kind): ... this.
3121 * nto-low.h (class nto_process_target): Update.
3122 * win32-low.cc (win32_target_ops): Update.
3123 (win32_sw_breakpoint_from_kind): Turn into ...
3124 (win32_process_target::sw_breakpoint_from_kind): ... this.
3125 * win32-low.h (class win32_process_target): Update.
3126
3127 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3128
3129 Turn process_stratum_target's multifs_open, multifs_readlink,
3130 multifs_unlink ops into methods of process_target.
3131
3132 * target.h (struct process_stratum_target): Remove the target ops.
3133 (class process_target): Add the target ops. Also add
3134 'supports_multifs'.
3135 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
3136 "sys/stat.h".
3137 (process_target::supports_multifs): Define.
3138 (process_target::multifs_open): Define.
3139 (process_target::multifs_readlink): Define.
3140 (process_target::multifs_unlink): Define.
3141
3142 Update the derived classes and callers below.
3143
3144 * hostio.cc (handle_setfs): Update.
3145 (handle_open): Update.
3146 (handle_unlink): Update.
3147 (handle_readlink): Update.
3148 * linux-low.cc (linux_target_ops): Update.
3149 (linux_process_target::supports_multifs): Define.
3150 (linux_process_target::multifs_open): Define.
3151 (linux_process_target::multifs_readlink): Define.
3152 (linux_process_target::multifs_unlink): Define.
3153 * linux-low.h (class linux_process_target): Update.
3154 * lynx-low.cc (lynx_target_ops): Update.
3155 * nto-low.cc (nto_target_ops): Update.
3156 * win32-low.cc (win32_target_ops): Update.
3157
3158 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3159
3160 Turn process_stratum_target's pid_to_exec_file op into a method
3161 of process_target.
3162
3163 * target.h (struct process_stratum_target): Remove the target op.
3164 (class process_target): Add the target op. Also add
3165 'supports_pid_to_exec_file'.
3166 * target.cc (process_target::pid_to_exec_file): Define.
3167 (process_target::supports_pid_to_exec_file): Define.
3168
3169 Update the derived classes and callers below.
3170
3171 * server.cc (handle_qxfer_exec_file): Update.
3172 (handle_query): Update.
3173 * linux-low.cc (linux_target_ops): Update.
3174 (linux_process_target::supports_pid_to_exec_file): Define.
3175 (linux_process_target::pid_to_exec_file): Define.
3176 * linux-low.h (class linux_process_target): Update.
3177 * lynx-low.cc (lynx_target_ops): Update.
3178 * nto-low.cc (nto_target_ops): Update.
3179 * win32-low.cc (win32_target_ops): Update.
3180
3181 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3182
3183 Turn process_stratum_target's supports_range_stepping op into a
3184 method of process_target.
3185
3186 * target.h (struct process_stratum_target): Remove the target op.
3187 (class process_target): Add the target op.
3188 (target_supports_range_stepping): Update the macro.
3189 * target.cc (process_target::supports_range_stepping): Define.
3190
3191 Update the derived classes and callers below.
3192
3193 * linux-low.cc (linux_target_ops): Update.
3194 (linux_supports_range_stepping): Turn into ...
3195 (linux_process_target::supports_range_stepping): ... this.
3196 * linux-low.h (class linux_process_target): Update.
3197 * lynx-low.cc (lynx_target_ops): Update.
3198 * nto-low.cc (nto_target_ops): Update.
3199 * win32-low.cc (win32_target_ops): Update.
3200
3201 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3202
3203 Turn process_stratum_target's btrace-related ops (enable_btrace,
3204 disable_btrace, read_btrace, read_btrace_conf) into methods of
3205 process_target.
3206
3207 * target.h (struct process_stratum_target): Remove the target ops.
3208 (class process_target): Add the target ops.
3209 (target_enable_btrace): Update.
3210 (target_disable_btrace): Update.
3211 (target_read_btrace): Update.
3212 (target_read_btrace_conf): Update.
3213 * target.cc (process_target::enable_btrace): Define.
3214 (process_target::disable_btrace): Define.
3215 (process_target::read_btrace): Define.
3216 (process_target::read_btrace_conf): Define.
3217
3218 Update the derived classes and callers below.
3219
3220 * linux-low.cc (linux_target_ops): Update.
3221 (linux_process_target:enable_btrace): Define as a wrapper around
3222 linux_enable_btrace.
3223 (linux_low_disable_btrace): Turn into ...
3224 (linux_process_target::disable_btrace): ... this.
3225 (linux_low_read_btrace): Turn into ...
3226 (linux_process_target::read_btrace): ... this.
3227 (linux_low_btrace_conf): Turn into ...
3228 (linux_process_target::read_btrace_conf): ... this.
3229 * linux-low.h (class linux_process_target): Update.
3230 * lynx-low.cc (lynx_target_ops): Update.
3231 * nto-low.cc (nto_target_ops): Update.
3232 * win32-low.cc (win32_target_ops): Update.
3233
3234 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3235
3236 Turn process_stratum_target's supports_agent op into a method of
3237 process_target.
3238
3239 * target.h (struct process_stratum_target): Remove the target op.
3240 (class process_target): Add the target op.
3241 (target_supports_agent): Update the macro.
3242 * target.cc (process_target::supports_agent): Define.
3243
3244 Update the derived classes and callers below.
3245
3246 * linux-low.cc (linux_target_ops): Update.
3247 (linux_supports_agent): Turn into ...
3248 (linux_process_target::supports_agent): ... this.
3249 * linux-low.h (class linux_process_target): Update.
3250 * lynx-low.cc (lynx_target_ops): Update.
3251 * nto-low.cc (nto_target_ops): Update.
3252 * win32-low.cc (win32_target_ops): Update.
3253
3254 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3255
3256 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3257 method of process_target.
3258
3259 * target.h (struct process_stratum_target): Remove the target op.
3260 (class process_target): Add the target op. Also add
3261 'supports_qxfer_libraries_svr4'.
3262 * target.cc (process_target::qxfer_libraries_svr4): Define.
3263 (process_target::supports_qxfer_libraries_svr4): Define.
3264
3265 Update the derived classes and callers below.
3266
3267 * server.cc (handle_qxfer_libraries_svr4): Update.
3268 (handle_query): Update.
3269 * linux-low.cc (linux_target_ops): Update.
3270 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3271 (linux_qxfer_libraries_svr4): Turn into ...
3272 (linux_process_target::qxfer_libraries_svr4): ... this.
3273 * linux-low.h (class linux_process_target): Update.
3274 * lynx-low.cc (lynx_target_ops): Update.
3275 * nto-low.cc (nto_target_ops): Update.
3276 * win32-low.cc (win32_target_ops): Update.
3277
3278 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3279
3280 Turn process_stratum_target's supports_disable_randomization op
3281 into a method of process_target.
3282
3283 * target.h (struct process_stratum_target): Remove the target op.
3284 (class process_target): Add the target op.
3285 (target_supports_disable_randomization): Update the macro.
3286 * target.cc (process_target::supports_disable_randomization): Define.
3287
3288 Update the derived classes and callers below.
3289
3290 * linux-low.cc (linux_target_ops): Update.
3291 (linux_supports_disable_randomization): Turn into ...
3292 (linux_process_target::supports_disable_randomization): ... this.
3293 * linux-low.h (class linux_process_target): Update.
3294 * lynx-low.cc (lynx_target_ops): Update.
3295 * nto-low.cc (nto_target_ops): Update.
3296 * win32-low.cc (win32_target_ops): Update.
3297
3298 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3299
3300 Turn process_stratum_target's emit_ops op into a method of
3301 process_target.
3302
3303 * target.h (struct process_stratum_target): Remove the target op.
3304 (class process_target): Add the target op.
3305 (target_emit_ops): Update the macro.
3306 * target.cc (process_target::emit_ops): Define.
3307
3308 Update the derived classes and callers below.
3309
3310 * linux-low.cc (linux_target_ops): Update.
3311 (linux_emit_ops): Turn into ...
3312 (linux_process_target::emit_ops): ... this.
3313 * linux-low.h (class linux_process_target): Update.
3314 * lynx-low.cc (lynx_target_ops): Update.
3315 * nto-low.cc (nto_target_ops): Update.
3316 * win32-low.cc (win32_target_ops): Update.
3317
3318 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3319
3320 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3321 and get_min_fast_tracepoint_insn_len ops into methods of
3322 process_target.
3323
3324 * target.h (struct process_stratum_target): Remove the target ops.
3325 (class process_target): Add the target ops. Also add
3326 'supports_fast_tracepoints'.
3327 (target_supports_fast_tracepoints): Update the macro.
3328 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3329 (install_fast_tracepoint_jump_pad): Update and rename the macro
3330 to ...
3331 (target_install_fast_tracepoint_jump_pad): ... this.
3332 * target.cc (process_target::supports_fast_tracepoints): Define.
3333 (process_target::install_fast_tracepoint_jump_pad): Define.
3334 (process_target::get_min_fast_tracepoint_insn_len): Define.
3335
3336 Update the derived classes and callers below.
3337
3338 * tracepoint.cc (install_fast_tracepoint): Update.
3339 * linux-low.cc (linux_target_ops): Update.
3340 (linux_process_target::supports_fast_tracepoints): Define.
3341 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3342 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3343 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3344 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3345 * linux-low.h (class linux_process_target): Update.
3346 * lynx-low.cc (lynx_target_ops): Update.
3347 * nto-low.cc (nto_target_ops): Update.
3348 * win32-low.cc (win32_target_ops): Update.
3349
3350 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3351
3352 Turn process_stratum_target's stabilize_threads op into a
3353 method of process_target.
3354
3355 * target.h (struct process_stratum_target): Remove the target op.
3356 (class process_target): Add the target op.
3357 (target_stabilize_threads): Update the macro.
3358 * target.cc (process_target::stabilize_threads): Define.
3359
3360 Update the derived classes and callers below.
3361
3362 * server.cc (handle_status): Update.
3363 * tracepoint.cc (cmd_qtdp): Update.
3364 (cmd_qtstart): Update.
3365 * linux-low.cc (linux_target_ops): Update.
3366 (linux_stabilize_threads): Turn into ...
3367 (linux_process_target::stabilize_threads): ... this.
3368 (linux_wait_1): Update.
3369 * linux-low.h (class linux_process_target): Update.
3370 * lynx-low.cc (lynx_target_ops): Update.
3371 * nto-low.cc (nto_target_ops): Update.
3372 * win32-low.cc (win32_target_ops): Update.
3373
3374 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3375
3376 Turn process_stratum_target's pause_all and unpause_all ops
3377 into methods of process_target.
3378
3379 * target.h (struct process_stratum_target): Remove the target ops.
3380 (class process_target): Add the target ops.
3381 (pause_all): Update the macro and rename to...
3382 (target_pause_all): ... this.
3383 (unpause_all): Update the macro and rename to...
3384 (target_unpause_all): ... this.
3385 * target.cc (process_target::pause_all): Define.
3386 (process_target::unpause_all): Define.
3387
3388 Update the derived classes and callers below.
3389
3390 * server.cc (handle_status): Update.
3391 * tracepoint.cc (clear_installed_tracepoints): Update.
3392 (cmd_qtdp): Update.
3393 (cmd_qtstart): Update.
3394 (stop_tracing): Update.
3395 (cmd_qtstatus): Update.
3396 (upload_fast_traceframes): Update.
3397 (run_inferior_command): Update.
3398 * linux-low.cc (linux_target_ops): Update.
3399 (linux_pause_all): Turn into ...
3400 (linux_process_target::pause_all): ... this.
3401 (linux_unpause_all): Turn into ...
3402 (linux_process_target::unpause_all): ... this.
3403 (linux_process_target::prepare_to_access_memory): Update.
3404 (linux_process_target::done_accessing_memory): Update.
3405 * linux-low.h (class linux_process_target): Update.
3406 * lynx-low.cc (lynx_target_ops): Update.
3407 * nto-low.cc (nto_target_ops): Update.
3408 * win32-low.cc (win32_target_ops): Update.
3409
3410 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3411
3412 Turn process_stratum_target's get_tib_address op into a method of
3413 process_target.
3414
3415 * target.h (struct process_stratum_target): Remove the target op.
3416 (class process_target): Add the target op. Also add
3417 'supports_get_tib_address'.
3418 * target.cc (process_target::get_tib_address): Define.
3419 (process_target::supports_get_tib_address): Define.
3420
3421 Update the derived classes and callers below.
3422
3423 * server.cc (handle_query): Update.
3424 * linux-low.cc (win32_target_ops): 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 (win32_process_target::supports_get_tib_address): Define.
3429 (win32_get_tib_address): Turn into ...
3430 (win32_process_target::get_tib_address): ... this.
3431 * win32-low.h (class win32_process_target): Update.
3432
3433 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3434
3435 Turn process_stratum_target's thread_stopped op into a method of
3436 process_target.
3437
3438 * target.h (struct process_stratum_target): Remove the target op.
3439 (class process_target): Add the target op. Also add
3440 'supports_thread_stopped'.
3441 (target_thread_stopped): Update the macro.
3442 * target.cc (process_target::thread_stopped): Define.
3443 (process_target::supports_thread_stopped): Define.
3444 (prepare_to_access_memory): Update.
3445
3446 Update the derived classes and callers below.
3447
3448 * server.cc (queue_stop_reply_callback): Update.
3449 * linux-low.cc (linux_target_ops): Update.
3450 (linux_process_target::supports_thread_stopped): Define.
3451 (linux_thread_stopped): Turn into ...
3452 (linux_process_target::thread_stopped): ... this.
3453 * linux-low.h (class linux_process_target): Update.
3454 * lynx-low.cc (lynx_target_ops): Update.
3455 * nto-low.cc (nto_target_ops): Update.
3456 * win32-low.cc (win32_target_ops): Update.
3457
3458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3459
3460 Turn process_stratum_target's read_pc and write_pc ops into
3461 methods of process_target.
3462
3463 * target.h (struct process_stratum_target): Remove the target ops.
3464 (class process_target): Add the target ops.
3465 * target.cc (process_target::read_pc): Define.
3466 (process_target::write_pc): Define.
3467
3468 Update the derived classes and callers below.
3469
3470 * regcache.cc (regcache_read_pc): Update.
3471 (regcache_write_pc): Update.
3472 * linux-low.cc (linux_target_ops): Update.
3473 (linux_read_pc): Turn into ...
3474 (linux_process_target::read_pc): ... this.
3475 (linux_write_pc): Turn into ...
3476 (linux_process_target::write_pc): ... this.
3477 * linux-low.h (class linux_process_target): Update.
3478 * lynx-low.cc (lynx_target_ops): Update.
3479 * nto-low.cc (nto_target_ops): Update.
3480 * win32-low.cc (win32_target_ops): Update.
3481
3482 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3483
3484 Turn process_stratum_target's supports_tracepoints op into a
3485 method of process_target.
3486
3487 * target.h (struct process_stratum_target): Remove the target op.
3488 (class process_target): Add the target op.
3489 (target_supports_tracepoints): Update the macro.
3490 * target.cc (process_target::supports_tracepoints): Define.
3491
3492 Update the derived classes and callers below.
3493
3494 * linux-low.cc (linux_target_ops): Update.
3495 (linux_supports_tracepoints): Turn into ...
3496 (linux_process_target::supports_tracepoints): ... this.
3497 * linux-low.h (class linux_process_target): Update.
3498 * lynx-low.cc (lynx_target_ops): Update.
3499 * nto-low.cc (nto_target_ops): Update.
3500 * win32-low.cc (win32_target_ops): Update.
3501
3502 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3503
3504 Turn process_stratum_target's process_qsupported op into a method
3505 of process_target.
3506
3507 * target.h (struct process_stratum_target): Remove the target op.
3508 (class process_target): Add the target op.
3509 (target_process_qsupported): Update the macro.
3510 * target.cc (process_target::process_qsupported): Define.
3511
3512 Update the derived classes and callers below.
3513
3514 * linux-low.cc (linux_target_ops): Update.
3515 (linux_process_qsupported): Turn into ...
3516 (linux_process_target::process_qsupported): ... this.
3517 * linux-low.h (class linux_process_target): Update.
3518 * lynx-low.cc (lynx_target_ops): Update.
3519 * nto-low.cc (nto_target_ops): Update.
3520 * win32-low.cc (win32_target_ops): Update.
3521
3522 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3523
3524 Turn process_stratum_target's read_loadmap op into a method of
3525 process_target.
3526
3527 * target.h (struct process_stratum_target): Remove the target op.
3528 (class process_target): Add the target op. Also add
3529 'supports_read_loadmap'.
3530 * target.cc (process_target::read_loadmap): Define.
3531 (process_target::supports_read_loadmap): Define.
3532
3533 Update the derived classes and callers below.
3534
3535 * server.cc (handle_qxfer_fdpic): Update.
3536 (handle_query): Update.
3537 * linux-low.cc (linux_target_ops): Update.
3538 (linux_process_target::supports_read_loadmap): Define.
3539 (linux_read_loadmap): Turn into ...
3540 (linux_process_target::read_loadmap): ... this.
3541 * linux-low.h (class linux_process_target): Update.
3542 * lynx-low.cc (lynx_target_ops): Update.
3543 * nto-low.cc (nto_target_ops): Update.
3544 * win32-low.cc (win32_target_ops): Update.
3545
3546 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3547
3548 Turn process_stratum_target's core_of_thread op into a method of
3549 process_target.
3550
3551 * target.h (struct process_stratum_target): Remove the target op.
3552 (class process_target): Add the target op.
3553 (target_core_of_thread): Update the macro.
3554 * target.cc (process_target::core_of_thread): Define.
3555
3556 Update the derived classes and callers below.
3557
3558 * linux-low.cc (linux_target_ops): Update.
3559 (linux_process_target::core_of_thread): Define.
3560 * linux-low.h (class linux_process_target): Update.
3561 * lynx-low.cc (lynx_target_ops): Update.
3562 * nto-low.cc (nto_target_ops): Update.
3563 * win32-low.cc (win32_target_ops): Update.
3564
3565 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3566
3567 Turn process_stratum_target's handle_monitor_command op into a
3568 method of process_target.
3569
3570 * target.h (struct process_stratum_target): Remove the target op.
3571 (class process_target): Add the target op.
3572 (target_handle_monitor_command): Update the macro.
3573 * target.cc (process_target::handle_monitor_command): Define.
3574
3575 Update the derived classes and callers below.
3576
3577 * server.cc (handle_query): Update.
3578 * linux-low.cc (linux_target_ops): Update.
3579 (linux_process_target::handle_monitor_command): Define.
3580 * linux-low.h (class linux_process_target): Update.
3581 * lynx-low.cc (lynx_target_ops): Update.
3582 * nto-low.cc (nto_target_ops): Update.
3583 * win32-low.cc (win32_target_ops): Update.
3584
3585 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3586
3587 Turn process_stratum_target's handle_new_gdb_connection op into a
3588 method of process_target.
3589
3590 * target.h (struct process_stratum_target): Remove the target op.
3591 (class process_target): Add the target op.
3592 (target_handle_new_gdb_connection): Update the macro.
3593 * target.cc (process_target::handle_new_gdb_connection): Define.
3594
3595 Update the derived classes and callers below.
3596
3597 * linux-low.cc (linux_target_ops): Update.
3598 (linux_handle_new_gdb_connection): Turn into ...
3599 (linux_process_target::handle_new_gdb_connection): ... 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_fork_events,
3608 supports_vfork_events, and supports_exec_events ops into methods
3609 of process_target.
3610
3611 * target.h (struct process_stratum_target): Remove the target ops.
3612 (class process_target): Add the target ops.
3613 (target_supports_fork_events): Update the macro.
3614 (target_supports_vfork_events): Update the macro.
3615 (target_supports_exec_events): Update the macro.
3616 * target.cc (process_target::supports_fork_events): Define.
3617 (process_target::supports_vfork_events): Define.
3618 (process_target::supports_exec_events): Define.
3619
3620 Update the derived classes and callers below.
3621
3622 * linux-low.cc (linux_target_ops): Update.
3623 (linux_supports_fork_events): Turn into ...
3624 (linux_process_target::supports_fork_events): ... this.
3625 (linux_supports_vfork_events): Turn into ...
3626 (linux_process_target::supports_vfork_events): ... this.
3627 (linux_supports_exec_events): Turn into ...
3628 (linux_process_target::supports_exec_events): ... this.
3629 * linux-low.h (class linux_process_target): Update.
3630 * lynx-low.cc (lynx_target_ops): Update.
3631 * nto-low.cc (nto_target_ops): Update.
3632 * win32-low.cc (win32_target_ops): Update.
3633
3634 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3635
3636 Turn process_stratum_target's supports_multi_process op into a
3637 method of process_target.
3638
3639 * target.h (struct process_stratum_target): Remove the target op.
3640 (class process_target): Add the target op.
3641 * target.cc (process_target::supports_multi_process): Define.
3642 (target_supports_multi_process): Update.
3643
3644 Update the derived classes and callers below.
3645
3646 * linux-low.cc (linux_target_ops): Update.
3647 (linux_supports_multi_process): Turn into ...
3648 (linux_process_target::supports_multi_process): ... this.
3649 * linux-low.h (class linux_process_target): Update.
3650 * lynx-low.cc (lynx_target_ops): Update.
3651 * nto-low.cc (nto_target_ops): Update.
3652 * win32-low.cc (win32_target_ops): Update.
3653
3654 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3655
3656 Turn process_stratum_target's supports_non_stop, async, and
3657 start_non_stop ops into methods of process_target.
3658
3659 * target.h (struct process_stratum_target): Remove the target ops.
3660 (class process_target): Add the target ops.
3661 (target_supports_non_stop): Update the macro.
3662 (target_async): Update the macro.
3663 (start_non_stop): Remove declaration.
3664 * target.cc (process_target::supports_non_stop): Define.
3665 (process_target::async): Define.
3666 (process_target::start_non_stop): Define.
3667 (start_non_stop): Remove.
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_supports_non_stop): Turn into ...
3675 (linux_process_target::supports_non_stop): ... this.
3676 (linux_async): Turn into ...
3677 (linux_process_target::async): ... this.
3678 (linux_start_non_stop): Turn into ...
3679 (linux_process_target::start_non_stop): ... this.
3680 * linux-low.h (class linux_process_target): Update.
3681 * lynx-low.cc (lynx_target_ops): Update.
3682 * nto-low.cc (nto_target_ops): Update.
3683 (nto_supports_non_stop): Remove; rely on the default behavior
3684 instead.
3685 * win32-low.cc (win32_target_ops): Update.
3686
3687 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3688
3689 Turn process_stratum_target's qxfer_siginfo op into a method of
3690 process_target.
3691
3692 * target.h (struct process_stratum_target): Remove the target op.
3693 (class process_target): Add the target op. Also add
3694 'supports_qxfer_siginfo'.
3695 * target.cc (process_target::qxfer_siginfo): Define.
3696 (process_target::supports_qxfer_siginfo): Define.
3697
3698 Update the derived classes and callers below.
3699
3700 * server.cc (handle_qxfer_siginfo): Update.
3701 (handle_query): Update.
3702 * linux-low.cc (linux_target_ops): Update.
3703 (linux_process_target::supports_qxfer_siginfo): Define.
3704 (linux_xfer_siginfo): Turn into ...
3705 (linux_process_target::qxfer_siginfo): ... this.
3706 * linux-low.h (class linux_process_target): Update.
3707 * lynx-low.cc (lynx_target_ops): Update.
3708 * nto-low.cc (nto_target_ops): Update.
3709 * win32-low.cc (win32_target_ops): Update.
3710
3711 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3712
3713 Turn process_stratum_target's qxfer_osdata op into a method of
3714 process_target.
3715
3716 * target.h (struct process_stratum_target): Remove the target op.
3717 (class process_target): Add the target op. Also add
3718 'supports_qxfer_osdata'.
3719 * target.cc (process_target::qxfer_osdata): Define.
3720 (process_target::supports_qxfer_osdata): Define.
3721
3722 Update the derived classes and callers below.
3723
3724 * server.cc (handle_qxfer_osdata): Update.
3725 (handle_query): Update.
3726 * linux-low.cc (linux_target_ops): Update.
3727 (linux_process_target::supports_qxfer_osdata): Define.
3728 (linux_qxfer_osdata): Turn into ...
3729 (linux_process_target::qxfer_osdata): ... this.
3730 * linux-low.h (class linux_process_target): Update.
3731 * lynx-low.cc (lynx_target_ops): Update.
3732 * nto-low.cc (nto_target_ops): Update.
3733 * win32-low.cc (win32_target_ops): Update.
3734
3735 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3736
3737 Turn process_stratum_target's hostio_last_error op into a
3738 method of process_target.
3739
3740 * target.h (struct process_stratum_target): Remove the target op.
3741 (class process_target): Add the target op.
3742 * target.cc: Add "hostio.h" to includes.
3743 (process_target::hostio_last_error): Define.
3744
3745 Update the derived classes and callers below.
3746
3747 * hostio.cc (hostio_error): Update.
3748 * linux-low.cc: Remove "hostio.h" from includes.
3749 (linux_target_ops): Update.
3750 * lynx-low.cc (lynx_target_ops): Update.
3751 * nto-low.cc (nto_target_ops): Update.
3752 * win32-low.h (class win32_process_target): Update.
3753 * win32-low.cc (win32_target_ops): Update.
3754 (wince_hostio_last_error): Turn into ...
3755 (win32_process_target::hostio_last_error): ... this.
3756
3757 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3758
3759 Turn process_stratum_target's get_tls_address op into a method of
3760 process_target.
3761
3762 * target.h (struct process_stratum_target): Remove the target op.
3763 (class process_target): Add the target op. Also add
3764 'supports_get_tls_address'.
3765 * target.cc (process_target::get_tls_address): Define.
3766 (process_target::supports_get_tls_address): Define.
3767
3768 Update the derived classes and callers below.
3769
3770 * server.cc (handle_query): Update.
3771 * linux-low.cc (linux_target_ops): Update.
3772 (linux_process_target::supports_get_tls_address): Define.
3773 (linux_process_target::get_tls_address): Define.
3774 * linux-low.h (class linux_process_target): Update.
3775 * lynx-low.cc (lynx_target_ops): Update.
3776 * nto-low.cc (nto_target_ops): Update.
3777 * win32-low.cc (win32_target_ops): Update.
3778
3779 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3780
3781 Turn process_stratum_target's read_offsets op into a method of
3782 process_target.
3783
3784 * target.h (struct process_stratum_target): Remove the target op.
3785 (class process_target): Add the target op. Also add
3786 'supports_read_offsets'.
3787 * target.cc (process_target::read_offsets): Define.
3788 (process_target::supports_read_offsets): Define.
3789
3790 Update the derived classes and callers below.
3791
3792 * server.cc (handle_query): Update.
3793 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3794 (linux_target_ops): Update.
3795 (linux_process_target::supports_read_offsets): Define.
3796 (linux_read_offsets): Turn into ...
3797 (linux_process_target::read_offsets): ... this.
3798 * linux-low.h (class linux_process_target): Update.
3799 * lynx-low.cc (lynx_target_ops): Update.
3800 * nto-low.cc (nto_target_ops): Update.
3801 * win32-low.cc (win32_target_ops): Update.
3802
3803 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3804
3805 Turn process_stratum_target's stopped_by_watchpoint and
3806 stopped_data_address ops into methods of process_target.
3807
3808 * target.h (struct process_stratum_target): Remove the target ops.
3809 (class process_target): Add the target ops.
3810 * target.cc (process_target::stopped_by_watchpoint): Define.
3811 (process_target::stopped_data_address): Define.
3812
3813 Update the derived classes and callers below.
3814
3815 * remote-utils.cc (prepare_resume_reply): Update.
3816 * linux-low.cc (linux_target_ops): Update.
3817 (linux_stopped_by_watchpoint): Turn into ...
3818 (linux_process_target::stopped_by_watchpoint): ... this.
3819 (linux_stopped_data_address): Turn into ...
3820 (linux_process_target::stopped_data_address): ... this.
3821 * linux-low.h (class linux_process_target): Update.
3822 * lynx-low.cc (lynx_target_ops): Update.
3823 * nto-low.cc (nto_target_ops): Update.
3824 (nto_stopped_by_watchpoint): Turn into ...
3825 (nto_process_target::stopped_by_watchpoint): ... this.
3826 (nto_stopped_data_address): Turn into ...
3827 (nto_process_target::stopped_data_address): ... this.
3828 * nto-low.h (class nto_process_target): Update.
3829 * win32-low.cc (win32_target_ops): Update.
3830 (win32_stopped_by_watchpoint): Turn into ...
3831 (win32_process_target::stopped_by_watchpoint): ... this.
3832 (win32_stopped_data_address): Turn into ...
3833 (win32_process_target::stopped_data_address): ... this.
3834 * win32-low.h (class win32_process_target): Update.
3835
3836 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3837
3838 Turn process_stratum_target's supports_hardware_single_step op into
3839 a method of process_target.
3840
3841 * target.h (struct process_stratum_target): Remove the target op.
3842 (class process_target): Add the target op.
3843 (target_supports_hardware_single_step): Update the macro.
3844 (target_can_do_hardware_single_step): Remove declaration.
3845 * target.cc (process_target::supports_hardware_single_step): Define.
3846 (target_can_do_hardware_single_step): Remove.
3847
3848 Update the derived classes and callers below.
3849
3850 * linux-low.h (class linux_process_target): Update.
3851 * linux-low.cc (linux_target_ops): Update.
3852 (linux_supports_hardware_single_step): Turn into ...
3853 (linux_process_target::supports_hardware_single_step): ... this.
3854 * lynx-low.h (class lynx_process_target): Update.
3855 * lynx-low.cc (lynx_target_ops): Update.
3856 (lynx_process_target::supports_hardware_single_step): Define.
3857 * nto-low.h (class nto_process_target): Update.
3858 * nto-low.cc (nto_target_ops): Update.
3859 (nto_process_target::supports_hardware_single_step): Define.
3860 * win32-low.h (class win32_process_target): Update.
3861 * win32-low.cc (win32_target_ops): Update.
3862 (win32_process_target::supports_hardware_single_step): Define.
3863
3864 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3865
3866 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3867 ops into methods of process_target.
3868
3869 * target.h (struct process_stratum_target): Remove the target ops.
3870 (class process_target): Add the target ops.
3871 (target_stopped_by_hw_breakpoint): Update the macro.
3872 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3873 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3874 (process_target::supports_stopped_by_hw_breakpoint): Define.
3875
3876 Update the derived classes and callers below.
3877
3878 * linux-low.cc (linux_target_ops): Update.
3879 (linux_stopped_by_hw_breakpoint): Turn into ...
3880 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3881 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3882 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3883 * linux-low.h (class linux_process_target): Update.
3884 * lynx-low.cc (lynx_target_ops): Update.
3885 * nto-low.cc (nto_target_ops): Update.
3886 * win32-low.cc (win32_target_ops): Update.
3887
3888 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3889
3890 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3891 ops into methods of process_target.
3892
3893 * target.h (struct process_stratum_target): Remove the target ops.
3894 (class process_target): Add the target ops.
3895 (target_stopped_by_sw_breakpoint): Update the macro.
3896 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3897 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3898 (process_target::supports_stopped_by_sw_breakpoint): Define.
3899
3900 Update the derived classes and callers below.
3901
3902 * linux-low.cc (linux_target_ops): Update.
3903 (linux_stopped_by_sw_breakpoint): Turn into ...
3904 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3905 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3906 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3907 * linux-low.h (class linux_process_target): Update.
3908 * lynx-low.cc (lynx_target_ops): Update.
3909 * nto-low.cc (nto_target_ops): Update.
3910 * win32-low.cc (win32_target_ops): Update.
3911
3912 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3913
3914 Turn process_stratum_target's insert_point and remove_point ops
3915 into methods of process_target.
3916
3917 * target.h (struct process_stratum_target): Remove the target ops.
3918 (class process_target): Add the target ops.
3919 * target.cc (process_target::insert_point): Define.
3920 (process_target::remove_point): Define.
3921
3922 Update the derived classes and callers below.
3923
3924 * mem-break.cc (set_raw_breakpoint_at): Update.
3925 (delete_raw_breakpoint): Update.
3926 (uninsert_raw_breakpoint): Update.
3927 (reinsert_raw_breakpoint): Update.
3928 * linux-low.cc (linux_target_ops): Update.
3929 (linux_insert_point): Turn into ...
3930 (linux_process_target::insert_point): ... this.
3931 (linux_remove_point): Turn into ...
3932 (linux_process_target::remove_point): ... this.
3933 * linux-low.h (class linux_process_target): Update.
3934 * lynx-low.cc (lynx_target_ops): Update.
3935 * nto-low.cc (nto_target_ops): Update.
3936 (nto_insert_point): Turn into ...
3937 (nto_process_target::insert_point): ... this.
3938 (nto_remove_point): Turn into ...
3939 (nto_process_target::remove_point): ... this.
3940 * nto-low.h (class nto_process_target): Update.
3941 * win32-low.cc (win32_target_ops): Update.
3942 (win32_insert_point): Turn into ...
3943 (win32_process_target::insert_point): ... this.
3944 (win32_remove_point): Turn into ...
3945 (win32_process_target::remove_point): ... this.
3946 * win32-low.h (class win32_process_target): Update.
3947
3948 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3949
3950 Turn process_stratum_target's supports_z_point_type op into a
3951 method of process_target.
3952
3953 * target.h (struct process_stratum_target): Remove the target op.
3954 (class process_target): Add the target op.
3955 * target.cc (process_target::supports_z_point_type): Define.
3956
3957 Update the derived classes and callers below.
3958
3959 * mem-break.cc (z_type_supported): Update.
3960 * linux-low.cc (linux_target_ops): Update.
3961 (linux_supports_z_point_type): Turn into ...
3962 (linux_process_target::supports_z_point_type): ... this.
3963 * linux-low.h (class linux_process_target): Update.
3964 * lynx-low.cc (lynx_target_ops): Update.
3965 * nto-low.cc (nto_target_ops): Update.
3966 (nto_supports_z_point_type): Turn into ...
3967 (nto_process_target::supports_z_point_type): ... this.
3968 * nto-low.h (class nto_process_target): Update.
3969 * win32-low.cc (win32_target_ops): Update.
3970 (win32_supports_z_point_type): Turn into ...
3971 (win32_process_target::supports_z_point_type): ... this.
3972 * win32-low.h (class win32_process_target): Update.
3973
3974 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3975
3976 Turn process_stratum_target's read_auxv op into a method of
3977 process_target.
3978
3979 * target.h (class process_stratum_target): Remove the target op.
3980 (struct process_target): Add the target op. Also add
3981 'supports_read_auxv'.
3982 * target.cc (process_target::read_auxv): Define.
3983 (process_target::supports_read_auxv): Define.
3984
3985 Update the derived classes and callers below.
3986
3987 * server.cc (handle_qxfer_auxv): Update.
3988 (handle_query): Update.
3989 * linux-low.cc (linux_target_ops): Update.
3990 (linux_process_target::supports_read_auxv): Define.
3991 (linux_read_auxv): Turn into ...
3992 (linux_process_target::read_auxv): ... this.
3993 * linux-low.h (class linux_process_target): Update.
3994 * lynx-low.cc (lynx_target_ops): Update.
3995 * nto-low.cc (nto_target_ops): Update.
3996 (nto_process_target::supports_read_auxv): Define.
3997 (nto_read_auxv): Turn into ...
3998 (nto_process_target::read_auxv): ... this.
3999 * nto-low.h (class nto_process_target): Update.
4000 * win32-low.cc (win32_target_ops): Update.
4001
4002 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4003
4004 Turn process_stratum_target's request_interrupt op into a method of
4005 process_target.
4006
4007 * target.h (struct process_stratum_target): Remove the target op.
4008 (class process_target): Add the target op.
4009
4010 Update the derived classes and callers below.
4011
4012 * remote-utils.cc (putpkt_binary_1): Update.
4013 (input_interrupt): Update.
4014 (getpkt): Update.
4015 * server.cc (handle_v_requests): Update.
4016 * linux-low.cc (linux_target_ops): Update.
4017 (linux_request_interrupt): Turn into ...
4018 (linux_process_target::request_interrupt): ... this.
4019 * linux-low.h (class linux_process_target): Update.
4020 * lynx-low.cc (lynx_target_ops): Update.
4021 (lynx_request_interrupt): Turn into ...
4022 (lynx_process_target::request_interrupt): ... this.
4023 * lynx-low.h (class lynx_process_target): Update.
4024 * nto-low.cc (nto_target_ops): Update.
4025 (nto_request_interrupt): Turn into ...
4026 (nto_process_target::request_interrupt): ... this.
4027 * nto-low.h (class nto_process_target): Update.
4028 * win32-low.cc (win32_target_ops): Update.
4029 (win32_request_interrupt): Turn into ...
4030 (win32_process_target::request_interrupt): ... this.
4031 * win32-low.h (class win32_process_target): Update.
4032
4033 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4034
4035 Turn process_stratum_target's look_up_symbols op into a method of
4036 process_target.
4037
4038 * target.h (struct process_stratum_target): Remove the target op.
4039 (class process_target): Add the target op.
4040 * target.cc (process_target::look_up_symbols): Define.
4041
4042 Update the derived classes and callers below.
4043
4044 * server.cc (handle_query): Update.
4045 * linux-low.cc (linux_target_ops): Update.
4046 (linux_look_up_symbols): Turn into ...
4047 (linux_process_target::look_up_symbols): ... this.
4048 * linux-low.h (class linux_process_target): Update.
4049 * lynx-low.cc (lynx_target_ops): Update.
4050 * nto-low.cc (nto_target_ops): Update.
4051 * win32-low.cc (win32_target_ops): Update.
4052
4053 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4054
4055 Turn process_stratum_target's read_memory and write_memory
4056 ops into methods of process_target.
4057
4058 * target.h (struct process_stratum_target): Remove the target ops.
4059 (class process_target): Add the target ops.
4060
4061 Update the derived classes and callers below.
4062
4063 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
4064 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
4065 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
4066 (arm_get_syscall_trapinfo): Update.
4067 * linux-cris-low.cc (cris_breakpoint_at): Update.
4068 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
4069 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
4070 * linux-mips-low.cc (mips_breakpoint_at): Update.
4071 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
4072 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
4073 * linux-sh-low.cc (sh_breakpoint_at): Update.
4074 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
4075 (sparc_store_gregset_from_stack): Update.
4076 (sparc_breakpoint_at): Update.
4077 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
4078 * linux-tile-low.cc (tile_breakpoint_at): Update.
4079 * linux-x86-low.cc (x86_breakpoint_at): Update.
4080 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
4081 * mem-brea.cc (insert_memory_breakpoint): Update.
4082 (validate_inserted_breakpoint): Update.
4083 * target.cc (read_inferior_memory): Update.
4084 (target_write_memory): Update.
4085 * linux-low.cc (linux_target_ops): Update.
4086 (linux_read_memory): Make a wrapper around the read_memory target
4087 op call.
4088 (linux_process_target::read_memory): Rename from linux_read_memory.
4089 (linux_write_memory): Turn into ...
4090 (linux_process_target::write_memory): ... this.
4091 * linux-low.h (class linux_process_target): Update.
4092 * lynx-low.cc (lynx_target_ops): Update.
4093 (lynx_read_memory): Turn into ...
4094 (lynx_process_target::read_memory): ... this.
4095 (lynx_write_memory): Turn into ...
4096 (lynx_process_target::write_memory): ... this.
4097 * lynx-low.h (class lynx_process_target): Update.
4098 * nto-low.cc (nto_target_ops): Update.
4099 (nto_read_memory): Turn into ...
4100 (nto_process_target::read_memory): ... this.
4101 (nto_write_memory): Turn into ...
4102 (nto_process_target::write_memory): ... this.
4103 * nto-low.h (class nto_process_target): Update.
4104 * win32-low.cc (win32_target_ops): Update.
4105 (win32_read_inferior_memory): Turn into ...
4106 (win32_process_target::read_memory): ... this.
4107 (win32_write_inferior_memory): Turn into ...
4108 (win32_process_target::write_memory): ... this.
4109 * win32-low.h (class win32_process_target): Update.
4110
4111 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4112
4113 Turn process_stratum_target's prepare_to_access_memory and
4114 done_accessing_memory ops into methods of process_target.
4115
4116 * target.h (struct process_stratum_target): Remove the target ops.
4117 (class process_target): Add the target ops.
4118 * target.cc (process_target::prepare_to_access_memory): Define.
4119 (process_target::done_accessing_memory): Define.
4120 (prepare_to_access_memory): Update.
4121 (done_accessing_memory): Update.
4122
4123 Update the derived classes and callers below.
4124
4125 * linux-low.cc (linux_target_ops): Update.
4126 (linux_prepare_to_access_memory): Turn into ...
4127 (linux_process_target::prepare_to_access_memory): ... this.
4128 (linux_done_accessing_memory): Turn into ...
4129 (linux_process_target::done_accessing_memory): ... this.
4130 * linux-low.h (class linux_process_target): Update.
4131 * lynx-low.cc (lynx_target_ops): Update.
4132 * nto-low.cc (nto_target_ops): Update.
4133 * win32-low.cc (win32_target_ops): Update.
4134
4135 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4136
4137 Turn process_stratum_target's fetch_registers and store_registers
4138 ops into methods of process_target.
4139
4140 * target.h (struct process_stratum_target): Remove the target ops.
4141 (class process_target): Add the target ops.
4142 (fetch_inferior_registers): Update the macro.
4143 (store_inferior_registers): Update the macro.
4144
4145 Update the derived classes and callers below.
4146
4147 * linux-low.cc (linux_target_ops): Update.
4148 (linux_fetch_registers): Turn into ...
4149 (linux_process_target::fetch_registers): ... this.
4150 (linux_store_registers): Turn into ...
4151 (linux_process_target::store_registers): ... this.
4152 * linux-low.h (class linux_process_target): Update.
4153 * lynx-low.cc (lynx_target_ops): Update.
4154 (lynx_fetch_registers): Turn into ...
4155 (lynx_process_target::fetch_registers): ... this.
4156 (lynx_store_registers): Turn into ...
4157 (lynx_process_target::store_registers): ... this.
4158 * lynx-low.h (class lynx_process_target): Update.
4159 * nto-low.cc (nto_target_ops): Update.
4160 (nto_fetch_registers): Turn into ...
4161 (nto_process_target::fetch_registers): ... this.
4162 (nto_store_registers): Turn into ...
4163 (nto_process_target::store_registers): ... this.
4164 * nto-low.h (class nto_process_target): Update.
4165 * win32-low.cc (win32_target_ops): Update.
4166 (win32_fetch_inferior_registers): Turn into ...
4167 (win32_process_target::fetch_registers): ... this.
4168 (win32_store_inferior_registers): Turn into ...
4169 (win32_process_target::store_registers): ... this.
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 wait 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 * target.cc (target_wait): Update.
4183 * linux-low.cc (linux_target_ops): Update.
4184 (linux_wait): Turn into ...
4185 (linux_process_target::wait): ... this.
4186 * linux-low.h (class linux_process_target): Update.
4187 * lynx-low.cc (lynx_target_ops): Update.
4188 (lynx_wait): Turn into ...
4189 (lynx_process_target::wait): ... this.
4190 * lynx-low.h (class lynx_process_target): Update.
4191 * nto-low.cc (nto_target_ops): Update.
4192 (nto_wait): Turn into ...
4193 (nto_process_target::wait): ... this.
4194 * nto-low.h (class nto_process_target): Update.
4195 * win32-low.cc (win32_target_ops): Update.
4196 (win32_wait): Turn into ...
4197 (win32_process_target::wait): ... this.
4198 (do_initial_child_stuff): Update.
4199 * win32-low.h (class win32_process_target): Update.
4200
4201 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4202
4203 Turn process_stratum_target's resume op into a method of
4204 process_target.
4205
4206 * target.h (struct process_stratum_target): Remove the target op.
4207 (class process_target): Add the target op.
4208
4209 Update the derived classes and callers below.
4210
4211 * server.cc (resume): Update.
4212 * target.cc (target_stop_and_wait): Update.
4213 (target_continue_no_signal): Update.
4214 (target_continue): Update.
4215 * linux-low.cc (linux_target_ops): Update.
4216 (linux_resume): Turn into ...
4217 (linux_process_target::resume): ... this.
4218 * linux-low.h (class linux_process_target): Update.
4219 * lynx-low.cc (lynx_target_ops): Update.
4220 (lynx_resume): Turn into ...
4221 (lynx_process_target::resume): ... this.
4222 * lynx-low.h (class lynx_process_target): Update.
4223 * nto-low.cc (nto_target_ops): Update.
4224 (nto_resume): Turn into ...
4225 (nto_process_target::resume): ... this.
4226 * nto-low.h (class nto_process_target): Update.
4227 * win32-low.cc (win32_target_ops): Update.
4228 (win32_resume): Turn into ...
4229 (win32_process_target::resume): ... this.
4230 (win32_process_target::detach): Update.
4231 (do_initial_child_stuff): Update.
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 thread_alive 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 (mythread_alive): Update the macro.
4242
4243 Update the derived classes and callers below.
4244
4245 * linux-low.cc (linux_target_ops): Update.
4246 (linux_thread_alive): Turn into ...
4247 (linux_process_target::thread_alive): ... this.
4248 (wait_for_sigstop): Update.
4249 * linux-low.h (class linux_process_target): Update.
4250 * lynx-low.cc (lynx_target_ops): Update.
4251 (lynx_thread_alive): Turn into ...
4252 (lynx_process_target::thread_alive): ... this.
4253 * lynx-low.h (class lynx_process_target): Update.
4254 * nto-low.cc (nto_target_ops): Update.
4255 (nto_thread_alive): Turn into ...
4256 (nto_process_target::thread_alive): ... this.
4257 * nto-low.h (class nto_process_target): Update.
4258 * win32-low.cc (win32_target_ops): Update.
4259 (win32_thread_alive): Turn into ...
4260 (win32_process_target::thread_alive): ... this.
4261 * win32-low.h (class win32_process_target): Update.
4262
4263 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4264
4265 Turn process_stratum_target's join op into a method of
4266 process_target.
4267
4268 * target.h (struct process_stratum_target): Remove the target op.
4269 (class process_target): Add the target op.
4270 (join_inferior): Update the macro.
4271
4272 Update the derived classes and callers below.
4273
4274 * linux-low.cc (linux_target_ops): Update.
4275 (linux_join): Turn into ...
4276 (linux_process_target::join): ... this.
4277 * linux-low.h (class linux_process_target): Update.
4278 * lynx-low.cc (lynx_target_ops): Update.
4279 (lynx_join): Turn into ...
4280 (lynx_process_target::join): ... this.
4281 * lynx-low.h (class lynx_process_target): Update.
4282 * nto-low.cc (nto_target_ops): Update.
4283 (nto_process_target::join): Define.
4284 * nto-low.h (class nto_process_target): Update.
4285 * win32-low.cc (win32_target_ops): Update.
4286 (win32_join): Turn into ...
4287 (win32_process_target::join): ... this.
4288 * win32-low.h (class win32_process_target): Update.
4289
4290 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4291
4292 Turn process_stratum_target's mourn op into a method of
4293 process_target.
4294
4295 * target.h (struct process_stratum_target): Remove the target op.
4296 (class process_target): Add the target op.
4297
4298 Update the derived classes and callers below.
4299
4300 * target.cc (target_mourn_inferior): Update.
4301 * linux-low.cc (linux_target_ops): Update.
4302 (linux_mourn): Turn into ...
4303 (linux_process_target::mourn): ... this.
4304 (handle_extended_wait): Update.
4305 (linux_process_target::kill): Update.
4306 (linux_process_target::detach): Update.
4307 * linux-low.h (class linux_process_target): Update.
4308 * lynx-low.cc (lynx_target_ops): Update.
4309 (lynx_mourn): Turn into ...
4310 (lynx_process_target::mourn): ... this.
4311 * lynx-low.h (class lynx_process_target): Update.
4312 * nto-low.cc (nto_target_ops): Update.
4313 (nto_mourn): Turn into ...
4314 (nto_process_target::mourn): ... this.
4315 * nto-low.h (class nto_process_target): Update.
4316 * win32-low.cc (win32_target_ops): Update.
4317 (win32_mourn): Turn into ...
4318 (win32_process_target::mourn): ... this.
4319 * win32-low.h (class win32_process_target): Update.
4320
4321 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4322
4323 Turn process_stratum_target's detach op into a method of
4324 process_target.
4325
4326 * target.h (struct process_stratum_target): Remove the target op.
4327 (class process_target): Add the target op.
4328 (detach_inferior): Update the macro.
4329
4330 Update the derived classes and callers below.
4331
4332 * linux-low.cc (linux_target_ops): Update.
4333 (linux_detach): Turn into ...
4334 (linux_process_target::detach): ... this.
4335 * linux-low.h (class linux_process_target): Update.
4336 * lynx-low.cc (lynx_target_ops): Update.
4337 (lynx_detach): Turn into ...
4338 (lynx_process_target::detach): ... this.
4339 * lynx-low.h (class lynx_process_target): Update.
4340 * nto-low.cc (nto_target_ops): Update.
4341 (nto_detach): Turn into ...
4342 (nto_process_target::detach): ... this.
4343 * nto-low.h (class nto_process_target): Update.
4344 * win32-low.cc (win32_target_ops): Update.
4345 (win32_detach): Turn into ...
4346 (win32_process_target::detach): ... this.
4347 * win32-low.h (class win32_process_target): Update.
4348
4349 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4350
4351 Turn process_stratum_target's kill op into a method of
4352 process_target.
4353
4354 * target.h (struct process_stratum_target): Remove the target op.
4355 (class process_target): Add the target op.
4356
4357 Update the derived classes and callers below.
4358
4359 * target.cc (kill_inferior): Update.
4360 * linux-low.cc (linux_target_ops): Update.
4361 (linux_kill): Turn into ...
4362 (linux_process_target::kill): ... this.
4363 * linux-low.h (class linux_process_target): Update.
4364 * lynx-low.cc (lynx_target_ops): Update.
4365 (lynx_kill): Turn into ...
4366 (lynx_process_target::kill): ... this.
4367 * lynx-low.h (class lynx_process_target): Update.
4368 * nto-low.cc (nto_target_ops): Update.
4369 (nto_kill): Turn into ...
4370 (nto_process_target::kill): ... this.
4371 * nto-low.h (class nto_process_target): Update.
4372 * win32-low.cc (win32_target_ops): Update.
4373 (win32_kill): Turn into ...
4374 (win32_process_target::kill): ... this.
4375 * win32-low.h (class win32_process_target): Update.
4376
4377 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4378
4379 Turn process_stratum_target's attach op into a method of
4380 process_target.
4381
4382 * target.h (struct process_stratum_target): Remove the target op.
4383 (class process_target): Add the target op.
4384 (myattach): Update the macro.
4385
4386 Update the derived classes and callers below.
4387
4388 * linux-low.cc (linux_target_ops): Update.
4389 (linux_attach): Turn into ...
4390 (linux_process_target::attach): ... this.
4391 * linux-low.h (class linux_process_target): Update.
4392 * lynx-low.cc (lynx_target_ops): Update.
4393 (lynx_attach): Turn into ...
4394 (lynx_process_target::attach): ... this.
4395 * lynx-low.h (class lynx_process_target): Update.
4396 * nto-low.cc (nto_target_ops): Update.
4397 (nto_attach): Turn into ...
4398 (nto_process_target::attach): ... this.
4399 * nto-low.h (class nto_process_target): Update.
4400 * win32-low.cc (win32_target_ops): Update.
4401 (win32_attach): Turn into ...
4402 (win32_process_target::attach): ... this.
4403 * win32-low.h (class win32_process_target): Update.
4404
4405 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4406
4407 Turn process_stratum_target's post_create_inferior op into a method
4408 of process_target.
4409
4410 * target.h (struct process_stratum_target): Remove the target op.
4411 (class process_target): Add the target op.
4412 (target_post_create_inferior): Update the macro.
4413 * target.cc (process_target::post_create_inferior): Define.
4414
4415 Update the derived classes and callers below.
4416
4417 * linux-low.cc (linux_target_ops): Update.
4418 (linux_post_create_inferior): Turn into ...
4419 (linux_process_target::post_create_inferior): ... this.
4420 * linux-low.h (class linux_process_target): Update.
4421 * lynx-low.cc (lynx_target_ops): Update.
4422 * nto-low.cc (nto_target_ops): Update.
4423 * win32-low.cc (win32_target_ops): Update.
4424
4425 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4426
4427 Turn process_stratum_target's create_inferior op into a method of
4428 process_target.
4429
4430 * target.h (struct process_stratum_target): Remove the target op.
4431 (class process_target): Add the target op.
4432 (create_inferior): Rename the macro to ...
4433 (target_create_inferior): ... this.
4434
4435 Update the derived classes and callers below.
4436
4437 * server.cc (handle_v_run): Update.
4438 (captured_main): Update.
4439 (process_serial_event): Update.
4440 * linux-low.cc (linux_target_ops): Update.
4441 (linux_create_inferior): Turn into ...
4442 (linux_process_target::create_inferior): ... this.
4443 * linux-low.h (class linux_process_target): Update.
4444 * lynx-low.cc (lynx_target_ops): Update.
4445 (lynx_create_inferior): Turn into ...
4446 (lynx_process_target::create_inferior): ... this.
4447 * lynx-low.h (class lynx_process_target): Update.
4448 * nto-low.cc (nto_target_ops): Update.
4449 (nto_create_inferior): Turn into ...
4450 (nto_process_target::create_inferior): ... this.
4451 * nto-low.h (class nto_process_target): Update.
4452 * win32-low.cc (win32_target_ops): Update.
4453 (win32_create_inferior): Turn into ...
4454 (win32_process_target::create_inferior): ... this.
4455 * win32-low.h (class win32_process_target): Update.
4456
4457 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4458
4459 * target.h (class process_target): New class definition.
4460 (struct process_stratum_target) <pt>: New field with type
4461 'process_target*'.
4462 * linux-low.h (class linux_process_target): Define as a derived
4463 class of 'process_target'.
4464 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4465 as the 'pt' field.
4466 * lynx-low.h (class lynx_process_target): Define as a derived
4467 class of 'process_target'.
4468 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4469 as the 'pt' field.
4470 * nto-low.h (class nto_process_target): Define as a derived
4471 class of 'process_target'.
4472 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4473 as the 'pt' field.
4474 * win32-low.h (class win32_process_target): Define as a derived
4475 class of 'process_target'.
4476 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4477 as the 'pt' field.
4478
4479 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4480
4481 * configure: Regenerate.
4482
4483 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4484 Andrew Burgess <andrew.burgess@embecosm.com>
4485
4486 * linux-riscv-low.cc: New file.
4487 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4488 and nat/riscv-linux-tdesc.c.
4489 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4490 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4491 Define.
4492
4493 2020-02-14 Tom Tromey <tom@tromey.com>
4494
4495 * acinclude.m4: Don't include acx_configure_dir.m4.
4496 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4497 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4498 (all, install-only, uninstall, clean-info, clean)
4499 (maintainer-clean): Don't recurse.
4500 (subdir_do, all-lib): Remove.
4501 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4502 (GNULIB_H): Remove.
4503 (generated_files): Update.
4504 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4505 * configure: Rebuild.
4506 * configure.ac: Don't configure gnulib or libiberty.
4507 (GNULIB): Update.
4508
4509 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4510
4511 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4512 preparing the command line for CreateProcess.
4513 (win32_create_inferior): Reflect the program name in debugging
4514 output that shows the process and its command line.
4515
4516 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4517
4518 * Makefile.in: Rename source files from .c to .cc.
4519 * %.c: Rename to %.cc.
4520 * configure.ac: Rename server.c to server.cc.
4521 * configure: Re-generate.
4522
4523 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4524
4525 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4526
4527 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4528
4529 * win32-low.c (win32_create_inferior): Set signal_pid.
4530
4531 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4532 Pedro Alves <palves@redhat.com>
4533
4534 Skip building gdbserver in a cross-configuration.
4535 * configure.srv: Set $gdbserver_host depending on whether $target
4536 is $host. Use $gdbserver_host instead of $host.
4537
4538 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4539
4540 * configure: Re-generate.
4541
4542 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4543
4544 * configure: Re-generate.
4545
4546 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4547
4548 * acinclude.m4: Update warning.m4 path.
4549
4550 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4551
4552 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4553 (handle_exception): Set siginfo_er.
4554 (win32_xfer_siginfo): New function.
4555
4556 2020-02-07 Tom Tromey <tom@tromey.com>
4557 Pedro Alves <palves@redhat.com>
4558
4559 * README: Update build documentation.
4560 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4561 host, not target.
4562 * configure.ac: Update paths.
4563 * configure: Rebuild.
4564 * acinclude.m4: Update paths.
4565 * Makefile.in: Update include paths.
4566 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4567 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4568 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4569 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4570 (%-generated.c): Update paths.
4571 * Move entire directory from ../gdb/gdbserver.
4572
4573 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4574
4575 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4576
4577 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4578
4579 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4580 assignment instead of srv_linux_obj.
4581
4582 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4583
4584 * server.c (handle_qxfer_libraries): Write segment-address with
4585 paddress.
4586
4587 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4588
4589 * Makefile.in (install-strip): New target.
4590 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4591 * aclocal.m4: Regenerate.
4592 * configure: Regenerate.
4593 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4594
4595 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4596
4597 * Makefile.in (SFILES): Adjust paths to point to real files.
4598 (OBS): Move waitstatus.o to target/waitstatus.o.
4599 (TAGS): Transform paths appropriately.
4600 (%.o): Rename to...
4601 (nat/%.o): ... this pattern rule.
4602 (%.o): Rename to...
4603 (target/%.o): ... this pattern rule.
4604 * configure.srv: Adjust paths throughout to include nat/ prefix
4605 with the revant files.
4606 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4607 * configure: Regenerate.
4608
4609 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4610
4611 * Makefile.in (TAGS): Remove config files from the recipe.
4612
4613 2020-01-14 Tom Tromey <tom@tromey.com>
4614
4615 * configure: Rebuild.
4616 * configure.ac: Remove any checks that were added to common.m4.
4617 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4618 lib-link.m4.
4619
4620 2020-01-14 Tom Tromey <tom@tromey.com>
4621
4622 * server.h: Include config.h.
4623 * gdbreplay.c: Include config.h.
4624 * configure: Rebuild.
4625 * configure.ac: Don't source common.host.
4626 * acinclude.m4: Update path.
4627 * Makefile.in (INCSUPPORT): New variable.
4628 (INCLUDE_CFLAGS): Add INCSUPPORT.
4629 (SFILES): Update paths.
4630 (version-generated.c): Update path to create-version.sh.
4631 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4632
4633 2020-01-14 Tom Tromey <tom@tromey.com>
4634
4635 * configure.ac (LIBS): Use WIN32APILIBS.
4636 (USE_WIN32API): Don't define.
4637 * configure: Rebuild.
4638
4639 2020-01-14 Tom Tromey <tom@tromey.com>
4640
4641 * configure: Rebuild.
4642
4643 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4644
4645 * Makefile.in (%-generated.c): Remove rule for files from
4646 regformats/i386.
4647
4648 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4649
4650 * configure: Re-generate.
4651
4652 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4653
4654 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4655 Define to static.
4656 * tracepoint.c (stop_tracing, flush_trace_buffer,
4657 about_to_request_buffer_space, get_trace_state_variable_value,
4658 set_trace_state_variable_value, gdb_collect): Add declaration.
4659
4660 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4661
4662 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4663 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4664 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4665 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4666 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4667 static.
4668
4669 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4670
4671 * inferiors.c: Include gdbsupport/common-inferior.h.
4672
4673 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4674
4675 * hostio-errno.c: Include hostio.h.
4676
4677 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4678
4679 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4680 prerequisite.
4681
4682 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4683
4684 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4685 * linux-arm-tdesc.h: Include arch/arm.h.
4686
4687 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4688
4689 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4690
4691 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4692
4693 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4694 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4695
4696 2020-01-10 Pedro Alves <palves@redhat.com>
4697
4698 * fork-child.c (post_fork_inferior): Pass target down to
4699 startup_inferior.
4700 * inferiors.c (switch_to_thread): Add process_stratum_target
4701 parameter.
4702 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4703 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4704 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4705 * remote-utils.c (prepare_resume_reply): Pass the target to
4706 switch_to_thread.
4707 * target.c (the_target): Now a process_stratum_target.
4708 (done_accessing_memory): Pass the target to switch_to_thread.
4709 (set_target_ops): Ajust to use process_stratum_target.
4710 * target.h (struct target_ops): Rename to ...
4711 (struct process_stratum_target): ... this.
4712 (the_target, set_target_ops): Adjust.
4713 (prepare_to_access_memory): Adjust comment.
4714 * win32-low.c (child_xfer_memory): Adjust to use
4715 process_stratum_target.
4716 (win32_target_ops): Now a process_stratum_target.
4717
4718 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4719 Pedro Alves <palves@redhat.com>
4720
4721 * win32-low.c (get_child_debug_event): Extract the fatal exception
4722 from the exit status and convert to the equivalent Posix signal
4723 number.
4724 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4725 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4726
4727 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4728
4729 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4730
4731 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4732
4733 * server.c (gdbserver_version): Change copyright year to 2020.
4734 * gdbreplay.c (gdbreplay_version): Likewise.
4735
4736 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4737
4738 * configure: Regenerate.
4739 * configure.ac: Quote variable arguments of test.
4740
4741 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4742
4743 * Makefile.in: Fix build with GNU Make 3.81
4744
4745 2019-12-16 Tom Tromey <tromey@adacore.com>
4746
4747 * server.c (get_exec_file): Constify result.
4748
4749 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4750
4751 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4752 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4753 * config.in: Regenerate.
4754 * configure: Regenerate.
4755 * configure.ac: Don't check for strerror.
4756 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4757 Call safe_strerror instead of strerror.
4758 * server.h (strerror): Remove this now-unnecessary declaration.
4759 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4760 strerror.
4761 (gdb_agent_helper_thread): Likewise.
4762 * utils.c (perror_with_name): Likewise.
4763
4764 2019-11-26 Tom Tromey <tom@tromey.com>
4765
4766 * configure, config.in: Rebuild.
4767
4768 2019-11-26 Tom Tromey <tom@tromey.com>
4769
4770 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4771 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4772 gdb_sigmask.
4773 * configure, config.in: Rebuild.
4774
4775 2019-11-26 Tom Tromey <tom@tromey.com>
4776
4777 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4778 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4779 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4780 * acinclude.m4: Include ax_pthread.m4.
4781 * config.in, configure: Rebuild.
4782
4783 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4784
4785 * debug.c (debug_set_output): Call safe_strerror instead of
4786 strerror.
4787 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4788 (linux_kill_one_lwp): Likewise.
4789 (linux_detach_one_lwp): Likewise.
4790 (linux_wait_for_event_filtered): Likewise.
4791 (store_register): Likewise.
4792 * lynx-low.c (lynx_attach): Likewise.
4793 * mem-break.c (insert_memory_breakpoint): Likewise.
4794 (remove_memory_breakpoint): Likewise.
4795 (delete_fast_tracepoint_jump): Likewise.
4796 (set_fast_tracepoint_jump): Likewise.
4797 (uninsert_fast_tracepoint_jumps_at): Likewise.
4798 (reinsert_fast_tracepoint_jumps_at): Likewise.
4799 * nto-low.c (nto_xfer_memory): Likewise.
4800 (nto_resume): Likewise.
4801
4802 2019-11-20 Luis Machado <luis.machado@linaro.org>
4803
4804 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4805 instead of register count.
4806 * tdesc.c (tdesc_contains_feature): New function.
4807 * tdesc.h (tdesc_contains_feature): New prototype.
4808
4809 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4810
4811 * Makefile.in: Add safe-strerror.c.
4812 * configure: Regenerate.
4813 * configure.ac: Don't source common.host.
4814
4815 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4816
4817 * config.in: Regenerate.
4818 * configure: Regenerate.
4819
4820 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4821
4822 * ax.c (ax_printf): Handle size_t_arg.
4823
4824 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4825
4826 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4827 * mi/mi-main.c (output_cores): Likewise.
4828 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4829 (linux_xfer_osdata_modules): Likewise.
4830 * remote.c (register_remote_support_xml): Likewise.
4831 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4832 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4833
4834 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4835
4836 * configure: Regenerate.
4837 * configure.ac: Remove check for strerror_r.
4838
4839 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4840
4841 * config.in: Regenerate.
4842 * configure: Regenerate.
4843 * configure.ac: Also check for strerror_r.
4844
4845 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4846
4847 * ax.h (debug_agent): Remove duplicate declaration.
4848
4849 2019-10-26 Tom de Vries <tdevries@suse.de>
4850
4851 * linux-aarch64-low.c: Fix typos in comments.
4852 * linux-arm-low.c: Same.
4853 * linux-low.c: Same.
4854 * linux-ppc-low.c: Same.
4855 * proc-service.c: Same.
4856 * regcache.h: Same.
4857 * server.c: Same.
4858 * tracepoint.c: Same.
4859 * win32-low.c: Same.
4860
4861 2019-10-25 Tom Tromey <tromey@adacore.com>
4862
4863 * utils.c (xstrdup): Remove.
4864
4865 2019-10-23 Tom Tromey <tom@tromey.com>
4866
4867 * configure, config.in: Rebuild.
4868
4869 2019-10-23 Tom Tromey <tom@tromey.com>
4870
4871 * configure: Rebuild.
4872 * acinclude.m4: Use m4_include, not sinclude.
4873
4874 2019-10-17 Tom Tromey <tromey@adacore.com>
4875
4876 * configure: Rebuild.
4877 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4878 in AC_CONFIG_FILES invocation.
4879 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4880 invocation.
4881
4882 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4883
4884 * server.c: Include xml-builtin.h.
4885 (get_xml_features): Don't declare xml_builtins here.
4886
4887 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4888
4889 * Makefile.in: Remove references to vec-ipa.o.
4890
4891 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4892
4893 * Makefile.in: Remove references to vec.c.
4894
4895 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4896
4897 * server.c (server_waiting): Change to bool.
4898 (extended_protocol): Likewise.
4899 (response_needed): Likewise.
4900 (exit_requested): Likewise.
4901 (run_once): Likewise.
4902 (report_no_resumed): Likewise.
4903 (non_stop): Likewise.
4904 (disable_packet_vCont): Likewise.
4905 (disable_packet_Tthread): Likewise.
4906 (disable_packet_qC): Likewise.
4907 (disable_packet_qfThreadInfo): Likewise.
4908 (handle_general_set): Update.
4909 (handle_detach): Update.
4910 (handle_monitor_command): Update.
4911 (handle_query): Update.
4912 (captured_main): Update.
4913 (process_serial_event): Update.
4914 * server.h (server_waiting): Change to bool.
4915 (disable_packet_vCont): Likewise.
4916 (disable_packet_Tthread): Likewise.
4917 (disable_packet_qC): Likewise.
4918 (disable_packet_qfThreadInfo): Likewise.
4919 (run_once): Likewise.
4920 (non_stop): Likewise.
4921 * target.c (target_stop_and_wait): Update.
4922
4923 2019-10-02 Tom Tromey <tromey@adacore.com>
4924
4925 * Makefile.in (SFILES): Add common-inferior.c.
4926 (OBS): Add common-inferior.o.
4927 * server.c (startup_with_shell): Don't define.
4928
4929 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4930
4931 * linux-low.c (linux_low_read_btrace): Update for change to
4932 std::vector.
4933
4934 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4935
4936 * debug.c (debug_threads): Remove comment in favor of the header.
4937 * debug.h (using_threads): Add declaration.
4938 (debug_threads): Add comment.
4939 * linux-aarch64-low.c: Include debug.h and remove declaration of
4940 debug_threads.
4941 * nto-low.c: Likewise.
4942 * remote-utils.c: Likewise.
4943 * thread-db.c: Likewise.
4944
4945 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4946
4947 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4948 and powerpc-cell64l-ipa.o.
4949 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4950 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4951 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4952 (spu*-*-*): Remove.
4953
4954 * spu-low.c: Remove file.
4955
4956 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4957 (parse_spufs_run): Remove.
4958 (ppc_get_pc): Remove Cell/B.E. support.
4959 (ppc_set_pc): Likewise.
4960 (ppc_breakpoint_at): Likewise.
4961 (ppc_arch_setup): Likewise.
4962 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4963 tdesc_powerpc_cell32l.
4964 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4965 or init_registers_powerpc_cell32l.
4966 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4967 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4968 or init_registers_powerpc_cell32l.
4969 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4970 (init_registers_powerpc_cell32l): Remove prototype.
4971 (init_registers_powerpc_cell64l): Likewise.
4972
4973 * target.h (struct target_ops): Remove qxfer_spu member.
4974 * server.c (handle_qxfer_spu): Remove.
4975 (qxfer_packets): Remove entry for "spu".
4976 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4977 * linux-low.c (SPUFS_MAGIC): Remove.
4978 (spu_enumerate_spu_ids): Remove.
4979 (linux_qxfer_spu): Remove.
4980 (linux_target_ops): Remove qxfer_spu member.
4981 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4982 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4983 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4984
4985 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4986
4987 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4988 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4989 * config.in: Regenerate.
4990 * configure: Regenerate.
4991
4992 2019-08-15 Tom Tromey <tromey@adacore.com>
4993
4994 * target.c (target_write_memory): Use gdb::byte_vector.
4995
4996 2019-08-15 Tom Tromey <tromey@adacore.com>
4997
4998 * tracepoint.c (write_inferior_data_pointer)
4999 (write_inferior_integer, write_inferior_int8)
5000 (write_inferior_uinteger, m_tracepoint_action_download)
5001 (r_tracepoint_action_download, x_tracepoint_action_download)
5002 (l_tracepoint_action_download, clear_inferior_trace_buffer)
5003 (download_agent_expr, download_tracepoint_1)
5004 (download_trace_state_variables, upload_fast_traceframes): Update.
5005 * server.c (gdb_write_memory): Update.
5006 * remote-utils.c (relocate_instruction): Update.
5007 * proc-service.c (ps_pdwrite): Update.
5008 * mem-break.c (remove_memory_breakpoint)
5009 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
5010 (uninsert_fast_tracepoint_jumps_at)
5011 (reinsert_fast_tracepoint_jumps_at): Update.
5012 * linux-x86-low.c (append_insns)
5013 (i386_install_fast_tracepoint_jump_pad)
5014 (amd64_write_goto_address, i386_write_goto_address): Update.
5015 * linux-s390-low.c (append_insns, s390_write_goto_address):
5016 Update.
5017 * linux-ppc-low.c (ppc_relocate_instruction)
5018 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
5019 (ppc_write_goto_address): Update.
5020 * linux-aarch64-low.c (append_insns): Update.
5021 * target.h (struct target_ops): Update.
5022 (write_inferior_memory): Don't declare.
5023 * target.c (target_write_memory): Rename from
5024 write_inferior_memory. Remove old target_write_memory.
5025
5026 2019-08-15 Tom Tromey <tromey@adacore.com>
5027
5028 * target.c (write_inferior_memory): Use std::vector.
5029
5030 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
5031
5032 PR build/24886
5033 * configure.ac: Drop enable-libmcheck support.
5034 * configure, config.in: Rebuild.
5035 * acinclude.m4: Don't include it.
5036
5037 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5038
5039 * configure.srv: Remove Arm xml files.
5040
5041 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5042
5043 * configure.srv: Add new files. Remove xml generated files.
5044 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
5045 registers.
5046 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
5047 * linux-aarch32-tdesc.c: New file.
5048 * linux-aarch32-tdesc.h: New file.
5049 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
5050 * linux-arm-low.c (init_registers_arm, tdesc_arm)
5051 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
5052 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
5053 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
5054 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5055 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
5056 (arm_read_description): Call arm_linux_read_description.
5057 (initialize_low_arch): Don't init registers.
5058 * linux-arm-tdesc.c: New file.
5059 * linux-arm-tdesc.h: New file.
5060
5061 2019-07-10 Alan Hayward <alan.hayward@arm.com>
5062
5063 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
5064 Move counter inside for.
5065 (arm_read_description): Check ptrace earlier.
5066 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
5067
5068 2019-07-09 Tom Tromey <tom@tromey.com>
5069
5070 * configure: Rebuild.
5071 * configure.ac: Change common to gdbsupport.
5072 * acinclude.m4: Change common to gdbsupport.
5073 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
5074 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
5075 common to gdbsupport.
5076 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
5077 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
5078 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
5079 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
5080 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
5081 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
5082 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
5083 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
5084 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
5085 common to gdbsupport.
5086
5087 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5088
5089 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
5090 defines.
5091 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
5092
5093 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5094
5095 * configure.srv: Remove legacy xml.
5096 * linux-aarch64-low.c (initialize_low_arch): Remove
5097 initialize_low_tdesc call.
5098 * linux-aarch64-tdesc-selftest.c: Remove file.
5099 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
5100 * linux-x86-low.c (initialize_low_arch): Remove
5101 initialize_low_tdesc call.
5102 * linux-x86-tdesc-selftest.c: Remove file.
5103 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
5104
5105 2019-06-20 Tom de Vries <tdevries@suse.de>
5106
5107 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
5108 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
5109
5110 2019-06-19 Tom de Vries <tdevries@suse.de>
5111
5112 * debug.h (debug_write): Change return type to ssize_t.
5113 * debug.c (debug_write): Same.
5114
5115 2019-06-14 Tom Tromey <tom@tromey.com>
5116
5117 * configure.ac: Use new path to gnulib.
5118 * configure: Rebuild.
5119 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
5120 to gnulib.
5121
5122 2019-06-11 Tom Tromey <tom@tromey.com>
5123
5124 * Makefile.in (SFILES): Add alloc.c.
5125 (OBS): Add alloc.o.
5126 (IPA_OBJS): Add alloc-ipa.o.
5127 (alloc-ipa.o): New target.
5128 (%.o: ../%.c): New pattern rule.
5129
5130 2019-06-10 Tom Tromey <tromey@adacore.com>
5131
5132 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
5133 end warning with a newline.
5134 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
5135 newline.
5136 * thread-db.c (attach_thread): Don't end warning with a newline.
5137 (thread_db_notice_clone): Likewise.
5138 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
5139 newline.
5140 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
5141 end warning with a newline.
5142
5143 2019-06-04 Pedro Alves <palves@redhat.com>
5144
5145 * server.c (captured_main): Use make_unique_xstrdup.
5146
5147 2019-06-02 Tom Tromey <tom@tromey.com>
5148
5149 * gdbreplay.c (fromhex): Remove.
5150 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5151
5152 2019-05-29 Tom Tromey <tromey@adacore.com>
5153
5154 * configure: Rebuild.
5155
5156 2019-05-06 Kevin Buettner <kevinb@redhat.com>
5157
5158 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
5159 sign extension code on 32-bit builds.
5160
5161 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5162
5163 * remote-utils.c:
5164 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5165
5166 2019-04-19 Tom Tromey <tom@tromey.com>
5167
5168 * server.c (struct vstop_notif): Derive from notif_event.
5169 <base>: Remove.
5170 (queue_stop_reply): Update.
5171 (remove_all_on_match_ptid): Change type. Rewrite.
5172 (discard_queued_stop_replies): Rewrite.
5173 (in_queued_stop_replies_ptid): Change type.
5174 (in_queued_stop_replies): Rewrite.
5175 (notif_stop): Update.
5176 (queue_stop_reply_callback): Update.
5177 (captured_main): Don't call initialize_notif.
5178 (push_stop_notification): Update.
5179 * notif.c (notif_write_event, handle_notif_ack)
5180 (notif_event_enque, notif_push): Update.
5181 (notif_event_xfree, initialize_notif): Remove.
5182 * notif.h (struct notif_event): Include <list>, not
5183 "common/queue.h".
5184 (struct notif_server) <queue>: Now a std::list.
5185 (notif_event_p): Remove typedef.
5186 (initialize_notif): Don't declare.
5187 (struct notif_event): Add virtual destructor.
5188
5189 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5190
5191 * ax.c (ax_vdebug): Call debug_printf.
5192 * debug.c (debug_write): New function.
5193 * debug.h (debug_write): New declaration.
5194 * linux-low.c (sigchld_handler): Call debug_write.
5195
5196 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5197
5198 * debug.c (debug_set_output): New function.
5199 (debug_vprintf): Send output to debug_file.
5200 (debug_flush): Likewise.
5201 * debug.h (debug_set_output): New declaration.
5202 * server.c (handle_monitor_command): Add debug-file option.
5203 (captured_main): Likewise.
5204
5205 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5206
5207 * debug.c (remote_debug): Add definition.
5208 * debug.h (remote_debug): Add declaration.
5209 * hostio.c (remote_debug): Remove declaration.
5210 * remote-utils.c (struct ui_file): Likewise.
5211 (remote_debug): Likewise.
5212 * remote-utils.h (remote_debug): Likewise,
5213 * server.c (remote_debug): Remove definition.
5214
5215 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5216
5217 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5218 when using a 64-bit gdbserver.
5219
5220 2019-04-09 Tom Tromey <tromey@adacore.com>
5221
5222 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5223
5224 2019-04-08 Tom Tromey <tom@tromey.com>
5225
5226 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5227 throw.
5228 (linux_resume_one_lwp): Likewise.
5229
5230 2019-04-08 Tom Tromey <tom@tromey.com>
5231
5232 * gdbreplay.c: Update.
5233 * linux-low.c: Update.
5234 * server.c: Update.
5235
5236 2019-04-08 Tom Tromey <tom@tromey.com>
5237
5238 * server.c: Use C++ exception handling.
5239 * linux-low.c: Use C++ exception handling.
5240 * gdbreplay.c: Use C++ exception handling.
5241
5242 2019-04-08 Tom Tromey <tom@tromey.com>
5243
5244 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5245 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5246 (captured_main, main): Update.
5247 * gdbreplay.c (main): Update.
5248
5249 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5250
5251 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5252 value in argument pointer, return 1 if the entry is found and 0
5253 otherwise. Move comment.
5254 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5255 * linux-low.h (linux_get_auxv): Declare.
5256 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5257
5258 2019-04-05 Tom Tromey <tromey@adacore.com>
5259
5260 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5261 variables.
5262
5263 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5264
5265 * linux-low.c (AT_HWCAP2): Add define if not already included.
5266
5267 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5268
5269 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5270 (aarch64_arch_setup): Call linux_get_hwcap.
5271 * linux-arm-low.c (arm_get_hwcap): Remove function.
5272 (arm_read_description): Call linux_get_hwcap.
5273 * linux-low.c (linux_get_auxv): New function.
5274 (linux_get_hwcap): Likewise.
5275 (linux_get_hwcap2): Likewise.
5276 * linux-low.h (linux_get_hwcap): New declaration.
5277 (linux_get_hwcap2): Likewise.
5278 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5279 (ppc_arch_setup): Call linux_get_hwcap.
5280 * linux-s390-low.c (s390_get_hwcap): Remove function.
5281 (s390_arch_setup): Call linux_get_hwcap.
5282
5283 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5284 Jiong Wang <jiong.wang@arm.com>
5285
5286 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5287 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5288 to fail.
5289 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5290
5291 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5292 Jiong Wang <jiong.wang@arm.com>
5293
5294 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5295 (aarch64_get_hwcap): New function.
5296 (aarch64_arch_setup): Read APIA hwcap.
5297
5298 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5299 Jiong Wang <jiong.wang@arm.com>
5300
5301 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5302 (initialize_low_tracepoint): Likewise.
5303 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5304 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5305 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5306 (aarch64_linux_read_description): Likewise.
5307 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5308
5309 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5310
5311 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5312 i386_create_target_description for 'segments' parameter.
5313 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5314 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5315 * win32-i386-low.c (i386_arch_setup): Likewise.
5316
5317 2019-03-12 Tom Tromey <tromey@adacore.com>
5318
5319 * linux-low.c (iterate_over_lwps): Update.
5320
5321 2019-03-06 Tom Tromey <tom@tromey.com>
5322
5323 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5324 (captured_main): Use SCOPE_EXIT.
5325
5326 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5327
5328 * configure.srv: Use '$enable_unittest' instead of '$development'
5329 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5330 case.
5331
5332 2019-02-27 Tom Tromey <tromey@adacore.com>
5333
5334 * gdbreplay.c (logchar): Handle \r\n.
5335
5336 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5337
5338 * linux-low.c (linux_attach): Add process before lwp.
5339 * server.c (attach_inferior): Check if already attached.
5340
5341 2019-02-07 Tom Tromey <tom@tromey.com>
5342
5343 * x86-tdesc.h: Rename include guard.
5344 * x86-low.h: Add include guard.
5345 * wincecompat.h: Rename include guard.
5346 * win32-low.h: Add include guard.
5347 * utils.h: Rename include guard.
5348 * tracepoint.h: Rename include guard.
5349 * tdesc.h: Rename include guard.
5350 * target.h: Rename include guard.
5351 * server.h: Rename include guard.
5352 * remote-utils.h: Rename include guard.
5353 * regcache.h: Rename include guard.
5354 * nto-low.h: Rename include guard.
5355 * notif.h: Add include guard.
5356 * mem-break.h: Rename include guard.
5357 * lynx-low.h: Add include guard.
5358 * linux-x86-tdesc.h: Add include guard.
5359 * linux-s390-tdesc.h: Add include guard.
5360 * linux-ppc-tdesc-init.h: Add include guard.
5361 * linux-low.h: Add include guard.
5362 * linux-aarch64-tdesc.h: Add include guard.
5363 * linux-aarch32-low.h: Add include guard.
5364 * inferiors.h: Rename include guard.
5365 * i387-fp.h: Rename include guard.
5366 * hostio.h: Rename include guard.
5367 * gdbthread.h: Rename include guard.
5368 * gdb_proc_service.h: Rename include guard.
5369 * event-loop.h: Rename include guard.
5370 * dll.h: Rename include guard.
5371 * debug.h: Rename include guard.
5372 * ax.h: Rename include guard.
5373
5374 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5375
5376 PR gdb/23985
5377 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5378 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5379
5380 2019-01-25 Tom Tromey <tom@tromey.com>
5381
5382 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5383
5384 2019-01-25 Tom Tromey <tom@tromey.com>
5385
5386 * win32-low.c: Fix common/ includes.
5387 * win32-i386-low.c: Fix common/ includes.
5388 * tracepoint.c: Fix common/ includes.
5389 * thread-db.c: Fix common/ includes.
5390 * target.h: Fix common/ includes.
5391 * symbol.c: Fix common/ includes.
5392 * spu-low.c: Fix common/ includes.
5393 * server.h: Fix common/ includes.
5394 * server.c: Fix common/ includes.
5395 * remote-utils.c: Fix common/ includes.
5396 * regcache.h: Fix common/ includes.
5397 * regcache.c: Fix common/ includes.
5398 * nto-x86-low.c: Fix common/ includes.
5399 * notif.h: Fix common/ includes.
5400 * mem-break.h: Fix common/ includes.
5401 * lynx-low.c: Fix common/ includes.
5402 * lynx-i386-low.c: Fix common/ includes.
5403 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5404 * linux-x86-low.c: Fix common/ includes.
5405 * linux-low.c: Fix common/ includes.
5406 * inferiors.h: Fix common/ includes.
5407 * i387-fp.c: Fix common/ includes.
5408 * hostio.c: Fix common/ includes.
5409 * hostio-errno.c: Fix common/ includes.
5410 * gdbthread.h: Fix common/ includes.
5411 * gdbreplay.c: Fix common/ includes.
5412 * fork-child.c: Fix common/ includes.
5413 * event-loop.c: Fix common/ includes.
5414 * ax.c:
5415 (enum gdb_agent_op): Fix common/ includes.
5416
5417 2019-01-21 Tom Tromey <tom@tromey.com>
5418
5419 * tracepoint.c: Fix includes.
5420 * remote-utils.c: Fix includes.
5421 * linux-x86-low.c: Fix includes.
5422
5423 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5424
5425 * gdbreplay.c (gdbreplay_version): Update copyright year in
5426 version message.
5427 * server.c (gdbserver_version): Likewise.
5428
5429 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5430
5431 * linux-low.c (add_lwp): Switch ordering.
5432
5433 2018-11-29 Tom Tromey <tom@tromey.com>
5434
5435 * win32-low.c (win32_join): Take pid, not process.
5436 * target.h (struct target_ops) <join>: Change argument type.
5437 (join_inferior): Change argument name.
5438 * spu-low.c (spu_join): Take pid, not process.
5439 * server.c (handle_detach): Preserve pid before destroying
5440 process.
5441 * lynx-low.c (lynx_join): Take pid, not process.
5442 * linux-low.c (linux_join): Take pid, not process.
5443
5444 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5445
5446 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5447 (aarch64_cannot_fetch_register): Likewise.
5448 (struct linux_target_ops): Update references.
5449
5450 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5451
5452 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5453
5454 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5455
5456 * configure.srv (ipa_ppc_linux_regobj): Add
5457 powerpc-isa207-htm-vsx32l-ipa.o and
5458 powerpc-isa207-htm-vsx64l-ipa.o.
5459 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5460 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5461 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5462 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5463 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5464 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5465 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5466 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5467 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5468 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5469 (init_registers_powerpc_isa207_htm_vsx32l)
5470 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5471 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5472 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5473 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5474 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5475 (ppc_store_tm_ctarregset): New functions.
5476 (ppc_regsets): Add entries for HTM regsets.
5477 (ppc_arch_setup): Set htm in features struct when needed. Set
5478 sizes for the HTM regsets.
5479 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5480 (initialize_low_arch): Call
5481 init_registers_powerpc_isa207_htm_vsx32l and
5482 init_registers_powerpc_isa207_htm_vsx64l.
5483 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5484 PPC_TDESC_ISA207_HTM_VSX.
5485 (initialize_low_tracepoint): Call
5486 init_registers_powerpc_isa207_htm_vsx32l and
5487 init_registers_powerpc_isa207_htm_vsx64l.
5488
5489 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5490
5491 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5492 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5493 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5494 (ppc_store_pmuregset): New functions.
5495 (ppc_regsets): Add entries for ebb and pmu regsets.
5496 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5497 pmu regsets are available. Set sizes for these regsets.
5498
5499 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5500
5501 * configure.srv (ipa_ppc_linux_regobj): Add
5502 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5503 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5504 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5505 rs6000/powerpc-isa207-vsx32l.xml, and
5506 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5507 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5508 <PPC_TDESC_ISA207_VSX>: New enum value.
5509 (init_registers_powerpc_isa207_vsx32l): Declare.
5510 (init_registers_powerpc_isa207_vsx64l): Declare.
5511 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5512 (ppc_store_tarregset): New function.
5513 (ppc_regsets): Add entry for the TAR regset.
5514 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5515 size for the TAR regsets.
5516 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5517 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5518 and init_registers_powerpc_isa207_vsx64l.
5519 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5520 (initialize_low_tracepoint): Call
5521 init_registers_powerpc_isa207_vsx32l and
5522 init_registers_powerpc_isa207_vsx64l.
5523
5524 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5525 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5526
5527 * configure.srv (ipa_ppc_linux_regobj): Add
5528 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5529 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5530 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5531 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5532 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5533 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5534 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5535 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5536 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5537 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5538 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5539 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5540 (ppc_hwcap): Add comment.
5541 (ppc_hwcap2): New global.
5542 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5543 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5544 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5545 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5546 when needed. Set sizes for the the DSCR and PPR regsets.
5547 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5548 (initialize_low_arch): Call
5549 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5550 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5551 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5552 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5553 (initialize_low_tracepoint): Call
5554 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5555 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5556
5557 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5558
5559 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5560
5561 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5562 Simon Marchi <simark@simark.ca>
5563
5564 * acinclude.m4: Include "../selftest.m4".
5565 * configure: Regenerate.
5566 * configure.ac: Use "GDB_AC_SELFTEST".
5567 * configure.srv: Use "$enable_unittests" instead of
5568 "$development" when checking whether unit tests have been
5569 enabled.
5570 * server.c (captured_main): Update message informing that
5571 selftests have been disabled.
5572
5573 2018-10-04 Tom Tromey <tom@tromey.com>
5574
5575 * configure: Rebuild.
5576
5577 2018-10-04 Tom Tromey <tom@tromey.com>
5578
5579 * server.c (handle_status): Rename inner "thread".
5580 (process_serial_event): Declare "res" in 'm' case.
5581 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5582 (iterate_over_lwps): Rename inner "thread".
5583 (linux_qxfer_libraries_svr4): Rename inner "len".
5584 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5585
5586 2018-10-01 Gary Benson <gbenson@redhat.com>
5587
5588 * gdb_proc_service.h: Moved common code to
5589 common/gdb_proc_service.h.
5590
5591 2018-10-01 Gary Benson <gbenson@redhat.com>
5592
5593 * gdb_proc_service.h: Synchronize comments and whitespace with
5594 GDB's version of this file.
5595
5596 2018-09-25 Tom Tromey <tom@tromey.com>
5597
5598 * configure: Rebuild.
5599 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5600
5601 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5602
5603 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5604 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5605 ($(IPA_LIB)): Sort IPA_OBJS.
5606
5607 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5608
5609 * Makefile.in: Remove references to $(ADD_DEPS).
5610
5611 2018-09-16 Tom Tromey <tom@tromey.com>
5612
5613 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5614 variables.
5615 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5616 variables.
5617
5618 2018-09-05 Tom Tromey <tom@tromey.com>
5619
5620 * configure: Rebuild.
5621
5622 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5623
5624 PR build/23399
5625 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5626
5627 2018-08-27 Tom Tromey <tom@tromey.com>
5628
5629 PR build/23087:
5630 * configure: Rebuild.
5631
5632 2018-08-27 Tom Tromey <tom@tromey.com>
5633
5634 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5635 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5636 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5637 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5638 (s390x_emit_stack_adjust): Add casts to unsigned char.
5639
5640 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5641
5642 PR gdb/23374
5643 PR gdb/23375
5644 * server.h (struct client_state) <disable_randomization>:
5645 Initialize to 1.
5646
5647 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5648
5649 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5650 variable.
5651 (mips_supply_ptrace_register): Likewise.
5652
5653 2018-07-22 Tom Tromey <tom@tromey.com>
5654
5655 * configure: Rebuild.
5656
5657 2018-07-22 Tom Tromey <tom@tromey.com>
5658
5659 * win32-low.c (win32_create_inferior): Remove unused variables.
5660 * gdbreplay.c (remote_open): Remove unused variable.
5661 * remote-utils.c (remote_prepare): Remove unused variable.
5662 * x86-tdesc.h (X86_TDESC_H): Define.
5663 (amd64_expedite_regs): Define conditionally.
5664 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5665 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5666 * remote-utils.c (readchar): Remove unused variable.
5667
5668 2018-07-13 Pedro Alves <palves@redhat.com>
5669
5670 * linux-low.c (linux_kill): Change parameter to process_info
5671 pointer instead of pid. Adjust.
5672 * lynx-low.c (lynx_kill): Likewise.
5673 * nto-low.c (nto_kill): Likewise.
5674 * spu-low.c (spu_kill): Likewise.
5675 * win32-low.c (win32_kill): Likewise.
5676 * server.c (handle_v_kill, kill_inferior_callback)
5677 (detach_or_kill_for_exit): Adjust.
5678 * target.c (kill_inferior): Change parameter to process_info
5679 pointer instead of pid. Adjust.
5680 * target.h (struct target_ops) <kill>: Change parameter to
5681 process_info pointer instead of pid. Adjust all implementations
5682 and callers.
5683 (kill_inferior): Likewise.
5684
5685 2018-07-13 Pedro Alves <palves@redhat.com>
5686
5687 * linux-low.c (linux_detach, linux_join): Change parameter to
5688 process_info pointer instead of pid. Adjust.
5689 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5690 * nto-low.c (nto_detach): Likewise.
5691 * spu-low.c (spu_detach, spu_join): Likewise.
5692 * win32-low.c (win32_detach, win32_join): Likewise.
5693 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5694 * target.h (struct target_ops) <detach, join>: Change parameter to
5695 process_info pointer instead of pid. Adjust all implementations
5696 and callers.
5697 (detach_inferior, join_inferior): Rename 'pid' parameter to
5698 'proc'.
5699
5700 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5701 Jan Kratochvil <jan.kratochvil@redhat.com>
5702 Paul Fertser <fercerpav@gmail.com>
5703 Tsutomu Seki <sekiriki@gmail.com>
5704
5705 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5706 (OBS): Add 'common/netstuff.o'.
5707 (GDBREPLAY_OBS): Likewise.
5708 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5709 (remote_open): Implement support for IPv6
5710 connections.
5711 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5712 and 'wspiapi.h'.
5713 (handle_accept_event): Accept connections from IPv6 sources.
5714 (remote_prepare): Handle IPv6-style hostnames; implement
5715 support for IPv6 connections.
5716 (remote_open): Implement support for printing connections from
5717 IPv6 sources.
5718
5719 2018-07-11 Pedro Alves <palves@redhat.com>
5720
5721 PR gdb/23377
5722 * mem-break.c (any_persistent_commands): Add process_info
5723 parameter and use it instead of relying on the current process.
5724 Change return type to bool.
5725 * mem-break.h (any_persistent_commands): Add process_info
5726 parameter and change return type to bool.
5727 * server.c (handle_detach): Remove require_running_or_return call.
5728 Look up the process_info for the process we're about to detach.
5729 If not found, return back error to GDB. Adjust
5730 any_persistent_commands call to pass down a process pointer.
5731
5732 2018-07-11 Pedro Alves <palves@redhat.com>
5733
5734 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5735 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5736 instead of collect_register_by_name.
5737 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5738 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5739
5740 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5741 Pedro Alves <palves@redhat.com>
5742
5743 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5744
5745 2018-07-03 Tom Tromey <tom@tromey.com>
5746
5747 * linux-low.c: Update.
5748 * lynx-low.c: Update.
5749 * mem-break.c: Update.
5750 * nto-low.c: Update.
5751 * remote-utils.c: Update.
5752 * server.c: Update.
5753 * spu-low.c: Update.
5754 * target.c: Update.
5755 * win32-low.c: Update.
5756
5757 2018-07-03 Tom Tromey <tom@tromey.com>
5758
5759 * server.c: Update.
5760
5761 2018-07-03 Tom Tromey <tom@tromey.com>
5762
5763 * linux-low.c: Update.
5764
5765 2018-07-03 Tom Tromey <tom@tromey.com>
5766
5767 * target.c: Update.
5768
5769 2018-07-03 Tom Tromey <tom@tromey.com>
5770
5771 * linux-low.c: Update.
5772 * linux-mips-low.c: Update.
5773 * lynx-low.c: Update.
5774 * nto-low.c: Update.
5775 * remote-utils.c: Update.
5776 * server.c: Update.
5777 * spu-low.c: Update.
5778 * target.c: Update.
5779 * thread-db.c: Update.
5780
5781 2018-07-03 Tom Tromey <tom@tromey.com>
5782
5783 * linux-low.c: Update.
5784 * linux-mips-low.c: Update.
5785 * lynx-low.c: Update.
5786 * mem-break.c: Update.
5787 * nto-low.c: Update.
5788 * remote-utils.c: Update.
5789 * server.c: Update.
5790 * spu-low.c: Update.
5791 * target.c: Update.
5792 * tracepoint.c: Update.
5793
5794 2018-07-03 Tom Tromey <tom@tromey.com>
5795
5796 * linux-low.c: Update.
5797 * linux-ppc-low.c: Update.
5798 * linux-x86-low.c: Update.
5799 * proc-service.c: Update.
5800 * server.c: Update.
5801 * spu-low.c: Update.
5802 * thread-db.c: Update.
5803 * win32-low.c: Update.
5804
5805 2018-07-03 Tom Tromey <tom@tromey.com>
5806
5807 * linux-low.c: Update.
5808 * lynx-low.c: Update.
5809 * nto-low.c: Update.
5810 * remote-utils.c: Update.
5811 * spu-low.c: Update.
5812 * thread-db.c: Update.
5813 * win32-low.c: Update.
5814
5815 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5816
5817 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5818 parameter in call to 'amd64_create_target_description'.
5819
5820 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5821
5822 * x86-tdesc.h: Remove executable permission flag.
5823
5824 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5825
5826 * configure.ac: Remove AC_PREREQ, add missing quoting.
5827 * configure: Re-generate.
5828 * config.in: Re-generate.
5829 * aclocal.m4: Re-generate.
5830
5831 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5832
5833 * tracepoint.h (current_traceframe): Remove declaration.
5834
5835 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5836
5837 * linux-aarch64-low.c (is_sve_tdesc): New function.
5838 (aarch64_sve_regs_copy_to_regcache): Likewise.
5839 (aarch64_sve_regs_copy_from_regcache): Likewise.
5840 (aarch64_regs_info): Add SVE checks.
5841 (initialize_low_arch): Initialize SVE.
5842
5843 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5844
5845 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5846
5847 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5848
5849 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5850 (initialize_low_tracepoint): Likewise
5851 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5852 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5853 param.
5854 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5855 checks.
5856 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5857
5858 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5859
5860 * server.h (PBUFSIZ): Increase size
5861
5862 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5863
5864 * regcache.c (regcache::raw_compare): New function.
5865 * regcache.h (regcache::raw_compare): New declaration.
5866
5867 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5868
5869 * regcache.c (new_register_cache): Use new.
5870 (free_register_cache): Use delete.
5871 (register_data): Use const.
5872 (supply_register): Move body inside regcache.
5873 (regcache::raw_supply): New override function.
5874 (collect_register): Move body inside regcache.
5875 (regcache::raw_collect): New override function.
5876 (regcache::get_register_status): New override function.
5877 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5878
5879 2018-06-09 Tom Tromey <tom@tromey.com>
5880
5881 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5882 declare queue.
5883 (event_queue): Use std::queue.
5884 (gdb_event_xfree): Remove.
5885 (initialize_event_loop, process_event, wait_for_event): Update.
5886
5887 2018-06-08 Stan Cox <scox@redhat.com>
5888
5889 * win32-low.c (win32_create_inferior): last_ptid and last_status
5890 moved to client_state.
5891
5892 2018-06-08 Pedro Alves <palves@redhat.com>
5893
5894 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5895 common/common-exceptions.o, common/common-utils.o,
5896 common/errors.o, common/print-utils.o and utils.o.
5897 * gdbreplay.c: Include "common-defs.h" instead of the two
5898 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5899 string.h or alloca.h.
5900 (perror_with_name): Delete.
5901 (remote_open): Use xstrdup instead of strdup.
5902 (main): Rename to ...
5903 (captured_main): ... this.
5904 (main): New.
5905
5906 2018-06-08 Tom Tromey <tom@tromey.com>
5907
5908 * linux-low.c (linux_low_read_btrace): Update.
5909
5910 2018-06-04 Stan Cox <scox@redhat.com>
5911
5912 * server.h (struct client_state): New.
5913 * server.c (cont_thread, general_thread, multi_process)
5914 (report_fork_events, report_vfork_events, report_exec_events)
5915 (report_thread_events, swbreak_feature, hwbreak_feature)
5916 (vCont_supported, disable_randomization, pass_signals)
5917 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5918 Moved to client_state.
5919 * remote-utils.c (remote_debug, noack_mode)
5920 (transport_is_reliable): Moved to client_state.
5921 * tracepoint.c (current_traceframe): Moved to client_state.
5922
5923 Update all callers.
5924 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5925 linux-low.c, remote-utils.h, target.c: Use client_state.
5926
5927 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5928
5929 * configure.srv: Add new c/h file.
5930
5931 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5932
5933 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5934 null VQ.
5935
5936 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5937
5938 * gdb.arch/mips-fpregset-core.exp: New test.
5939 * gdb.arch/mips-fpregset-core.c: New test source.
5940
5941 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5942
5943 PR server/23198
5944 * hostio.c (require_int): Do not report overflow for integers
5945 between 0xfffffff and 0x7fffffff.
5946
5947 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5948
5949 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5950 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5951 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5952 functions.
5953 (the_low_target): Wire them.
5954
5955 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5956
5957 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5958 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5959 mode. Call collect_register_by_name with vscr using
5960 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5961 (ppc_store_vrregset): Add and set vscr_offset variable as in
5962 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5963 vscr_offset.
5964
5965 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5966
5967 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5968 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5969 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5970
5971 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5972
5973 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5974 (ppc_store_vsxregset): Likewise.
5975 (ppc_fill_vrregset): Likewise.
5976 (ppc_store_vrregset): Likewise.
5977 (ppc_fill_evrregset): Likewise.
5978 (ppc_store_evrregset): Likewise.
5979 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5980 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5981 needed.
5982
5983 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5984
5985 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5986 wordsize of the inferior. Call ppc_linux_target_wordsize.
5987
5988 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5989
5990 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5991 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5992 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5993 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5994 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5995 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5996 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5997 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5998 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5999 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6000 (tdesc_powerpc_e500l): Remove.
6001 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
6002 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
6003 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
6004 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
6005 linux-ppc-tdesc.h.
6006 (ppc_arch_setup): Remove target description matching code. Fill a
6007 ppc_linux_features struct and call ppc_linux_match_description
6008 with it.
6009
6010 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6011
6012 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
6013 width of the requested register exceeds the width of the
6014 `ptrace' data type.
6015 (mips_cannot_store_register): Likewise.
6016
6017 2018-05-21 Maciej W. Rozycki <macro@mips.com>
6018
6019 * linux-mips-low.c (mips_fetch_register): New function. Update
6020 preceding comment.
6021 (mips_store_gregset): Supply 0 rather than $restart for $zero.
6022 (the_low_target): Wire `mips_fetch_register'.
6023
6024 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6025
6026 * lynx-i386-low.c (LYNXOS_178): New macro.
6027 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
6028 the layout on LynxOS-178.
6029 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
6030 handle floating point registers that are not supported by
6031 LynxOS-178.
6032
6033 2018-05-10 Tom Tromey <tom@tromey.com>
6034
6035 * configure: Rebuild.
6036
6037 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6038
6039 PR server/23158:
6040 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
6041 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
6042 Use it to set the expedite_regs field in the given tdesc.
6043 * x86-tdesc.h: New file.
6044 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
6045 Adjust following the addition of the new expedite_regs parameter
6046 to init_target_desc.
6047 * linux-tic6x-low.c (tic6x_read_description): Likewise.
6048 * linux-x86-tdesc.c: #include "x86-tdesc.h".
6049 (i386_linux_read_description, amd64_linux_read_description):
6050 Adjust following the addition of the new expedite_regs parameter
6051 to init_target_desc.
6052 * lynx-i386-low.c: #include "x86-tdesc.h".
6053 (lynx_i386_arch_setup): Adjust following the addition of the new
6054 expedite_regs parameter to init_target_desc.
6055 * nto-x86-low.c: #include "x86-tdesc.h".
6056 (nto_x86_arch_setup): Adjust following the addition of the new
6057 expedite_regs parameter to init_target_desc.
6058 * win32-i386-low.c: #include "x86-tdesc.h".
6059 (i386_arch_setup): Adjust following the addition of the new
6060 expedite_regs parameter to init_target_desc.
6061
6062 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6063
6064 PR server/23158:
6065 * win32-low.c (win32_create_inferior): Add call to my_wait
6066 setting last_status global.
6067
6068 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6069
6070 PR server/23158:
6071 * win32-low.c (create_process): Only call gdb_tilde_expand if
6072 inferior_cwd is not NULL.
6073
6074 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6075
6076 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
6077 registers to the cache if their values have changed.
6078 (i387_xsave_to_cache): Provide default values for x87 control
6079 registers when these features are available, but disabled.
6080 * regcache.c (supply_register_by_name_zeroed): New function.
6081 * regcache.h (supply_register_by_name_zeroed): Declare new
6082 function.
6083
6084 2018-05-07 Tom Tromey <tom@tromey.com>
6085
6086 * configure: Rebuild.
6087
6088 2018-05-04 Tom Tromey <tom@tromey.com>
6089
6090 * configure: Rebuild.
6091
6092 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6093 Pedro Alves <palves@redhat.com>
6094
6095 * linux-aarch64-low.c (aarch64_stopped_data_address):
6096 Likewise.
6097
6098 2018-04-27 Tom Tromey <tom@tromey.com>
6099
6100 * configure: Rebuild.
6101
6102 2018-04-23 Tom Tromey <tom@tromey.com>
6103
6104 * configure: Rebuild.
6105
6106 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
6107
6108 * Makefile.in (depcomp): Add "..".
6109 (all_deps_files): New and use it.
6110
6111 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6112
6113 * configure.srv (aarch64*-*-linux*): Don't include xml.
6114 (i[34567]86-*-cygwin*): Likewise.
6115 (i[34567]86-*-linux*): Likewise.
6116 (i[34567]86-*-lynxos*): Likewise.
6117 (i[34567]86-*-mingw32ce*): Likewise.
6118 (i[34567]86-*-mingw*): Likewise.
6119 (i[34567]86-*-nto*): Likewise.
6120 (tic6x-*-uclinux): Likewise.
6121 (x86_64-*-linux*): Likewise.
6122 (x86_64-*-mingw*): Likewise.
6123 (x86_64-*-cygwin*): Likewise.
6124
6125 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6126
6127 * tdesc.c: Remove xml parameter.
6128
6129 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6130
6131 * server.c (get_features_xml): Remove cast.
6132 * tdesc.c (void target_desc::accept): Fill in function.
6133 (tdesc_get_features_xml): Remove old xml creation.
6134 (print_xml_feature::visit_pre): Add xml vistor.
6135 * tdesc.h (struct target_desc): Make xmltarget mutable.
6136 (tdesc_get_features_xml): Remove declaration.
6137
6138 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6139
6140 * tdesc.c (tdesc_architecture_name): Add new function.
6141 (tdesc_osabi_name): Likewise.
6142 (tdesc_get_features_xml): Use new functions.
6143
6144 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6145
6146 * tdesc.c (tdesc_create_flags): Remove.
6147 (tdesc_add_flag): Likewise.
6148 (tdesc_named_type): Likewise.
6149 (tdesc_create_union): Likewise.
6150 (tdesc_create_struct): Likewise.
6151 (tdesc_create_vector): Likewise.
6152 (tdesc_add_bitfield): Likewise.
6153 (tdesc_add_field): Likewise.
6154 (tdesc_set_struct_size): Likewise.
6155
6156 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6157
6158 * tdesc.c (~target_desc): Remove implictly deleted items.
6159 (init_target_desc): Iterate all features.
6160 (tdesc_get_features_xml): Use vector.
6161 (tdesc_create_feature): Create feature.
6162 * tdesc.h (tdesc_feature) Remove
6163 (target_desc): Add features.
6164
6165 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6166
6167 * Makefile.in: Add common/tdesc.c
6168 * tdesc.c (init_target_desc): init all reg_defs from register
6169 vector.
6170 (tdesc_create_reg): Create tdesc_reg.
6171 * tdesc.h (tdesc_feature): Add register vector.
6172
6173 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6174
6175 * tdesc.h (struct target_desc) <features>: Change type to
6176 std::vector<std::string>.
6177 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6178 changes.
6179 (tdesc_get_features_xml): Likewise.
6180 (tdesc_create_feature): Likewise.
6181
6182 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6183
6184 * regcache.c (find_register_by_number): Return a ref.
6185 (find_regno): Use references.
6186 (register_size): Likewise.
6187 (register_data): Likewise.
6188 * tdesc.c (target_desc::~target_desc): Remove free calls.
6189 (target_desc::operator==): Use std::vector compare.
6190 (init_target_desc): Use reference.
6191 (tdesc_create_reg): Use reg constructors.
6192 * tdesc.h (struct target_desc): Replace pointer with object.
6193
6194 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6195
6196 * regcache.c (find_register_by_number): Make static.
6197 (find_regno): Use find_register_by_number
6198 * regcache.h (struct reg): Remove declaration.
6199
6200 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6201
6202 * tdesc.c (target_desc::~target_desc): Move to here.
6203 (target_desc::operator==): Likewise.
6204 * tdesc.h (target_desc::~target_desc): Move from here.
6205 (target_desc::operator==): Likewise.
6206
6207 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6208
6209 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6210
6211 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6212
6213 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6214 S390_TDESC_GS.
6215 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6216 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6217 and init_registers_s390_gs_linux64.
6218
6219 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6220
6221 * linux-s390-low.c (s390_fill_gs): Remove function.
6222 (s390_fill_gsbc): Remove function.
6223 (s390_regsets): Set fill functions for the guarded storage regsets
6224 to NULL.
6225
6226 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6227
6228 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6229 the word size. Add comment.
6230 (s390_get_wordsize): New function.
6231 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6232 pswm with it. Instead, use s390_get_wordsize to determine the
6233 word size first and derive the correct tdesc from that directly.
6234
6235 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6236
6237 * Makefile.in: Include silent-rules.mk.
6238 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6239 (COMPILE): Add ECHO_CXX.
6240 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6241 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6242 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6243 (version-generated.c): Add ECHO_GEN.
6244 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6245 (IPAGENT_COMPILE): Add ECHO_CXX.
6246 (%-generated.c): Add ECHO_REGDAT.
6247
6248 2018-03-14 Tom Tromey <tom@tromey.com>
6249
6250 PR cli/14977:
6251 * ax.c (ax_printf): Special case for NULL.
6252
6253 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6254
6255 * linux-low.c (linux_qxfer_libraries_svr4): Use
6256 xml_escape_text_append.
6257
6258 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6259
6260 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6261
6262 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6263
6264 * server.c (handle_general_set): Remove unnecessary xstrdup.
6265
6266 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6267
6268 * server.c (parse_debug_format_options): Adjust to
6269 delim_string_to_char_ptr_vec changes.
6270 * thread-db.c (thread_db_load_search): Adjust to
6271 dirnames_to_char_ptr_vec changes.
6272
6273 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6274
6275 * target.h (target_enable_btrace, target_disable_btrace)
6276 (target_read_btrace, target_read_btrace_conf): Turn macro into
6277 inline function. Throw error if target method is not defined.
6278 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6279 check for btrace target method. Be prepared to handle exceptions
6280 from btrace target methods.
6281
6282 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6283
6284 * server.c (captured_main): Change order of error message printed
6285 when the current working directory cannot be found.
6286
6287 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6288
6289 * server.c: Include "filenames.h" and "pathstuff.h".
6290 (program_name): Delete variable.
6291 (program_path): New anonymous class.
6292 (get_exec_wrapper): Use "program_path" instead of
6293 "program_name".
6294 (handle_v_run): Likewise.
6295 (captured_main): Likewise.
6296 (process_serial_event): Likewise.
6297
6298 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6299
6300 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6301 (OBJS): Add "pathstuff.o".
6302 * server.c (current_directory): New global variable.
6303 (captured_main): Initialize "current_directory".
6304
6305 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6306
6307 * tdesc.c: Use common/tdesc.h.
6308 * tdesc.h: Likewise.
6309
6310 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6311 Simon Marchi <simon.marchi@ericsson.com>
6312
6313 * Makefile.in: Switch order of make rules.
6314
6315 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6316
6317 * Makefile.in: Add common directory in build.
6318 * configure.ac: Add common reference.
6319 * configure: Regenerate.
6320
6321 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6322
6323 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6324 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6325 * spu-low.c (spu_target_ops): Likewise.
6326 * win32-low.c (win32_target_ops): Likewise.
6327 * server.c (supported_btrace_packets): Report packets unconditionally.
6328 * target.h (target_ops) <supports_btrace>: Remove.
6329 (target_supports_btrace): Remove.
6330
6331 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6332
6333 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6334 (handle_btrace_disable): Change return type to void. Use exceptions
6335 to report errors.
6336 (handle_btrace_general_set): Catch exception and copy message to
6337 return message.
6338
6339 2018-02-08 Tom Tromey <tom@tromey.com>
6340
6341 * linux-low.c (install_software_single_step_breakpoints): Use
6342 make_scoped_restore.
6343 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6344 (do_restore_current_thread_cleanup): Remove.
6345 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6346 declare.
6347
6348 2018-02-08 Tom Tromey <tom@tromey.com>
6349
6350 * mem-break.c (set_raw_breakpoint_at): Use
6351 gdb::unique_xmalloc_ptr.
6352
6353 2018-01-30 Pedro Alves <palves@redhat.com>
6354
6355 PR gdb/13211
6356 * target.c (target_terminal::terminal_state): Rename to ...
6357 (target_terminal::m_terminal_state): ... this.
6358
6359 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6360
6361 * linux-low.c (handle_extended_wait): Surround call to
6362 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6363
6364 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6365
6366 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6367 linux_ptrace_attach_fail_reason_string now returning an
6368 std::string.
6369 (linux_attach): Likewise.
6370 * thread-db.c (attach_thread): Likewise.
6371
6372 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6373
6374 PR gdb/21559
6375 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6376 checking for fs_base/gs_base fields in struct user_regs_struct.
6377 * configure: Regenerate.
6378
6379 2018-01-16 Yao Qi <yao.qi@linaro.org>
6380
6381 PR gdb/18749
6382 * linux-low.c (fetch_register): Call supply_register instead of
6383 error.
6384
6385 2018-01-08 Yao Qi <yao.qi@linaro.org>
6386 Simon Marchi <simon.marchi@ericsson.com>
6387
6388 * Makefile.in (OBS): Remove selftest.o.
6389 * configure.ac: Set srv_selftest_objs if $development is true.
6390 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6391 * configure: Re-generated.
6392 * server.c (captured_main): Wrap variable selftest_filter with
6393 GDB_SELF_TEST.
6394
6395 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6396
6397 * server.c (parse_debug_format_options): Return std::string.
6398 (handle_monitor_command, captured_main): Adjust.
6399
6400 2018-01-05 Pedro Alves <palves@redhat.com>
6401
6402 PR gdb/18653
6403 * server.c (captured_main): Pass quiet=false to
6404 save_original_signals_state.
6405
6406 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6407
6408 * gdbreplay.c (gdbreplay_version): Update copyright year in
6409 version message.
6410 * server.c (gdbserver_version): Likewise.
6411
6412 2017-12-08 Tom Tromey <tom@tromey.com>
6413
6414 * ax.c (ax_printf): Update.
6415
6416 2017-12-07 Yao Qi <yao.qi@linaro.org>
6417
6418 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6419 aarch64_linux_read_description.
6420 * linux-amd64-ipa.c (idx2mask): New array.
6421 (get_ipa_tdesc): Move idx2mask out.
6422 (initialize_low_tracepoint): Initialize target descriptions.
6423 * linux-i386-ipa.c (idx2mask): New array.
6424 (get_ipa_tdesc): Move idx2mask out.
6425 (initialize_low_tracepoint): Initialize target descriptions.
6426
6427 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6428
6429 * tdesc.c (struct tdesc_type): Change return type.
6430 (tdesc_add_flag): Change parameter type.
6431 (tdesc_add_bitfield): Likewise.
6432 (tdesc_add_field): Likewise.
6433 (tdesc_set_struct_size): Likewise.
6434
6435 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6436
6437 * regcache.c (registers_to_string): Remove unused variable.
6438
6439 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6440
6441 * inferiors.c (for_each_inferior_with_data): Remove.
6442 * inferiors.h (for_each_inferior_with_data): Remove.
6443 * server.c (handle_qxfer_threads_worker): Change parameter type.
6444 (handle_qxfer_threads_proper): Use for_each_thread.
6445
6446 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6447
6448 * inferiors.c (for_each_inferior): Remove.
6449 (clear_inferiors): Use for_each_thread.
6450 * inferiors.h (for_each_inferior): Remove.
6451 * linux-low.c (linux_wait_for_event_filtered): Use
6452 for_each_thread.
6453 (linux_stabilize_threads): Likewise.
6454 * regcache.c (regcache_release): Likewise.
6455 * server.c (gdb_wants_all_threads_stopped): Likewise.
6456 (clear_pending_status_callback): Remove.
6457 (handle_status): Use for_each_thread.
6458 (captured_main): Likewise.
6459 * win32-low.c (child_init_thread_list): Likewise.
6460 (win32_clear_inferiors): Likewise.
6461 (fake_breakpoint_event): Likewise.
6462
6463 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6464
6465 * inferiors.h (find_inferior): Remove.
6466 * inferiors.c (find_inferior): Remove.
6467
6468 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6469
6470 * linux-low.c (resume_status_pending_p): Update comment.
6471 (need_step_over_p): Update comment.
6472
6473 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6474
6475 * linux-low.c (proceed_one_lwp): Return void, change parameter
6476 type.
6477 (unsuspend_and_proceed_one_lwp): Likewise.
6478 (proceed_all_lwps): Use for_each_thread.
6479 (unstop_all_lwps): Likewise.
6480
6481 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6482
6483 * linux-low.c (linux_resume_one_thread): Return void, take
6484 parameter directly.
6485 (linux_resume): Use for_each_thread.
6486
6487 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6488
6489 * linux-low.c (send_sigstop_callback): Return void, change
6490 parameter type. Rename to...
6491 (send_sigstop): ... this.
6492 (suspend_and_send_sigstop_callback): Return void, change parameter
6493 type. Rename to...
6494 (suspend_and_send_sigstop): ... this.
6495 (stop_all_lwps): Use for_each_thread.
6496
6497 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6498
6499 * linux-low.c (lwp_running): Return bool, remove unused
6500 argument.
6501 (linux_stabilize_threads): Use find_thread.
6502
6503 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6504
6505 * linux-low.c (select_singlestep_lwp_callback): Remove.
6506 (count_events_callback): Remove.
6507 (select_event_lwp_callback): Remove.
6508 (select_event_lwp): Use find_thread/for_each_thread.
6509
6510 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6511
6512 * linux-low.c (not_stopped_callback): Return bool, take filter
6513 argument directly.
6514 (linux_wait_for_event_filtered): Use find_thread.
6515 (linux_wait_1): Likewise.
6516
6517 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6518
6519 * linux-low.c (same_lwp): Remove.
6520 (find_lwp_pid): Use find_thread.
6521
6522 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6523
6524 * linux-low.c (delete_lwp_callback): Remove.
6525 (linux_mourn): Use for_each_thread.
6526
6527 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6528
6529 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6530 args parameter, don't check for pid.
6531 (linux_detach): Use for_each_thread.
6532
6533 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6534
6535 * linux-low.c (struct counter): Remove.
6536 (second_thread_of_pid_p): Remove.
6537 (last_thread_of_process_p): Use find_thread.
6538
6539 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6540
6541 * inferiors.c (find_inferior_in_random): Remove.
6542 * inferiors.h (find_inferior_in_random): Remove.
6543 * linux-low.c (status_pending_p_callback): Return bool, accept
6544 parameter ptid directly.
6545 (linux_wait_for_event_filtered): Use find_thread_in_random.
6546 (linux_wait_1): Likewise.
6547
6548 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6549
6550 * inferiors.c (find_inferior_id): Remove.
6551 (find_thread_ptid): Move implemention from find_inferior_id to
6552 here.
6553 * inferiors.h (find_inferior_id): Remove.
6554 * server.c (handle_status): Use find_thread_ptid.
6555 (process_serial_event): Likewise.
6556 * thread-db.c (find_one_thread): Likewise.
6557 (thread_db_thread_handle): Likewise.
6558 * win32-low.c (thread_rec): Likewise.
6559 (child_delete_thread): Likewise.
6560 (win32_thread_alive): Likewise.
6561 (get_child_debug_event): Likewise.
6562
6563 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6564
6565 * linux-mips-low.c (update_watch_registers_callback): Return
6566 void, remove pid_p parameter, don't check for pid.
6567 (mips_insert_point, mips_remove_point): Use for_each_thread.
6568
6569 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6570
6571 * lynx.low (lynx_delete_thread_callback): Remove.
6572 (lynx_mourn): Use for_each_thread.
6573
6574 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6575
6576 * regcache.c (regcache_invalidate_one): Remove.
6577 (regcache_invalidate_pid): use for_each_thread.
6578
6579 2017-11-26 Tom Tromey <tom@tromey.com>
6580
6581 * linux-low.c (linux_create_inferior): Update.
6582
6583 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6584
6585 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6586
6587 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6588
6589 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6590 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6591 * linux-aarch64-tdesc-selftest.c: New file.
6592 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6593
6594 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6595
6596 * configure.srv: Add new file.
6597 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6598 * linux-aarch64-tdesc-selftest.c: New file.
6599 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6600
6601 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6602
6603 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6604 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6605 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6606
6607 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6608
6609 * configure.srv: Add new files.
6610 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6611 aarch64_linux_read_description.
6612 * linux-aarch64-low.c (aarch64_linux_read_description):
6613 Merge with aarch64_arch_setup.
6614 (aarch64_arch_setup): Call aarch64_linux_read_description.
6615 * linux-aarch64-tdesc.c: New file.
6616 * linux-aarch64-tdesc.h: New file.
6617
6618 2017-11-24 Yao Qi <yao.qi@linaro.org>
6619
6620 * configure.srv: Set $srv_regobj for tic6x-linux.
6621 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6622 (tic6x_read_description): Move some code to tic6x_arch_setup.
6623 (tic6x_tdesc_test): New function.
6624 (initialize_low_arch): Call selftests::register_test.
6625
6626 2017-11-22 Yao Qi <yao.qi@linaro.org>
6627
6628 * remote-utils.c (prepare_resume_reply): Use memcpy.
6629
6630 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6631
6632 * linux-low.c (kill_one_lwp_callback): Return void, take
6633 argument directly, don't filter on pid.
6634 (linux_kill): Use for_each_thread.
6635
6636 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6637
6638 * linux-low.c (need_step_over_p): Return bool, remove dummy
6639 argument.
6640 (linux_resume, proceed_all_lwps): Use find_thread.
6641
6642 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6643
6644 * linux-low.c (resume_status_pending_p): Return bool, remove
6645 flag_p argument.
6646 (linux_resume): Use find_thread.
6647
6648 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6649
6650 * linux-low.c (struct thread_resume_array): Remove.
6651 (linux_set_resume_request): Return void, take arguments
6652 directly.
6653 (linux_resume): Use for_each_thread.
6654
6655 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6656
6657 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6658 return bool, remove data argument.
6659 (linux_stabilize_threads): Use find_thread.
6660
6661 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6662
6663 * linux-low.c (unsuspend_one_lwp): Remove.
6664 (unsuspend_all_lwps): Use for_each_thread, inline code from
6665 unsuspend_one_lwp.
6666
6667 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6668
6669 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6670 * linux-low.c (struct iterate_over_lwps_args): Remove.
6671 (iterate_over_lwps_filter): Remove.
6672 (iterate_over_lwps): Use find_thread.
6673
6674 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6675
6676 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6677 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6678 code from reset_lwp_ptrace_options_callback.
6679
6680 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6681
6682 * linux-arm-low.c (struct update_registers_data): Remove.
6683 (update_registers_callback): Return void, take arguments
6684 directly, don't check thread's pid.
6685 (arm_insert_point, arm_remove_point): Use for_each_thread.
6686
6687 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6688
6689 * win32-low.c (continue_one_thread): Return void, take argument
6690 directly.
6691 (child_continue): Use for_each_thread.
6692
6693 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6694
6695 * win32-i386-low.c (update_debug_registers_callback): Rename
6696 to ...
6697 (update_debug_registers): ... this, return void, remove pid_p arg.
6698 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6699
6700 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6701
6702 * inferiors.h (struct process_info): Add constructor, initialize
6703 fields..
6704 <syscalls_to_catch>: Change type to std::vector<int>.
6705 * inferiors.c (add_process): Allocate process_info with new.
6706 (remove_process): Free process_info with delete.
6707 * linux-low.c (handle_extended_wait): Adjust.
6708 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6709 * server.c (handle_general_set): Adjust.
6710
6711 2017-11-16 Pedro Alves <palves@redhat.com>
6712
6713 * remote-utils.c (remote_close): Block SIGIO signals instead of
6714 uninstalling the SIGIO handler.
6715
6716 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6717
6718 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6719
6720 2017-11-16 Yao Qi <yao.qi@linaro.org>
6721
6722 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6723 (tic6x_store_gregset): Likewise.
6724 (tic6x_usrregs_info): Move it up.
6725
6726 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6727
6728 * Makefile.in: Update arch rules.
6729 * configure.srv: Explicitly mark arch/ files.
6730
6731 2017-11-13 Andreas Schwab <schwab@suse.de>
6732
6733 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6734 function.
6735 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6736
6737 2017-11-06 Pedro Alves <palves@redhat.com>
6738
6739 * config.in, configure: Regenerate.
6740
6741 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6742
6743 * target.c (struct thread_search): Remove.
6744 (thread_search_callback): Remove.
6745 (prepare_to_access_memory): Use for_each_thread instead of
6746 find_inferior. Inline code from thread_search_callback.
6747
6748 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6749
6750 * server.c (struct visit_actioned_threads_data): Remove.
6751 (visit_actioned_threads): Change prototype to take arguments
6752 directly.
6753 (resume): Use find_thread instead of find_inferior.
6754
6755 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6756
6757 * server.c (queue_stop_reply_callback): Change prototype, return
6758 void.
6759 (find_status_pending_thread_callback): Remove.
6760 (handle_status): Replace find_inferior with find_thread and
6761 for_each_thread.
6762
6763 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6764
6765 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6766 with REGNO.
6767 (aarch64_store_gregset): Likewise.
6768 (aarch64_fill_fpregset): Likewise.
6769 (aarch64_store_fpregset): Likewise.
6770
6771 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6772
6773 * gdbthread.h (find_thread, for_each_thread): New functions.
6774 * inferiors.c (thread_of_pid): Remove.
6775 (find_any_thread_of_pid): Use find_thread.
6776 * linux-low.c (num_lwps): Use for_each_thread.
6777
6778 2017-10-17 Yao Qi <yao.qi@linaro.org>
6779
6780 * Makefile.in: Remove one rule.
6781 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6782
6783 2017-10-17 Yao Qi <yao.qi@linaro.org>
6784
6785 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6786 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6787
6788 2017-10-17 Yao Qi <yao.qi@linaro.org>
6789
6790 * configure.srv: Rename arm.o with arch/arm.o.
6791
6792 2017-10-17 Yao Qi <yao.qi@linaro.org>
6793
6794 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6795 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6796 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6797 (arch-i386.o, arch-amd64.o): Remove rules.
6798 (arch/%.o): New rule.
6799 Update POSTCOMPILE and COMPILE.pre.
6800 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6801 * configure: Re-generated.
6802 * configure.srv: Replace arch-i386.o with arch/i386.o.
6803 Replace arch-amd64.o with arch/amd64.o.
6804
6805 2017-10-16 Yao Qi <yao.qi@linaro.org>
6806
6807 * configure: Regenerated.
6808
6809 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6810
6811 * inferiors.h: (struct inferior_list): Remove.
6812 (struct inferior_list_entry); Remove.
6813 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6814 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6815 get_first_inferior): Remove.
6816 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6817 find_inferior_id, find_inferior_in_random): Change signature.
6818 * inferiors.c (all_threads): Change type to
6819 std::list<thread_info *>.
6820 (get_thread): Remove macro.
6821 (find_inferior, find_inferior_id): Change signature, implement
6822 using find_thread.
6823 (find_inferior_in_random): Change signature, implement using
6824 find_thread_in_random.
6825 (for_each_inferior, for_each_inferior_with_data): Change
6826 signature, implement using for_each_thread.
6827 (add_inferior_to_list, remove_inferior): Remove.
6828 (add_thread, get_first_thread, thread_of_pid,
6829 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6830 (get_first_inferior, one_inferior_p, clear_inferior_list):
6831 Remove.
6832 (clear_inferiors, get_thread_process): Update.
6833 * gdbthread.h: Include <list>.
6834 (struct thread_info) <entry>: Remove field.
6835 <id>: New field.
6836 (all_threads): Change type to std::list<thread_info *>.
6837 (get_first_inferior): Add doc.
6838 (find_thread, for_each_thread, find_thread_in_random): New
6839 functions.
6840 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6841 * linux-arm-low.c (update_registers_callback): Update.
6842 * linux-low.c (second_thread_of_pid_p): Update.
6843 (kill_one_lwp_callback, linux_detach_lwp_callback,
6844 delete_lwp_callback, status_pending_p_callback, same_lwp,
6845 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6846 iterate_over_lwps, not_stopped_callback,
6847 resume_stopped_resumed_lwps, count_events_callback,
6848 select_singlestep_lwp_callback, select_event_lwp_callback,
6849 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6850 suspend_and_send_sigstop_callback, wait_for_sigstop,
6851 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6852 lwp_running, linux_set_resume_request, resume_status_pending_p,
6853 need_step_over_p, start_step_over, linux_resume_one_thread,
6854 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6855 reset_lwp_ptrace_options_callback): Update.
6856 * linux-mips-low.c (update_watch_registers_callback): Update.
6857 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6858 Update.
6859 (free_register_cache_thread_one): Remove.
6860 (regcache_release): Update.
6861 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6862 handle_qxfer_threads_worker): Update.
6863 (handle_query): Update, use list iterator.
6864 (visit_actioned_threads, handle_pending_status,
6865 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6866 clear_pending_status_callback, set_pending_status_callback,
6867 find_status_pending_thread_callback, handle_status,
6868 process_serial_event): Update.
6869 * target.c (thread_search_callback): Update.
6870 * thread-db.c (thread_db_get_tls_address): Update.
6871 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6872 Update.
6873 * win32-i386-low.c (update_debug_registers_callback): Update.
6874 * win32-low.c (delete_thread_info, child_delete_thread,
6875 continue_one_thread, suspend_one_thread,
6876 get_child_debug_event): Adjust.
6877
6878 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6879
6880 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6881 * inferiors.h: Include <list>.
6882 (struct process_info) <entry>: Remove field.
6883 <pid>: New field.
6884 (pid_of): Change macro to function.
6885 (ptid_of, lwpid_of): Remove macro.
6886 (all_processes): Change type to std::list<process_info *>.
6887 (ALL_PROCESSES): Remove macro.
6888 (for_each_process, find_process): New function.
6889 * inferiors.c (all_processes): Change type to
6890 std::list<process_info *>.
6891 (find_thread_process): Adjust.
6892 (add_process): Likewise.
6893 (remove_process): Likewise.
6894 (find_process_pid): Likewise.
6895 (get_first_process): Likewise.
6896 (started_inferior_callback): Remove.
6897 (have_started_inferiors_p): Adjust.
6898 (attached_inferior_callback): Remove.
6899 (have_attached_inferiors_p): Adjust.
6900 * linux-low.c (check_zombie_leaders): Likewise.
6901 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6902 (x86_linux_update_xmltarget): Adjust.
6903 * server.c (handle_query): Likewise.
6904 (gdb_reattached_process): Remove.
6905 (handle_status): Adjust.
6906 (kill_inferior_callback): Likewise.
6907 (detach_or_kill_inferior): Remove.
6908 (print_started_pid): Likewise.
6909 (print_attached_pid): Likewise.
6910 (detach_or_kill_for_exit): Update.
6911 (process_serial_event): Likewise.
6912 * linux-arm-low.c (arm_new_fork): Likewise.
6913
6914 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6915
6916 * dll.h: Include <list>.
6917 (struct dll_info): Add constructor.
6918 <entry>: Remove field.
6919 (all_dlls): Change type to std::list<dll_info>.
6920 * dll.c: Include <algorithm>.
6921 (get_dll): Remove macro.
6922 (all_dlls): Change type to std::list<dll_info *>.
6923 (free_one_dll): Remove.
6924 (match_dll): Likewise.
6925 (loaded_dll): Adjust.
6926 (unloaded_dll): Adjust to all_dlls type change, use
6927 std::find_if. Inline code from match_dll.
6928 (clear_dlls): Adjust to all_dlls type change.
6929 * server.c (emit_dll_description): Remove.
6930 (handle_qxfer_libraries): Adjust to all_dlls type change,
6931 integrate emit_dll_description's functionality.
6932
6933 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6934
6935 * linux-low.h (struct linux_target_ops) <delete_process>: New
6936 field.
6937 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6938 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6939 (struct linux_target_ops): Add delete_process callback.
6940 * linux-arm-low.c (arm_delete_process): New.
6941 (struct linux_target_ops): Add delete_process callback.
6942 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6943 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6944 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6945 * linux-mips-low.c (mips_linux_delete_process): New.
6946 (struct linux_target_ops): Add delete_process callback.
6947 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6948 * linux-s390-low.c (struct linux_target_ops): Likewise.
6949 * linux-sh-low.c (struct linux_target_ops): Likewise.
6950 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6951 * linux-tile-low.c (struct linux_target_ops): Likewise.
6952 * linux-x86-low.c (x86_linux_delete_process): New.
6953 (struct linux_target_ops): Add delete_process callback.
6954 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6955
6956 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6957
6958 * linux-aarch64-low.c (the_low_target): Add thread delete
6959 callback.
6960 * linux-arm-low.c (arm_delete_thread): New function.
6961 (the_low_target): Add thread delete callback.
6962 * linux-bfin-low.c (the_low_target): Likewise.
6963 * linux-crisv32-low.c (the_low_target): Likewise.
6964 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6965 set.
6966 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6967 field.
6968 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6969 * linux-mips-low.c (mips_linux_delete_thread): New function.
6970 (the_low_target): Add thread delete callback.
6971 * linux-ppc-low.c (the_low_target): Likewise.
6972 * linux-s390-low.c (the_low_target): Likewise.
6973 * linux-sh-low.c (the_low_target): Likewise.
6974 * linux-tic6x-low.c (the_low_target): Likewise.
6975 * linux-tile-low.c (the_low_target): Likewise.
6976 * linux-x86-low.c (the_low_target): Likewise.
6977 * linux-xtensa-low.c (the_low_target): Likewise.
6978
6979 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6980
6981 * win32-low.c: Include "common-inferior.h".
6982
6983 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6984
6985 * inferiors.c (set_inferior_cwd): New function.
6986 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6987 (handle_query): Inform that QSetWorkingDir is supported.
6988 * win32-low.c (create_process): Pass the inferior's cwd to
6989 CreateProcess.
6990
6991 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6992
6993 * inferiors.c (current_inferior_cwd): New global variable.
6994 (get_inferior_cwd): New function.
6995 * inferiors.h (struct process_info) <cwd>: New field.
6996
6997 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6998
6999 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
7000 (OBS): Add gdb_tilde_expand.o.
7001
7002 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
7003
7004 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
7005 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
7006
7007 2017-09-29 Pedro Alves <palves@redhat.com>
7008
7009 * ax.c (gdb_parse_agent_expr): Constify.
7010 * ax.h (gdb_parse_agent_expr): Constify.
7011 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7012 Constify.
7013 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
7014 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
7015 * remote-utils.h (read_ptid): Constify.
7016 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
7017 (process_point_options, process_serial_event): Constify.
7018 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
7019 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
7020 (cmd_qtbuffer): Constify.
7021
7022 2017-09-29 Pedro Alves <palves@redhat.com>
7023
7024 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
7025 fails.
7026
7027 2017-09-29 Pedro Alves <palves@redhat.com>
7028
7029 * linux-low.c (handle_extended_wait): Pass parent thread instead
7030 of process to thread_db_notice_clone.
7031 * linux-low.h (thread_db_notice_clone): Replace parent process
7032 parameter with parent thread parameter.
7033 * thread-db.c (find_one_thread): Add comment.
7034 (thread_db_notice_clone): Replace parent process parameter with
7035 parent thread parameter. Temporarily switch to the parent thread.
7036
7037 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
7038
7039 * gdbthread.h: Include "common-gdbthread.h".
7040 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
7041 "if" when validating the ptid.
7042 * remote-utils.c: Include "gdbthread.h".
7043 (prepare_resume_reply): Use "switch_to_thread".
7044 * target.c (done_accessing_memory): Likewise.
7045
7046 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7047
7048 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
7049 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
7050 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
7051 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
7052 s390x-gs-linux64-ipa.o to ipa_obj.
7053 * linux-s390-low.c (HWCAP_S390_GS): New define.
7054 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
7055 New functions.
7056 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
7057 (s390_arch_setup): Check for guarded-storage support and choose
7058 appropriate tdesc.
7059 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
7060 init_registers_s390x_gs_linux64.
7061 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
7062 enum value.
7063 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
7064 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
7065
7066 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
7067
7068 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
7069
7070 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7071
7072 * linux-low.h (struct lwp_info): Add new field, thread_handle.
7073 (thread_db_thread_handle): Declare.
7074 * linux-low.c (linux_target_ops): Initialize thread_handle.
7075 * server.c (handle_qxfer_threads_worker): Add support for
7076 "handle" attribute.
7077 * target.h (struct target_ops): Add new function pointer,
7078 thread_handle.
7079 (target_thread_handle): Define.
7080 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
7081 field in lwp.
7082 (thread_db_thread_handle): New function.
7083
7084 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7085
7086 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
7087 * linux-low.h (thread_db_notice_clone): Declare.
7088 * thread-db.c (thread_db_notice_clone): New function.
7089
7090 2017-09-21 Pedro Alves <palves@redhat.com>
7091
7092 * server.c (gdb_read_memory, handle_status, process_serial_event)
7093 (handle_serial_event, handle_target_event): Adjust to
7094 set_desired_thread prototype change.
7095 * target.c (set_desired_thread): Remove 'use_general' parameter
7096 and adjust.
7097 * target.h (set_desired_thread): Remove 'use_general' parameter.
7098
7099 2017-09-20 Tom Tromey <tom@tromey.com>
7100
7101 * target.c (target_terminal::terminal_state): Define.
7102 (target_terminal::init): Rename from target_terminal_init.
7103 (target_terminal::inferior): Rename from
7104 target_terminal_inferior.
7105 (target_terminal::ours): Rename from target_terminal_ours.
7106 (target_terminal::ours_for_output, target_terminal::info): New.
7107
7108 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7109
7110 * server.c (accumulate_file_name_length): Remove.
7111 (emit_dll_description): Adjust to std::string change.
7112 (handle_qxfer_libraries): Use std::string to hold document.
7113
7114 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7115
7116 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
7117 return type of xml_escape_text.
7118 * server.c (emit_dll_description): Likewise.
7119
7120 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7121
7122 * server.c (captured_main): Accept argument for --selftest.
7123 Update run_tests call.
7124 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
7125 when registering selftests.
7126
7127 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
7128
7129 * regcache.c (get_thread_regcache): Update code to use "std::vector"
7130 instead of "VEC" for "target_desc.reg_defs".
7131 (regcache_cpy): Likewise.
7132 (registers_to_string): Likewise.
7133 (registers_from_string): Likewise.
7134 (find_regno): Likewise.
7135 (supply_regblock): Likewise.
7136 (regcache_raw_read_unsigned): Likewise.
7137 * tdesc.c (init_target_desc): Likewise.
7138 (tdesc_create_reg): Likewise.
7139 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
7140 (struct target_desc) <reg_defs>: Convert to "std::vector".
7141 (target_desc): Do not initialize "reg_defs".
7142 (~target_desc): Update code to use "std::vector" instead of "VEC"
7143 for "target_desc.reg_defs".
7144 (operator==): Likewise.
7145
7146 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7147
7148 * inferiors.h (thread_to_gdb_id): Remove.
7149 * inferiors.c (thread_to_gdb_id): Remove.
7150 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
7151 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7152 lynx_store_registers, lynx_read_memory, lynx_write_memory):
7153 Likewise.
7154 * nto-low.c (nto_fetch_registers, nto_store_registers,
7155 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
7156
7157 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7158
7159 * inferiors.h (gdb_id_to_thread_id): Remove.
7160 * inferiors.c (gdb_id_to_thread_id): Remove.
7161 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7162 removal. Move pid declaration closer to where it's used.
7163
7164 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7165
7166 * server.c (handle_detach): New function.
7167 (process_serial_event): Move code out, call handle_detach.
7168
7169 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7170
7171 * server.c (require_running): Rename to ...
7172 (require_running_or_return): ... this ...
7173 (require_running_or_break): ... and this.
7174 (handle_query, process_serial_event): Adjust.
7175
7176 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7177
7178 * linux-low.c (linux_set_resume_request): Remove unused
7179 variables.
7180
7181 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7182
7183 * server.c (first_thread_of): Remove.
7184 (process_serial_event): Replace usage of first_thread_of with
7185 find_any_thread_of_pid.
7186 * tracepoint.c (same_process_p): Remove.
7187 (gdb_agent_about_to_close): Replace usage of same_process_p with
7188 find_any_thread_of_pid.
7189 * linux-x86-low.c (same_process_callback): Remove.
7190 (x86_arch_setup_process_callback): Replace usage of
7191 same_process_callback with find_any_thread_of_pid.
7192 * thread-db.c (any_thread_of): Remove.
7193 (switch_to_process): Replace usage of any_thread_of with
7194 find_any_thread_of_pid.
7195 * inferiors.c (thread_pid_matches_callback): Remove.
7196 (find_thread_process): Adjust to use find_any_thread_of_pid.
7197
7198 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7199
7200 * regcache.c (get_thread_regcache): Guard calls to "memset"
7201 with "!VEC_empty".
7202
7203 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7204
7205 * linux-low.c (handle_extended_wait): Use
7206 "allocate_target_description" instead of "XNEW".
7207 * linux-x86-low.c (initialize_low_arch): Likewise.
7208
7209 2017-09-05 Yao Qi <yao.qi@linaro.org>
7210
7211 * configure.srv (srv_i386_regobj): Remove.
7212 (srv_amd64_regobj): Remove.
7213 (srv_regobj): Set it to "" for x86 non-linux targets.
7214 * linux-x86-tdesc.c (i386_linux_read_description):
7215 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7216 (init_registers_i386): Remove the declaration.
7217 (tdesc_i386): Remove the declaration.
7218 (lynx_i386_arch_setup): Call i386_create_target_description.
7219 * nto-x86-low.c: Likewise.
7220 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7221 [!__x86_64__]: include arch/i386.h.
7222 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7223
7224 2017-09-05 Yao Qi <yao.qi@linaro.org>
7225
7226 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7227 i386/amd64-XXX-linux from it.
7228
7229 2017-09-05 Yao Qi <yao.qi@linaro.org>
7230
7231 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7232 false.
7233 (ipa_amd64_linux_regobj): Remove.
7234 (ipa_x32_linux_regobj): Remove.
7235
7236 2017-09-05 Yao Qi <yao.qi@linaro.org>
7237
7238 * Makefile.in (arch-amd64.o): New rule.
7239 * configure.srv: Append arch-amd64.o.
7240 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7241 (get_ipa_tdesc): Call amd64_linux_read_description.
7242 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7243 and init_registers_amd64_XXX.
7244 * linux-x86-low.c (x86_linux_read_description): Call
7245 amd64_linux_read_description.
7246 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7247 (initialize_low_arch): Don't call init_registers_x32_XXX and
7248 init_registers_amd64_XXX.
7249 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7250 and tdesc_amd64_XXX.
7251 [__x86_64__] (amd64_tdesc_test): New function.
7252 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7253 and init_registers_amd64_XXX.
7254 * linux-x86-tdesc.c: Include arch/amd64.h.
7255 (xcr0_to_tdesc_idx): New function.
7256 (i386_linux_read_description): New function.
7257 (amd64_get_ipa_tdesc_idx): New function.
7258 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7259 (amd64_get_ipa_tdesc): Declare.
7260
7261 2017-09-05 Yao Qi <yao.qi@linaro.org>
7262
7263 * configure.srv (srv_i386_linux_xmlfiles): Remove
7264 i386/i386-XXX-linux.xml from it.
7265
7266 2017-09-05 Yao Qi <yao.qi@linaro.org>
7267
7268 * configure.srv: Set srv_i386_linux_regobj empty if $development
7269 is false.
7270 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7271 initialize_low_tdesc.
7272 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7273 with #if initialize_low_tdesc.
7274 * linux-x86-tdesc-selftest.c: New file.
7275 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7276
7277 2017-09-05 Yao Qi <yao.qi@linaro.org>
7278
7279 * Makefile.in (arch-i386.o): New rule.
7280 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7281 (x86_64-*-linux*): Likewise.
7282 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7283 include arch/i386.h.
7284 (i386_linux_read_description): Remove code and call
7285 i386_create_target_description.
7286 * tdesc.c (allocate_target_description): New function.
7287 * tdesc.h (set_tdesc_architecture): Remove declaration.
7288 (set_tdesc_osabi): Likewise.
7289
7290 2017-09-05 Yao Qi <yao.qi@linaro.org>
7291
7292 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7293 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7294 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7295 .xmltarget.
7296 * server.c (get_features_xml): Call tdesc_get_features_xml.
7297 * tdesc.c (set_tdesc_architecture): New function.
7298 (set_tdesc_osabi): New function.
7299 (tdesc_get_features_xml): New function.
7300 (tdesc_create_feature): Add an argument.
7301 * tdesc.h (struct target_desc) <features>: New field.
7302 <arch, osabi>: New field.
7303 (~target_desc): xfree features, arch, and osabi.
7304 (target_desc::oerator==): Don't compare .xmltarget.
7305 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7306 (set_tdesc_osabi): Likewise.
7307 (tdesc_get_features_xml): Likewise.
7308
7309 2017-09-05 Yao Qi <yao.qi@linaro.org>
7310
7311 * linux-x86-tdesc.c: Include selftest.h.
7312 (i386_tdesc_test): New function.
7313 (initialize_low_tdesc): Call selftests::register_test.
7314 * tdesc.h: Include regdef.h.
7315 (target_desc): Override operator == and !=.
7316
7317 2017-09-05 Yao Qi <yao.qi@linaro.org>
7318
7319 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7320 (ipa_obj): Likewise.
7321 * linux-i386-ipa.c: Include common/x86-xstate.h
7322 (get_ipa_tdesc): Call i386_linux_read_description.
7323 (initialize_low_tracepoint): Don't call init_registers_XXX
7324 functions, call initialize_low_tdesc instead.
7325 * linux-x86-low.c (x86_linux_read_description): Call
7326 i386_linux_read_description.
7327 (initialize_low_arch): Don't call init_registers_i386_XXX
7328 functions, call initialize_low_tdesc.
7329 * linux-x86-tdesc.c: New file.
7330 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7331 (i386_get_ipa_tdesc_idx): Declare.
7332 (i386_get_ipa_tdesc): Declare.
7333 (initialize_low_tdesc): Declare.
7334
7335 2017-09-05 Yao Qi <yao.qi@linaro.org>
7336
7337 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7338 instead of 0.
7339
7340 2017-09-05 Yao Qi <yao.qi@linaro.org>
7341
7342 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7343 * regcache.c (get_thread_regcache): Use VEC_length.
7344 (init_register_cache): Likewise.
7345 (regcache_cpy): Likewise.
7346 (registers_to_string): Iterate reg_defs via VEC_iterate.
7347 (find_regno): Likewise.
7348 (find_register_by_number): Use VEC_index.
7349 (register_size): Call find_register_by_number.
7350 (register_data): Call find_register_by_number.
7351 (supply_regblock): Use VEC_length.
7352 (regcache_raw_read_unsigned): Likewise.
7353 * tdesc.c (init_target_desc): Iterate reg_defs via
7354 VEC_iterate.
7355 (default_description): Update initializer.
7356 (copy_target_description): Don't update field num_registers.
7357 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7358 <num_registers>: Remove.
7359
7360 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7361
7362 * Makefile.in (.SECONDARY): Define target.
7363
7364 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7365
7366 * linux-low.c (linux_wait_1): Adjust.
7367 * server.c (queue_stop_reply_callback): Adjust.
7368
7369 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7370
7371 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7372 QEnvironmentUnset and QEnvironmentReset packets.
7373 (handle_query): Inform remote that QEnvironmentHexEncoded,
7374 QEnvironmentUnset and QEnvironmentReset are supported.
7375
7376 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7377
7378 * inferiors.h (inferior_target_data): Rename to ...
7379 (thread_target_data): ... this.
7380 (inferior_regcache_data): Rename to ...
7381 (thread_regcache_data): ... this.
7382 (set_inferior_regcache_data): Rename to ...
7383 (set_thread_regcache_data): ... this.
7384 * inferiors.c (inferior_target_data): Rename to ...
7385 (thread_target_data): ... this.
7386 (inferior_regcache_data): Rename to ...
7387 (thread_regcache_data): ... this.
7388 (set_inferior_regcache_data): Rename to ...
7389 (set_thread_regcache_data): ... this.
7390 (free_one_thread): Update.
7391 * linux-low.h (get_thread_lwp): Update.
7392 * regcache.c (get_thread_regcache): Update.
7393 (regcache_invalidate_thread): Update.
7394 (free_register_cache_thread): Update.
7395 * win32-i386-low.c (update_debug_registers_callback): Update.
7396 (win32_get_current_dr): Update.
7397 * win32-low.c (thread_rec): Update.
7398 (delete_thread_info): Update.
7399 (continue_one_thread): Update.
7400 (suspend_one_thread): Update.
7401
7402 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7403
7404 * inferiors.c (set_inferior_target_data): Remove.
7405 * inferiors.h (set_inferior_target_data): Remove.
7406
7407 2017-08-18 Yao Qi <yao.qi@linaro.org>
7408
7409 * Makefile.in (OBS): Add selftest.o.
7410 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7411 * configure, config.in: Re-generated.
7412 * server.c: Include common/sefltest.h.
7413 (captured_main): Handle option --selftest.
7414
7415 2017-08-09 Yao Qi <yao.qi@linaro.org>
7416
7417 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7418 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7419 i386-avx-mpx.o and i386-mmx.o.
7420 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7421 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7422 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7423 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7424 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7425 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7426 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7427 i386/amd64-avx-mpx.xml.
7428
7429 2017-08-09 Yao Qi <yao.qi@linaro.org>
7430
7431 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7432 and x32-avx-avx512.o.
7433 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7434 i386/x32-avx-avx512.xml.
7435
7436 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7437
7438 * tracepoint.h (enum class fast_tpoint_collect_result): New
7439 enumeration.
7440 (fast_tracepoint_collecting): Change return type to
7441 fast_tpoint_collect_result.
7442 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7443 * linux-low.h: Include tracepoint.h.
7444 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7445 fast_tpoint_collect_result.
7446 * linux-low.c (handle_tracepoints): Adjust.
7447 (linux_fast_tracepoint_collecting): Change return type to
7448 fast_tpoint_collect_result.
7449 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7450 linux_wait_1, stuck_in_jump_pad_callback,
7451 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7452 proceed_one_lwp): Adjust to type change.
7453
7454 2017-07-10 Yao Qi <yao.qi@linaro.org>
7455
7456 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7457
7458 2017-06-29 Yao Qi <yao.qi@linaro.org>
7459
7460 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7461 Remove.
7462 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7463
7464 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7465
7466 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7467
7468 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7469
7470 * linux-low.c (linux_create_inferior): Adjust code to access the
7471 environment information via 'gdb_environ' class.
7472 * lynx-low.c (lynx_create_inferior): Likewise.
7473 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7474 (get_environ): Return a pointer to 'our_environ'.
7475 (captured_main): Initialize 'our_environ'.
7476 * server.h (get_environ): Adjust prototype.
7477 * spu-low.c (spu_create_inferior): Adjust code to access the
7478 environment information via 'gdb_environ' class.
7479
7480 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7481
7482 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7483 usage of "register" keyword.
7484
7485 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7486
7487 * configure: Re-generate.
7488
7489 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7490
7491 * configure: Re-generate.
7492
7493 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7494
7495 * Makefile.in (COMPILE.pre): Add "-x c++".
7496
7497 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7498
7499 * fork-child.c: Conditionally include <signal.h>.
7500
7501 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7502
7503 * server.c (handle_general_set): Handle new packet
7504 "QStartupWithShell".
7505 (handle_query): Add "QStartupWithShell" to the list of supported
7506 packets.
7507 (gdbserver_usage): Add help text explaining the
7508 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7509 options.
7510 (captured_main): Recognize and act upon the presence of the new
7511 CLI options.
7512
7513 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7514 Pedro Alves <palves@redhat.com>
7515
7516 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7517 * configure: Regenerate.
7518 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7519 "fork-inferior.o".
7520 (i[34567]86-*-lynxos*): Likewise.
7521 (spu*-*-*): Likewise.
7522 * fork-child.c: New file.
7523 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7524 and "environ.h".
7525 (linux_ptrace_fun): New function.
7526 (linux_create_inferior): Adjust function prototype to reflect
7527 change on "target.h". Adjust function code to use
7528 "fork_inferior".
7529 (linux_request_interrupt): Delete "signal_pid".
7530 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7531 (lynx_ptrace_fun): New function.
7532 (lynx_create_inferior): Adjust function prototype to reflect
7533 change on "target.h". Adjust function code to use
7534 "fork_inferior".
7535 * nto-low.c (nto_create_inferior): Adjust function prototype and
7536 code to reflect change on "target.h". Update comments.
7537 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7538 "common-terminal.h" and "environ.h".
7539 (terminal_fd): Moved to fork-child.c.
7540 (old_foreground_pgrp): Likewise.
7541 (restore_old_foreground_pgrp): Likewise.
7542 (last_status): Make it global.
7543 (last_ptid): Likewise.
7544 (our_environ): New variable.
7545 (startup_with_shell): Likewise.
7546 (program_name): Likewise.
7547 (program_argv): Rename to...
7548 (program_args): ...this.
7549 (wrapper_argv): New variable.
7550 (start_inferior): Delete function.
7551 (get_exec_wrapper): New function.
7552 (get_exec_file): Likewise.
7553 (get_environ): Likewise.
7554 (prefork_hook): Likewise.
7555 (post_fork_inferior): Likewise.
7556 (postfork_hook): Likewise.
7557 (postfork_child_hook): Likewise.
7558 (handle_v_run): Update code to deal with arguments coming from the
7559 remote host. Update calls from "start_inferior" to
7560 "create_inferior".
7561 (captured_main): Likewise. Initialize environment variable. Call
7562 "have_job_control".
7563 * server.h (post_fork_inferior): New prototype.
7564 (get_environ): Likewise.
7565 (last_status): Declare.
7566 (last_ptid): Likewise.
7567 (signal_pid): Likewise.
7568 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7569 (spu_ptrace_fun): New function.
7570 (spu_create_inferior): Adjust function prototype to reflect change
7571 on "target.h". Adjust function code to use "fork_inferior".
7572 * target.c (target_terminal_init): New function.
7573 (target_terminal_inferior): Likewise.
7574 (target_terminal_ours): Likewise.
7575 * target.h: Include <vector>.
7576 (struct target_ops) <create_inferior>: Update prototype.
7577 (create_inferior): Update macro.
7578 * utils.c (gdb_flush_out_err): New function.
7579 * win32-low.c (win32_create_inferior): Adjust function prototype
7580 and code to reflect change on "target.h".
7581
7582 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7583
7584 * inferiors.c (switch_to_thread): New function.
7585
7586 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7587
7588 * Makefile.in (SFILE): Add "common/job-control.c".
7589 (OBS): Add "job-control.o".
7590
7591 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7592
7593 * Makefile: Remove "@host_makefile_frag@".
7594
7595 2017-05-05 Pedro Alves <palves@redhat.com>
7596
7597 * configure: Regenerate.
7598
7599 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7600
7601 * configure: Regenerate.
7602
7603 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7604
7605 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7606 software_single_step change of return type to
7607 std::vector<CORE_ADDR>.
7608 * linux-low.c (install_software_single_step_breakpoints):
7609 Likewise.
7610 * linux-low.h (install_software_single_step_breakpoints):
7611 Likewise.
7612
7613 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7614
7615 * remote-utils.c: Include "gdb_termios.h" instead of
7616 "terminal.h".
7617 * terminal.h: Delete file.
7618
7619 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7620
7621 * server.c: Include <vector>.
7622 <program_argv, wrapper_argv>: Convert to std::vector.
7623 (start_inferior): Rewrite function to use C++.
7624 (handle_v_run): Likewise. Update code that calculates the argv
7625 based on the vRun packet; use C++.
7626 (captured_main): Likewise.
7627
7628 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7629
7630 * server.c (handle_v_cont): Initialize thread_resume::thread
7631 with null_ptid.
7632
7633 2017-04-05 Pedro Alves <palves@redhat.com>
7634
7635 * configure: Regenerate.
7636
7637 2017-04-05 Pedro Alves <palves@redhat.com>
7638
7639 * gdbreplay.c (sync_error): Constify.
7640 * linux-x86-low.c (push_opcode): Constify.
7641
7642 2017-04-05 Pedro Alves <palves@redhat.com>
7643
7644 * win32-low.c (get_child_debug_event)
7645 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7646 Report TARGET_WAITKIND_SPURIOUS instead.
7647
7648 2017-04-05 Pedro Alves <palves@redhat.com>
7649
7650 * remote-utils.c (remote_prepare, remote_open): Constify.
7651 * remote-utils.h (remote_prepare, remote_open): Constify.
7652 * server.c (captured_main): Constify 'port' handling.
7653
7654 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7655
7656 * Makefile.in (clean): Clear .deps.
7657
7658 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7659
7660 * .gitignore: Remove generated files, replace with wildcard.
7661 * (clean): Replace removal of generated files with wildcard.
7662 (version.c): Replace with...
7663 (version-generated.c): ...this.
7664 (xml-builtin.c): Replace with...
7665 (xml-builtin-generated.c): ...this.
7666 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7667 (%.c: *regformats*): Replace with...
7668 (%-generated.c: *regformats*): ...this.
7669
7670 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7671
7672 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7673 (xtensa_fill_gregset): Call collect_register_by_name for
7674 threadptr register.
7675 (xtensa_store_gregset): Call supply_register_by_name for
7676 threadptr register.
7677
7678 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7679
7680 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7681 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7682 (xtensa_store_gregset): Call supply_register for all registers in
7683 a0_regnum..a0_regnum + C0_NREGS range.
7684
7685 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7686
7687 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7688 (ax-ipa.o: ax.c): Remove.
7689 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7690 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7691 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7692 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7693 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7694
7695 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7696
7697 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7698 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7699 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7700 (errors-ipa.o: ../common/errors.c): Remove.
7701 (format-ipa.o: ../common/format.c): Remove.
7702 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7703
7704 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7705
7706 * Makefile.in (%-ipa.o: %.c): New rule.
7707 (tracepoint-ipa.o: tracepoint.c): Remove.
7708 (utils-ipa.o: utils.c): Remove.
7709 (remote-utils-ipa.o: remote-utils.c): Remove.
7710 (regcache-ipa.o: regcache.c): Remove.
7711 (i386-linux-ipa.o: i386-linux.c): Remove.
7712 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7713 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7714 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7715 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7716 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7717 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7718 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7719 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7720 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7721 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7722 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7723 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7724 (aarch64-ipa.o: aarch64.c): Remove.
7725 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7726 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7727 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7728 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7729 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7730 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7731 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7732 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7733 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7734 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7735 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7736 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7737 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7738 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7739 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7740 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7741 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7742 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7743 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7744 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7745 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7746 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7747 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7748 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7749 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7750 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7751 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7752 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7753 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7754 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7755 (tdesc-ipa.o: tdesc.c): Remove.
7756 (x32-linux-ipa.o: x32-linux.c): Remove.
7757 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7758 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7759
7760 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7761
7762 * Makefile.in (%.o: ../arch/%.c): New rule.
7763 (arm.o: ../arch/arm.c): Remove.
7764 (arm-linux.o: ../arch/arm-linux.c): Remove.
7765 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7766 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7767
7768 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7769
7770 * Makefile.in (%.o: ../nat/%.c): New rule.
7771 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7772 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7773 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7774 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7775 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7776 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7777 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7778 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7779 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7780 (linux-personality.o: ../nat/linux-personality.c): Remove.
7781 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7782 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7783 (x86-linux.o: ../nat/x86-linux.c): Remove.
7784 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7785 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7786
7787 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7788
7789 * Makefile.in (%.o: ../common/%.c): New rule.
7790 (signals.o: ../common/signals.c): Remove.
7791 (print-utils.o: ../common/print-utils.c): Remove.
7792 (rsp-low.o: ../common/rsp-low.c): Remove.
7793 (common-utils.o: ../common/common-utils.c): Remove.
7794 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7795 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7796 (vec.o: ../common/vec.c): Remove.
7797 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7798 (xml-utils.o: ../common/xml-utils.c): Remove.
7799 (ptid.o: ../common/ptid.c): Remove.
7800 (buffer.o: ../common/buffer.c): Remove.
7801 (format.o: ../common/format.c): Remove.
7802 (filestuff.o: ../common/filestuff.c): Remove.
7803 (agent.o: ../common/agent.c): Remove.
7804 (errors.o: ../common/errors.c): Remove.
7805 (environ.o: ../common/environ.c): Remove.
7806 (common-debug.o: ../common/common-debug.c): Remove.
7807 (cleanups.o: ../common/cleanups.c): Remove.
7808 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7809 (fileio.o: ../common/fileio.c): Remove.
7810 (common-regcache.o: ../common/common-regcache.c): Remove.
7811 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7812 (new-op.o: ../common/new-op.c): Remove.
7813 (btrace-common.o: ../common/btrace-common.c): Remove.
7814
7815 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7816
7817 * Makefile.in (%.o: ../target/%.c): New rule.
7818 (waitstatus.o: ../target/waitstatus.c): Remove.
7819
7820 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7821
7822 * Makefile.in
7823 (%.c: ../regformats/%.dat,
7824 (%.c: ../regformats/arm/%.dat,
7825 (%.c: ../regformats/i386/%.dat,
7826 (%.c: ../regformats/rs6000/%.dat): New rules.
7827 (aarch64.c): Remove.
7828 (reg-arm.c): Remove.
7829 (arm-with-iwmmxt.c): Remove.
7830 (arm-with-vfpv2.c): Remove.
7831 (arm-with-vfpv3.c): Remove.
7832 (arm-with-neon.c): Remove.
7833 (reg-bfin.c): Remove.
7834 (reg-cris.c): Remove.
7835 (reg-crisv32.c): Remove.
7836 (i386.c): Remove.
7837 (i386-linux.c): Remove.
7838 (i386-avx.c): Remove.
7839 (i386-avx-linux.c): Remove.
7840 (i386-avx-avx512.c): Remove.
7841 (i386-avx-avx512-linux.c): Remove.
7842 (i386-mpx.c): Remove.
7843 (i386-mpx-linux.c): Remove.
7844 (i386-avx-mpx-avx512-pku.c): Remove.
7845 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7846 (i386-avx-mpx.c): Remove.
7847 (i386-avx-mpx-linux.c): Remove.
7848 (i386-mmx.c): Remove.
7849 (i386-mmx-linux.c): Remove.
7850 (reg-ia64.c): Remove.
7851 (reg-m32r.c): Remove.
7852 (reg-m68k.c): Remove.
7853 (reg-cf.c): Remove.
7854 (mips-linux.c): Remove.
7855 (mips-dsp-linux.c): Remove.
7856 (mips64-linux.c): Remove.
7857 (mips64-dsp-linux.c): Remove.
7858 (nios2-linux.c): Remove.
7859 (powerpc-32.c): Remove.
7860 (powerpc-32l.c): Remove.
7861 (powerpc-altivec32l.c): Remove.
7862 (powerpc-cell32l.c): Remove.
7863 (powerpc-vsx32l.c): Remove.
7864 (powerpc-isa205-32l.c): Remove.
7865 (powerpc-isa205-altivec32l.c): Remove.
7866 (powerpc-isa205-vsx32l.c): Remove.
7867 (powerpc-e500l.c): Remove.
7868 (powerpc-64l.c): Remove.
7869 (powerpc-altivec64l.c): Remove.
7870 (powerpc-cell64l.c): Remove.
7871 (powerpc-vsx64l.c): Remove.
7872 (powerpc-isa205-64l.c): Remove.
7873 (powerpc-isa205-altivec64l.c): Remove.
7874 (powerpc-isa205-vsx64l.c): Remove.
7875 (s390-linux32.c): Remove.
7876 (s390-linux32v1.c): Remove.
7877 (s390-linux32v2.c): Remove.
7878 (s390-linux64.c): Remove.
7879 (s390-linux64v1.c): Remove.
7880 (s390-linux64v2.c): Remove.
7881 (s390-te-linux64.c): Remove.
7882 (s390-vx-linux64.c): Remove.
7883 (s390-tevx-linux64.c): Remove.
7884 (s390x-linux64.c): Remove.
7885 (s390x-linux64v1.c): Remove.
7886 (s390x-linux64v2.c): Remove.
7887 (s390x-te-linux64.c): Remove.
7888 (s390x-vx-linux64.c): Remove.
7889 (s390x-tevx-linux64.c): Remove.
7890 (tic6x-c64xp-linux.c): Remove.
7891 (tic6x-c64x-linux.c): Remove.
7892 (tic6x-c62x-linux.c): Remove.
7893 (reg-sh.c): Remove.
7894 (reg-sparc64.c): Remove.
7895 (reg-spu.c): Remove.
7896 (amd64.c): Remove.
7897 (amd64-linux.c): Remove.
7898 (amd64-avx.c): Remove.
7899 (amd64-avx-linux.c): Remove.
7900 (amd64-avx-avx512.c): Remove.
7901 (amd64-avx-avx512-linux.c): Remove.
7902 (amd64-mpx.c): Remove.
7903 (amd64-mpx-linux.c): Remove.
7904 (amd64-avx-mpx-avx512-pku.c): Remove.
7905 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7906 (amd64-avx-mpx.c): Remove.
7907 (amd64-avx-mpx-linux.c): Remove.
7908 (x32.c): Remove.
7909 (x32-linux.c): Remove.
7910 (x32-avx.c): Remove.
7911 (x32-avx-linux.c): Remove.
7912 (x32-avx-avx512.c): Remove.
7913 (x32-avx-avx512-linux.c): Remove.
7914 (reg-xtensa.c): Remove.
7915 (reg-tilegx.c): Remove.
7916 (reg-tilegx32.c): Remove.
7917
7918 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7919
7920 * Makefile.in (SFILES): Add "common/environ.c".
7921 (OBJS): Add "common/environ.h".
7922
7923 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7924
7925 * configure.ac: Check if the fs_base and gs_base members of
7926 `struct user_regs_struct' exist.
7927 * config.in: Regenerated.
7928 * configure: Likewise.
7929
7930 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7931
7932 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7933 target_read_memory.
7934 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7935 (get_next_pcs_syscall_next_pc): Likewise.
7936
7937 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7938
7939 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7940 * nto-x86-low.c: Likewise.
7941
7942 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7943
7944 * Makefile.in: Include disable-implicit-rules.mk.
7945
7946 2016-11-23 Pedro Alves <palves@redhat.com>
7947
7948 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7949 (debug_vprintf): Use std::chrono::steady_clock instead of
7950 gettimeofday. Use '.' instead of ':'.
7951 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7952 (get_timestamp): Use std::chrono::steady_clock instead of
7953 gettimeofday.
7954
7955 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7956
7957 * Makefile.in: Fix whitespace formatting.
7958
7959 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7960
7961 * Makefile.in (SFILES, OBS): Flatten list and order
7962 alphabetically.
7963
7964 2016-11-23 Pedro Alves <palves@redhat.com>
7965
7966 * event-loop.c (handle_file_event): Use warning.
7967 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7968 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7969 Use warning.
7970
7971 2016-11-23 Pedro Alves <palves@redhat.com>
7972
7973 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7974 output.
7975 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7976 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7977 debug_printf and debug_flush for debug output.
7978 * server.c (handle_general_set): Likewise.
7979 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7980 output.
7981
7982 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7983
7984 * Makefile.in (.c.o): Replace rule with ...
7985 (%.o: %.c): ... this one.
7986
7987 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7988
7989 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7990 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7991 make.
7992 * configure.ac: Remove checks for the make program.
7993 * configure: Re-generate.
7994
7995 2016-10-28 Pedro Alves <palves@redhat.com>
7996
7997 * Makefile.in (CXX_DIALECT): Get from configure.
7998 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7999 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
8000 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
8001 * config.in: Regenerate.
8002 * configure: Regenerate.
8003
8004 2016-10-27 Yao Qi <yao.qi@linaro.org>
8005
8006 * linux-low.c (linux_supports_range_stepping): Return true if
8007 can_software_single_step return true.
8008
8009 2016-10-27 Yao Qi <yao.qi@linaro.org>
8010
8011 * inferiors.c (find_inferior_in_random): New function.
8012 * inferiors.h (find_inferior_in_random): Declare.
8013 * linux-low.c (linux_wait_for_event_filtered): Call
8014 find_inferior_in_random instead of find_inferior.
8015
8016 2016-10-27 Yao Qi <yao.qi@linaro.org>
8017
8018 * linux-low.c (linux_wait_1): If single-step breakpoints are
8019 inserted, remove them.
8020
8021 2016-10-26 Pedro Alves <palves@redhat.com>
8022
8023 * linux-low.c (handle_extended_wait): Link parent/child fork
8024 threads.
8025 (linux_wait_1): Unlink them.
8026 (linux_set_resume_request): Ignore resume requests for
8027 already-resumed and unhandled fork child threads.
8028 * linux-low.h (struct lwp_info) <fork_relative>: New field.
8029 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
8030 New functions.
8031 (handle_v_requests) <vCont>: Don't call require_running.
8032 * server.h (in_queued_stop_replies): New declaration.
8033
8034 2016-10-24 Yao Qi <yao.qi@linaro.org>
8035
8036 PR server/20733
8037 * linux-aarch64-low.c (append_insns): Cast the return value to
8038 'uint32_t *'.
8039
8040 2016-10-10 Yao Qi <yao.qi@linaro.org>
8041
8042 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
8043
8044 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
8045
8046 * target.c (target_supports_multi_process): New function, moved
8047 from...
8048 * target.h (target_supports_multi_process): ... here. Remove
8049 macro.
8050
8051 2016-10-05 Tom Tromey <tom@tromey.com>
8052
8053 PR remote/20655:
8054 * tracepoint.c (handle_tracepoint_bkpts): Check
8055 ipa_error_tracepoint, not ipa_stopping_tracepoint.
8056
8057 2016-10-05 Yao Qi <yao.qi@linaro.org>
8058
8059 * configure.srv: Update the path of arm-*.xml files.
8060
8061 2016-10-05 Terry Guo <terry.guo@arm.com>
8062 Yao Qi <yao.qi@linaro.org>
8063
8064 * Makefile.in: Adjust the path of rules.
8065 * configure.srv: Update the path of xml files.
8066 * regformats/arm-with-iwmmxt.dat: Regenerated.
8067 * regformats/arm-with-neon.dat: Likewise.
8068 * regformats/arm-with-vfpv2.dat: Likewise.
8069 * regformats/arm-with-vfpv3.dat Likewise.
8070
8071 2016-09-30 Yao Qi <yao.qi@linaro.org>
8072
8073 PR gdbserver/20627
8074 * target.c (target_stop_and_wait): Don't call
8075 target_continue_no_signal, use resume_stop instead.
8076
8077 2016-09-26 Yao Qi <yao.qi@linaro.org>
8078
8079 * linux-low.c (linux_wait_1): Call debug_exit.
8080
8081 2016-09-23 Pedro Alves <palves@redhat.com>
8082
8083 * Makefile.in (SFILES): Add common/new-op.c.
8084 (OBS): Add common/new-op.o.
8085 (new-op.o): New rule.
8086
8087 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
8088
8089 * .gitinore: Ignore more files.
8090
8091 2016-09-21 Yao Qi <yao.qi@linaro.org>
8092
8093 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
8094 23.
8095
8096 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
8097
8098 * server.c (start_inferior): Call target_mourn_inferior instead of
8099 mourn_inferior; pass ptid_t argument to it.
8100 (resume): Likewise.
8101 (handle_target_event): Likewise.
8102 * target.c (target_mourn_inferior): New function.
8103 * target.h (mourn_inferior): Delete macro.
8104
8105 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8106
8107 * linux-low.c (lwp_is_stepping): New function.
8108
8109 2016-09-06 Carl Love <cel@us.ibm.com>
8110
8111 * server.c (start_inferior): Fixed comment, requested comment change
8112 didn't get updated correctly. Removed reference to ptrace () call as
8113 it is only true on Linux systems.
8114
8115 2016-09-06 Carl Love <cel@us.ibm.com>
8116
8117 * server.c (start_inferior): Do not call
8118 function target_post_create_inferior () if the
8119 inferior process has already exited.
8120
8121 2016-09-05 Pedro Alves <palves@redhat.com>
8122
8123 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
8124 (COMPILE.pre, CC_LD): Use CXX directly.
8125 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
8126 * acinclude.m4: Don't include build-with-cxx.m4.
8127 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
8128 * configure: Regenerate.
8129
8130 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
8131
8132 PR gdb/19495
8133 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
8134 call writing data to own_buf.
8135
8136 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8137
8138 * target.c (mywait): Call target_wait instead of
8139 the_target->wait.
8140 (target_wait): New function.
8141
8142 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8143
8144 * server.c (start_inferior): New variable 'ptid'. Replace calls
8145 to the_target->resume by target_continue{,_no_signal}, depending
8146 on the case.
8147 * target.c (target_stop_and_wait): Call target_continue_no_signal
8148 instead of the_target->resume.
8149 (target_continue): New function.
8150
8151 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
8152
8153 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
8154
8155 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
8156
8157 PR server/20491
8158 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
8159 ps_prochandle.
8160 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8161 * linux-arm-low.c (ps_get_thread_area): Likewise.
8162 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8163 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8164 * linux-mips-low.c (ps_get_thread_area): Likewise.
8165 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8166 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8167 * linux-x86-low.c (ps_get_thread_area): Likewise.
8168 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8169
8170 2016-08-19 Pedro Alves <palves@redhat.com>
8171
8172 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8173
8174 2016-08-19 Pedro Alves <palves@redhat.com>
8175
8176 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8177 comment. Use memcpy instead of casting through unsigned long.
8178
8179 2016-08-19 Pedro Alves <palves@redhat.com>
8180
8181 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8182 allocating around 0x80000000.
8183
8184 2016-08-19 Pedro Alves <palves@redhat.com>
8185
8186 PR gdb/20415
8187 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8188 (x32-avx512-linux-ipa.o): New rules.
8189 * configure.ac (x86_64-*-linux*): New x32 check.
8190 * configure.srv (ipa_x32_linux_regobj): New.
8191 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8192 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8193 descriptions.
8194 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8195 descriptions.
8196 * configure: Regenerate.
8197
8198 2016-08-09 Pedro Alves <palves@redhat.com>
8199
8200 PR gdb/18653
8201 * Makefile.in (OBS): Add signals-state-save-restore.o.
8202 (signals-state-save-restore.o): New rule.
8203 * config.in: Regenerate.
8204 * configure: Regenerate.
8205 * linux-low.c: Include "signals-state-save-restore.h".
8206 (linux_create_inferior): Call
8207 restore_original_signals_state.
8208 * server.c: Include "dispositions-save-restore.h".
8209 (captured_main): Call save_original_signals_state.
8210
8211 2016-08-05 Pedro Alves <palves@redhat.com>
8212
8213 * configure: Regenerate.
8214
8215 2016-08-04 Yao Qi <yao.qi@linaro.org>
8216
8217 * linux-low.c (regsets_fetch_inferior_registers): Check
8218 errno is ESRCH or not.
8219
8220 2016-08-02 Yao Qi <yao.qi@linaro.org>
8221
8222 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8223 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8224 (thread_db_load_search): Update.
8225 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8226 td_ta_set_event and td_ta_event_getmsg.
8227
8228 2016-07-26 Pedro Alves <palves@redhat.com>
8229
8230 PR server/20414
8231 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8232 of unsigned long for 64-bit registers and use uint32_t instead of
8233 unsigned int for 32-bit registers.
8234
8235 2016-07-26 Pedro Alves <palves@redhat.com>
8236
8237 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8238 to 'ptrace'.
8239
8240 2016-07-21 Tom Tromey <tom@tromey.com>
8241
8242 * configure: Rebuild.
8243
8244 2016-07-21 Yao Qi <yao.qi@linaro.org>
8245
8246 * mem-break.c (find_gdb_breakpoint): Cast bp to
8247 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8248
8249 2016-07-21 Yao Qi <yao.qi@linaro.org>
8250
8251 * server.c (handle_v_requests): Support s and S actions
8252 if target_supports_software_single_step return true.
8253
8254 2016-07-21 Yao Qi <yao.qi@linaro.org>
8255
8256 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8257 is resume_step, call maybe_hw_step.
8258 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8259 and unstop them.
8260 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8261 breakpoints or not.
8262 (proceed_one_lwp): If resume request is resume_step, install
8263 reinsert breakpoints and call maybe_hw_step.
8264
8265 2016-07-21 Yao Qi <yao.qi@linaro.org>
8266
8267 * linux-low.c (proceed_one_lwp): Declare.
8268 (linux_resume_one_thread): Remove local variable 'step'.
8269 Lift code enqueue signal. Call proceed_one_lwp instead of
8270 linux_resume_one_lwp.
8271
8272 2016-07-21 Yao Qi <yao.qi@linaro.org>
8273
8274 * linux-low.c (linux_resume_one_thread): Call
8275 enqueue_pending_signal.
8276
8277 2016-07-21 Yao Qi <yao.qi@linaro.org>
8278
8279 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8280 * inferiors.c (do_restore_current_thread_cleanup): New function.
8281 (make_cleanup_restore_current_thread): Likewise.
8282 * linux-low.c (install_software_single_step_breakpoints): Call
8283 make_cleanup_restore_current_thread. Switch current_thread to
8284 thread.
8285
8286 2016-07-21 Yao Qi <yao.qi@linaro.org>
8287
8288 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8289 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8290 (clone_one_breakpoint): Likewise.
8291 (delete_reinsert_breakpoints): Change parameter to thread.
8292 Callers updated.
8293 (has_reinsert_breakpoints): Likewise.
8294 (uninsert_reinsert_breakpoints): Likewise.
8295 (reinsert_reinsert_breakpoints): Likewise.
8296 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8297 (delete_reinsert_breakpoints): Likewise.
8298 (reinsert_reinsert_breakpoints): Likewise.
8299 (uninsert_reinsert_breakpoints): Likewise.
8300 (has_reinsert_breakpoints): Likewise.
8301
8302 2016-07-21 Yao Qi <yao.qi@linaro.org>
8303
8304 * inferiors.c (get_thread_process): Make parameter const.
8305 * inferiors.h (get_thread_process): Update declaration.
8306 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8307 Add new parameters child_thread and parent_thread. Callers
8308 updated.
8309 * mem-break.h (clone_all_breakpoints): Update declaration.
8310
8311 2016-07-21 Yao Qi <yao.qi@linaro.org>
8312
8313 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8314 <command_list, handler>: Remove.
8315 (struct gdb_breakpoint): New.
8316 (struct other_breakpoint): New.
8317 (struct reinsert_breakpoint): New.
8318 (is_gdb_breakpoint): New function.
8319 (any_persistent_commands): Update command_list if
8320 is_gdb_breakpoint returns true.
8321 (set_breakpoint): Create breakpoints according to their types.
8322 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8323 (set_gdb_breakpoint_1): Likewise.
8324 (set_gdb_breakpoint): Likewise.
8325 (clear_breakpoint_conditions): Change parameter type to
8326 'struct gdb_breakpoint *'.
8327 (clear_breakpoint_commands): Likewise.
8328 (clear_breakpoint_conditions_and_commands): Likewise.
8329 (add_condition_to_breakpoint): Likewise.
8330 (add_breakpoint_condition): Likewise.
8331 (add_commands_to_breakpoint): Likewise.
8332 (check_breakpoints): Check other_breakpoint.
8333 (clone_one_breakpoint): Clone breakpopint according to its type.
8334 * mem-break.h (struct gdb_breakpoint): Declare.
8335 (set_gdb_breakpoint): Update declaration.
8336 (clear_breakpoint_conditions_and_commands): Likewise.
8337 (add_breakpoint_condition): Likewise.
8338 (add_breakpoint_commands): Likewise.
8339 * server.c (process_point_options): Change parameter type to
8340 'struct gdb_breakpoint *'.
8341
8342 2016-07-21 Yao Qi <yao.qi@linaro.org>
8343
8344 * mem-break.c (set_breakpoint_at): Rename it to ...
8345 (set_breakpoint_type_at): ... it.
8346 (set_breakpoint_at): Call set_breakpoint_type_at.
8347 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8348 * mem-break.h (set_breakpoint_at): Update comments.
8349
8350 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8351
8352 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8353 to buf parameter.
8354 (nios2_store_gregset): Likewise.
8355
8356 2016-07-01 Pedro Alves <palves@redhat.com>
8357 Antoine Tremblay <antoine.tremblay@ericsson.com>
8358
8359 * linux-low.c: Change interface to take the target lwp_info
8360 pointer directly and return void. Handle detaching from a zombie
8361 thread.
8362 (linux_detach_lwp_callback): New function.
8363 (linux_detach): Detach from the leader thread after detaching from
8364 the clone threads.
8365
8366 2016-06-28 Yao Qi <yao.qi@linaro.org>
8367
8368 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8369 for variable new_offset.
8370 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8371 (aarch64_ftrace_insn_reloc_cb): Likewise.
8372 (aarch64_ftrace_insn_reloc_tb): Likewise.
8373 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8374 PRIx64 instead of PRIx32.
8375
8376 2016-06-28 Yao Qi <yao.qi@linaro.org>
8377
8378 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8379 (the_low_target): Install arm_get_syscall_trapinfo.
8380
8381 2016-06-28 Yao Qi <yao.qi@linaro.org>
8382
8383 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8384 function.
8385 (the_low_target): Install aarch64_get_syscall_trapinfo.
8386
8387 2016-06-28 Yao Qi <yao.qi@linaro.org>
8388
8389 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8390 Callers updated.
8391 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8392 Remove parameter sysno.
8393 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8394 sysret.
8395
8396 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8397
8398 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8399 (s390_emit_ne_goto): Likewise.
8400 (s390_emit_lt_goto): Likewise.
8401 (s390_emit_le_goto): Likewise.
8402 (s390_emit_gt_goto): Likewise.
8403 (s390_emit_ge_goto): Likewise.
8404 (s390x_emit_eq_goto): Likewise.
8405 (s390x_emit_ne_goto): Likewise.
8406 (s390x_emit_lt_goto): Likewise.
8407 (s390x_emit_le_goto): Likewise.
8408 (s390x_emit_gt_goto): Likewise.
8409 (s390x_emit_ge_goto): Likewise.
8410 (s390_emit_ops_impl): Mark variable static.
8411 (s390x_emit_ops): Likewise.
8412
8413 2016-06-17 Yao Qi <yao.qi@linaro.org>
8414
8415 * linux-low.c (handle_extended_wait): Call
8416 uninsert_reinsert_breakpoints for the parent process. Remove
8417 reinsert breakpoints from the child process. Reinsert them to
8418 the parent process when vfork is done.
8419 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8420 (reinsert_reinsert_breakpoints): New function.
8421 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8422 (reinsert_reinsert_breakpoints): Declare.
8423
8424 2016-06-17 Yao Qi <yao.qi@linaro.org>
8425
8426 * linux-low.c (handle_extended_wait): If the parent is doing
8427 step-over, remove the reinsert breakpoints from the forked child.
8428
8429 2016-06-17 Yao Qi <yao.qi@linaro.org>
8430
8431 * linux-low.c (unsuspend_all_lwps): Declare.
8432 (linux_low_filter_event): If thread exited, call finish_step_over.
8433 If step-over is finished, unsuspend other threads.
8434
8435 2016-06-17 Yao Qi <yao.qi@linaro.org>
8436
8437 * linux-low.c (linux_resume_one_lwp_throw): Assert
8438 has_reinsert_breakpoints returns false.
8439 * mem-break.c (delete_disabled_breakpoints): Assert
8440 bp type isn't reinsert_breakpoint.
8441
8442 2016-06-17 Yao Qi <yao.qi@linaro.org>
8443
8444 * linux-low.c (maybe_hw_step): New function.
8445 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8446 (finish_step_over): Switch current_thread to lwp temporarily,
8447 and assert has_reinsert_breakpoints returns true.
8448 (proceed_one_lwp): Call maybe_hw_step.
8449 * mem-break.c (has_reinsert_breakpoints): New function.
8450 * mem-break.h (has_reinsert_breakpoints): Declare.
8451
8452 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8453
8454 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8455
8456 2016-05-17 Yao Qi <yao.qi@linaro.org>
8457
8458 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8459 instead of find_inferior.
8460
8461 2016-05-05 Yao Qi <yao.qi@linaro.org>
8462
8463 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8464 Initialize res to zero.
8465
8466 2016-05-05 Yao Qi <yao.qi@linaro.org>
8467
8468 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8469 to uint32_t.
8470
8471 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8472
8473 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8474 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8475 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8476
8477 2016-04-28 Par Olsson <par.olsson@windriver.com>
8478 Simon Marchi <simon.marchi@ericsson.com>
8479
8480 * tracepoint.c (write_inferior_int8): New function.
8481 (cmd_qtenable_disable): Write enable flag using
8482 write_inferior_int8.
8483
8484 2016-04-25 Yao Qi <yao.qi@linaro.org>
8485
8486 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8487 (need_step_over_p): Return zero if the LWP has pending signals
8488 can be delivered on software single step target.
8489
8490 2016-04-25 Yao Qi <yao.qi@linaro.org>
8491
8492 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8493 return instead of error.
8494
8495 2016-04-22 Yao Qi <yao.qi@linaro.org>
8496
8497 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8498 to 23.
8499
8500 2016-04-22 Yao Qi <yao.qi@linaro.org>
8501
8502 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8503 signal when stepping over breakpoint with software single
8504 step.
8505
8506 2016-04-21 Pedro Alves <palves@redhat.com>
8507
8508 * linux-s390-low.c (s390_collect_ptrace_register)
8509 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8510 add casts.
8511 (s390_check_regset): Use void * instead of gdb_byte *.
8512
8513 2016-04-20 Pedro Alves <palves@redhat.com>
8514
8515 * configure: Renegerate.
8516
8517 2016-04-20 Yao Qi <yao.qi@linaro.org>
8518
8519 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8520 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8521 number 16.
8522 (arm_store_gregset): Likewise.
8523
8524 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8525
8526 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8527 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8528 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8529 (amd64-avx-mpx-linux.c): New rules.
8530 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8531 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8532 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8533 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8534 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8535 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8536 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8537 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8538 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8539 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8540 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8541 * linux-x86-low.c (x86_linux_read_description): Add case for
8542 X86_XSTATE_AVX_MPX_MASK.
8543 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8544 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8545 init_registers_i386_avx_mpx_linux.
8546 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8547 (initialize_low_tracepoint): Call
8548 init_registers_i386_avx_mpx_linux.
8549 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8550 (initialize_low_tracepoint): Call
8551 init_registers_amd64_avx_mpx_linux.
8552 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8553 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8554 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8555 declarations.
8556
8557 2016-04-18 Pedro Alves <palves@redhat.com>
8558
8559 * configure: Regenerate.
8560
8561 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8562
8563 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8564 (aarch64_emit_sub): Likewise.
8565
8566 2016-04-12 Pedro Alves <palves@redhat.com>
8567
8568 * utils.c (prepare_to_throw_exception): Delete.
8569
8570 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8571
8572 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8573
8574 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8575
8576 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8577
8578 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8579
8580 * linux-aarch64-ipa.c: Add <elf.h> include.
8581 * linux-ppc-ipa.c: Add <elf.h> include.
8582 * linux-s390-ipa.c: Add <elf.h> include.
8583
8584 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8585
8586 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8587 (get_raw_reg_ptr): Likewise.
8588 (get_trace_state_variable_value_ptr): Likewise.
8589 (set_trace_state_variable_value_ptr): Likewise.
8590 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8591 char *.
8592
8593 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8594 Marcin Kościelnicki <koriakin@0x04.net>
8595
8596 PR/17221
8597 * linux-ppc-low.c (emit_insns): New function.
8598 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8599 (ppc_emit_prologue): New function.
8600 (ppc_emit_epilogue): New function.
8601 (ppc_emit_add): New function.
8602 (ppc_emit_sub): New function.
8603 (ppc_emit_mul): New function.
8604 (ppc_emit_lsh): New function.
8605 (ppc_emit_rsh_signed): New function.
8606 (ppc_emit_rsh_unsigned): New function.
8607 (ppc_emit_ext): New function.
8608 (ppc_emit_zero_ext): New function.
8609 (ppc_emit_log_not): New function.
8610 (ppc_emit_bit_and): New function.
8611 (ppc_emit_bit_or): New function.
8612 (ppc_emit_bit_xor): New function.
8613 (ppc_emit_bit_not): New function.
8614 (ppc_emit_equal): New function.
8615 (ppc_emit_less_signed): New function.
8616 (ppc_emit_less_unsigned): New function.
8617 (ppc_emit_ref): New function.
8618 (ppc_emit_const): New function.
8619 (ppc_emit_reg): New function.
8620 (ppc_emit_pop): New function.
8621 (ppc_emit_stack_flush): New function.
8622 (ppc_emit_swap): New function.
8623 (ppc_emit_stack_adjust): New function.
8624 (ppc_emit_call): New function.
8625 (ppc_emit_int_call_1): New function.
8626 (ppc_emit_void_call_2): New function.
8627 (ppc_emit_if_goto): New function.
8628 (ppc_emit_goto): New function.
8629 (ppc_emit_eq_goto): New function.
8630 (ppc_emit_ne_goto): New function.
8631 (ppc_emit_lt_goto): New function.
8632 (ppc_emit_le_goto): New function.
8633 (ppc_emit_gt_goto): New function.
8634 (ppc_emit_ge_goto): New function.
8635 (ppc_write_goto_address): New function.
8636 (ppc_emit_ops_impl): New static variable.
8637 (ppc64v1_emit_prologue): New function.
8638 (ppc64v2_emit_prologue): New function.
8639 (ppc64_emit_epilogue): New function.
8640 (ppc64_emit_add): New function.
8641 (ppc64_emit_sub): New function.
8642 (ppc64_emit_mul): New function.
8643 (ppc64_emit_lsh): New function.
8644 (ppc64_emit_rsh_signed): New function.
8645 (ppc64_emit_rsh_unsigned): New function.
8646 (ppc64_emit_ext): New function.
8647 (ppc64_emit_zero_ext): New function.
8648 (ppc64_emit_log_not): New function.
8649 (ppc64_emit_bit_and): New function.
8650 (ppc64_emit_bit_or): New function.
8651 (ppc64_emit_bit_xor): New function.
8652 (ppc64_emit_bit_not): New function.
8653 (ppc64_emit_equal): New function.
8654 (ppc64_emit_less_signed): New function.
8655 (ppc64_emit_less_unsigned): New function.
8656 (ppc64_emit_ref): New function.
8657 (ppc64_emit_const): New function.
8658 (ppc64v1_emit_reg): New function.
8659 (ppc64v2_emit_reg): New function.
8660 (ppc64_emit_pop): New function.
8661 (ppc64_emit_stack_flush): New function.
8662 (ppc64_emit_swap): New function.
8663 (ppc64v1_emit_call): New function.
8664 (ppc64v2_emit_call): New function.
8665 (ppc64v1_emit_int_call_1): New function.
8666 (ppc64v2_emit_int_call_1): New function.
8667 (ppc64v1_emit_void_call_2): New function.
8668 (ppc64v2_emit_void_call_2): New function.
8669 (ppc64_emit_if_goto): New function.
8670 (ppc64_emit_eq_goto): New function.
8671 (ppc64_emit_ne_goto): New function.
8672 (ppc64_emit_lt_goto): New function.
8673 (ppc64_emit_le_goto): New function.
8674 (ppc64_emit_gt_goto): New function.
8675 (ppc64_emit_ge_goto): New function.
8676 (ppc64v1_emit_ops_impl): New static variable.
8677 (ppc64v2_emit_ops_impl): New static variable.
8678 (ppc_emit_ops): New function.
8679 (linux_low_target): Wire in ppc_emit_ops.
8680
8681 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8682 Marcin Kościelnicki <koriakin@0x04.net>
8683
8684 PR/17221
8685 * Makefile.in: Add powerpc-*-ipa.o
8686 * configure.srv: Add ipa_obj for powerpc*-linux.
8687 * linux-ppc-ipa.c: New file.
8688 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8689 includes.
8690 (PPC_FIELD): New macro.
8691 (PPC_SEXT): New macro.
8692 (PPC_OP6): New macro.
8693 (PPC_BO): New macro.
8694 (PPC_LI): New macro.
8695 (PPC_BD): New macro.
8696 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8697 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8698 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8699 (ppc_get_thread_area): New function.
8700 (is_elfv2_inferior): New function.
8701 (gen_ds_form): New function.
8702 (GEN_STD): New macro.
8703 (GEN_STDU): New macro.
8704 (GEN_LD): New macro.
8705 (GEN_LDU): New macro.
8706 (gen_d_form): New function.
8707 (GEN_ADDI): New macro.
8708 (GEN_ADDIS): New macro.
8709 (GEN_LI): New macro.
8710 (GEN_LIS): New macro.
8711 (GEN_ORI): New macro.
8712 (GEN_ORIS): New macro.
8713 (GEN_LWZ): New macro.
8714 (GEN_STW): New macro.
8715 (GEN_STWU): New macro.
8716 (gen_xfx_form): New function.
8717 (GEN_MFSPR): New macro.
8718 (GEN_MTSPR): New macro.
8719 (GEN_MFCR): New macro.
8720 (GEN_MTCR): New macro.
8721 (GEN_SYNC): New macro.
8722 (GEN_LWSYNC): New macro.
8723 (gen_x_form): New function.
8724 (GEN_OR): New macro.
8725 (GEN_MR): New macro.
8726 (GEN_LWARX): New macro.
8727 (GEN_STWCX): New macro.
8728 (GEN_CMPW): New macro.
8729 (gen_md_form): New function.
8730 (GEN_RLDICL): New macro.
8731 (GEN_RLDICR): New macro.
8732 (gen_i_form): New function.
8733 (GEN_B): New macro.
8734 (GEN_BL): New macro.
8735 (gen_b_form): New function.
8736 (GEN_BNE): New macro.
8737 (GEN_LOAD): New macro.
8738 (GEN_STORE): New macro.
8739 (gen_limm): New function.
8740 (gen_atomic_xchg): New function.
8741 (gen_call): New function.
8742 (ppc_relocate_instruction): New function.
8743 (ppc_install_fast_tracepoint_jump_pad): New function.
8744 (ppc_get_min_fast_tracepoint_insn_len): New function.
8745 (ppc_get_ipa_tdesc_idx): New function.
8746 (the_low_target): Wire in the new functions.
8747 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8748 tdescs.
8749 * linux-ppc-tdesc.h: New file.
8750
8751 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8752
8753 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8754 (alloc_jump_pad_buffer): New function.
8755 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8756 (alloc_jump_pad_buffer): New function.
8757 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8758 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8759 (alloc_jump_pad_buffer): New function.
8760 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8761 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8762 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8763 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8764
8765 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8766
8767 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8768 * linux-amd64-ipa.c: Likewise.
8769 * linux-i386-ipa.c: Likewise.
8770 * linux-s390-ipa.c: Likewise.
8771 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8772 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8773 set_trace_state_variable_value_ptr.
8774 (struct ipa_sym_addresses): Likewise.
8775 (symbol_list): Likewise.
8776 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8777 accessing gdb_collect directly.
8778 (gdb_collect_ptr_type): New typedef.
8779 (get_raw_reg_ptr_type): New typedef.
8780 (get_trace_state_variable_value_ptr_type): New typedef.
8781 (set_trace_state_variable_value_ptr_type): New typedef.
8782 (gdb_collect_ptr): New global.
8783 (get_raw_reg_ptr): New global.
8784 (get_trace_state_variable_value_ptr): New global.
8785 (set_trace_state_variable_value_ptr): New global.
8786 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8787 accessing get_raw_reg directly.
8788 (get_get_tsv_func_addr): Likewise for
8789 get_trace_state_variable_value_ptr.
8790 (get_set_tsv_func_addr): Likewise for
8791 set_trace_state_variable_value_ptr.
8792 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8793
8794 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8795
8796 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8797
8798 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8799
8800 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8801 packets.
8802 (relocate_instruction): Remove own_buf.
8803 * server.c (own_buf): Make global.
8804 (handle_v_requests): Make global.
8805 * server.h (own_buf): New declaration.
8806 (handle_v_requests): New prototype.
8807
8808 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8809
8810 PR 18377
8811 * linux-s390-low.c (add_insns): New function.
8812 (s390_emit_prologue): New function.
8813 (s390_emit_epilogue): New function.
8814 (s390_emit_add): New function.
8815 (s390_emit_sub): New function.
8816 (s390_emit_mul): New function.
8817 (s390_emit_lsh): New function.
8818 (s390_emit_rsh_signed): New function.
8819 (s390_emit_rsh_unsigned): New function.
8820 (s390_emit_ext): New function.
8821 (s390_emit_log_not): New function.
8822 (s390_emit_bit_and): New function.
8823 (s390_emit_bit_or): New function.
8824 (s390_emit_bit_xor): New function.
8825 (s390_emit_bit_not): New function.
8826 (s390_emit_equal): New function.
8827 (s390_emit_less_signed): New function.
8828 (s390_emit_less_unsigned): New function.
8829 (s390_emit_ref): New function.
8830 (s390_emit_if_goto): New function.
8831 (s390_emit_goto): New function.
8832 (s390_write_goto_address): New function.
8833 (s390_emit_litpool): New function.
8834 (s390_emit_const): New function.
8835 (s390_emit_call): New function.
8836 (s390_emit_reg): New function.
8837 (s390_emit_pop): New function.
8838 (s390_emit_stack_flush): New function.
8839 (s390_emit_zero_ext): New function.
8840 (s390_emit_swap): New function.
8841 (s390_emit_stack_adjust): New function.
8842 (s390_emit_set_r2): New function.
8843 (s390_emit_int_call_1): New function.
8844 (s390_emit_void_call_2): New function.
8845 (s390_emit_eq_goto): New function.
8846 (s390_emit_ne_goto): New function.
8847 (s390_emit_lt_goto): New function.
8848 (s390_emit_le_goto): New function.
8849 (s390_emit_gt_goto): New function.
8850 (s390_emit_ge_goto): New function.
8851 (s390x_emit_prologue): New function.
8852 (s390x_emit_epilogue): New function.
8853 (s390x_emit_add): New function.
8854 (s390x_emit_sub): New function.
8855 (s390x_emit_mul): New function.
8856 (s390x_emit_lsh): New function.
8857 (s390x_emit_rsh_signed): New function.
8858 (s390x_emit_rsh_unsigned): New function.
8859 (s390x_emit_ext): New function.
8860 (s390x_emit_log_not): New function.
8861 (s390x_emit_bit_and): New function.
8862 (s390x_emit_bit_or): New function.
8863 (s390x_emit_bit_xor): New function.
8864 (s390x_emit_bit_not): New function.
8865 (s390x_emit_equal): New function.
8866 (s390x_emit_less_signed): New function.
8867 (s390x_emit_less_unsigned): New function.
8868 (s390x_emit_ref): New function.
8869 (s390x_emit_if_goto): New function.
8870 (s390x_emit_const): New function.
8871 (s390x_emit_call): New function.
8872 (s390x_emit_reg): New function.
8873 (s390x_emit_pop): New function.
8874 (s390x_emit_stack_flush): New function.
8875 (s390x_emit_zero_ext): New function.
8876 (s390x_emit_swap): New function.
8877 (s390x_emit_stack_adjust): New function.
8878 (s390x_emit_int_call_1): New function.
8879 (s390x_emit_void_call_2): New function.
8880 (s390x_emit_eq_goto): New function.
8881 (s390x_emit_ne_goto): New function.
8882 (s390x_emit_lt_goto): New function.
8883 (s390x_emit_le_goto): New function.
8884 (s390x_emit_gt_goto): New function.
8885 (s390x_emit_ge_goto): New function.
8886 (s390_emit_ops): New function.
8887 (struct linux_target_ops): Fill in emit_ops hook.
8888
8889 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8890
8891 PR 18377
8892 * Makefile.in: Add s390 IPA files.
8893 * configure.srv: Build IPA for s390.
8894 * linux-s390-ipa.c: New file.
8895 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8896 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8897 (tdesc_s390_linux32): Likewise.
8898 (init_registers_s390_linux32v1): Likewise.
8899 (tdesc_s390_linux32v1): Likewise.
8900 (init_registers_s390_linux32v2): Likewise.
8901 (tdesc_s390_linux32v2): Likewise.
8902 (init_registers_s390_linux64): Likewise.
8903 (tdesc_s390_linux64): Likewise.
8904 (init_registers_s390_linux64v1): Likewise.
8905 (tdesc_s390_linux64v1): Likewise.
8906 (init_registers_s390_linux64v2): Likewise.
8907 (tdesc_s390_linux64v2): Likewise.
8908 (init_registers_s390_te_linux64): Likewise.
8909 (tdesc_s390_te_linux64): Likewise.
8910 (init_registers_s390_vx_linux64): Likewise.
8911 (tdesc_s390_vx_linux64): Likewise.
8912 (init_registers_s390_tevx_linux64): Likewise.
8913 (tdesc_s390_tevx_linux64): Likewise.
8914 (init_registers_s390x_linux64): Likewise.
8915 (tdesc_s390x_linux64): Likewise.
8916 (init_registers_s390x_linux64v1): Likewise.
8917 (tdesc_s390x_linux64v1): Likewise.
8918 (init_registers_s390x_linux64v2): Likewise.
8919 (tdesc_s390x_linux64v2): Likewise.
8920 (init_registers_s390x_te_linux64): Likewise.
8921 (tdesc_s390x_te_linux64): Likewise.
8922 (init_registers_s390x_vx_linux64): Likewise.
8923 (tdesc_s390x_vx_linux64): Likewise.
8924 (init_registers_s390x_tevx_linux64): Likewise.
8925 (tdesc_s390x_tevx_linux64): Likewise.
8926 (have_hwcap_s390_vx): New static variable.
8927 (s390_arch_setup): Fill have_hwcap_s390_vx.
8928 (s390_get_thread_area): New function.
8929 (s390_ft_entry_gpr_esa): New const.
8930 (s390_ft_entry_gpr_zarch): New const.
8931 (s390_ft_entry_misc): New const.
8932 (s390_ft_entry_fr): New const.
8933 (s390_ft_entry_vr): New const.
8934 (s390_ft_main_31): New const.
8935 (s390_ft_main_64): New const.
8936 (s390_ft_exit_fr): New const.
8937 (s390_ft_exit_vr): New const.
8938 (s390_ft_exit_misc): New const.
8939 (s390_ft_exit_gpr_esa): New const.
8940 (s390_ft_exit_gpr_zarch): New const.
8941 (append_insns): New function.
8942 (s390_relocate_instruction): New function.
8943 (s390_install_fast_tracepoint_jump_pad): New function.
8944 (s390_get_min_fast_tracepoint_insn_len): New function.
8945 (s390_get_ipa_tdesc_idx): New function.
8946 (struct linux_target_ops): Wire in the above functions.
8947 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8948 * linux-s390-tdesc.h: New file.
8949
8950 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8951
8952 * linux-s390-low.c (s390_supports_tracepoints): New function.
8953 (struct linux_target_ops): Fill supports_tracepoints hook.
8954
8955 2016-03-18 Yao Qi <yao.qi@linaro.org>
8956
8957 * linux-low.c (lwp_signal_can_be_delivered): New function.
8958 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8959
8960 2016-03-18 Yao Qi <yao.qi@linaro.org>
8961
8962 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8963 0 if signal is enqueued. Remove 'signal' from one debugging
8964 message. Move one debugging message to some lines below.
8965 Remove code setting 'signal' to 0.
8966
8967 2016-03-18 Yao Qi <yao.qi@linaro.org>
8968
8969 * linux-low.c (linux_low_filter_event): Remove redundant
8970 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8971
8972 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8973
8974 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8975 (struct linux_target_ops): Wire in the above.
8976
8977 2016-03-03 Yao Qi <yao.qi@linaro.org>
8978
8979 * linux-low.c: Update comments to start_step_over.
8980
8981 2016-03-03 Yao Qi <yao.qi@linaro.org>
8982
8983 PR server/19736
8984 * linux-low.c (handle_extended_wait): Set child suspended
8985 if event_lwp->bp_reinsert isn't zero.
8986
8987 2016-03-02 Yao Qi <yao.qi@linaro.org>
8988
8989 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8990 enqueue_pending_signal.
8991
8992 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8993
8994 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8995 is actually loaded.
8996
8997 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8998
8999 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
9000 (s390_regmap_3264) [!__s390x__]: New global.
9001 (s390_collect_ptrace_register): Skip map entries containing -1.
9002 (s390_supply_ptrace_register): Ditto.
9003 (s390_fill_gprs_high): New function.
9004 (s390_store_gprs_high): New function.
9005 (s390_regsets): Add NT_S390_HIGH_GPRS.
9006 (s390_get_hwcap): Enable on 31-bit.
9007 (have_hwcap_s390_high_gprs): Enable on 31-bit.
9008 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
9009 Detect NT_S390_HIGH_GPRS.
9010 (s390_usrregs_info_3264): Enable on 31-bit.
9011 (s390_regs_info): Enable regs_info_3264 on 31-bit.
9012 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
9013
9014 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9015
9016 PR gdb/13808
9017 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
9018 * configure.srv: Ditto.
9019 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
9020 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
9021 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
9022 (init_registers_amd64_linux): Remove prototype.
9023 (tdesc_amd64_linux): Remove declaration.
9024 (get_ipa_tdesc): New function.
9025 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9026 initialize remaining tdescs.
9027 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
9028 (init_registers_i386_linux): Remove prototype.
9029 (tdesc_i386_linux): Remove declaration.
9030 (get_ipa_tdesc): New function.
9031 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9032 initialize remaining tdescs.
9033 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
9034 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
9035 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
9036 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
9037 (x86_get_ipa_tdesc_idx): New function.
9038 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
9039 * linux-x86-tdesc.h: New file.
9040 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
9041 (target_get_ipa_tdesc_idx): New macro.
9042 * tracepoint.c (ipa_tdesc_idx): New macro.
9043 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
9044 (symbol_list): Add ipa_tdesc_idx.
9045 (cmd_qtstart): Write ipa_tdesc_idx in the target.
9046 (ipa_tdesc): Remove.
9047 (ipa_tdesc_idx): New variable.
9048 (get_context_regcache): Use get_ipa_tdesc.
9049 (gdb_collect): Ditto.
9050 (gdb_probe): Ditto.
9051 * tracepoint.h (get_ipa_tdesc): New prototype.
9052 (ipa_tdesc): Remove.
9053
9054 2016-02-24 Pedro Alves <palves@redhat.com>
9055
9056 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
9057 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
9058 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
9059 Factor out common code between the USE_SIGTRAP_SIGINFO and
9060 !USE_SIGTRAP_SIGINFO blocks.
9061 (linux_low_filter_event): Call save_stop_reason instead of
9062 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
9063 Update comments.
9064 (linux_wait_1): Update comments.
9065
9066 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
9067
9068 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
9069 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
9070 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
9071 ppc_insert_point, ppc_remove_point.
9072
9073 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
9074
9075 * linux-s390-low.c (s390_supports_z_point_type): New function.
9076 (struct linux_target_ops): Wire s390_supports_z_point_type in.
9077
9078 2016-02-16 Yao Qi <yao.qi@linaro.org>
9079
9080 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9081 PC. Get pc from regcache_read_pc.
9082
9083 2016-02-12 Yao Qi <yao.qi@linaro.org>
9084
9085 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
9086 or linux_get_pc_32bit.
9087 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
9088
9089 2016-02-12 Yao Qi <yao.qi@linaro.org>
9090
9091 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
9092 arm_linux_get_next_pcs_fixup.
9093
9094 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
9095
9096 * tracepoint.c (x_tracepoint_action_download): Change
9097 write_inferior_data_ptr to write_inferior_data_pointer.
9098 (cmd_qtstart): Likewise.
9099 (write_inferior_data_ptr): Remove.
9100 (download_agent_expr): Change write_inferior_data_ptr to
9101 write_inferior_data_pointer.
9102 (download_tracepoint_1): Likewise.
9103 (download_tracepoint): Likewise.
9104 (download_trace_state_variables): Likewise.
9105
9106 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
9107 Marcin Kościelnicki <koriakin@0x04.net>
9108
9109 * tracepoint.c (struct tracepoint_action_ops): Remove.
9110 (struct tracepoint_action): Remove ops.
9111 (m_tracepoint_action_download, r_tracepoint_action_download)
9112 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
9113 size and offset accordingly.
9114 (m_tracepoint_action_ops, r_tracepoint_action_ops)
9115 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
9116 (tracepoint_action_send, tracepoint_action_download): New functions.
9117 Helpers for trace action handlers.
9118 (add_tracepoint_action): Remove setup actions ops.
9119 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
9120
9121 2016-02-10 Yao Qi <yao.qi@linaro.org>
9122
9123 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
9124
9125 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9126
9127 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
9128 to AC_OUTPUT.
9129 * configure: Regenerate.
9130
9131 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9132
9133 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
9134 void * to gdb_byte *.
9135 * linux-low.c (siginfo_fixup): Likewise.
9136 (linux_xfer_siginfo): Likewise.
9137 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
9138 Likewise.
9139 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9140
9141 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
9142
9143 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9144 to srv_tgtobj.
9145 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
9146 to srv_tgtobj.
9147 * linux-x86-low.c [__x86_64__]: Include
9148 "nat/amd64-linux-siginfo.h".
9149 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
9150 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
9151 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
9152 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
9153 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
9154 (cpt_si_fd, si_timerid, si_overrun): Move from
9155 nat/amd64-linux-siginfo.c.
9156 * Makefile.in (amd64-linux-siginfo.o:): New rule.
9157
9158 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
9159
9160 * server.c (skip_to_semicolon): Remove.
9161 (process_point_options): Use strchrnul instead of
9162 skip_to_semicolon.
9163
9164 2016-01-26 Yao Qi <yao.qi@linaro.org>
9165
9166 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9167 * linux-low.c (install_software_single_step_breakpoints): Don't
9168 call regcache_read_pc.
9169 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9170 argument pc.
9171
9172 2016-01-26 Yao Qi <yao.qi@linaro.org>
9173
9174 * linux-low.c (install_software_single_step_breakpoints): Call
9175 regcache_read_pc instead of get_pc.
9176
9177 2016-01-26 Yao Qi <yao.qi@linaro.org>
9178
9179 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9180 (unblock_async_io): Rename to ...
9181 (block_unblock_async_io): ... it. New function.
9182 (enable_async_io): Don't install SIGIO handler. Unblock it
9183 instead.
9184 (disable_async_io): Don't ignore SIGIO. Block it instead.
9185 (initialize_async_io): Install SIGIO handler. Don't call
9186 unblock_async_io.
9187
9188 2016-01-26 Yao Qi <yao.qi@linaro.org>
9189
9190 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9191 first character is '\003', call *the_target->request_interrupt.
9192
9193 2016-01-25 Yao Qi <yao.qi@linaro.org>
9194
9195 * remote-utils.c (new_thread_notify): Remove.
9196 (dead_thread_notify): Likewise.
9197 * remote-utils.h (new_thread_notify): Remove declaration.
9198 (dead_thread_notify): Likewise.
9199
9200 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9201
9202 * gdb.trace/pending.exp: Fix expected message on continue.
9203
9204 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9205
9206 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9207 it works properly on big-endian machines where sizeof (CORE_ADDR)
9208 != sizeof (void *).
9209
9210 2016-01-21 Pedro Alves <palves@redhat.com>
9211
9212 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9213 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9214 * configure: Regenerate.
9215
9216 2016-01-21 Yao Qi <yao.qi@linaro.org>
9217
9218 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9219 is_thumb and set it according to CPSR saved on the stack.
9220 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9221 arm_sigreturn_next_pc.
9222
9223 2016-01-18 Yao Qi <yao.qi@linaro.org>
9224
9225 * linux-low.c (linux_set_pc_64bit): New function.
9226 (linux_get_pc_64bit): New function.
9227 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9228 Declare.
9229 * linux-sparc-low.c (debug_threads): Remove declaration.
9230 (sparc_get_pc): Remove.
9231 (the_low_target): Use linux_get_pc_64bit instead of
9232 sparc_get_pc.
9233 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9234 (the_low_target): Use linux_get_pc_64bit and
9235 linux_set_pc_64bit.
9236
9237 2016-01-18 Yao Qi <yao.qi@linaro.org>
9238
9239 * linux-arm-low.c (debug_threads): Remove declaration.
9240 (arm_get_pc, arm_set_pc): Remove.
9241 (the_low_target): Use linux_get_pc_32bit and
9242 linux_set_pc_32bit.
9243 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9244 (the_low_target): Use linux_get_pc_32bit and
9245 linux_set_pc_32bit.
9246 * linux-cris-low.c (debug_threads): Remove declaration.
9247 (cris_get_pc, cris_set_pc,): Remove.
9248 (the_low_target): Use linux_get_pc_32bit and
9249 linux_set_pc_32bit.
9250 * linux-crisv32-low.c (debug_threads): Remove declaration.
9251 (cris_get_pc, cris_set_pc): Remove.
9252 (the_low_target): Use linux_get_pc_32bit and
9253 linux_set_pc_32bit.
9254 * linux-low.c: Include inttypes.h.
9255 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9256 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9257 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9258 (the_low_target): Use linux_get_pc_32bit and
9259 linux_set_pc_32bit.
9260 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9261 (the_low_target): Use linux_get_pc_32bit and
9262 linux_set_pc_32bit.
9263 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9264 (the_low_target): Use linux_get_pc_32bit and
9265 linux_set_pc_32bit.
9266 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9267 (the_low_target): Use linux_get_pc_32bit and
9268 linux_set_pc_32bit.
9269 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9270 (the_low_target): Use linux_get_pc_32bit and
9271 linux_set_pc_32bit.
9272
9273 2016-01-18 Gary Benson <gbenson@redhat.com>
9274
9275 * configure.ac (AC_FUNC_FORK): New check.
9276 * config.in: Regenerate.
9277 * configure: Likewise.
9278
9279 2016-01-14 Yao Qi <yao.qi@linaro.org>
9280
9281 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9282 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9283 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9284 arm_get_next_pcs_ctor.
9285
9286 2016-01-12 Josh Stone <jistone@redhat.com>
9287 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9288
9289 * inferiors.h: Include "gdb_vecs.h".
9290 (struct process_info): Add syscalls_to_catch.
9291 * inferiors.c (remove_process): Free syscalls_to_catch.
9292 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9293 syscall_return stops.
9294 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9295 * server.c (handle_general_set): Handle QCatchSyscalls.
9296 (handle_query): Report support for QCatchSyscalls.
9297 * target.h (struct target_ops): Add supports_catch_syscall.
9298 (target_supports_catch_syscall): New macro.
9299 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9300 (struct lwp_info): Add syscall_state.
9301 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9302 Maintain syscall_state and syscalls_to_catch across exec.
9303 (get_syscall_trapinfo): New function, proxy to the_low_target.
9304 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9305 (linux_low_filter_event): Toggle syscall_state entry/return for
9306 syscall traps, and set it ignored for all others.
9307 (gdb_catching_syscalls_p): New function.
9308 (gdb_catch_this_syscall_p): New function.
9309 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9310 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9311 (linux_supports_catch_syscall): New function.
9312 (linux_target_ops): Install it.
9313 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9314 (the_low_target): Install it.
9315
9316 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9317
9318 * acinclude.m4: Include new ../warning.m4 file.
9319 * configure: Regenerated.
9320 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9321
9322 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9323
9324 * ax.c (is_goto_target): Mark static.
9325 * linux-low.c (register_addr): Likewise.
9326 (linux_fetch_registers, linux_store_registers): Likewise.
9327 * mem-break.c (any_persistent_commands): Fix old prototype.
9328 (add_commands_to_breakpoint): Mark static.
9329 * regcache.c (find_register_by_name): Delete unused func.
9330 * remote-utils.c (hex_or_minus_one): Mark static.
9331 * server.c (monitor_show_help): Mark static.
9332 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9333 handle_v_requests): Likewise.
9334
9335 2016-01-12 Pedro Alves <palves@redhat.com>
9336
9337 Remove use of the registered trademark symbol throughout.
9338
9339 2016-01-08 Yao Qi <yao.qi@linaro.org>
9340
9341 * remote-utils.c (getpkt): If c is '\003', call target hook
9342 request_interrupt.
9343
9344 2016-01-06 Yao Qi <yao.qi@linaro.org>
9345
9346 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9347 linux-aarch32-low.c.
9348 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9349 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9350 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9351 (thumb2_breakpoint): Declare.
9352 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9353 linux-aarch32-low.h.
9354 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9355 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9356 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9357
9358 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9359
9360 * gdbreplay.c (gdbreplay_version): Change copyright year in
9361 version message.
9362 * server.c (gdbserver_version): Likewise.
9363
9364 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9365
9366 * server.c (crc32_table): Delete.
9367 (crc32): Use libiberty's xcrc32 function.
9368
9369 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9370
9371 * lynx-low.c (lynx_delete_thread_callback): New function.
9372 (lynx_mourn): Properly delete our process and all of its
9373 threads. Remove call to clear_inferiors.
9374
9375 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9376
9377 * target.c (thread_search_callback): Add check that
9378 the thread_stopped target callback is not NULL before
9379 calling it.
9380
9381 2015-12-21 Yao Qi <yao.qi@linaro.org>
9382
9383 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9384 arm breakpoint.
9385
9386 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9387
9388 * server.c (handle_query): Call target_supports_software_single_step.
9389
9390 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9391
9392 * linux-low.c (single_step): New function.
9393 (linux_resume_one_lwp_throw): Call single_step.
9394 (start_step_over): Likewise.
9395
9396 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9397
9398 * Makefile.in (SFILES): Append arch/arm-linux.c,
9399 arch/arm-get-next-pcs.c.
9400 (arm-linux.o): New rule.
9401 (arm-get-next-pcs.o): New rule.
9402 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9403 arm-linux.o.
9404 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9405 to linux-aarch32-low.c.
9406 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9407 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9408 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9409 (thumb2_breakpoint_len): Likewise.
9410 (arm_is_thumb_mode): Make non-static.
9411 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9412 from linux-aarch32-low.c.
9413 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9414 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9415 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9416 (thumb2_breakpoint_len): Likewise.
9417 (arm_is_thumb_mode): New declaration.
9418 * linux-arm-low.c: Include arch/arm-linux.h
9419 aarch/arm-get-next-pcs.h, sys/syscall.h.
9420 (get_next_pcs_ops): New struct.
9421 (get_next_pcs_addr_bits_remove): New function.
9422 (get_next_pcs_is_thumb): New function.
9423 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9424 (arm_sigreturn_next_pc): Likewise.
9425 (get_next_pcs_syscall_next_pc): Likewise.
9426 (arm_gdbserver_get_next_pcs): Likewise.
9427 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9428 Initialize.
9429 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9430 * server.h: Include gdb_vecs.h.
9431
9432 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9433
9434 * Makefile.in (SFILES): Append common/common-regcache.c.
9435 (OBS): Append common-regcache.o.
9436 (common-regcache.o): New rule.
9437 * regcache.c (init_register_cache): Initialize cache to
9438 REG_UNAVAILABLE.
9439 (regcache_raw_read_unsigned): New function.
9440 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9441 register_status enum.
9442
9443 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9444
9445 * linux-aarch64-low.c (the_low_targets): Rename
9446 breakpoint_reinsert_addr to get_next_pcs.
9447 * linux-arm-low.c (the_low_targets): Likewise.
9448 * linux-bfin-low.c (the_low_targets): Likewise.
9449 * linux-cris-low.c (the_low_targets): Likewise.
9450 * linux-crisv32-low.c (the_low_targets): Likewise.
9451 * linux-low.c (can_software_single_step): Likewise.
9452 (install_software_single_step_breakpoints): New function.
9453 (start_step_over): Use install_software_single_step_breakpoints.
9454 * linux-low.h: New CORE_ADDR vector.
9455 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9456 get_next_pcs.
9457 * linux-mips-low.c (the_low_targets): Likewise.
9458 * linux-nios2-low.c (the_low_targets): Likewise.
9459 * linux-sparc-low.c (the_low_targets): Likewise.
9460
9461 2015-12-17 Pedro Alves <palves@redhat.com>
9462
9463 * linux-low.c (linux_kill_one_lwp): Remove references to
9464 LinuxThreads.
9465 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9466 to 'kill'.
9467 (linux_init_signals): Delete.
9468 (initialize_low): Adjust.
9469 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9470
9471 2015-12-16 Pedro Alves <palves@redhat.com>
9472
9473 * configure.ac (compiler warning flags): When testing a
9474 -Wno-foo option, check whether -Wfoo works instead.
9475 * configure: Regenerate.
9476
9477 2015-12-11 Don Breazeal <donb@codesourcery.com>
9478
9479 * server.c (process_serial_event): Don't exit from gdbserver
9480 in remote mode if there are still active inferiors.
9481
9482 2015-12-11 Yao Qi <yao.qi@linaro.org>
9483
9484 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9485 arm_breakpoint_at if the process is 32-bit.
9486
9487 2015-12-11 Yao Qi <yao.qi@linaro.org>
9488
9489 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9490 arm breakpoint.
9491
9492 2015-12-07 Yao Qi <yao.qi@linaro.org>
9493
9494 * configure.srv: Append arm.o to srv_tgtobj for
9495 aarch64*-*-linux* target.
9496 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9497 from linux-arm-low.c.
9498 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9499 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9500 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9501 (thumb2_breakpoint_len): Likewise.
9502 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9503 (arm_breakpoint_kinds): Likewise.
9504 (arm_breakpoint_kind_from_pc): Likewise.
9505 (arm_sw_breakpoint_from_kind): Likewise.
9506 (arm_breakpoint_kind_from_current_state): Likewise.
9507 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9508 (arm_sw_breakpoint_from_kind): Declare.
9509 (arm_breakpoint_kind_from_current_state): Declare.
9510 (arm_breakpoint_at): Declare.
9511 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9512 arm_sw_breakpoint_from_kind if process is 32-bit.
9513 (aarch64_breakpoint_kind_from_pc): New function.
9514 (aarch64_breakpoint_kind_from_current_state): New function.
9515 (the_low_target): Initialize fields breakpoint_kind_from_pc
9516 and breakpoint_kind_from_current_state.
9517 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9518 linux-aarch32-low.c.
9519 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9520 (arm_breakpoint, arm_breakpoint_len): Likewise.
9521 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9522 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9523 (arm_is_thumb_mode): Likewise.
9524 (arm_breakpoint_at): Likewise.
9525 (arm_breakpoint_kind_from_pc): Likewise.
9526 (arm_sw_breakpoint_from_kind): Likewise.
9527 (arm_breakpoint_kind_from_current_state): Likewise.
9528
9529 Revert:
9530 2015-08-04 Yao Qi <yao.qi@linaro.org>
9531
9532 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9533 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9534 * server.c (extended_protocol): Remove "static".
9535 * server.h (extended_protocol): Declare it.
9536
9537 2015-12-04 Josh Stone <jistone@redhat.com>
9538
9539 * target.h (struct target_ops) <arch_setup>: Rename to ...
9540 (struct target_ops) <post_create_inferior>: ... this.
9541 (target_arch_setup): Rename to ...
9542 (target_post_create_inferior): ... this, calling post_create_inferior.
9543 * server.c (start_inferior): Update target_arch_setup calls to
9544 target_post_create_inferior.
9545 * linux-low.c (linux_low_ptrace_options): Forward declare.
9546 (linux_arch_setup): Update its comment for general use.
9547 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9548 (struct linux_target_ops): Use linux_post_create_inferior.
9549 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9550 to post_create_inferior.
9551 * nto-low.c (struct nto_target_ops): Likewise.
9552 * spu-low.c (struct spu_target_ops): Likewise.
9553 * win32-low.c (struct win32_target_ops): Likewise.
9554
9555 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9556
9557 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9558
9559 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9560
9561 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9562 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9563 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9564 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9565 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9566 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9567 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9568 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9569 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9570 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9571 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9572 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9573
9574 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9575
9576 * linux-low.c (linux_look_up_symbols): Don't call
9577 linux_supports_traceclone.
9578 * linux-low.h (thread_db_init): Remove use_events argument.
9579 * thread-db.c (thread_db_use_event): Remove global variable.
9580 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9581 (struct thread_db) <td_create_bp>: Remove field.
9582 (thread_db_create_event): Remove function.
9583 (thread_db_enable_reporting): Likewise.
9584 (find_one_thread): Don't check for thread_db_use_events.
9585 (attach_thread): Likewise.
9586 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9587 (try_thread_db_load_1): Don't check for thread_db_use_events.
9588 (thread_db_init): Remove use_events argument and thread events
9589 handling.
9590 (remove_thread_event_breakpoints): Remove function.
9591 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9592
9593 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9594
9595 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9596 New function.
9597 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9598 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9599 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9600 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9601 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9602 Initialize.
9603 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9604 New function.
9605 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9606 * linux-low.c (can_hardware_single_step): Use
9607 supports_hardware_single_step.
9608 (can_software_single_step): New function.
9609 (start_step_over): Call can_software_single_step.
9610 (linux_supports_hardware_single_step): New function.
9611 (struct target_ops) <supports_software_single_step>: Initialize.
9612 * linux-low.h (struct linux_target_ops)
9613 <supports_hardware_single_step>: Initialize.
9614 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9615 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9616 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9617 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9618 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9619 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9620 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9621 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9622 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9623 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9624 Initialize.
9625 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9626 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9627 Initialize.
9628 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9629 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9630 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9631 New function.
9632 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9633 * target.h (struct target_ops): <supports_software_single_step>:
9634 New field.
9635 (target_supports_software_single_step): New macro.
9636
9637 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9638
9639 * linux-low.c (linux_wait_1): Fix pc advance condition.
9640 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9641 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9642
9643 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9644
9645 * linux-arm-low.c (arm_is_thumb_mode): New function.
9646 (arm_breakpoint_at): Use arm_is_thumb_mode.
9647 (arm_breakpoint_kind_from_current_state): New function.
9648 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9649 Initialize.
9650 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9651 (linux_breakpoint_kind_from_current_state): New function.
9652 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9653 * linux-low.h (struct linux_target_ops)
9654 <breakpoint_kind_from_current_state>: New field.
9655 * target.h (struct target_ops): Likewise.
9656 (target_breakpoint_kind_from_current_state): New macro.
9657
9658 2015-11-30 Pedro Alves <palves@redhat.com>
9659
9660 * linux-low.c (linux_resume): Wake up the event loop before
9661 returning.
9662
9663 2015-11-30 Pedro Alves <palves@redhat.com>
9664
9665 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9666 check.
9667 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9668 to -1.
9669 * target.c (struct thread_search): New structure.
9670 (thread_search_callback): New function.
9671 (prev_general_thread): New global.
9672 (prepare_to_access_memory, done_accessing_memory): New functions.
9673 * target.h (prepare_to_access_memory, done_accessing_memory):
9674 Replace macros with function declarations.
9675
9676 2015-11-30 Pedro Alves <palves@redhat.com>
9677
9678 PR 14618
9679 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9680 report TARGET_WAITKIND_NO_RESUMED.
9681 * remote-utils.c (prepare_resume_reply): Handle
9682 TARGET_WAITKIND_NO_RESUMED.
9683 * server.c (report_no_resumed): New global.
9684 (handle_query) <qSupported>: Handle "no-resumed+". Report
9685 "no-resumed+" support.
9686 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9687 return error if the client doesn't support no-resumed events.
9688 (push_stop_notification): New function.
9689 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9690 events if the client supports them.
9691
9692 2015-11-30 Pedro Alves <palves@redhat.com>
9693
9694 * linux-low.c (thread_still_has_status_pending_p): Don't check
9695 vCont;t here.
9696 (lwp_resumed): New function.
9697 (status_pending_p_callback): Return early if the LWP is not
9698 supposed to be resumed.
9699
9700 2015-11-30 Pedro Alves <palves@redhat.com>
9701
9702 * linux-low.c (handle_extended_wait): Assert that the LWP's
9703 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9704 thread create events, leave the new child's status pending.
9705 (linux_low_filter_event): If GDB wants to hear about thread exit
9706 events, leave the LWP marked dead and don't delete it.
9707 (linux_wait_for_event_filtered): Don't check for thread exit.
9708 (filter_exit_event): New function.
9709 (linux_wait_1): Use it, when returning an exit event.
9710 (linux_resume_one_lwp_throw): Assert that the LWP's
9711 waitstatus is TARGET_WAITKIND_IGNORE.
9712 * remote-utils.c (prepare_resume_reply): Handle
9713 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9714 * server.c (report_thread_events): New global.
9715 (handle_general_set): Handle QThreadEvents.
9716 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9717 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9718 TARGET_WAITKIND_THREAD_EXITED.
9719 * server.h (report_thread_events): Declare.
9720
9721 2015-11-30 Pedro Alves <palves@redhat.com>
9722
9723 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9724 the thread's last_resume_kind was resume_stop.
9725
9726 2015-11-30 Pedro Alves <palves@redhat.com>
9727
9728 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9729 before returning.
9730
9731 2015-11-30 Pedro Alves <palves@redhat.com>
9732
9733 * server.c (handle_v_requests): Handle vCtrlC.
9734
9735 2015-11-30 Pedro Alves <palves@redhat.com>
9736
9737 * gdbthread.h (find_any_thread_of_pid): Declare.
9738 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9739 functions.
9740 * server.c (handle_query): If current_thread is NULL, look for
9741 another thread of the selected process.
9742
9743 2015-11-26 Daniel Colascione <dancol@dancol.org>
9744 Simon Marchi <simon.marchi@ericsson.com>
9745
9746 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9747 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9748 name in reply.
9749 * target.h (struct target_ops) <thread_name>: New field.
9750 (target_thread_name): New macro.
9751
9752 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9753
9754 * regcache.h (regcache_invalidate_pid): Add declaration.
9755 * regcache.c (regcache_invalidate_pid): New function, extracted
9756 from regcache_invalidate.
9757 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9758 Add trivial documentation comment.
9759 * lynx-low.c: Use regcache_invalidate_pid instead of
9760 regcache_invalidate.
9761
9762 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9763
9764 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9765 and Elf64_auxv_t if the target is Android.
9766
9767 2015-11-22 Doug Evans <xdje42@gmail.com>
9768
9769 * target.h: #include <sys/types.h>.
9770
9771 2015-11-19 Pedro Alves <palves@redhat.com>
9772
9773 * linux-low.c (linux_process_qsupported): Change prototype.
9774 Adjust.
9775 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9776 Change prototype.
9777 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9778 and adjust to loop over all features.
9779 * server.c (handle_query) <qSupported>: Adjust to call
9780 target_process_qsupported once, passing it a vector of unprocessed
9781 features.
9782 * target.h (struct target_ops) <process_qsupported>: Change
9783 prototype.
9784 (target_process_qsupported): Adjust.
9785
9786 2015-11-19 Pedro Alves <palves@redhat.com>
9787
9788 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9789 mode.
9790 * configure: Regenerate.
9791
9792 2015-11-19 Pedro Alves <palves@redhat.com>
9793
9794 * configure: Regenerate.
9795
9796 2015-11-19 Yao Qi <yao.qi@linaro.org>
9797
9798 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9799 type to uint32_t.
9800
9801 2015-11-19 Yao Qi <yao.qi@linaro.org>
9802
9803 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9804 (struct aarch64_operand): Move enum out.
9805
9806 2015-11-19 Yao Qi <yao.qi@linaro.org>
9807
9808 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9809 struct user_fpsimd_state *.
9810 (aarch64_store_fpregset): Likewise.
9811
9812 2015-11-19 Yao Qi <yao.qi@linaro.org>
9813
9814 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9815 struct user_pt_regs *.
9816 (aarch64_store_gregset): Likewise.
9817
9818 2015-11-18 Pedro Alves <palves@redhat.com>
9819
9820 * Makefile.in (all_object_files): Add $IPA_OBJS.
9821
9822 2015-11-17 Pedro Alves <palves@redhat.com>
9823
9824 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9825 GDB_SIGNAL_0 and gdb_signal_to_string.
9826
9827 2015-11-17 Pedro Alves <palves@redhat.com>
9828
9829 * win32-low.c (handle_output_debug_string): Remove parameter.
9830 (win32_kill): Remove our_status local and adjust call to
9831 handle_output_debug_string.
9832 (get_child_debug_event): Adjust call to
9833 handle_output_debug_string.
9834
9835 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9836
9837 * linux-mips-low.c (mips_fill_gregset): Add cast.
9838 (mips_store_gregset): Likewise.
9839 (mips_fill_fpregset): Likewise.
9840 (mips_store_fpregset): Likewise.
9841
9842 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9843
9844 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9845 priv.
9846
9847 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9848
9849 * linux-mips-low.c (mips_linux_new_thread): Change type of
9850 watch_type to enum target_hw_bp_type.
9851
9852 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9853
9854 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9855 Change return type to arm_hwbp_type.
9856
9857 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9858
9859 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9860 (arm_store_gregset): Likewise.
9861 * linux-arm-low.c (arm_get_hwcap): Likewise.
9862 (arm_read_description): Likewise.
9863
9864 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9865
9866 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9867
9868 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9869
9870 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9871 (ppc_fill_vsxregset): Likewise.
9872 (ppc_store_vsxregset): Likewise.
9873 (ppc_fill_vrregset): Likewise.
9874 (ppc_store_vrregset): Likewise.
9875 (ppc_fill_evrregset): Likewise.
9876 (ppc_store_evrregset): Likewise.
9877
9878 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9879
9880 * linux-ppc-low.c (ppc_usrregs_info): Remove
9881 forward-declaration.
9882 (ppc_arch_setup): Move lower in file.
9883
9884 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9885
9886 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9887 (ps_pdwrite): Likewise.
9888
9889 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9890
9891 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9892 to after assert checks.
9893
9894 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9895
9896 * proc-service.c (ps_pdread): Add/adjust casts.
9897 (ps_pdwrite): Add/adjust casts.
9898
9899 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9900
9901 * server.c (handle_search_memory_1): Cast return value of
9902 memmem.
9903
9904 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9905
9906 * server.c (write_qxfer_response): Change type of data to
9907 gdb_byte *.
9908
9909 2015-10-29 Pedro Alves <palves@redhat.com>
9910
9911 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9912
9913 2015-10-29 Pedro Alves <palves@redhat.com>
9914
9915 * tracepoint.c (clear_installed_tracepoints): Add casts.
9916
9917 2015-10-29 Pedro Alves <palves@redhat.com>
9918
9919 * server.c (handle_v_cont, process_serial_event): Add enum
9920 gdb_signal casts to signal parsing code.
9921
9922 2015-10-29 Pedro Alves <palves@redhat.com>
9923
9924 * linux-low.h (NULL_REGSET): Define.
9925 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9926 * linux-arm-low.c (arm_regsets): Likewise.
9927 * linux-crisv32-low.c (cris_regsets): Likewise.
9928 * linux-m68k-low.c (m68k_regsets): Likewise.
9929 * linux-mips-low.c (mips_regsets): Likewise.
9930 * linux-nios2-low.c (nios2_regsets): Likewise.
9931 * linux-ppc-low.c (ppc_regsets): Likewise.
9932 * linux-s390-low.c (s390_regsets): Likewise.
9933 * linux-sh-low.c (sh_regsets): Likewise.
9934 * linux-sparc-low.c (sparc_regsets): Likewise.
9935 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9936 * linux-tile-low.c (tile_regsets): Likewise.
9937 * linux-x86-low.c (x86_regsets): Likewise.
9938 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9939
9940 2015-10-29 Pedro Alves <palves@redhat.com>
9941
9942 * linux-low.h (NULL_REGSET): Define.
9943 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9944 * linux-arm-low.c (arm_regsets): Likewise.
9945 * linux-crisv32-low.c (cris_regsets): Likewise.
9946 * linux-m68k-low.c (m68k_regsets): Likewise.
9947 * linux-mips-low.c (mips_regsets): Likewise.
9948 * linux-nios2-low.c (nios2_regsets): Likewise.
9949 * linux-ppc-low.c (ppc_regsets): Likewise.
9950 * linux-s390-low.c (s390_regsets): Likewise.
9951 * linux-sh-low.c (sh_regsets): Likewise.
9952 * linux-sparc-low.c (sparc_regsets): Likewise.
9953 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9954 * linux-tile-low.c (tile_regsets): Likewise.
9955 * linux-x86-low.c (x86_regsets): Likewise.
9956 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9957
9958 2015-10-26 Doug Evans <dje@google.com>
9959
9960 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9961
9962 2015-10-26 Doug Evans <dje@google.com>
9963
9964 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9965
9966 2015-10-26 Doug Evans <dje@google.com>
9967
9968 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9969 for debug_printf.
9970 (attach_thread, find_new_threads_callback): Ditto.
9971
9972 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9973
9974 * mem-break.h (set_breakpoint_data): Remove.
9975
9976 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9977
9978 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9979 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9980 (initialize_low): Remove set_breakpoint_data call.
9981 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9982 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9983 (initialize_low): Remove set_breakpoint_data call.
9984 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9985 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9986 (initialize_low): Remove set_breakpoint_data call.
9987
9988 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9989
9990 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9991 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9992 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9993 * target.h (target_breakpoint_kind_from_pc): New macro.
9994
9995 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9996
9997 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9998 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9999 the default breakpoint kind.
10000
10001 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10002
10003 * linux-arm-low.c (arm_supports_z_point_type): Add software
10004 breakpoint support.
10005
10006 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10007
10008 * linux-arm-low.c: Refactor breakpoint definitions.
10009 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
10010 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
10011
10012 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10013
10014 * Makefile.in: Add arm.c/o.
10015 * configure.srv: Likewise.
10016 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
10017 (arm_breakpoint_kind_from_pc): New function.
10018 (arm_sw_breakpoint_from_kind): Return proper kind.
10019 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
10020
10021 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10022
10023 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
10024 removal.
10025 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
10026 (struct raw_breakpoint) <size>: Remove.
10027 (struct raw_breakpoint) <kind>: Add.
10028 (bp_size): New function.
10029 (bp_opcode): Likewise.
10030 (find_raw_breakpoint_at): Adjust for kind.
10031 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
10032 (remove_memory_breakpoint): Adjust for kind call bp_size.
10033 (set_raw_breakpoint_at): Adjust for kind.
10034 (set_breakpoint): Likewise.
10035 (set_breakpoint_at): Call breakpoint_kind_from_pc.
10036 (delete_raw_breakpoint): Adjust for kind.
10037 (delete_breakpoint): Likewise.
10038 (find_gdb_breakpoint): Likewise.
10039 (set_gdb_breakpoint_1): Likewise.
10040 (set_gdb_breakpoint): Likewise.
10041 (delete_gdb_breakpoint_1): Likewise.
10042 (delete_gdb_breakpoint): Likewise.
10043 (uninsert_raw_breakpoint): Likewise.
10044 (reinsert_raw_breakpoint): Likewise.
10045 (set_breakpoint_data): Remove.
10046 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
10047 (check_mem_read): Adjust for kind call bp_size.
10048 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
10049 (clone_one_breakpoint): Adjust for kind.
10050 * mem-break.h (set_gdb_breakpoint): Likewise.
10051 (delete_gdb_breakpoint): Likewise.
10052 * server.c (process_serial_event): Likewise.
10053
10054 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10055
10056 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
10057 (struct linux_target_ops) <breakpoint>: Remove.
10058 (struct linux_target_ops) <breakpoint_len>: Remove.
10059 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10060 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10061 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
10062 (arm_sw_breakpoint_from_kind): New function.
10063 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
10064 (struct linux_target_ops) <breakpoint>: Remove.
10065 (struct linux_target_ops) <breakpoint_len>: Remove.
10066 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10067 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10068 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
10069 (struct linux_target_ops) <breakpoint>: Remove.
10070 (struct linux_target_ops) <breakpoint_len>: Remove.
10071 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10072 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10073 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
10074 (struct linux_target_ops) <breakpoint>: Remove.
10075 (struct linux_target_ops) <breakpoint_len>: Remove.
10076 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10077 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10078 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
10079 and sw_breakpoint_from_kind to increment the pc.
10080 (linux_breakpoint_kind_from_pc): New function.
10081 (linux_sw_breakpoint_from_kind): New function.
10082 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
10083 (initialize_low): Call breakpoint_kind_from_pc and
10084 sw_breakpoint_from_kind to replace breakpoint_data/len.
10085 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
10086 New field.
10087 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
10088 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
10089 (struct linux_target_ops) <breakpoint>: Remove.
10090 (struct linux_target_ops) <breakpoint_len>: Remove.
10091 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10092 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10093 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
10094 (struct linux_target_ops) <breakpoint>: Remove.
10095 (struct linux_target_ops) <breakpoint_len>: Remove.
10096 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10097 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10098 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
10099 (struct linux_target_ops) <breakpoint>: Remove.
10100 (struct linux_target_ops) <breakpoint_len>: Remove.
10101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10103 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
10104 (struct linux_target_ops) <breakpoint>: Remove.
10105 (struct linux_target_ops) <breakpoint_len>: Remove.
10106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10108 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
10109 (struct linux_target_ops) <breakpoint>: Remove.
10110 (struct linux_target_ops) <breakpoint_len>: Remove.
10111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10112 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10113 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
10114 (struct linux_target_ops) <breakpoint>: Remove.
10115 (struct linux_target_ops) <breakpoint_len>: Remove.
10116 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10118 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
10119 (struct linux_target_ops) <breakpoint>: Remove.
10120 (struct linux_target_ops) <breakpoint_len>: Remove.
10121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10123 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
10124 (struct linux_target_ops) <breakpoint>: Remove.
10125 (struct linux_target_ops) <breakpoint_len>: Remove.
10126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10128 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
10129 (struct linux_target_ops) <breakpoint>: Remove.
10130 (struct linux_target_ops) <breakpoint_len>: Remove.
10131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10133 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
10134 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
10135 (struct linux_target_ops) <breakpoint>: Remove.
10136 (struct linux_target_ops) <breakpoint_len>: Remove.
10137 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10138 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10139 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
10140 (struct linux_target_ops) <breakpoint>: Remove.
10141 (struct linux_target_ops) <breakpoint_len>: Remove.
10142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10144
10145 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10146
10147 * linux-cris-low.c (cris_get_pc): Remove void arg.
10148
10149 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10150
10151 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
10152 variable name.
10153
10154 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10155
10156 * inferiors.c (thread_pid_matches_callback): New function.
10157 (find_thread_process): New function.
10158 (remove_thread): Reset current_thread.
10159 (remove_process): Assert threads have been removed first.
10160
10161 2015-10-15 Yao Qi <yao.qi@linaro.org>
10162
10163 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10164 if it is 3.
10165 (aarch64_remove_point): Likewise.
10166 * regcache.c (regcache_register_size): New function.
10167
10168 2015-10-12 Yao Qi <yao.qi@linaro.org>
10169
10170 * linux-aarch64-low.c: Update all callers as emit_load_store
10171 is renamed to aarch64_emit_load_store.
10172
10173 2015-10-12 Yao Qi <yao.qi@linaro.org>
10174
10175 * linux-aarch64-low.c: Update all callers of function renaming
10176 from emit_insn to aarch64_emit_insn.
10177
10178 2015-10-12 Yao Qi <yao.qi@linaro.org>
10179
10180 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10181 arch/aarch64-insn.h.
10182 (struct aarch64_memory_operand): Likewise.
10183 (ENCODE): Likewise.
10184 (emit_insn): Move to arch/aarch64-insn.c.
10185 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10186 (emit_load_store): Move to arch/aarch64-insn.c.
10187 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10188 (can_encode_int32): Remove.
10189
10190 2015-10-12 Yao Qi <yao.qi@linaro.org>
10191
10192 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10193 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10194 (aarch64_relocate_instruction): Likewise.
10195 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10196 (struct aarch64_insn_visitor): Likewise.
10197
10198 2015-10-12 Yao Qi <yao.qi@linaro.org>
10199
10200 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10201 (struct aarch64_insn_visitor): New.
10202 (struct aarch64_insn_relocation_data): New.
10203 (aarch64_ftrace_insn_reloc_b): New function.
10204 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10205 (aarch64_ftrace_insn_reloc_cb): Likewise.
10206 (aarch64_ftrace_insn_reloc_tb): Likewise.
10207 (aarch64_ftrace_insn_reloc_adr): Likewise.
10208 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10209 (aarch64_ftrace_insn_reloc_others): Likewise.
10210 (visitor): New.
10211 (aarch64_relocate_instruction): Use visitor.
10212
10213 2015-10-12 Yao Qi <yao.qi@linaro.org>
10214
10215 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10216 int. Add argument buf.
10217 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10218 aarch64_relocate_instruction.
10219
10220 2015-10-12 Yao Qi <yao.qi@linaro.org>
10221
10222 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10223 argument insn. Remove local variable insn. Don't call
10224 target_read_uint32.
10225 (aarch64_install_fast_tracepoint_jump_pad): Call
10226 target_read_uint32.
10227
10228 2015-09-30 Yao Qi <yao.qi@linaro.org>
10229
10230 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10231 (emit_load_store_pair): Likewise.
10232
10233 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10234
10235 * dll.c (match_dll): Add cast(s).
10236 (unloaded_dll): Likewise.
10237 * linux-low.c (second_thread_of_pid_p): Likewise.
10238 (delete_lwp_callback): Likewise.
10239 (count_events_callback): Likewise.
10240 (select_event_lwp_callback): Likewise.
10241 (linux_set_resume_request): Likewise.
10242 * server.c (accumulate_file_name_length): Likewise.
10243 (emit_dll_description): Likewise.
10244 (handle_qxfer_threads_worker): Likewise.
10245 (visit_actioned_threads): Likewise.
10246 * thread-db.c (any_thread_of): Likewise.
10247 * tracepoint.c (same_process_p): Likewise.
10248 (match_blocktype): Likewise.
10249 (build_traceframe_info_xml): Likewise.
10250
10251 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10252
10253 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10254 assignment.
10255 (gdb_unparse_agent_expr): Likewise.
10256 * hostio.c (require_data): Likewise.
10257 (handle_pread): Likewise.
10258 * linux-low.c (disable_regset): Likewise.
10259 (fetch_register): Likewise.
10260 (store_register): Likewise.
10261 (get_dynamic): Likewise.
10262 (linux_qxfer_libraries_svr4): Likewise.
10263 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10264 (set_fast_tracepoint_jump): Likewise.
10265 (uninsert_fast_tracepoint_jumps_at): Likewise.
10266 (reinsert_fast_tracepoint_jumps_at): Likewise.
10267 (validate_inserted_breakpoint): Likewise.
10268 (clone_agent_expr): Likewise.
10269 * regcache.c (init_register_cache): Likewise.
10270 * remote-utils.c (putpkt_binary_1): Likewise.
10271 (decode_M_packet): Likewise.
10272 (decode_X_packet): Likewise.
10273 (look_up_one_symbol): Likewise.
10274 (relocate_instruction): Likewise.
10275 (monitor_output): Likewise.
10276 * server.c (handle_search_memory): Likewise.
10277 (handle_qxfer_exec_file): Likewise.
10278 (handle_qxfer_libraries): Likewise.
10279 (handle_qxfer): Likewise.
10280 (handle_query): Likewise.
10281 (handle_v_cont): Likewise.
10282 (handle_v_run): Likewise.
10283 (captured_main): Likewise.
10284 * target.c (write_inferior_memory): Likewise.
10285 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10286 * tracepoint.c (init_trace_buffer): Likewise.
10287 (add_tracepoint_action): Likewise.
10288 (add_traceframe): Likewise.
10289 (add_traceframe_block): Likewise.
10290 (cmd_qtdpsrc): Likewise.
10291 (cmd_qtdv): Likewise.
10292 (cmd_qtstatus): Likewise.
10293 (response_source): Likewise.
10294 (response_tsv): Likewise.
10295 (cmd_qtnotes): Likewise.
10296 (gdb_collect): Likewise.
10297 (initialize_tracepoint): Likewise.
10298
10299 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10300
10301 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10302 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10303 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10304 <NOP>: New.
10305 (enum aarch64_condition_codes): New enum.
10306 (w0): New static global.
10307 (fp): Likewise.
10308 (lr): Likewise.
10309 (struct aarch64_memory_operand) <type>: New
10310 MEMORY_OPERAND_POSTINDEX type.
10311 (postindex_memory_operand): New helper function.
10312 (emit_ret): New function.
10313 (emit_load_store_pair): New function, factored out of emit_stp
10314 with support for MEMORY_OPERAND_POSTINDEX.
10315 (emit_stp): Rewrite using emit_load_store_pair.
10316 (emit_ldp): New function.
10317 (emit_load_store): Likewise.
10318 (emit_ldr): Mention post-index instruction in comment.
10319 (emit_ldrh): New function.
10320 (emit_ldrb): New function.
10321 (emit_ldrsw): Mention post-index instruction in comment.
10322 (emit_str): Likewise.
10323 (emit_subs): New function.
10324 (emit_cmp): Likewise.
10325 (emit_and): Likewise.
10326 (emit_orr): Likewise.
10327 (emit_orn): Likewise.
10328 (emit_eor): Likewise.
10329 (emit_mvn): Likewise.
10330 (emit_lslv): Likewise.
10331 (emit_lsrv): Likewise.
10332 (emit_asrv): Likewise.
10333 (emit_mul): Likewise.
10334 (emit_sbfm): Likewise.
10335 (emit_sbfx): Likewise.
10336 (emit_ubfm): Likewise.
10337 (emit_ubfx): Likewise.
10338 (emit_csinc): Likewise.
10339 (emit_cset): Likewise.
10340 (emit_nop): Likewise.
10341 (emit_ops_insns): New helper function.
10342 (emit_pop): Likewise.
10343 (emit_push): Likewise.
10344 (aarch64_emit_prologue): New function.
10345 (aarch64_emit_epilogue): Likewise.
10346 (aarch64_emit_add): Likewise.
10347 (aarch64_emit_sub): Likewise.
10348 (aarch64_emit_mul): Likewise.
10349 (aarch64_emit_lsh): Likewise.
10350 (aarch64_emit_rsh_signed): Likewise.
10351 (aarch64_emit_rsh_unsigned): Likewise.
10352 (aarch64_emit_ext): Likewise.
10353 (aarch64_emit_log_not): Likewise.
10354 (aarch64_emit_bit_and): Likewise.
10355 (aarch64_emit_bit_or): Likewise.
10356 (aarch64_emit_bit_xor): Likewise.
10357 (aarch64_emit_bit_not): Likewise.
10358 (aarch64_emit_equal): Likewise.
10359 (aarch64_emit_less_signed): Likewise.
10360 (aarch64_emit_less_unsigned): Likewise.
10361 (aarch64_emit_ref): Likewise.
10362 (aarch64_emit_if_goto): Likewise.
10363 (aarch64_emit_goto): Likewise.
10364 (aarch64_write_goto_address): Likewise.
10365 (aarch64_emit_const): Likewise.
10366 (aarch64_emit_call): Likewise.
10367 (aarch64_emit_reg): Likewise.
10368 (aarch64_emit_pop): Likewise.
10369 (aarch64_emit_stack_flush): Likewise.
10370 (aarch64_emit_zero_ext): Likewise.
10371 (aarch64_emit_swap): Likewise.
10372 (aarch64_emit_stack_adjust): Likewise.
10373 (aarch64_emit_int_call_1): Likewise.
10374 (aarch64_emit_void_call_2): Likewise.
10375 (aarch64_emit_eq_goto): Likewise.
10376 (aarch64_emit_ne_goto): Likewise.
10377 (aarch64_emit_lt_goto): Likewise.
10378 (aarch64_emit_le_goto): Likewise.
10379 (aarch64_emit_gt_goto): Likewise.
10380 (aarch64_emit_ge_got): Likewise.
10381 (aarch64_emit_ops_impl): New static global variable.
10382 (aarch64_emit_ops): New target function, return
10383 &aarch64_emit_ops_impl.
10384 (struct linux_target_ops): Install it.
10385
10386 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10387
10388 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10389 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10390 aarch64-ipa.o.
10391 * linux-aarch64-ipa.c: New file.
10392 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10393 and endian.h.
10394 (aarch64_get_thread_area): New target method.
10395 (extract_signed_bitfield): New helper function.
10396 (aarch64_decode_ldr_literal): New function.
10397 (enum aarch64_opcodes): New enum.
10398 (struct aarch64_register): New struct.
10399 (struct aarch64_operand): New struct.
10400 (x0): New static global.
10401 (x1): Likewise.
10402 (x2): Likewise.
10403 (x3): Likewise.
10404 (x4): Likewise.
10405 (w2): Likewise.
10406 (ip0): Likewise.
10407 (sp): Likewise.
10408 (xzr): Likewise.
10409 (aarch64_register): New helper function.
10410 (register_operand): Likewise.
10411 (immediate_operand): Likewise.
10412 (struct aarch64_memory_operand): New struct.
10413 (offset_memory_operand): New helper function.
10414 (preindex_memory_operand): Likewise.
10415 (enum aarch64_system_control_registers): New enum.
10416 (ENCODE): New macro.
10417 (emit_insn): New helper function.
10418 (emit_b): New function.
10419 (emit_bcond): Likewise.
10420 (emit_cb): Likewise.
10421 (emit_tb): Likewise.
10422 (emit_blr): Likewise.
10423 (emit_stp): Likewise.
10424 (emit_ldp_q_offset): Likewise.
10425 (emit_stp_q_offset): Likewise.
10426 (emit_load_store): Likewise.
10427 (emit_ldr): Likewise.
10428 (emit_ldrsw): Likewise.
10429 (emit_str): Likewise.
10430 (emit_ldaxr): Likewise.
10431 (emit_stxr): Likewise.
10432 (emit_stlr): Likewise.
10433 (emit_data_processing_reg): Likewise.
10434 (emit_data_processing): Likewise.
10435 (emit_add): Likewise.
10436 (emit_sub): Likewise.
10437 (emit_mov): Likewise.
10438 (emit_movk): Likewise.
10439 (emit_mov_addr): Likewise.
10440 (emit_mrs): Likewise.
10441 (emit_msr): Likewise.
10442 (emit_sevl): Likewise.
10443 (emit_wfe): Likewise.
10444 (append_insns): Likewise.
10445 (can_encode_int32_in): New helper function.
10446 (aarch64_relocate_instruction): New function.
10447 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10448 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10449 (struct linux_target_ops): Install aarch64_get_thread_area,
10450 aarch64_install_fast_tracepoint_jump_pad and
10451 aarch64_get_min_fast_tracepoint_insn_len.
10452
10453 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10454
10455 * Makefile.in (aarch64-insn.o): New rule.
10456 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10457
10458 2015-09-21 Yao Qi <yao.qi@linaro.org>
10459
10460 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10461
10462 2015-09-21 Yao Qi <yao.qi@linaro.org>
10463
10464 * tracepoint.c (max_jump_pad_size): Remove.
10465
10466 2015-09-18 Yao Qi <yao.qi@linaro.org>
10467
10468 * linux-aarch64-low.c: Don't include sys/uio.h.
10469 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10470
10471 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10472
10473 * tracepoint.c (eval_result_type): Change prototype.
10474 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10475
10476 2015-09-15 Pedro Alves <palves@redhat.com>
10477
10478 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10479 Check whether to report exec events instead of checking whether
10480 multiprocess is enabled.
10481
10482 2015-09-15 Pedro Alves <palves@redhat.com>
10483
10484 PR remote/18965
10485 * remote-utils.c (prepare_resume_reply): Merge
10486 TARGET_WAITKIND_VFORK_DONE switch case with the
10487 TARGET_WAITKIND_FORKED case.
10488
10489 2015-09-15 Yao Qi <yao.qi@linaro.org>
10490
10491 * server.c (handle_query): Check string comparison using
10492 "else if" instead of "if".
10493
10494 2015-09-15 Yao Qi <yao.qi@linaro.org>
10495
10496 * server.c (vCont_supported): New global variable.
10497 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10498 matches. Append ";vContSupported+" to own_buf.
10499 (handle_v_requests): Append ";s;S" to own_buf if target supports
10500 hardware single step or vCont_supported is false.
10501 (capture_main): Set vCont_supported to zero.
10502
10503 2015-09-15 Yao Qi <yao.qi@linaro.org>
10504
10505 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10506 it to ...
10507 (linux_supports_hardware_single_step): ... New function.
10508 (linux_target_ops): Update.
10509 * lynx-low.c (lynx_target_ops): Set field
10510 supports_hardware_single_step to target_can_do_hardware_single_step.
10511 * nto-low.c (nto_target_ops): Likewise.
10512 * spu-low.c (spu_target_ops): Likewise.
10513 * win32-low.c (win32_target_ops): Likewise.
10514 * target.c (target_can_do_hardware_single_step): New function.
10515 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10516 Remove. <supports_hardware_single_step>: New field.
10517 (target_supports_conditional_breakpoints): Remove.
10518 (target_supports_hardware_single_step): New macro.
10519 (target_can_do_hardware_single_step): Declare.
10520 * server.c (handle_query): Use target_supports_hardware_single_step
10521 instead of target_supports_conditional_breakpoints.
10522
10523 2015-09-15 Yao Qi <yao.qi@linaro.org>
10524
10525 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10526 function.
10527 (struct linux_target_ops the_low_target): Install
10528 aarch64_linux_siginfo_fixup.
10529
10530 2015-09-11 Don Breazeal <donb@codesourcery.com>
10531 Luis Machado <lgustavo@codesourcery.com>
10532
10533 * linux-low.c (linux_mourn): Static declaration.
10534 (linux_arch_setup): Move in front of
10535 handle_extended_wait.
10536 (linux_arch_setup_thread): New function.
10537 (handle_extended_wait): Handle exec events. Call
10538 linux_arch_setup_thread. Make event_lwp argument a
10539 pointer-to-a-pointer.
10540 (check_zombie_leaders): Do not check stopped threads.
10541 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10542 (linux_low_filter_event): Add lwp and thread for exec'ing
10543 non-leader thread if leader thread has been deleted.
10544 Refactor code into linux_arch_setup_thread and call it.
10545 Pass child lwp pointer by reference to handle_extended_wait.
10546 (linux_wait_for_event_filtered): Update comment.
10547 (linux_wait_1): Prevent clobbering exec event status.
10548 (linux_supports_exec_events): New function.
10549 (linux_target_ops) <supports_exec_events>: Initialize new member.
10550 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10551 new member.
10552 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10553 * server.c (report_exec_events): New global variable.
10554 (handle_query): Handle qSupported query for exec-events feature.
10555 (captured_main): Initialize report_exec_events.
10556 * server.h (report_exec_events): Declare new global variable.
10557 * target.h (struct target_ops) <supports_exec_events>: New
10558 member.
10559 (target_supports_exec_events): New macro.
10560 * win32-low.c (win32_target_ops) <supports_exec_events>:
10561 Initialize new member.
10562
10563 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10564
10565 * linux-low.c (linux_low_enable_btrace): Remove.
10566 (linux_target_ops): Replace linux_low_enable_btrace with
10567 linux_enable_btrace.
10568
10569 2015-09-03 Yao Qi <yao.qi@linaro.org>
10570
10571 * linux-aarch64-low.c (aarch64_insert_point): Call
10572 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10573 returns true.
10574
10575 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10576
10577 * linux-low.c (check_stopped_by_breakpoint): Use
10578 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10579
10580 2015-08-27 Pedro Alves <palves@redhat.com>
10581
10582 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10583
10584 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10585
10586 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10587 the XNEW-family equivalent.
10588 (compile_bytecodes): Likewise.
10589 * dll.c (loaded_dll): Likewise.
10590 * event-loop.c (append_callback_event): Likewise.
10591 (create_file_handler): Likewise.
10592 (create_file_event): Likewise.
10593 * hostio.c (handle_open): Likewise.
10594 * inferiors.c (add_thread): Likewise.
10595 (add_process): Likewise.
10596 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10597 * linux-arm-low.c (arm_new_process): Likewise.
10598 (arm_new_thread): Likewise.
10599 * linux-low.c (add_to_pid_list): Likewise.
10600 (linux_add_process): Likewise.
10601 (handle_extended_wait): Likewise.
10602 (add_lwp): Likewise.
10603 (enqueue_one_deferred_signal): Likewise.
10604 (enqueue_pending_signal): Likewise.
10605 (linux_resume_one_lwp_throw): Likewise.
10606 (linux_resume_one_thread): Likewise.
10607 (linux_read_memory): Likewise.
10608 (linux_write_memory): Likewise.
10609 * linux-mips-low.c (mips_linux_new_process): Likewise.
10610 (mips_linux_new_thread): Likewise.
10611 (mips_add_watchpoint): Likewise.
10612 * linux-x86-low.c (initialize_low_arch): Likewise.
10613 * lynx-low.c (lynx_add_process): Likewise.
10614 * mem-break.c (set_raw_breakpoint_at): Likewise.
10615 (set_breakpoint): Likewise.
10616 (add_condition_to_breakpoint): Likewise.
10617 (add_commands_to_breakpoint): Likewise.
10618 (clone_agent_expr): Likewise.
10619 (clone_one_breakpoint): Likewise.
10620 * regcache.c (new_register_cache): Likewise.
10621 * remote-utils.c (look_up_one_symbol): Likewise.
10622 * server.c (queue_stop_reply): Likewise.
10623 (start_inferior): Likewise.
10624 (queue_stop_reply_callback): Likewise.
10625 (handle_target_event): Likewise.
10626 * spu-low.c (fetch_ppc_memory): Likewise.
10627 (store_ppc_memory): Likewise.
10628 * target.c (set_target_ops): Likewise.
10629 * thread-db.c (thread_db_load_search): Likewise.
10630 (try_thread_db_load_1): Likewise.
10631 * tracepoint.c (add_tracepoint): Likewise.
10632 (add_tracepoint_action): Likewise.
10633 (create_trace_state_variable): Likewise.
10634 (cmd_qtdpsrc): Likewise.
10635 (cmd_qtro): Likewise.
10636 (add_while_stepping_state): Likewise.
10637 * win32-low.c (child_add_thread): Likewise.
10638 (get_image_name): Likewise.
10639
10640 2015-08-25 Yao Qi <yao.qi@linaro.org>
10641
10642 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10643
10644 2015-08-25 Yao Qi <yao.qi@linaro.org>
10645
10646 * Makefile.in (aarch64-linux.o): New rule.
10647 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10648 srv_tgtobj.
10649 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10650 (aarch64_init_debug_reg_state): Make it extern.
10651 (aarch64_linux_prepare_to_resume): Remove.
10652
10653 2015-08-25 Yao Qi <yao.qi@linaro.org>
10654
10655 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10656 lwp_arch_private_info and ptid_of_lwp.
10657
10658 2015-08-25 Yao Qi <yao.qi@linaro.org>
10659
10660 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10661 Find proc_info by find_process_pid. All callers updated.
10662
10663 2015-08-25 Yao Qi <yao.qi@linaro.org>
10664
10665 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10666 Remove.
10667 (debug_reg_change_callback): Remove.
10668 (aarch64_notify_debug_reg_change): Remove.
10669
10670 2015-08-25 Yao Qi <yao.qi@linaro.org>
10671
10672 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10673 Call current_lwp_ptid.
10674
10675 2015-08-25 Yao Qi <yao.qi@linaro.org>
10676
10677 * linux-aarch64-low.c (debug_reg_change_callback): Use
10678 debug_printf.
10679
10680 2015-08-25 Yao Qi <yao.qi@linaro.org>
10681
10682 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10683
10684 2015-08-25 Yao Qi <yao.qi@linaro.org>
10685
10686 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10687
10688 2015-08-25 Yao Qi <yao.qi@linaro.org>
10689
10690 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10691 the code.
10692
10693 2015-08-25 Yao Qi <yao.qi@linaro.org>
10694
10695 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10696 Remove.
10697 (debug_reg_change_callback): Remove argument entry and add argument
10698 lwp. Remove local variable thread. Don't print thread id in the
10699 debugging output. Don't check whether pid of thread equals to pid.
10700 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10701 iterate_over_lwps instead find_inferior.
10702
10703 2015-08-24 Pedro Alves <palves@redhat.com>
10704
10705 * inferiors.c (get_first_process): New function.
10706 * inferiors.h (get_first_process): New declaration.
10707 * remote-utils.c (read_ptid): Default to the first process in the
10708 list, instead of to the current thread's process.
10709
10710 2015-08-24 Pedro Alves <palves@redhat.com>
10711
10712 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10713 * event-loop.c: Likewise.
10714 * remote-utils.c: Likewise.
10715 * tracepoint.c: Likewise.
10716
10717 2015-08-24 Pedro Alves <palves@redhat.com>
10718
10719 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10720 ptid_get_lwp.
10721
10722 2015-08-21 Pedro Alves <palves@redhat.com>
10723
10724 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10725 instead of literal 1.
10726
10727 2015-08-21 Pedro Alves <palves@redhat.com>
10728
10729 * tdesc.c (default_description): Explicitly zero-initialize.
10730
10731 2015-08-21 Pedro Alves <palves@redhat.com>
10732
10733 PR gdb/18749
10734 * inferiors.c (remove_thread): Discard any pending stop reply for
10735 this thread.
10736 * server.c (remove_all_on_match_pid): Rename to ...
10737 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10738 instead of a pid.
10739 (discard_queued_stop_replies): Change parameter to a ptid. Now
10740 extern.
10741 (handle_v_kill, kill_inferior_callback, captured_main)
10742 (process_serial_event): Adjust.
10743 * server.h (discard_queued_stop_replies): Declare.
10744
10745 2015-08-21 Pedro Alves <palves@redhat.com>
10746
10747 * linux-low.c (wait_for_sigstop): Always switch to no thread
10748 selected if the previously current thread dies.
10749 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10750 process instead of the current thread's.
10751 * remote-utils.c (input_interrupt): Don't check if there's no
10752 current thread.
10753 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10754 current thread to the general thread fails, error out.
10755 (handle_qxfer_auxv, handle_qxfer_libraries)
10756 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10757 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10758 (handle_query): Check if there's a thread selected instead of
10759 checking whether there's any thread in the thread list.
10760 (handle_qxfer_threads, handle_qxfer_btrace)
10761 (handle_qxfer_btrace_conf): Don't error out early if there's no
10762 thread in the thread list.
10763 (handle_v_cont, myresume): Don't set the current thread to the
10764 continue thread.
10765 (process_serial_event) <Hg handling>: Also set thread_id if the
10766 previous general thread is still alive.
10767 (process_serial_event) <g/G handling>: If setting the current
10768 thread to the general thread fails, error out.
10769 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10770 thread's lwp instead of the current thread's.
10771 * target.c (set_desired_thread): If the desired thread was not
10772 found, leave the current thread pointing to NULL. Return an int
10773 (boolean) indicating success.
10774 * target.h (set_desired_thread): Change return type to int.
10775
10776 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10777
10778 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10779 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10780 #includes.
10781 (ps_get_thread_area): New function.
10782
10783 2015-08-19 Gary Benson <gbenson@redhat.com>
10784
10785 * hostio.c (handle_pread): Do not attempt to read more data
10786 than hostio_reply_with_data can fit in a packet.
10787
10788 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10789
10790 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10791
10792 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10793
10794 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10795
10796 2015-08-06 Pedro Alves <palves@redhat.com>
10797
10798 * tracepoint.c (expr_eval_result): Now an int.
10799
10800 2015-08-06 Pedro Alves <palves@redhat.com>
10801
10802 * gdbthread.h (struct regcache): Forward declare.
10803 (struct thread_info) <regcache_data>: Now a struct regcache
10804 pointer.
10805 * inferiors.c (inferior_regcache_data)
10806 (set_inferior_regcache_data): Now work with struct regcache
10807 pointers.
10808 * inferiors.h (struct regcache): Forward declare.
10809 (inferior_regcache_data, set_inferior_regcache_data): Now work
10810 with struct regcache pointers.
10811 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10812 (free_register_cache_thread): Remove struct regcache pointer
10813 casts.
10814
10815 2015-08-06 Pedro Alves <palves@redhat.com>
10816
10817 * server.c (captured_main): On error, print the exception message
10818 to stderr, and if run_once is set, throw a quit.
10819
10820 2015-08-06 Pedro Alves <palves@redhat.com>
10821
10822 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10823 the current thread.
10824
10825 2015-08-06 Pedro Alves <palves@redhat.com>
10826
10827 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10828 reading beyond the passed in buffer length.
10829
10830 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10831
10832 * tracepoint.c (symbol_list) <required>: Remove.
10833
10834 2015-08-06 Pedro Alves <palves@redhat.com>
10835
10836 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10837 count if stopping and suspending threads.
10838 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10839 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10840 (linux_detach): Complete an ongoing step-over.
10841 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10842 throughout.
10843 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10844 (linux_wait_1): If passing a signal to the inferior after
10845 finishing a step-over, unsuspend and re-resume all lwps. If we
10846 see a single-step event but the thread should be continuing, don't
10847 pass the trap to gdb.
10848 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10849 internal_error instead of gdb_assert.
10850 (enqueue_pending_signal): New function.
10851 (check_ptrace_stopped_lwp_gone): Add debug output.
10852 (start_step_over): Use internal_error instead of gdb_assert.
10853 (complete_ongoing_step_over): New function.
10854 (linux_resume_one_thread): Don't resume a suspended thread.
10855 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10856 it stepping.
10857
10858 2015-08-06 Pedro Alves <palves@redhat.com>
10859
10860 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10861 (linux_thread_alive): Use lwp_is_marked_dead.
10862 (extended_event_reported): Delete.
10863 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10864 instead of extended_event_reported.
10865 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10866 as well.
10867 (lwp_is_marked_dead): New function.
10868 (lwp_running): Use lwp_is_marked_dead.
10869 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10870 comment.
10871
10872 2015-08-06 Pedro Alves <palves@redhat.com>
10873
10874 * linux-low.c (linux_wait_1): Move fork event output out of the
10875 !report_to_gdb check. Pass event_child->waitstatus to
10876 target_waitstatus_to_string instead of ourstatus.
10877
10878 2015-08-04 Yao Qi <yao.qi@linaro.org>
10879
10880 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10881 if current_thread is 32 bit.
10882
10883 2015-08-04 Yao Qi <yao.qi@linaro.org>
10884
10885 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10886 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10887 * server.c (extended_protocol): Remove "static".
10888 * server.h (extended_protocol): Declare it.
10889
10890 2015-08-04 Yao Qi <yao.qi@linaro.org>
10891
10892 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10893 both aarch64 and aarch32.
10894 (aarch64_set_pc): Likewise.
10895
10896 2015-08-04 Yao Qi <yao.qi@linaro.org>
10897
10898 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10899 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10900 arm-with-neon.xml to srv_xmlfiles.
10901 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10902 (is_64bit_tdesc): New function.
10903 (aarch64_linux_read_description): New function.
10904 (aarch64_arch_setup): Call aarch64_linux_read_description.
10905 (regs_info): Rename to regs_info_aarch64.
10906 (aarch64_regs_info): Return right regs_info.
10907 (initialize_low_arch): Call initialize_low_arch_aarch32.
10908
10909 2015-08-04 Yao Qi <yao.qi@linaro.org>
10910
10911 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10912 * linux-aarch32-low.c: New file.
10913 * linux-aarch32-low.h: New file.
10914 * linux-arm-low.c (arm_fill_gregset): Move it to
10915 linux-aarch32-low.c.
10916 (arm_store_gregset): Likewise.
10917 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10918 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10919 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10920 (regs_info): Rename to regs_info_arm.
10921 (arm_regs_info): Return regs_info_aarch32 if
10922 have_ptrace_getregset is 1 and target description is
10923 arm_with_neon or arm_with_vfpv3.
10924 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10925 Call initialize_low_arch_aarch32 instead.
10926
10927 2015-08-04 Yao Qi <yao.qi@linaro.org>
10928
10929 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10930 * linux-low.c: ... here.
10931 * linux-low.h (have_ptrace_getregset): Declare it.
10932
10933 2015-08-04 Pedro Alves <palves@redhat.com>
10934
10935 * thread-db.c (struct thread_db): Use new typedefs.
10936 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10937 CHK calls.
10938 (disable_thread_event_reporting): Cast result of dlsym to
10939 destination function pointer type.
10940 (thread_db_mourn): Use td_ta_delete_ftype.
10941
10942 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10943
10944 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10945 arch variant.
10946 (CDX_BREAKPOINT): Define for R2.
10947 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10948 (the_low_target): Add comments.
10949
10950 2015-07-30 Yao Qi <yao.qi@linaro.org>
10951
10952 * linux-arm-low.c (arm_hwcap): Remove it.
10953 (arm_read_description): New local variable arm_hwcap. Don't
10954 set arm_hwcap to zero.
10955
10956 2015-07-30 Yao Qi <yao.qi@linaro.org>
10957
10958 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10959 Use regcache->tdesc instead.
10960 (arm_store_wmmxregset): Likewise.
10961 (arm_fill_vfpregset): Likewise.
10962 (arm_store_vfpregset): Likewise.
10963
10964 2015-07-30 Yao Qi <yao.qi@linaro.org>
10965
10966 * linux-arm-low.c: Include arch/arm.h.
10967 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10968 (arm_store_gregset): Likewise.
10969
10970 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10971
10972 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10973 ptrace's 4th parameter.
10974
10975 2015-07-27 Yao Qi <yao.qi@linaro.org>
10976
10977 * configure.srv (case aarch64*-*-linux*): Don't set
10978 srv_linux_usrregs.
10979
10980 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10981
10982 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10983 sys/ptrace.h.
10984 * linux-arm-low.c: Likewise.
10985 * linux-cris-low.c: Likewise.
10986 * linux-crisv32-low.c: Likewise.
10987 * linux-low.c: Likewise.
10988 * linux-m68k-low.c: Likewise.
10989 * linux-mips-low.c: Likewise.
10990 * linux-nios2-low.c: Likewise.
10991 * linux-s390-low.c: Likewise.
10992 * linux-sparc-low.c: Likewise.
10993 * linux-tic6x-low.c: Likewise.
10994 * linux-tile-low.c: Likewise.
10995 * linux-x86-low.c: Likewise.
10996
10997 2015-07-24 Pedro Alves <palves@redhat.com>
10998
10999 * config.in: Regenerate.
11000 * configure: Regenerate.
11001
11002 2015-07-24 Pedro Alves <palves@redhat.com>
11003
11004 * acinclude.m4: Include ../ptrace.m4.
11005 * configure.ac: Call GDB_AC_PTRACE.
11006 * config.in, configure: Regenerate.
11007
11008 2015-07-24 Yao Qi <yao.qi@linaro.org>
11009
11010 * linux-low.c (linux_create_inferior): Remove setting to
11011 proc->priv->new_inferior.
11012 (linux_attach): Likewise.
11013 (linux_low_filter_event): Likewise.
11014 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
11015
11016 2015-07-24 Yao Qi <yao.qi@linaro.org>
11017
11018 * linux-low.c (linux_arch_setup): New function.
11019 (linux_low_filter_event): If proc->tdesc is NULL and
11020 proc->attached is true, call the_low_target.arch_setup.
11021 Otherwise, keep status pending, and return.
11022 (linux_resume_one_lwp_throw): Don't call get_pc if
11023 thread->while_stepping isn't NULL. Don't call
11024 get_thread_regcache if proc->tdesc is NULL.
11025 (need_step_over_p): Return 0 if proc->tdesc is NULL.
11026 (linux_target_ops): Install arch_setup.
11027 * server.c (start_inferior): Call the_target->arch_setup.
11028 * target.h (struct target_ops) <arch_setup>: New field.
11029 (target_arch_setup): New marco.
11030 * lynx-low.c (lynx_target_ops): Update.
11031 * nto-low.c (nto_target_ops): Update.
11032 * spu-low.c (spu_target_ops): Update.
11033 * win32-low.c (win32_target_ops): Update.
11034
11035 2015-07-24 Yao Qi <yao.qi@linaro.org>
11036
11037 * linux-low.c (linux_add_process): Don't set
11038 proc->priv->new_inferior.
11039 (linux_create_inferior): Set proc->priv->new_inferior to 1.
11040 (linux_attach): Likewise.
11041
11042 2015-07-24 Yao Qi <yao.qi@linaro.org>
11043
11044 * server.c (start_inferior): Code refactor.
11045
11046 2015-07-24 Yao Qi <yao.qi@linaro.org>
11047
11048 * server.c (process_serial_event): Set general_thread.
11049
11050 2015-07-21 Yao Qi <yao.qi@linaro.org>
11051
11052 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
11053 aarch64_linux_get_debug_reg_capacity.
11054
11055 2015-07-17 Yao Qi <yao.qi@linaro.org>
11056
11057 * Makefile.in (aarch64-linux-hw-point.o): New rule.
11058 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
11059 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
11060 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
11061 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
11062 (AARCH64_HWP_ALIGNMENT): Likewise.
11063 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
11064 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
11065 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
11066 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
11067 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
11068 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
11069 (struct aarch64_debug_reg_state): Likewise.
11070 (struct arch_lwp_info): Likewise.
11071 (aarch64_align_watchpoint): Likewise.
11072 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
11073 (aarch64_watchpoint_length): Likewise.
11074 (aarch64_point_encode_ctrl_reg): Likewise
11075 (aarch64_point_is_aligned): Likewise.
11076 (aarch64_align_watchpoint): Likewise.
11077 (aarch64_linux_set_debug_regs):
11078 (aarch64_dr_state_insert_one_point): Likewise.
11079 (aarch64_dr_state_remove_one_point): Likewise.
11080 (aarch64_handle_breakpoint): Likewise.
11081 (aarch64_handle_aligned_watchpoint): Likewise.
11082 (aarch64_handle_unaligned_watchpoint): Likewise.
11083 (aarch64_handle_watchpoint): Likewise.
11084
11085 2015-07-17 Yao Qi <yao.qi@linaro.org>
11086
11087 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
11088 and don't aarch64_get_debug_reg_state. All callers update.
11089 (aarch64_handle_aligned_watchpoint): Likewise.
11090 (aarch64_handle_unaligned_watchpoint): Likewise.
11091 (aarch64_handle_watchpoint): Likewise.
11092 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
11093 (aarch64_remove_point): Likewise.
11094
11095 2015-07-17 Yao Qi <yao.qi@linaro.org>
11096
11097 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
11098 debug_printf.
11099 (aarch64_handle_unaligned_watchpoint): Likewise.
11100
11101 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11102
11103 Revert the previous 3 commits:
11104 Move gdb_regex* to common/
11105 Move linux_find_memory_regions_full & co.
11106 gdbserver build-id attribute generator
11107
11108 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11109 Jan Kratochvil <jan.kratochvil@redhat.com>
11110
11111 gdbserver build-id attribute generator.
11112 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
11113 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
11114 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
11115 (find_phdr): New.
11116 (get_dynamic): Use find_pdhr to traverse program headers.
11117 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
11118 (compare_mapping_entry_range, struct find_memory_region_callback_data)
11119 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
11120 (get_hex_build_id): New.
11121 (linux_qxfer_libraries_svr4): Add optional build-id attribute
11122 to reply XML document.
11123
11124 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11125 Jan Kratochvil <jan.kratochvil@redhat.com>
11126
11127 * target.c: Include target/target-utils.h and fcntl.h.
11128 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
11129 (target_fileio_read_stralloc): New functions.
11130
11131 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11132
11133 * Makefile.in (OBS): Add gdb_regex.o.
11134 (gdb_regex.o): New.
11135 * config.in: Rebuilt.
11136 * configure: Rebuilt.
11137
11138 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11139 Jan Kratochvil <jan.kratochvil@redhat.com>
11140
11141 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
11142 * Makefile.in (OBS): Add target-utils.o.
11143 (linux-maps.o, target-utils.o): New.
11144 * configure.srv (srv_linux_obj): Add linux-maps.o.
11145
11146 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
11147
11148 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
11149 function, return 1.
11150 (the_low_target): Install it.
11151
11152 2015-07-14 Pedro Alves <palves@redhat.com>
11153
11154 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
11155 Instead, ignore ECHILD, and throw an error for other errnos.
11156
11157 2015-07-10 Pedro Alves <palves@redhat.com>
11158
11159 * event-loop.c (struct callback_event) <data>: Change type to
11160 gdb_client_data instance instead of gdb_client_data pointer.
11161 (append_callback_event): Adjust.
11162
11163 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11164
11165 * linux-aarch64-low.c: Add comments for each linux_target_ops
11166 method. Remove comments already covered in target_ops and
11167 linux_target_ops definitions.
11168 (the_low_target): Add comments for each unimplemented method.
11169
11170 2015-07-09 Yao Qi <yao.qi@linaro.org>
11171
11172 * linux-aarch64-low.c (aarch64_regmap): Remove.
11173 (aarch64_usrregs_info): Remove.
11174 (regs_info): Set field usrregs to NULL.
11175
11176 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11177
11178 * linux-low.c: Include "rsp-low.h"
11179 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11180 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11181 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11182 (handle_btrace_enable_pt): New.
11183 (handle_btrace_general_set): Support "pt".
11184 (handle_btrace_conf_general_set): Support "pt:size".
11185
11186 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11187
11188 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11189 Z_PACKET_SW_BP.
11190
11191 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11192
11193 * linux-aarch64-low.c: Remove comment about endianness.
11194 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11195 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11196 memcmp.
11197
11198 2015-06-24 Gary Benson <gbenson@redhat.com>
11199
11200 * linux-i386-ipa.c (stdint.h): Do not include.
11201 * lynx-i386-low.c (stdint.h): Likewise.
11202 * lynx-ppc-low.c (stdint.h): Likewise.
11203 * mem-break.c (stdint.h): Likewise.
11204 * thread-db.c (stdint.h): Likewise.
11205 * tracepoint.c (stdint.h): Likewise.
11206 * win32-low.c (stdint.h): Likewise.
11207
11208 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11209
11210 * server.c (write_qxfer_response): Update call to
11211 remote_escape_output.
11212
11213 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11214 Jan Kratochvil <jan.kratochvil@redhat.com>
11215
11216 Merge multiple hex conversions.
11217 * gdbreplay.c (tohex): Rename to 'fromhex'.
11218 (logchar): Use fromhex.
11219
11220 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11221
11222 * server.c (handle_qxfer_libraries): Set `version' attribute for
11223 <library-list>.
11224
11225 2015-06-10 Gary Benson <gbenson@redhat.com>
11226
11227 * target.h (struct target_ops) <multifs_open>: New field.
11228 <multifs_unlink>: Likewise.
11229 <multifs_readlink>: Likewise.
11230 * linux-low.c (nat/linux-namespaces.h): New include.
11231 (linux_target_ops): Initialize the_target->multifs_open,
11232 the_target->multifs_unlink and the_target->multifs_readlink.
11233 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11234 * hostio.c (hostio_fs_pid): New static variable.
11235 (hostio_handle_new_gdb_connection): New function.
11236 (handle_setfs): Likewise.
11237 (handle_open): Use the_target->multifs_open as appropriate.
11238 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11239 (handle_readlink): Use the_target->multifs_readlink as
11240 appropriate.
11241 (handle_vFile): Handle vFile:setfs packets.
11242 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11243 after target_handle_new_gdb_connection.
11244
11245 2015-06-10 Gary Benson <gbenson@redhat.com>
11246
11247 * configure.ac (AC_CHECK_FUNCS): Add setns.
11248 * config.in: Regenerate.
11249 * configure: Likewise.
11250 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11251 (linux-namespaces.o): New rule.
11252 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11253
11254 2015-06-09 Gary Benson <gbenson@redhat.com>
11255
11256 * hostio.c (handle_open): Process mode argument with
11257 fileio_to_host_mode.
11258
11259 2015-06-01 Yao Qi <yao.qi@linaro.org>
11260
11261 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11262 * linux-x86-low.c: Likewise.
11263
11264 2015-05-28 Don Breazeal <donb@codesourcery.com>
11265
11266 * linux-low.c (handle_extended_wait): Initialize
11267 thread_info.last_resume_kind for new fork children.
11268
11269 2015-05-15 Pedro Alves <palves@redhat.com>
11270
11271 * target.h (target_handle_new_gdb_connection): Rewrite using if
11272 wrapped in do/while.
11273
11274 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11275
11276 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11277 * configure, config.in: Regenerate.
11278 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11279 Declare typedef.
11280
11281 2015-05-12 Don Breazeal <donb@codesourcery.com>
11282
11283 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11284 PTRACE_EVENT_VFORK_DONE.
11285 (linux_low_ptrace_options, extended_event_reported): Add vfork
11286 events.
11287 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11288 and "vforkdone" for RSP 'T' Stop Reply Packet.
11289 * server.h (report_vfork_events): Declare
11290 global variable.
11291
11292 2015-05-12 Don Breazeal <donb@codesourcery.com>
11293
11294 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11295 (the_low_target) <new_fork>: Initialize new member.
11296 * linux-arm-low.c (arm_new_fork): New function.
11297 (the_low_target) <new_fork>: Initialize new member.
11298 * linux-low.c (handle_extended_wait): Call new target function
11299 new_fork.
11300 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11301 * linux-mips-low.c (mips_add_watchpoint): New function
11302 extracted from mips_insert_point.
11303 (the_low_target) <new_fork>: Initialize new member.
11304 (mips_linux_new_fork): New function.
11305 (mips_insert_point): Call mips_add_watchpoint.
11306 * linux-x86-low.c (x86_linux_new_fork): New function.
11307 (the_low_target) <new_fork>: Initialize new member.
11308
11309 2015-05-12 Don Breazeal <donb@codesourcery.com>
11310
11311 * linux-low.c (handle_extended_wait): Implement return value,
11312 rename argument 'event_child' to 'event_lwp', handle
11313 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11314 (linux_low_ptrace_options): New function.
11315 (linux_low_filter_event): Call linux_low_ptrace_options,
11316 use different argument fo linux_enable_event_reporting,
11317 use return value from handle_extended_wait.
11318 (extended_event_reported): New function.
11319 (linux_wait_1): Call extended_event_reported and set
11320 status to report fork events.
11321 (linux_write_memory): Add pid to debug message.
11322 (reset_lwp_ptrace_options_callback): New function.
11323 (linux_handle_new_gdb_connection): New function.
11324 (linux_target_ops): Initialize new structure member.
11325 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11326 * lynx-low.c: Initialize new structure member.
11327 * remote-utils.c (prepare_resume_reply): Implement stop reason
11328 "fork" for "T" stop message.
11329 * server.c (handle_query): Call handle_new_gdb_connection.
11330 * server.h (report_fork_events): Declare global flag.
11331 * target.h (struct target_ops) <handle_new_gdb_connection>:
11332 New member.
11333 (target_handle_new_gdb_connection): New macro.
11334 * win32-low.c: Initialize new structure member.
11335
11336 2015-05-12 Don Breazeal <donb@codesourcery.com>
11337
11338 * mem-break.c (APPEND_TO_LIST): Define macro.
11339 (clone_agent_expr): New function.
11340 (clone_one_breakpoint): New function.
11341 (clone_all_breakpoints): New function.
11342 * mem-break.h: Declare new functions.
11343
11344 2015-05-12 Don Breazeal <donb@codesourcery.com>
11345
11346 * linux-low.c (linux_supports_fork_events): New function.
11347 (linux_supports_vfork_events): New function.
11348 (linux_target_ops): Initialize new structure members.
11349 (initialize_low): Call linux_check_ptrace_features.
11350 * lynx-low.c (lynx_target_ops): Initialize new structure
11351 members.
11352 * server.c (report_fork_events, report_vfork_events):
11353 New global flags.
11354 (handle_query): Add new features to qSupported packet and
11355 response.
11356 (captured_main): Initialize new global variables.
11357 * target.h (struct target_ops) <supports_fork_events>:
11358 New member.
11359 <supports_vfork_events>: New member.
11360 (target_supports_fork_events): New macro.
11361 (target_supports_vfork_events): New macro.
11362 * win32-low.c (win32_target_ops): Initialize new structure
11363 members.
11364
11365 2015-05-12 Gary Benson <gbenson@redhat.com>
11366
11367 * server.c (handle_qxfer_exec_file): Use current process
11368 if annex is empty.
11369
11370 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11371
11372 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11373 Remove HAVE_PTRACE_GETREGS conditionals.
11374 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11375 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11376
11377 2015-05-08 Yao Qi <yao.qi@linaro.org>
11378
11379 * linux-low.c (linux_supports_conditional_breakpoints): New
11380 function.
11381 (linux_target_ops): Install new target method.
11382 * lynx-low.c (lynx_target_ops): Install NULL hook for
11383 supports_conditional_breakpoints.
11384 * nto-low.c (nto_target_ops): Likewise.
11385 * spu-low.c (spu_target_ops): Likewise.
11386 * win32-low.c (win32_target_ops): Likewise.
11387 * server.c (handle_query): Check
11388 target_supports_conditional_breakpoints.
11389 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11390 New field.
11391 (target_supports_conditional_breakpoints): New macro.
11392
11393 2015-05-06 Pedro Alves <palves@redhat.com>
11394
11395 PR server/18081
11396 * server.c (start_inferior): If the process exits, mourn it.
11397
11398 2015-04-21 Gary Benson <gbenson@redhat.com>
11399
11400 * hostio.c (fileio_open_flags_to_host): Factored out to
11401 fileio_to_host_openflags in common/fileio.c. Single use
11402 updated.
11403
11404 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11405
11406 * linux-xtensa-low.c (xtensa_fill_gregset)
11407 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11408 XCHAL_HAVE_LOOP.
11409
11410 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11411
11412 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11413 (regs_info): Replace usrregs pointer with NULL.
11414
11415 2015-04-17 Gary Benson <gbenson@redhat.com>
11416
11417 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11418 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11419 * server.c (handle_qxfer_exec_file): New function.
11420 (qxfer_packets): Add exec-file entry.
11421 (handle_query): Report qXfer:exec-file:read as supported packet.
11422
11423 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11424
11425 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11426
11427 2015-04-09 Gary Benson <gbenson@redhat.com>
11428
11429 * hostio-errno.c (errno_to_fileio_error): Remove function.
11430 Update caller to use remote_fileio_to_fio_error.
11431
11432 2015-04-09 Yao Qi <yao.qi@linaro.org>
11433
11434 * linux-low.c (linux_insert_point): Call
11435 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11436 (linux_remove_point): Call remove_memory_breakpoint if type is
11437 raw_bkpt_type_sw.
11438 * linux-x86-low.c (x86_insert_point): Don't call
11439 insert_memory_breakpoint.
11440 (x86_remove_point): Don't call remove_memory_breakpoint.
11441
11442 2015-04-01 Pedro Alves <palves@redhat.com>
11443 Cleber Rosa <crosa@redhat.com>
11444
11445 * server.c (gdbserver_usage): Reorganize and extend the usage
11446 message.
11447
11448 2015-03-24 Pedro Alves <palves@redhat.com>
11449
11450 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11451 output. Also dump TRAP_TRACE.
11452 (linux_low_filter_event): In debug output, distinguish a
11453 resume_stop SIGSTOP from a delayed SIGSTOP.
11454
11455 2015-03-24 Gary Benson <gbenson@redhat.com>
11456
11457 * linux-x86-low.c (x86_linux_new_thread): Moved to
11458 nat/x86-linux.c.
11459 (x86_linux_prepare_to_resume): Likewise.
11460
11461 2015-03-24 Gary Benson <gbenson@redhat.com>
11462
11463 * Makefile.in (x86-linux-dregs.o): New rule.
11464 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11465 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11466 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11467 (x86_linux_dr_get): Likewise.
11468 (x86_linux_dr_set): Likewise.
11469 (update_debug_registers_callback): Likewise.
11470 (x86_linux_dr_set_addr): Likewise.
11471 (x86_linux_dr_get_addr): Likewise.
11472 (x86_linux_dr_set_control): Likewise.
11473 (x86_linux_dr_get_control): Likewise.
11474 (x86_linux_dr_get_status): Likewise.
11475 (x86_linux_update_debug_registers): Likewise.
11476
11477 2015-03-24 Gary Benson <gbenson@redhat.com>
11478
11479 * linux-x86-low.c (x86_linux_update_debug_registers):
11480 New function, factored out from...
11481 (x86_linux_prepare_to_resume): ...this.
11482
11483 2015-03-24 Gary Benson <gbenson@redhat.com>
11484
11485 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11486 (x86_linux_dr_set): Likewise.
11487 (update_debug_registers_callback): Likewise.
11488 (x86_linux_dr_set_addr): Likewise.
11489 (x86_linux_dr_get_addr): Likewise.
11490 (x86_linux_dr_set_control): Likewise.
11491 (x86_linux_dr_get_control): Likewise.
11492 (x86_linux_dr_get_status): Likewise.
11493 (x86_linux_prepare_to_resume): Likewise.
11494
11495 2015-03-24 Gary Benson <gbenson@redhat.com>
11496
11497 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11498 Use perror_with_name. Pass string through gettext.
11499 (x86_linux_dr_set): Likewise.
11500
11501 2015-03-24 Gary Benson <gbenson@redhat.com>
11502
11503 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11504 (x86_linux_dr_set_addr): ...this.
11505 (x86_dr_low_get_addr): Rename to...
11506 (x86_linux_dr_get_addr): ...this.
11507 (x86_dr_low_set_control): Rename to...
11508 (x86_linux_dr_set_control): ...this.
11509 (x86_dr_low_get_control): Rename to...
11510 (x86_linux_dr_get_control): ...this.
11511 (x86_dr_low_get_status): Rename to...
11512 (x86_linux_dr_get_status): ...this.
11513 (x86_dr_low): Update with new function names.
11514
11515 2015-03-24 Gary Benson <gbenson@redhat.com>
11516
11517 * Makefile.in (x86-linux.o): New rule.
11518 * configure.srv: Add x86-linux.o to relevant targets.
11519 * linux-low.c (lwp_set_arch_private_info): New function.
11520 (lwp_arch_private_info): Likewise.
11521 * linux-x86-low.c: Include nat/x86-linux.h.
11522 (arch_lwp_info): Removed structure.
11523 (update_debug_registers_callback):
11524 Use lwp_set_debug_registers_changed.
11525 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11526 and lwp_set_debug_registers_changed.
11527 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11528
11529 2015-03-24 Gary Benson <gbenson@redhat.com>
11530
11531 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11532 * linux-arm-low.c (arm_new_thread): Likewise.
11533 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11534 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11535 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11536 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11537
11538 2015-03-24 Gary Benson <gbenson@redhat.com>
11539
11540 * linux-low.c (ptid_of_lwp): New function.
11541 (lwp_is_stopped): Likewise.
11542 (lwp_stop_reason): Likewise.
11543 * linux-x86-low.c (update_debug_registers_callback):
11544 Use lwp_is_stopped.
11545 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11546 lwp_stop_reason.
11547
11548 2015-03-24 Gary Benson <gbenson@redhat.com>
11549
11550 * linux-low.h (linux_stop_lwp): Remove declaration.
11551
11552 2015-03-24 Gary Benson <gbenson@redhat.com>
11553
11554 * linux-low.h: Include nat/linux-nat.h.
11555 * linux-low.c (iterate_over_lwps_args): New structure.
11556 (iterate_over_lwps_filter): New function.
11557 (iterate_over_lwps): Likewise.
11558 * linux-x86-low.c (update_debug_registers_callback):
11559 Update signature to what iterate_over_lwps expects.
11560 Remove PID check that iterate_over_lwps now performs.
11561 (x86_dr_low_set_addr): Use iterate_over_lwps.
11562 (x86_dr_low_set_control): Likewise.
11563
11564 2015-03-24 Gary Benson <gbenson@redhat.com>
11565
11566 * linux-x86-low.c (x86_debug_reg_state): New function.
11567 (x86_linux_prepare_to_resume): Use the above.
11568
11569 2015-03-24 Gary Benson <gbenson@redhat.com>
11570
11571 * linux-low.c (current_lwp_ptid): New function.
11572 * linux-x86-low.c: Include nat/linux-nat.h.
11573 (x86_dr_low_get_addr): Use current_lwp_ptid.
11574 (x86_dr_low_get_control): Likewise.
11575 (x86_dr_low_get_status): Likewise.
11576
11577 2015-03-20 Pedro Alves <palves@redhat.com>
11578
11579 * tracepoint.c (cmd_qtstatus): Make "str" const.
11580
11581 2015-03-20 Pedro Alves <palves@redhat.com>
11582
11583 * server.c (handle_general_set): Make "req_str" const.
11584
11585 2015-03-19 Pedro Alves <palves@redhat.com>
11586
11587 * linux-low.c (linux_resume_one_lwp): Rename to ...
11588 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11589 instead call perror_with_name.
11590 (check_ptrace_stopped_lwp_gone): New function.
11591 (linux_resume_one_lwp): Reimplement as wrapper around
11592 linux_resume_one_lwp_throw that swallows errors if the LWP is
11593 gone.
11594
11595 2015-03-19 Pedro Alves <palves@redhat.com>
11596
11597 * linux-low.c (count_events_callback, select_event_lwp_callback):
11598 No longer check whether the thread has resume_stop as last resume
11599 kind.
11600
11601 2015-03-19 Pedro Alves <palves@redhat.com>
11602
11603 * linux-low.c (count_events_callback, select_event_lwp_callback):
11604 Use the lwp's status_pending_p field, not the thread's.
11605
11606 2015-03-19 Pedro Alves <palves@redhat.com>
11607
11608 * linux-low.c (select_event_lwp_callback): Update comments to
11609 no longer mention SIGTRAP.
11610
11611 2015-03-18 Gary Benson <gbenson@redhat.com>
11612
11613 * server.c (handle_query): Do not report vFile:fstat as supported.
11614
11615 2015-03-11 Gary Benson <gbenson@redhat.com>
11616
11617 * hostio.c (sys/types.h): New include.
11618 (sys/stat.h): Likewise.
11619 (common-remote-fileio.h): Likewise.
11620 (handle_fstat): New function.
11621 (handle_vFile): Handle vFile:fstat packets.
11622
11623 2015-03-11 Gary Benson <gbenson@redhat.com>
11624
11625 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11626 struct stat.st_blocks and struct stat.st_blksize.
11627 * configure: Regenerate.
11628 * config.in: Likewise.
11629 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11630 (OBS): Add common-remote-fileio.o.
11631 (common-remote-fileio.o): New rule.
11632
11633 2015-03-09 Pedro Alves <palves@redhat.com>
11634
11635 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11636 'struct sockaddr' pointer in 'accept' call.
11637
11638 2015-03-09 Pedro Alves <palves@redhat.com>
11639
11640 Revert:
11641 2015-03-07 Pedro Alves <palves@redhat.com>
11642 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11643 or <winsock2.h> here. Instead include "gdb_socket.h".
11644 (remote_open): Use union gdb_sockaddr_u.
11645 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11646 or <winsock2.h> here. Instead include "gdb_socket.h".
11647 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11648 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11649 or <sys/un.h>.
11650 (init_named_socket, gdb_agent_helper_thread): Use union
11651 gdb_sockaddr_u.
11652
11653 2015-03-07 Pedro Alves <palves@redhat.com>
11654
11655 * configure.ac (build_warnings): Move
11656 -Wdeclaration-after-statement to the C-specific set.
11657 * configure: Regenerate.
11658
11659 2015-03-07 Pedro Alves <palves@redhat.com>
11660
11661 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11662 or <winsock2.h> here. Instead include "gdb_socket.h".
11663 (remote_open): Use union gdb_sockaddr_u.
11664 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11665 or <winsock2.h> here. Instead include "gdb_socket.h".
11666 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11667 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11668 or <sys/un.h>.
11669 (init_named_socket, gdb_agent_helper_thread): Use union
11670 gdb_sockaddr_u.
11671
11672 2015-03-07 Pedro Alves <palves@redhat.com>
11673
11674 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11675 instead.
11676
11677 2015-03-06 Yao Qi <yao.qi@linaro.org>
11678
11679 * linux-aarch64-low.c (aarch64_insert_point): Use
11680 show_debug_regs as a boolean.
11681 (aarch64_remove_point): Likewise.
11682
11683 2015-03-05 Pedro Alves <palves@redhat.com>
11684
11685 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11686 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11687 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11688 * nto-low.c (nto_target_ops): Likewise.
11689 * spu-low.c (spu_target_ops): Likewise.
11690 * win32-low.c (win32_target_ops): Likewise.
11691
11692 2015-03-04 Pedro Alves <palves@redhat.com>
11693
11694 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11695 Decide whether a breakpoint triggered based on the SIGTRAP's
11696 siginfo.si_code.
11697 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11698 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11699 (linux_low_filter_event): Check for breakpoints before checking
11700 watchpoints.
11701 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11702 siginfo.si_code.
11703 (linux_stopped_by_sw_breakpoint)
11704 (linux_supports_stopped_by_sw_breakpoint)
11705 (linux_stopped_by_hw_breakpoint)
11706 (linux_supports_stopped_by_hw_breakpoint): New functions.
11707 (linux_target_ops): Install new target methods.
11708
11709 2015-03-04 Pedro Alves <palves@redhat.com>
11710
11711 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11712 * server.c (swbreak_feature, hwbreak_feature): New globals.
11713 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11714 (captured_main): Clear swbreak_feature and hwbreak_feature.
11715 * server.h (swbreak_feature, hwbreak_feature): Declare.
11716 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11717 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11718 supports_stopped_by_hw_breakpoint>: New fields.
11719 (target_supports_stopped_by_sw_breakpoint)
11720 (target_stopped_by_sw_breakpoint)
11721 (target_supports_stopped_by_hw_breakpoint)
11722 (target_stopped_by_hw_breakpoint): Declare.
11723
11724 2015-03-04 Pedro Alves <palves@redhat.com>
11725
11726 enum lwp_stop_reason -> enum target_stop_reason
11727 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11728 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11729 (linux_wait_1, stuck_in_jump_pad_callback)
11730 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11731 (linux_stopped_by_watchpoint):
11732 * linux-low.h (enum lwp_stop_reason): Delete.
11733 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11734 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11735
11736 2015-03-04 Yao Qi <yao.qi@linaro.org>
11737
11738 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11739
11740 2015-03-03 Gary Benson <gbenson@redhat.com>
11741
11742 * hostio.c (handle_vFile): Fix prefix lengths.
11743
11744 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11745
11746 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11747 ptr_bits.
11748
11749 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11750
11751 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11752 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11753 (clean): Add "rm -f" for above C files.
11754 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11755 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11756 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11757 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11758 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11759 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11760 (init_registers_s390x_vx_linux64)
11761 (init_registers_s390x_tevx_linux64)
11762 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11763 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11764 declarations.
11765 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11766 (s390_store_vxrs_high): New functions.
11767 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11768 NT_S390_VXRS_HIGH.
11769 (s390_arch_setup): Add logic for selecting one of the new target
11770 descriptions. Activate the new vector regsets if applicable.
11771 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11772 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11773 and init_registers_s390x_tevx_linux64.
11774
11775 2015-03-01 Pedro Alves <palves@redhat.com>
11776
11777 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11778 parameter.
11779
11780 2015-02-27 Pedro Alves <palves@redhat.com>
11781
11782 * linux-x86-low.c (u_debugreg_offset): New function.
11783 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11784
11785 2015-02-27 Pedro Alves <palves@redhat.com>
11786
11787 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11788 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11789 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11790 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11791 (ps_lsetfpregs, ps_getpid)
11792 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11793 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11794 (ps_lsetxregs, ps_plog): Declare.
11795
11796 2015-02-27 Pedro Alves <palves@redhat.com>
11797
11798 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11799 IP_AGENT_EXPORT_FUNC.
11800 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11801 IP_AGENT_EXPORT_FUNC.
11802 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11803 (IP_AGENT_EXPORT): Delete.
11804 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11805 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11806 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11807 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11808 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11809 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11810 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11811 (traceframe_read_count, traceframe_write_count)
11812 (traceframes_created, trace_state_variables, get_raw_reg)
11813 (get_trace_state_variable_value, set_trace_state_variable_value)
11814 (ust_loaded, helper_thread_id, cmd_buf): Use
11815 IPA_SYM_EXPORTED_NAME.
11816 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11817 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11818 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11819 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11820 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11821 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11822 EXTERN_C_PUSH/EXTERN_C_POP.
11823 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11824 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11825 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11826 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11827 (traceframe_write_count, traceframe_read_count)
11828 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11829 (about_to_request_buffer_space, get_trace_state_variable_value)
11830 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11831 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11832 EXTERN_C_PUSH/EXTERN_C_POP.
11833 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11834 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11835 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11836 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11837 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11838 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11839 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11840 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11841 Define.
11842 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11843 (IP_AGENT_EXPORT_VAR_DECL): Define.
11844 (tracing): Declare.
11845 (gdb_agent_get_raw_reg): Declare.
11846
11847 2015-02-27 Tom Tromey <tromey@redhat.com>
11848 Pedro Alves <palves@redhat.com>
11849
11850 Rename symbols whose names are reserved C++ keywords throughout.
11851
11852 2015-02-27 Pedro Alves <palves@redhat.com>
11853
11854 * Makefile.in (COMPILER): New, get it from autoconf.
11855 (CXX): Get from autoconf instead.
11856 (COMPILE.pre): Use COMPILER.
11857 (CC-LD): Rename to ...
11858 (CC_LD): ... this. Use COMPILER.
11859 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11860 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11861 * acinclude.m4: Include build-with-cxx.m4.
11862 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11863 Disable -Werror by default if building in C++ mode.
11864 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11865 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11866 the C++ compiler. Save/restore CXXFLAGS too.
11867 * configure: Regenerate.
11868
11869 2015-02-27 Pedro Alves <palves@redhat.com>
11870
11871 * acinclude.m4: Include libiberty.m4.
11872 * configure.ac: Call libiberty_INIT.
11873 * config.in, configure: Regenerate.
11874
11875 2015-02-26 Pedro Alves <palves@redhat.com>
11876
11877 * linux-low.c (linux_wait_1): When incrementing the PC past a
11878 program breakpoint always use the_low_target.breakpoint_len as
11879 increment, rather than the maximum between that and
11880 the_low_target.decr_pc_after_break.
11881
11882 2015-02-23 Pedro Alves <palves@redhat.com>
11883
11884 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11885 thread was doing a step-over; always adjust the PC if
11886 we stepped over a permanent breakpoint.
11887 (linux_wait_1): If we stepped over breakpoint that was on top of a
11888 permanent breakpoint, manually advance the PC past it.
11889
11890 2015-02-23 Pedro Alves <palves@redhat.com>
11891
11892 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11893 modes.
11894 (x86_fill_gregset, x86_store_gregset): Use it when handling
11895 $orig_eax.
11896
11897 2015-02-20 Pedro Alves <palves@redhat.com>
11898
11899 * thread-db.c: Include "nat/linux-procfs.h".
11900 (thread_db_init): Skip listing new threads if the kernel supports
11901 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11902
11903 2015-02-20 Pedro Alves <palves@redhat.com>
11904
11905 * linux-low.c (status_pending_p_callback): Use ptid_match.
11906
11907 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11908
11909 PR breakpoints/16812
11910 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11911 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11912 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11913
11914 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11915
11916 PR breakpoints/15956
11917 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11918
11919 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11920
11921 * linux-low.c (linux_low_btrace_conf): Print size.
11922 * server.c (handle_btrace_conf_general_set): New.
11923 (hanle_general_set): Call handle_btrace_conf_general_set.
11924 (handle_query): Report Qbtrace-conf:bts:size as supported.
11925
11926 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11927
11928 * linux-low.c (linux_low_enable_btrace): Update parameters.
11929 (linux_low_btrace_conf): New.
11930 (linux_target_ops)<to_btrace_conf>: Initialize.
11931 * server.c (current_btrace_conf): New.
11932 (handle_btrace_enable): Rename to ...
11933 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11934 to target_enable_btrace. Update comment. Update users.
11935 (handle_qxfer_btrace_conf): New.
11936 (qxfer_packets): Add btrace-conf entry.
11937 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11938 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11939 (target_ops)<read_btrace_conf>: New.
11940 (target_enable_btrace): Update parameters.
11941 (target_read_btrace_conf): New.
11942
11943 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11944
11945 * server.c (handle_btrace_general_set): Remove call to
11946 target_supports_btrace.
11947 (supported_btrace_packets): New.
11948 (handle_query): Call supported_btrace_packets.
11949 * target.h: include btrace-common.h.
11950 (btrace_target_info): Removed.
11951 (supports_btrace, target_supports_btrace): Update parameters.
11952
11953 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11954
11955 * Makefile.in (SFILES): Add common/btrace-common.c.
11956 (OBS): Add common/btrace-common.o.
11957 (btrace-common.o): Add build rules.
11958 * linux-low: Include btrace-common.h.
11959 (linux_low_read_btrace): Use struct btrace_data. Call
11960 btrace_data_init and btrace_data_fini.
11961
11962 2015-02-06 Pedro Alves <palves@redhat.com>
11963
11964 * thread-db.c (find_new_threads_callback): Add debug output.
11965
11966 2015-02-04 Pedro Alves <palves@redhat.com>
11967
11968 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11969 (resume_stopped_resumed_lwps): New function.
11970 (linux_wait_for_event_filtered): Use it.
11971
11972 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11973
11974 * Makefile.in (SFILES): Add linux-personality.c.
11975 (linux-personality.o): New rule.
11976 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11977 list of objects to be built.
11978 * linux-low.c: Include nat/linux-personality.h.
11979 (linux_create_inferior): Remove code to disable address space
11980 randomization (moved to ../nat/linux-personality.c). Create
11981 cleanup to disable address space randomization.
11982
11983 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11984
11985 * Makefile.in (posix-strerror.o): New rule.
11986 (mingw-strerror.o): Likewise.
11987 * configure: Regenerated.
11988 * configure.ac: Source file ../common/common.host. Initialize new
11989 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11990
11991 2015-01-14 Yao Qi <yao@codesourcery.com>
11992
11993 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11994 (ppc-linux.o): New rule.
11995 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11996 * configure.ac: AC_CHECK_FUNCS(getauxval).
11997 * config.in: Re-generated.
11998 * configure: Re-generated.
11999 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
12000 ppc64_64bit_inferior_p
12001
12002 2015-01-14 Yao Qi <yao@codesourcery.com>
12003
12004 * linux-ppc-low.c: Include "nat/ppc-linux.h".
12005 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
12006 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
12007 (PT_ORIG_R3, PT_TRAP): Likewise.
12008 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
12009 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
12010 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
12011
12012 2015-01-10 Joel Brobecker <brobecker@adacore.com>
12013
12014 * i387-fp.c (i387_cache_to_xsave): In look over
12015 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
12016 zmmh_low_space field by use of zmmh_high_space.
12017
12018 2015-01-09 Pedro Alves <palves@redhat.com>
12019
12020 * linux-low.c (step_over_bkpt): Move higher up in the file.
12021 (handle_extended_wait): Don't store the stop_pc here.
12022 (get_stop_pc): Adjust comments and rename to ...
12023 (check_stopped_by_breakpoint): ... this. Record whether the LWP
12024 stopped for a software breakpoint or hardware breakpoint.
12025 (thread_still_has_status_pending_p): New function.
12026 (status_pending_p_callback): Use
12027 thread_still_has_status_pending_p. If the event is no longer
12028 interesting, resume the LWP.
12029 (handle_tracepoints): Add assert.
12030 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
12031 (wstatus_maybe_breakpoint): New function.
12032 (cancel_breakpoint): Delete function.
12033 (check_stopped_by_watchpoint): New function, factored out from
12034 linux_low_filter_event.
12035 (lp_status_maybe_breakpoint): Delete function.
12036 (linux_low_filter_event): Remove filter_ptid argument.
12037 Leave thread group exits pending here. Store the LWP's stop PC.
12038 Always leave events pending.
12039 (linux_wait_for_event_filtered): Pull all events out of the
12040 kernel, and leave them all pending.
12041 (count_events_callback, select_event_lwp_callback): Consider all
12042 events.
12043 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
12044 (select_event_lwp): Only give preference to the stepping LWP in
12045 all-stop mode. Adjust comments.
12046 (ignore_event): New function.
12047 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
12048 references to cancel_breakpoints. Adjust to renames. Also give
12049 equal priority to all LWPs that have had events in non-stop mode.
12050 If reporting a software breakpoint event, unadjust the LWP's PC.
12051 (linux_wait): If linux_wait_1 returned an ignored event, retry.
12052 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
12053 Adjust.
12054 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
12055 (resume_status_pending_p): Use thread_still_has_status_pending_p.
12056 (linux_stopped_by_watchpoint): Adjust.
12057 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
12058 * linux-low.h (enum lwp_stop_reason): New.
12059 (struct lwp_info) <stop_pc>: Adjust comment.
12060 <stopped_by_watchpoint>: Delete field.
12061 <stop_reason>: New field.
12062 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
12063 * mem-break.c (software_breakpoint_inserted_here)
12064 (hardware_breakpoint_inserted_here): New function.
12065 * mem-break.h (software_breakpoint_inserted_here)
12066 (hardware_breakpoint_inserted_here): Declare.
12067 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
12068 (cancel_breakpoints): Delete.
12069 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
12070 (upload_fast_traceframes): Remove references to
12071 cancel_breakpoints.
12072
12073 2015-01-09 Pedro Alves <palves@redhat.com>
12074
12075 * thread-db.c (find_new_threads_callback): Ignore thread if the
12076 kernel thread ID is -1.
12077
12078 2015-01-09 Pedro Alves <palves@redhat.com>
12079
12080 * linux-low.c (linux_attach_fail_reason_string): Move to
12081 nat/linux-ptrace.c, and rename.
12082 (linux_attach_lwp): Update comment.
12083 (attach_proc_task_lwp_callback): New function.
12084 (linux_attach): Adjust to rename and use
12085 linux_proc_attach_tgid_threads.
12086 (linux_attach_fail_reason_string): Delete declaration.
12087
12088 2015-01-01 Joel Brobecker <brobecker@adacore.com>
12089
12090 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
12091 * server.c (gdbserver_version): Likewise.
12092
12093 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
12094
12095 * remote-utils.c: Include ctype.h.
12096 (input_interrupt): Explicitly handle the case when the char
12097 received is the NUL byte. Improve the printing of non-ASCII
12098 characters.
12099
12100 2014-12-16 Joel Brobecker <brobecker@adacore.com>
12101
12102 * linux-low.c (linux_low_filter_event): Update call to
12103 linux_enable_event_reporting following the addition of
12104 a new parameter to that function.
12105
12106 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
12107
12108 PR server/17457
12109 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
12110 (AARCH64_FPCR_REGNO): Likewise.
12111 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
12112 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
12113 (aarch64_store_fpregset): Likewise.
12114
12115 2014-12-15 Joel Brobecker <brobecker@adacore.com>
12116
12117 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
12118 Remove FIXME comment about assumption about N.
12119
12120 2014-12-13 Joel Brobecker <brobecker@adacore.com>
12121
12122 * configure.ac: If large-file support is disabled in GDBserver,
12123 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
12124 * configure: Regenerate.
12125
12126 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12127
12128 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
12129 warning upon ENODATA from ptrace.
12130 * linux-s390-low.c (s390_store_tdb): New.
12131 (s390_regsets): Add regset for NT_S390_TDB.
12132
12133 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12134
12135 * linux-low.c (regsets_store_inferior_registers): Skip regsets
12136 without a fill_function.
12137 * linux-s390-low.c (s390_fill_last_break): Remove.
12138 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
12139 (s390_arch_setup): Use regset's size instead of fill_function for
12140 loop end condition.
12141
12142 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12143
12144 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
12145 the regset's store function when ptrace returned an error.
12146 * regcache.c (get_thread_regcache): Invalidate register cache
12147 before fetching inferior's registers.
12148
12149 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12150
12151 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
12152 while-loop as for-loop.
12153 (regsets_store_inferior_registers): Likewise.
12154
12155 2014-11-28 Yao Qi <yao@codesourcery.com>
12156
12157 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
12158 * config.in, configure: Re-generate.
12159 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
12160 is defined.
12161
12162 2014-11-21 Yao Qi <yao@codesourcery.com>
12163
12164 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12165 (AC_CHECK_HEADERS): Remove malloc.h.
12166 * configure: Re-generated.
12167 * config.in: Re-generated.
12168 * server.h: Don't include alloca.h and malloc.h.
12169 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12170 Don't include malloc.h.
12171
12172 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12173
12174 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12175 corresponding ERRNO check in same block.
12176
12177 2014-11-12 Pedro Alves <palves@redhat.com>
12178
12179 * server.c (cont_thread): Update comment.
12180 (start_inferior, attach_inferior): No longer clear cont_thread.
12181 (handle_v_cont): No longer set cont_thread.
12182 (captured_main): Clear cont_thread each time a GDB connects.
12183
12184 2014-11-12 Pedro Alves <palves@redhat.com>
12185
12186 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12187 thread, and don't resume all threads if the Hc thread has exited.
12188
12189 2014-11-12 Pedro Alves <palves@redhat.com>
12190
12191 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12192 the process group instead of to a specific LWP.
12193
12194 2014-10-15 Pedro Alves <palves@redhat.com>
12195
12196 PR server/17487
12197 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12198 parameter.
12199 (arm_set_thread_context): Delete.
12200 (the_low_target): Adjust.
12201 * win32-i386-low.c (debug_registers_changed)
12202 (debug_registers_used): Delete.
12203 (update_debug_registers_callback): New function.
12204 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12205 needing to update their debug registers.
12206 (win32_get_current_dr): New function.
12207 (x86_dr_low_get_addr, x86_dr_low_get_control)
12208 (x86_dr_low_get_status): Fetch the debug register from the thread
12209 record's context.
12210 (i386_initial_stuff): Adjust.
12211 (i386_get_thread_context): Remove current_event parameter. Don't
12212 clear debug_registers_changed nor copy DR values to
12213 debug_reg_state.
12214 (i386_set_thread_context): Delete.
12215 (i386_prepare_to_resume): New function.
12216 (i386_thread_added): Mark the thread as needing to update irs
12217 debug registers.
12218 (the_low_target): Remove i386_set_thread_context and install
12219 i386_prepare_to_resume.
12220 * win32-low.c (win32_get_thread_context): Adjust.
12221 (win32_set_thread_context): Use SetThreadContext
12222 directly.
12223 (win32_prepare_to_resume): New function.
12224 (win32_require_context): New function, factored out from ...
12225 (thread_rec): ... this.
12226 (continue_one_thread): Call win32_prepare_to_resume on each thread
12227 we're about to continue.
12228 (win32_resume): Call win32_prepare_to_resume on the event thread.
12229 * win32-low.h (struct win32_thread_info)
12230 <debug_registers_changed>: New field.
12231 (struct win32_target_ops): Change prototype of set_thread_context,
12232 delete set_thread_context and add prepare_to_resume.
12233 (win32_require_context): New declaration.
12234
12235 2014-10-08 Gary Benson <gbenson@redhat.com>
12236
12237 * server.h: Do not include common-exceptions.h.
12238
12239 2014-10-08 Gary Benson <gbenson@redhat.com>
12240
12241 * server.h: Do not include cleanups.h.
12242
12243 2014-09-30 James Hogan <james.hogan@imgtec.com>
12244
12245 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12246 mips64-dsp-linux.c.
12247
12248 2014-09-23 Yao Qi <yao@codesourcery.com>
12249
12250 * linux-low.c (lp_status_maybe_breakpoint): New function.
12251 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12252 (count_events_callback): Likewise.
12253 (select_event_lwp_callback): Likewise.
12254 (cancel_breakpoints_callback): Likewise.
12255
12256 2014-09-19 Don Breazeal <donb@codesourcery.com>
12257
12258 * linux-low.c (handle_extended_wait): Call
12259 linux_ptrace_get_extended_event.
12260 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12261 linux_is_extended_waitstatus.
12262
12263 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12264
12265 * Makefile.in (CPPFLAGS): Define.
12266 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12267 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12268
12269 2014-09-16 Gary Benson <gbenson@redhat.com>
12270
12271 * inferiors.h (current_inferior): Renamed as...
12272 (current_thread): New variable. All uses updated.
12273 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12274 (maybe_move_out_of_jump_pad): Likewise.
12275 (cancel_breakpoint): Likewise.
12276 (linux_low_filter_event): Likewise.
12277 (wait_for_sigstop): Likewise.
12278 (linux_resume_one_lwp): Likewise.
12279 (need_step_over_p): Likewise.
12280 (start_step_over): Likewise.
12281 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12282 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12283 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12284 and save_inferior as saved_thread.
12285 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12286 saved_thread.
12287 (regcache_invalidate_thread): Likewise.
12288 * remote-utils.c (prepare_resume_reply): Likewise.
12289 * thread-db.c (thread_db_get_tls_address): Likewise.
12290 (disable_thread_event_reporting): Likewise.
12291 (remove_thread_event_breakpoints): Likewise.
12292 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12293 as saved_thread.
12294 * target.h (set_desired_inferior): Renamed as...
12295 (set_desired_thread): New declaration. All uses updated.
12296 * server.c (myresume): Updated comment to reference thread instead
12297 of inferior.
12298 (handle_serial_event): Likewise.
12299 (handle_target_event): Likewise.
12300
12301 2014-09-12 Tom Tromey <tromey@redhat.com>
12302 Gary Benson <gbenson@redhat.com>
12303
12304 * regcache.h: Include common-regcache.h.
12305 (regcache_read_pc): Don't declare.
12306 * regcache.c (get_thread_regcache_for_ptid): New function.
12307
12308 2014-09-11 Tom Tromey <tromey@redhat.com>
12309 Gary Benson <gbenson@redhat.com>
12310
12311 * symbol.c: New file.
12312 * Makefile.in (SFILES): Add symbol.c.
12313 (OBS): Add symbol.o.
12314
12315 2014-09-11 Gary Benson <gbenson@redhat.com>
12316
12317 * target.c (target_stop_ptid, target_continue_ptid): New
12318 functions.
12319
12320 2014-09-11 Tom Tromey <tromey@redhat.com>
12321 Gary Benson <gbenson@redhat.com>
12322
12323 * target.h: Include target/target.h.
12324 * target.c (target_read_memory, target_read_uint32)
12325 (target_write_memory): New functions.
12326
12327 2014-09-11 Gary Benson <gbenson@redhat.com>
12328
12329 * server.h (debug_hw_points): Don't declare.
12330 * server.c (debug_hw_points): Don't define. Replace all uses
12331 with show_debug_regs.
12332 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12333 all uses with show_debug_regs.
12334
12335 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12336
12337 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12338 endianness into account.
12339 (ppc_supply_ptrace_register): Likewise.
12340
12341 2014-09-03 James Hogan <james.hogan@imgtec.com>
12342
12343 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12344 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12345
12346 2014-09-03 Gary Benson <gbenson@redhat.com>
12347
12348 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12349 ALL_DEBUG_ADDRESS_REGISTERS.
12350
12351 2014-09-02 Gary Benson <gbenson@redhat.com>
12352
12353 * i386-low.h: Renamed as...
12354 * x86-low.h: New file. All type, function and variable name
12355 prefixes changed from "i386_" to "x86_". All references updated.
12356 * i386-low.c: Renamed as...
12357 * x86-low.c: New file. All type, function and variable name
12358 prefixes changed from "i386_" to "x86_". All references updated.
12359
12360 2014-09-02 Gary Benson <gbenson@redhat.com>
12361
12362 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12363 (x86_linux_new_thread): Likewise.
12364
12365 2014-08-29 Gary Benson <gbenson@redhat.com>
12366
12367 * server.h (setjmp.h): Do not include.
12368 (toplevel): Do not declare.
12369 (common-exceptions.h): Include.
12370 (cleanups.h): Likewise.
12371 * server.c (toplevel): Do not define.
12372 (exit_code): New static global.
12373 (detach_or_kill_for_exit_cleanup): New function.
12374 (main): New function. Original main renamed to...
12375 (captured_main): New function.
12376 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12377
12378 2014-08-29 Gary Benson <gbenson@redhat.com>
12379
12380 * Makefile.in (SFILES): Add common/common-exceptions.c.
12381 (OBS): Add common-exceptions.o.
12382 (common-exceptions.o): New rule.
12383 * utils.c (prepare_to_throw_exception): New function.
12384
12385 2014-08-29 Gary Benson <gbenson@redhat.com>
12386
12387 * config.in: Regenerate.
12388 * configure: Likewise.
12389
12390 2014-08-29 Gary Benson <gbenson@redhat.com>
12391
12392 * Makefile.in (SFILES): Add common/cleanups.c.
12393 (OBS): cleanups.o.
12394 (cleanups.o): New rule.
12395
12396 2014-08-29 Gary Benson <gbenson@redhat.com>
12397
12398 * utils.c (internal_vwarning): New function.
12399
12400 2014-08-28 Gary Benson <gbenson@redhat.com>
12401
12402 * utils.h (fatal): Remove declaration.
12403 * utils.c (fatal): Remove function.
12404
12405 2014-08-28 Gary Benson <gbenson@redhat.com>
12406
12407 * tracepoint.c (gdb_agent_init): Replace fatal with
12408 perror_with_name.
12409 (initialize_tracepoint): Likewise.
12410
12411 2014-08-28 Gary Benson <gbenson@redhat.com>
12412
12413 * remote-utils.c (remote_prepare): Replace fatal with error.
12414
12415 2014-08-28 Gary Benson <gbenson@redhat.com>
12416
12417 * linux-low.c (linux_async): Replace fatal with warning.
12418 Tidy up and return.
12419 (linux_start_non_stop): Return -1 if linux_async failed.
12420
12421 2014-08-28 Gary Benson <gbenson@redhat.com>
12422
12423 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12424 gdb_assert.
12425 (i386_dr_low_get_addr): Remove vague comment.
12426 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12427 gdb_assert.
12428
12429 2014-08-28 Gary Benson <gbenson@redhat.com>
12430
12431 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12432 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12433 internal_error.
12434 (linux_resume_one_lwp): Likewise.
12435 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12436 gdb_assert.
12437 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12438 with internal_error.
12439 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12440 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12441 (find_register_by_name): Replace fatal with internal_error.
12442 (find_regno): Likewise.
12443 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12444 * thread-db.c (thread_db_create_event): Likewise.
12445 (thread_db_load_search): Likewise.
12446 (try_thread_db_load_1): Likewise.
12447 * tracepoint.c (get_jump_space_head): Replace fatal with
12448 internal_error.
12449 (claim_trampoline_space): Likewise.
12450 (have_fast_tracepoint_trampoline_buffer): Likewise.
12451 (cmd_qtstart): Likewise.
12452 (stop_tracing): Likewise.
12453 (fast_tracepoint_collecting): Likewise.
12454 (target_malloc): Likewise.
12455 (download_tracepoint): Likewise.
12456 (download_trace_state_variables): Replace check with gdb_assert.
12457 (upload_fast_traceframes): Replace fatal with internal_error.
12458
12459 2014-08-19 Tom Tromey <tromey@redhat.com>
12460 Gary Benson <gbenson@redhat.com>
12461
12462 * Makefile.in (SFILES): Add common/common-debug.c.
12463 (OBS): Add common-debug.o.
12464 (common-debug.o): New rule.
12465 * debug.h (debug_printf): Don't declare.
12466 * debug.c (debug_printf): Renamed and rewritten as...
12467 (debug_vprintf): New function.
12468
12469 2014-08-19 Gary Benson <gbenson@redhat.com>
12470
12471 * utils.h: Do not include print-utils.h.
12472
12473 2014-08-19 Tom Tromey <tromey@redhat.com>
12474 Gary Benson <gbenson@redhat.com>
12475
12476 * server.h: Add static assertion.
12477 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12478
12479 2014-08-19 Tom Tromey <tromey@redhat.com>
12480 Gary Benson <gbenson@redhat.com>
12481
12482 * Makefile.in (SFILES): Add common/errors.c.
12483 (OBS): Add errors.o.
12484 (IPA_OBS): Add errors-ipa.o.
12485 (errors.o): New rule.
12486 (errors-ipa.o): Likewise.
12487 * utils.h (perror_with_name, error, warning): Don't declare.
12488 * utils.c (warning): Renamed and rewritten as...
12489 (vwarning): New function.
12490 (error): Renamed and rewritten as...
12491 (verror): New function.
12492 (internal_error): Renamed and rewritten as...
12493 (internal_verror): New function.
12494
12495 2014-08-07 Gary Benson <gbenson@redhat.com>
12496
12497 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12498 * configure: Regenerate.
12499 * config.in: Likewise.
12500 * server.h: Do not include errno.h.
12501 * event-loop.c: Likewise.
12502 * hostio-errno.c: Likewise.
12503 * linux-low.c: Likewise.
12504 * remote-utils.c: Likewise.
12505 * spu-low.c: Likewise.
12506 * utils.c: Likewise.
12507 * gdbreplay.c: Unconditionally include errno.h.
12508
12509 2014-08-07 Gary Benson <gbenson@redhat.com>
12510
12511 * server.h: Do not include string.h.
12512 * event-loop.c: Likewise.
12513 * linux-low.c: Likewise.
12514 * regcache.c: Likewise.
12515 * remote-utils.c: Likewise.
12516 * spu-low.c: Likewise.
12517 * utils.c: Likewise.
12518
12519 2014-08-07 Gary Benson <gbenson@redhat.com>
12520
12521 * server.h: Do not include gdb_assert.h.
12522
12523 2014-08-07 Gary Benson <gbenson@redhat.com>
12524
12525 * server.h: Do not include common-utils.h.
12526
12527 2014-08-07 Gary Benson <gbenson@redhat.com>
12528
12529 * server.h: Do not include ptid.h.
12530 * notif.h: Likewise.
12531
12532 2014-08-07 Gary Benson <gbenson@redhat.com>
12533
12534 * server.h: Do not include gdb_locale.h.
12535
12536 2014-08-07 Gary Benson <gbenson@redhat.com>
12537
12538 * server.h: Do not include gdb/signals.h.
12539 * win32-low.c: Likewise.
12540
12541 2014-08-07 Gary Benson <gbenson@redhat.com>
12542
12543 * server.h: Do not include pathmax.h.
12544
12545 2014-08-07 Gary Benson <gbenson@redhat.com>
12546
12547 * server.h: Do not include libiberty.h.
12548 * linux-bfin-low.c: Likewise.
12549
12550 2014-08-07 Gary Benson <gbenson@redhat.com>
12551
12552 * server.h: Do not include ansidecl.h.
12553
12554 2014-08-07 Gary Benson <gbenson@redhat.com>
12555
12556 * linux-x86-low.c: Do not include stddef.h.
12557 * lynx-ppc-low.c: Likewise.
12558 * tracepoint.c: Likewise.
12559
12560 2014-08-07 Gary Benson <gbenson@redhat.com>
12561
12562 * server.h: Do not include stdarg.h.
12563 * nto-low.c: Likewise.
12564
12565 2014-08-07 Gary Benson <gbenson@redhat.com>
12566
12567 * server.h: Do not include stdlib.h.
12568 * inferiors.c: Likewise.
12569 * linux-low.c: Likewise.
12570 * regcache.c: Likewise.
12571 * spu-low.c: Likewise.
12572 * tracepoint.c: Likewise.
12573 * utils.c: Likewise.
12574
12575 2014-08-07 Gary Benson <gbenson@redhat.com>
12576
12577 * server.h: Do not include stdio.h.
12578 * linux-low.c: Likewise.
12579 * remote-utils.c: Likewise.
12580 * spu-low.c: Likewise.
12581 * utils.c: Likewise.
12582 * wincecompat.c: Likewise.
12583
12584 2014-08-06 Gary Benson <gbenson@redhat.com>
12585
12586 * regcache.c (init_register_cache): Move conditionals inside if.
12587
12588 2014-08-06 Gary Benson <gbenson@redhat.com>
12589
12590 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12591
12592 2014-07-31 Gary Benson <gbenson@redhat.com>
12593
12594 * ax.h: Do not include server.h.
12595 * gdbthread.h: Likewise.
12596 * lynx-low.h: Likewise.
12597 * notif.h: Likewise.
12598
12599 2014-07-30 Gary Benson <gbenson@redhat.com>
12600
12601 * server.h: Include common-defs.h.
12602 Do not include config.h or build-gnulib-gdbserver/config.h.
12603
12604 2014-07-30 Gary Benson <gbenson@redhat.com>
12605
12606 * hostio-errno.c: Move server.h to top of includes list.
12607 * inferiors.c: Likewise.
12608 * linux-x86-low.c: Likewise.
12609 * notif.c: Include server.h.
12610
12611 2014-07-24 Tom Tromey <tromey@redhat.com>
12612 Gary Benson <gbenson@redhat.com>
12613
12614 * server.h (CORE_ADDR): Now unsigned.
12615
12616 2014-07-16 Pedro Alves <palves@redhat.com>
12617
12618 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12619
12620 2014-07-15 Pedro Alves <palves@redhat.com>
12621
12622 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12623 copy.
12624
12625 2014-07-11 Pedro Alves <palves@redhat.com>
12626
12627 * linux-low.c (kill_wait_lwp): New function, based on
12628 kill_one_lwp_callback, but use my_waitpid directly.
12629 (kill_one_lwp_callback, linux_kill): Use it.
12630
12631 2014-06-23 Pedro Alves <palves@redhat.com>
12632
12633 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12634 before setting DR0..DR3.
12635
12636 2014-06-20 Gary Benson <gbenson@redhat.com>
12637
12638 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12639 * configure: Regenerated.
12640 * config.in: Likewise.
12641
12642 2014-06-20 Gary Benson <gbenson@redhat.com>
12643
12644 * Makefile.in (SFILES): Update locations for files moved
12645 from common to nat.
12646 (object file files): Reordered.
12647
12648 2014-06-20 Gary Benson <gbenson@redhat.com>
12649
12650 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12651 (i386_dr_low_set_addr): Likewise.
12652 (i386_dr_low_get_addr): Likewise.
12653 (i386_dr_low_can_set_control): Likewise.
12654 (i386_dr_low_set_control): Likewise.
12655 (i386_dr_low_get_control): Likewise.
12656 (i386_dr_low_get_status): Likewise.
12657 (i386_get_debug_register_length): Likewise.
12658 * linux-x86-low.c (i386_dr_low_set_addr):
12659 Changed signature. Made static.
12660 (i386_dr_low_get_addr): Likewise.
12661 (i386_dr_low_set_control): Likewise.
12662 (i386_dr_low_get_control): Likewise.
12663 (i386_dr_low_get_status): Likewise.
12664 (i386_dr_low): New global variable.
12665 * win32-i386-low.c (i386_dr_low_set_addr):
12666 Changed signature. Made static.
12667 (i386_dr_low_get_addr): Likewise.
12668 (i386_dr_low_set_control): Likewise.
12669 (i386_dr_low_get_control): Likewise.
12670 (i386_dr_low_get_status): Likewise.
12671 (i386_dr_low): New global variable.
12672
12673 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12674
12675 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12676 * Makefile.in (AR, AR_FLAGS): Define.
12677 * configure: Regenerate.
12678
12679 2014-06-19 Gary Benson <gbenson@redhat.com>
12680
12681 * Makefile.in (i386-dregs.o): New rule.
12682 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12683 * i386-low.c (target.h): Remove include.
12684 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12685 (DR_CONTROL_SHIFT): Likewise.
12686 (DR_CONTROL_SIZE): Likewise.
12687 (DR_RW_EXECUTE): Likewise.
12688 (DR_RW_WRITE): Likewise.
12689 (DR_RW_READ): Likewise.
12690 (DR_RW_IORW): Likewise.
12691 (DR_LEN_1): Likewise.
12692 (DR_LEN_2): Likewise.
12693 (DR_LEN_4): Likewise.
12694 (DR_LEN_8): Likewise.
12695 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12696 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12697 (DR_ENABLE_SIZE): Likewise.
12698 (DR_LOCAL_SLOWDOWN): Likewise.
12699 (DR_GLOBAL_SLOWDOWN): Likewise.
12700 (DR_CONTROL_RESERVED): Likewise.
12701 (I386_DR_CONTROL_MASK): Likewise.
12702 (I386_DR_VACANT): Likewise.
12703 (I386_DR_LOCAL_ENABLE): Likewise.
12704 (I386_DR_GLOBAL_ENABLE): Likewise.
12705 (I386_DR_DISABLE): Likewise.
12706 (I386_DR_SET_RW_LEN): Likewise.
12707 (I386_DR_GET_RW_LEN): Likewise.
12708 (I386_DR_WATCH_HIT): Likewise.
12709 (i386_wp_op_t): Likewise.
12710 (i386_show_dr): Likewise.
12711 (i386_length_and_rw_bits): Likewise.
12712 (i386_insert_aligned_watchpoint): Likewise.
12713 (i386_remove_aligned_watchpoint): Likewise.
12714 (i386_handle_nonaligned_watchpoint): Likewise.
12715 i386_update_inferior_debug_regs(): Likewise.
12716 (i386_dr_insert_watchpoint): Likewise.
12717 (i386_dr_remove_watchpoint): Likewise.
12718 (i386_dr_region_ok_for_watchpoint): Likewise.
12719 (i386_dr_stopped_data_address): Likewise.
12720 (i386_dr_stopped_by_watchpoint): Likewise.
12721
12722 2014-06-19 Gary Benson <gbenson@redhat.com>
12723
12724 * i386-low.c (i386_dr_show): Renamed to
12725 i386_show_dr and made static. All uses updated.
12726 (i386_dr_length_and_rw_bits): Renamed to
12727 i386_length_and_rw_bits and made static.
12728 All uses updated.
12729 (i386_dr_insert_aligned_watchpoint): Renamed to
12730 i386_insert_aligned_watchpoint and made static.
12731 All uses updated.
12732 (i386_dr_remove_aligned_watchpoint): Renamed to
12733 i386_remove_aligned_watchpoint and made static.
12734 All uses updated.
12735 (i386_dr_update_inferior_debug_regs): Renamed to
12736 i386_update_inferior_debug_regs and made static.
12737 All uses updated.
12738
12739 2014-06-18 Gary Benson <gbenson@redhat.com>
12740
12741 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12742 (i386_dr_low_can_set_control): Likewise.
12743 (i386_get_debug_register_length): Likewise.
12744 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12745 (i386_dr_low_can_set_control): Likewise.
12746 (i386_get_debug_register_length): Likewise.
12747
12748 2014-06-17 Gary Benson <gbenson@redhat.com>
12749
12750 * i386-low.h (i386-dregs.h): New include.
12751 (DR_FIRSTADDR): Now in i386-dregs.h.
12752 (DR_LASTADDR): Likewise.
12753 (DR_NADDR): Likewise.
12754 (DR_STATUS): Likewise.
12755 (DR_CONTROL): Likewise.
12756 (i386_debug_reg_state): Likewise.
12757 (i386_dr_insert_watchpoint): Likewise.
12758 (i386_dr_remove_watchpoint): Likewise.
12759 (i386_dr_region_ok_for_watchpoint): Likewise.
12760 (i386_dr_stopped_data_address): Likewise.
12761 (i386_dr_stopped_by_watchpoint): Likewise.
12762 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12763
12764 2014-06-18 Gary Benson <gbenson@redhat.com>
12765
12766 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12767 i386_dr_insert_watchpoint.
12768 (i386_low_remove_watchpoint): Renamed to
12769 i386_dr_remove_watchpoint.
12770 (i386_low_region_ok_for_watchpoint): Renamed to
12771 i386_dr_region_ok_for_watchpoint.
12772 (i386_low_stopped_data_address): Renamed to
12773 i386_dr_stopped_data_address.
12774 (i386_low_stopped_by_watchpoint): Renamed to
12775 i386_dr_stopped_by_watchpoint.
12776 * i386-low.c (i386_show_dr): Renamed to
12777 i386_dr_show and made nonstatic. All uses updated.
12778 (i386_length_and_rw_bits): Renamed to
12779 i386_dr_length_and_rw_bits and made nonstatic.
12780 All uses updated.
12781 (i386_insert_aligned_watchpoint): Renamed to
12782 i386_dr_insert_aligned_watchpoint and made nonstatic.
12783 All uses updated.
12784 (i386_remove_aligned_watchpoint): Renamed to
12785 i386_dr_remove_aligned_watchpoint and made nonstatic.
12786 All uses updated.
12787 (i386_update_inferior_debug_regs): Renamed to
12788 i386_dr_update_inferior_debug_regs and made nonstatic.
12789 All uses updated.
12790 (i386_low_insert_watchpoint): Renamed to
12791 i386_dr_insert_watchpoint. All uses updated.
12792 (i386_low_remove_watchpoint): Renamed to
12793 i386_dr_remove_watchpoint. All uses updated.
12794 (i386_low_region_ok_for_watchpoint): Renamed to
12795 i386_dr_region_ok_for_watchpoint. All uses updated.
12796 (i386_low_stopped_data_address): Renamed to
12797 i386_dr_stopped_data_address. All uses updated.
12798 (i386_low_stopped_by_watchpoint): Renamed to
12799 i386_dr_stopped_by_watchpoint. All uses updated.
12800
12801 2014-06-18 Gary Benson <gbenson@redhat.com>
12802
12803 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12804 (i386_dr_low_can_set_control): Likewise.
12805 (i386_insert_aligned_watchpoint): New check.
12806
12807 2014-06-18 Gary Benson <gbenson@redhat.com>
12808
12809 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12810 Renamed to state.
12811
12812 2014-06-18 Gary Benson <gbenson@redhat.com>
12813
12814 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12815 instead of fatal and error.
12816 (i386_handle_nonaligned_watchpoint): Likewise.
12817
12818 2014-06-18 Gary Benson <gbenson@redhat.com>
12819
12820 * i386-low.c (i386_get_debug_register_length): New macro.
12821 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12822 (i386_show_dr): Use debug_printf instead of fprintf. Use
12823 phex to format values.
12824
12825 2014-06-18 Gary Benson <gbenson@redhat.com>
12826
12827 * i386-low.h: Comment changes.
12828 * i386-low.c: Likewise.
12829
12830 2014-06-18 Gary Benson <gbenson@redhat.com>
12831
12832 * i386-low.c: Whitespace changes.
12833
12834 2014-06-12 Tom Tromey <tromey@redhat.com>
12835
12836 * utils.c (freeargv): Remove.
12837
12838 2014-06-12 Tom Tromey <tromey@redhat.com>
12839
12840 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12841 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12842 (parse_debug_format_options): Likewise.
12843 (gdbserver_usage): Likewise.
12844 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12845 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12846 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12847 against libiberty.
12848 ($(LIBGNU)): Depend on libiberty.
12849 (all-lib): Recurse into all subdirs.
12850 (install-only): Invoke "install" target in subdirs.
12851 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12852 targets.
12853 * configure: Rebuild.
12854 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12855 for vasprintf, vsnprintf, or gettimeofday.
12856 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12857 srv_tgtobj.
12858
12859 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12860
12861 * development.sh: Delete.
12862 * Makefile.in (config.status): Adjust dependency on development.sh.
12863 * configure.ac: Adjust development.sh source call.
12864 * configure: Regenerate.
12865
12866 2014-06-02 Pedro Alves <palves@redhat.com>
12867
12868 * ax.c (gdb_free_agent_expr): New function.
12869 * ax.h (gdb_free_agent_expr): New declaration.
12870 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12871 list.
12872 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12873 static.
12874 (clear_breakpoint_conditions_and_commands): New function.
12875 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12876 (clear_breakpoint_conditions_and_commands): New declaration.
12877
12878 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12879
12880 * linux-aarch64-low.c (asm/ptrace.h): Include.
12881
12882 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12883
12884 Fix TLS access for -static -pthread.
12885 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12886 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12887 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12888
12889 2014-05-20 Pedro Alves <palves@redhat.com>
12890
12891 * linux-aarch64-low.c (aarch64_insert_point)
12892 (aarch64_remove_point): No longer check whether the type is
12893 supported here. Adjust to new interface.
12894 (the_low_target): Install aarch64_supports_z_point_type as
12895 supports_z_point_type method.
12896 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12897 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12898 instead of a Z packet char. Adjust.
12899 (arm_supports_z_point_type): New function.
12900 (arm_insert_point, arm_remove_point): Adjust to new interface.
12901 (the_low_target): Install arm_supports_z_point_type.
12902 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12903 (cris_insert_point, cris_remove_point): Adjust to new interface.
12904 Don't check whether the type is supported here.
12905 (the_low_target): Install cris_supports_z_point_type.
12906 * linux-low.c (linux_supports_z_point_type): New function.
12907 (linux_insert_point, linux_remove_point): Adjust to new interface.
12908 * linux-low.h (struct linux_target_ops) <insert_point,
12909 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12910 raw_breakpoint pointer parameter.
12911 <supports_z_point_type>: New method.
12912 * linux-mips-low.c (mips_supports_z_point_type): New function.
12913 (mips_insert_point, mips_remove_point): Adjust to new interface.
12914 Use mips_supports_z_point_type.
12915 (the_low_target): Install mips_supports_z_point_type.
12916 * linux-ppc-low.c (the_low_target): Install NULL as
12917 supports_z_point_type method.
12918 * linux-s390-low.c (the_low_target): Install NULL as
12919 supports_z_point_type method.
12920 * linux-sparc-low.c (the_low_target): Install NULL as
12921 supports_z_point_type method.
12922 * linux-x86-low.c (x86_supports_z_point_type): New function.
12923 (x86_insert_point): Adjust to new insert_point interface. Use
12924 insert_memory_breakpoint. Adjust to new
12925 i386_low_insert_watchpoint interface.
12926 (x86_remove_point): Adjust to remove_point interface. Use
12927 remove_memory_breakpoint. Adjust to new
12928 i386_low_remove_watchpoint interface.
12929 (the_low_target): Install x86_supports_z_point_type.
12930 * lynx-low.c (lynx_target_ops): Install NULL as
12931 supports_z_point_type callback.
12932 * nto-low.c (nto_supports_z_point_type): New.
12933 (nto_insert_point, nto_remove_point): Adjust to new interface.
12934 (nto_target_ops): Install nto_supports_z_point_type.
12935 * mem-break.c: Adjust intro comment.
12936 (struct raw_breakpoint) <raw_type, size>: New fields.
12937 <inserted>: Update comment.
12938 <shlib_disabled>: Delete field.
12939 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12940 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12941 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12942 (raw_bkpt_type_to_target_hw_bp_type): New function.
12943 (find_enabled_raw_code_breakpoint_at): New function.
12944 (find_raw_breakpoint_at): New type and size parameters. Use them.
12945 (insert_memory_breakpoint): New function, based off
12946 set_raw_breakpoint_at.
12947 (remove_memory_breakpoint): New function.
12948 (set_raw_breakpoint_at): Reimplement.
12949 (set_breakpoint): New, based on set_breakpoint_at.
12950 (set_breakpoint_at): Reimplement.
12951 (delete_raw_breakpoint): Go through the_target->remove_point
12952 instead of assuming memory breakpoints.
12953 (find_gdb_breakpoint_at): Delete.
12954 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12955 (find_gdb_breakpoint): New function.
12956 (set_gdb_breakpoint_at): Delete.
12957 (z_type_supported): New function.
12958 (set_gdb_breakpoint_1): New function, loosely based off
12959 set_gdb_breakpoint_at.
12960 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12961 (delete_gdb_breakpoint_at): Delete.
12962 (delete_gdb_breakpoint_1): New function, loosely based off
12963 delete_gdb_breakpoint_at.
12964 (delete_gdb_breakpoint): New function.
12965 (clear_gdb_breakpoint_conditions): Rename to ...
12966 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12967 breakpoint.
12968 (add_condition_to_breakpoint): Make static.
12969 (add_breakpoint_condition): Take a struct breakpoint pointer
12970 instead of an address. Adjust.
12971 (gdb_condition_true_at_breakpoint): Rename to ...
12972 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12973 z_type parameter.
12974 (gdb_condition_true_at_breakpoint): Reimplement.
12975 (add_breakpoint_commands): Take a struct breakpoint pointer
12976 instead of an address. Adjust.
12977 (gdb_no_commands_at_breakpoint): Rename to ...
12978 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12979 parameter. Return true if no breakpoint was found. Change debug
12980 output.
12981 (gdb_no_commands_at_breakpoint): Reimplement.
12982 (run_breakpoint_commands): Rename to ...
12983 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12984 and change return type to boolean.
12985 (run_breakpoint_commands): New function.
12986 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12987 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12988 breakpoint. Go through the_target->remove_point instead of
12989 assuming memory breakpoint.
12990 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12991 software and hardware breakpoints.
12992 (reinsert_raw_breakpoint): Go through the_target->insert_point
12993 instead of assuming memory breakpoint.
12994 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12995 software and hardware breakpoints.
12996 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12997 Check both software and hardware breakpoints.
12998 (validate_inserted_breakpoint): Assert the breakpoint is a
12999 software breakpoint. Set the inserted flag to -1 instead of
13000 setting shlib_disabled.
13001 (delete_disabled_breakpoints): Adjust.
13002 (validate_breakpoints): Only validate software breakpoints.
13003 Adjust to inserted flag change.
13004 (check_mem_read, check_mem_write): Skip breakpoint types other
13005 than software breakpoints. Adjust to inserted flag change.
13006 * mem-break.h (enum raw_bkpt_type): New enum.
13007 (raw_breakpoint, struct process_info): Forward declare.
13008 (Z_packet_to_target_hw_bp_type): Delete declaration.
13009 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
13010 (set_gdb_breakpoint, delete_gdb_breakpoint)
13011 (clear_breakpoint_conditions): New declarations.
13012 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
13013 (breakpoint_inserted_here): Update comment.
13014 (add_breakpoint_condition, add_breakpoint_commands): Replace
13015 address parameter with a breakpoint pointer parameter.
13016 (gdb_breakpoint_here): Update comment.
13017 (delete_gdb_breakpoint_at): Delete.
13018 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
13019 * server.c (process_point_options): Take a struct breakpoint
13020 pointer instead of an address. Adjust.
13021 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
13022 delete_gdb_breakpoint.
13023 * spu-low.c (spu_target_ops): Install NULL as
13024 supports_z_point_type method.
13025 * target.h: Include mem-break.h.
13026 (struct target_ops) <prepare_to_access_memory>: Update comment.
13027 <supports_z_point_type>: New field.
13028 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13029 instead of a char. Also take a raw breakpoint pointer.
13030 * win32-arm-low.c (the_low_target): Install NULL as
13031 supports_z_point_type.
13032 * win32-i386-low.c (i386_supports_z_point_type): New function.
13033 (i386_insert_point, i386_remove_point): Adjust to new interface.
13034 (the_low_target): Install i386_supports_z_point_type.
13035 * win32-low.c (win32_supports_z_point_type): New function.
13036 (win32_insert_point, win32_remove_point): Adjust to new interface.
13037 (win32_target_ops): Install win32_supports_z_point_type.
13038 * win32-low.h (struct win32_target_ops):
13039 <supports_z_point_type>: New method.
13040 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13041 instead of a char. Also take a raw breakpoint pointer.
13042
13043 2014-05-20 Pedro Alves <palves@redhat.com>
13044
13045 * mem-break.h: Include break-common.h.
13046 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13047 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
13048 (Z_packet_to_target_hw_bp_type): New declaration.
13049 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
13050 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
13051 (Z_PACKET_ACCESS_WP): Delete macros.
13052 (Z_packet_to_hw_type): Delete function.
13053 * i386-low.h: Don't include break-common.h here.
13054 (Z_packet_to_hw_type): Delete declaration.
13055 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
13056 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13057 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
13058 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13059 * linux-aarch64-low.c: Don't include break-common.h here.
13060 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13061 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
13062 (Z_packet_to_target_hw_bp_type): Delete function.
13063 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
13064 function.
13065 (mips_insert_point, mips_remove_point): Use
13066 Z_packet_to_target_hw_bp_type.
13067
13068 2014-05-20 Pedro Alves <palves@redhat.com>
13069
13070 * linux-aarch64-low.c: Include break-common.h.
13071 (enum target_point_type): Delete.
13072 (Z_packet_to_point_type): Rename to ...
13073 (Z_packet_to_target_hw_bp_type): ... this, and return a
13074 target_hw_bp_type instead.
13075 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
13076 instead of an enum target_point_type.
13077 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
13078 breakpoint type.
13079 (aarch64_dr_state_insert_one_point)
13080 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
13081 (aarch64_handle_aligned_watchpoint)
13082 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
13083 Take an enum target_hw_bp_type instead of an enum
13084 target_point_type.
13085 (aarch64_supports_z_point_type): New function.
13086 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
13087 use Z_packet_to_target_hw_bp_type.
13088
13089 2014-05-20 Joel Brobecker <brobecker@adacore.com>
13090
13091 * configure.ac: Only use -Werror by default when DEVELOPMENT
13092 is true.
13093 * configure: Regenerate.
13094
13095 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
13096
13097 Fix gdbserver qGetTLSAddr for x86_64 -m32.
13098 * linux-x86-low.c (X86_64_USER_REGS): New.
13099 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
13100
13101 2014-04-28 Yao Qi <yao@codesourcery.com>
13102
13103 * Makefile.in (i386-avx512.c): Fix the typo of generated file
13104 name.
13105
13106 2014-04-25 Pedro Alves <palves@redhat.com>
13107
13108 PR server/16255
13109 * linux-low.c (linux_attach_fail_reason_string): New function.
13110 (linux_attach_lwp): Delete.
13111 (linux_attach_lwp_1): Rename to ...
13112 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
13113 argument. Remove "initial" parameter. Return int instead of
13114 void. Don't error or warn here.
13115 (linux_attach): Adjust to call linux_attach_lwp. Call error on
13116 failure to attach to the tgid. Call warning when failing to
13117 attach to an lwp.
13118 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
13119 argument. Remove "initial" parameter. Return int instead of
13120 void. Don't error or warn here.
13121 (linux_attach_fail_reason_string): New declaration.
13122 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
13123 interface change. Use linux_attach_fail_reason_string.
13124
13125 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
13126 Walfred Tedeschi <walfred.tedeschi@intel.com>
13127
13128 * Makefile.in: Added rules to handle new files
13129 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
13130 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
13131 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
13132 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
13133 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
13134 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
13135 x32-avx512-linux.o.
13136 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
13137 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
13138 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
13139 i386/x32-avx512.xml.
13140 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
13141 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
13142 i386/x32-avx512-linux.xml.
13143 * i387-fp.c (num_avx512_k_registers): New constant for number
13144 of K registers.
13145 (num_avx512_zmmh_low_registers): New constant for number of
13146 lower ZMM registers (0-15).
13147 (num_avx512_zmmh_high_registers): New constant for number of
13148 higher ZMM registers (16-31).
13149 (num_avx512_ymmh_registers): New contant for number of higher
13150 YMM registers (ymm16-31 added by avx521 on x86_64).
13151 (num_avx512_xmm_registers): New constant for number of higher
13152 XMM registers (xmm16-31 added by AVX512 on x86_64).
13153 (struct i387_xsave): Add space for AVX512 registers.
13154 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
13155 Add code to handle AVX512 registers.
13156 (i387_xsave_to_cache): Add code to handle AVX512 registers.
13157 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
13158 prototypei from generated file.
13159 (tdesc_amd64_avx512_linux): Likewise.
13160 (init_registers_x32_avx512_linux): Likewise.
13161 (tdesc_x32_avx512_linux): Likewise.
13162 (init_registers_i386_avx512_linux): Likewise.
13163 (tdesc_i386_avx512_linux): Likewise.
13164 (x86_64_regmap): Add AVX512 registers.
13165 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13166 mask.
13167 (initialize_low_arch): Add code to initialize AVX512 registers.
13168
13169 2014-04-23 Pedro Alves <palves@redhat.com>
13170
13171 * mem-break.c (find_gdb_breakpoint_at): Make static.
13172 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13173
13174 2014-04-23 Pedro Alves <palves@redhat.com>
13175
13176 * i386-low.c: Don't include break-common.h here.
13177 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13178 prototype to take target_hw_bp_type as argument instead of a Z
13179 packet char.
13180 * i386-low.h: Include break-common.h here.
13181 (Z_packet_to_hw_type): Declare.
13182 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13183 prototypes.
13184 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13185 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13186 (x86_remove_point): Convert the packet number to a
13187 target_hw_bp_type before calling i386_low_remove_watchpoint.
13188 * win32-i386-low.c (i386_insert_point): Convert the packet number
13189 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13190 (i386_remove_point): Convert the packet number to a
13191 target_hw_bp_type before calling i386_low_remove_watchpoint.
13192
13193 2014-04-23 Pedro Alves <palves@redhat.com>
13194
13195 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13196
13197 2014-04-10 Pedro Alves <palves@redhat.com>
13198
13199 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13200 Check if the condition or command is NULL before checking if the
13201 breakpoint is known. On success, return true.
13202 * mem-break.h (add_breakpoint_condition): Document return.
13203 (add_breakpoint_commands): Add describing comment.
13204 * server.c (skip_to_semicolon): New function.
13205 (process_point_options): Use it.
13206
13207 2014-04-09 Pedro Alves <palves@redhat.com>
13208
13209 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13210 to lwpid_of.
13211
13212 2014-02-27 Pedro Alves <palves@redhat.com>
13213
13214 PR 12702
13215 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13216 macros.
13217 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13218 output.
13219 (last_thread_of_process_p): Take a PID argument instead of a
13220 thread pointer.
13221 (linux_wait_for_lwp): Delete.
13222 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13223 functions.
13224 (linux_low_filter_event): New function, party factored out from
13225 linux_wait_for_event.
13226 (linux_wait_for_event): Rename to ...
13227 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13228 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13229 sigsuspend. Check for zombie leaders.
13230 (linux_wait_for_event): Reimplement as wrapper around
13231 linux_wait_for_event_filtered.
13232 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13233 a normal or signal exit is seen, it's the whole process exiting.
13234 (wait_for_sigstop): No longer a for_each_inferior callback.
13235 Rewrite on top of linux_wait_for_event_filtered.
13236 (stop_all_lwps): Call wait_for_sigstop directly.
13237 * server.c (resume, handle_target_event): Handle
13238 TARGET_WAITKIND_NO_RESUMED.
13239
13240 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13241
13242 * win32-low.c (psapi_get_dll_name,
13243 * win32_CreateToolhelp32Snapshot): Delete.
13244 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13245 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13246 Delete.
13247 (handle_load_dll): Add function description.
13248 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13249
13250 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13251
13252 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13253 Add comment.
13254 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13255 base address when calling win32_add_one_solib.
13256 (handle_load_dll): Delete local variable load_addr.
13257 Remove 0x1000 offset applied to DLL base address when calling
13258 win32_add_one_solib.
13259 (handle_unload_dll): Add comment.
13260
13261 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13262
13263 * win32-low.c (win32_add_all_dlls): Renames
13264 win32_ensure_ntdll_loaded. Rewrite function documentation.
13265 Adjust implementation to always load all DLLs.
13266 Add 0x1000 offset to DLL base address when calling
13267 win32_add_one_solib.
13268 (child_initialization_done): New static global.
13269 (do_initial_child_stuff): Set child_initialization_done to
13270 zero during child initialization, and 1 after. Replace call
13271 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13272 Add comment.
13273 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13274 (handle_unload_dll): Add function documentation.
13275 (get_child_debug_event): Ignore load and unload DLL events
13276 during child initialization.
13277
13278 2014-02-20 Doug Evans <dje@google.com>
13279
13280 Remove global all_lwps.
13281 * inferiors.h (ptid_of): Move here from linux-low.h.
13282 (pid_of, lwpid_of): Ditto.
13283 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13284 parameter is a struct thread_info * now.
13285 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13286 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13287 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13288 directly.
13289 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13290 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13291 * linux-arm-low.c (update_registers_callback): Update, "entry"
13292 parameter is a struct thread_info * now.
13293 Fetch lwpid from current_inferior directly.
13294 (arm_insert_point): Pass &all_threads to find_inferior instead of
13295 &all_lwps.
13296 (arm_remove_point): Ditto.
13297 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13298 (arm_prepare_to_resume): Fetch pid from thread.
13299 (arm_read_description): Fetch lwpid from current_inferior directly.
13300 * linux-low.c (all_lwps): Delete.
13301 (delete_lwp): Delete call to remove_inferior.
13302 (handle_extended_wait): Fetch lwpid from thread.
13303 (add_lwp): Don't set lwp->entry.id. Remove call to
13304 add_inferior_to_list.
13305 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13306 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13307 (kill_one_lwp_callback): Ditto.
13308 (linux_kill): Don't dereference NULL pointer.
13309 Fetch ptid,lwpid from thread.
13310 (get_detach_signal): Fetch ptid from thread.
13311 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13312 Simplify call to regcache_invalidate_thread.
13313 (delete_lwp_callback): Update, "entry" parameter is a
13314 struct thread_info * now. Fetch pid from thread.
13315 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13316 (status_pending_p_callback): Update, "entry" parameter is a
13317 struct thread_info * now. Fetch ptid from thread.
13318 (find_lwp_pid): Update, "entry" parameter is a
13319 struct thread_info * now.
13320 (linux_wait_for_lwp): Fetch pid from thread.
13321 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13322 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13323 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13324 (dequeue_one_deferred_signal): Ditto.
13325 (cancel_breakpoint): Fetch ptid from current_inferior.
13326 (linux_wait_for_event): Pass &all_threads to find_inferior,
13327 not &all_lwps. Fetch ptid, lwpid from thread.
13328 (count_events_callback): Update, "entry" parameter is a
13329 struct thread_info * now.
13330 (select_singlestep_lwp_callback): Ditto.
13331 (select_event_lwp_callback): Ditto.
13332 (cancel_breakpoints_callback): Ditto.
13333 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13334 not &all_lwps.
13335 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13336 (unsuspend_one_lwp): Update, "entry" parameter is a
13337 struct thread_info * now.
13338 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13339 not &all_lwps.
13340 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13341 Fetch lwpid from thread, not lwp.
13342 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13343 Pass &all_threads to find_inferior, not &all_lwps.
13344 (send_sigstop): Fetch lwpid from thread, not lwp.
13345 (send_sigstop_callback): Update, "entry" parameter is a
13346 struct thread_info * now.
13347 (suspend_and_send_sigstop_callback): Ditto.
13348 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13349 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13350 struct thread_info * now.
13351 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13352 from thread, lwp.
13353 (lwp_running): Update, "entry" parameter is a
13354 struct thread_info * now.
13355 (stop_all_lwps): Fetch ptid from thread.
13356 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13357 (linux_resume_one_lwp): Fetch lwpid from thread.
13358 (linux_set_resume_request): Update, "entry" parameter is a
13359 struct thread_info * now. Fetch pid, lwpid from thread.
13360 (resume_status_pending_p): Update, "entry" parameter is a
13361 struct thread_info * now.
13362 (need_step_over_p): Ditto. Fetch lwpid from thread.
13363 (start_step_over): Fetch lwpid from thread.
13364 (linux_resume_one_thread): Update, "entry" parameter is a
13365 struct thread_info * now. Fetch lwpid from thread.
13366 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13367 (proceed_one_lwp): Update, "entry" parameter is a
13368 struct thread_info * now. Fetch lwpid from thread.
13369 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13370 struct thread_info * now.
13371 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13372 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13373 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13374 directly.
13375 (regsets_store_inferior_registers): Ditto.
13376 (fetch_register, store_register): Ditto.
13377 (linux_read_memory, linux_write_memory): Ditto.
13378 (linux_request_interrupt): Ditto.
13379 (linux_read_auxv): Ditto.
13380 (linux_xfer_siginfo): Ditto.
13381 (linux_qxfer_spu): Ditto.
13382 (linux_qxfer_libraries_svr4): Ditto.
13383 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13384 moved to inferiors.h.
13385 (get_lwp): Delete.
13386 (get_thread_lwp): Update.
13387 (struct lwp_info): Delete member "entry". Simplify comment for
13388 member "thread".
13389 (all_lwps): Delete.
13390 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13391 current_inferior directly.
13392 (update_watch_registers_callback): Update, "entry" parameter is a
13393 struct thread_info * now. Fetch pid from thread.
13394 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13395 (mips_insert_point): Fetch lwpid from current_inferior.
13396 Pass &all_threads to find_inferior, not &all_lwps.
13397 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13398 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13399 directly.
13400 (mips_stopped_data_address): Ditto.
13401 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13402 directly.
13403 * linux-tile-low.c (tile_arch_setup): Ditto.
13404 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13405 (update_debug_registers_callback): Update, "entry" parameter is a
13406 struct thread_info * now. Fetch pid from thread.
13407 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13408 Pass &all_threads to find_inferior, not &all_lwps.
13409 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13410 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13411 Pass &all_threads to find_inferior, not &all_lwps.
13412 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13413 (i386_dr_low_get_status): Ditto.
13414 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13415 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13416 (x86_linux_read_description): Ditto.
13417 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13418
13419 2014-02-20 Doug Evans <dje@google.com>
13420
13421 * inferiors.c (get_first_inferior): Fix buglet.
13422
13423 2014-02-19 Doug Evans <dje@google.com>
13424
13425 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13426 * inferiors.c (add_thread): Change result type to struct thread_info *.
13427 All callers updated.
13428 (add_lwp): Call add_thread here instead of in callers.
13429 All callers updated.
13430 * linux-low.h (get_lwp_thread): Rewrite.
13431 (struct lwp_info): New member "thread".
13432
13433 2014-02-19 Doug Evans <dje@google.com>
13434
13435 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13436 All callers updated.
13437
13438 2014-02-19 Doug Evans <dje@google.com>
13439
13440 * inferiors.c (add_thread): Fix whitespace.
13441
13442 2014-02-19 Doug Evans <dje@google.com>
13443
13444 * dll.c (clear_dlls): Replace accessing list implemention details
13445 with API function.
13446 * gdbthread.h (get_first_thread): Declare.
13447 * inferiors.c (for_each_inferior_with_data): New function.
13448 (get_first_thread): New function.
13449 (find_thread_ptid): Simplify.
13450 (get_first_inferior): New function.
13451 (clear_list): Delete.
13452 (one_inferior_p): New function.
13453 (clear_inferior_list): New function.
13454 (clear_inferiors): Update.
13455 * inferiors.h (for_each_inferior_with_data): Declare.
13456 (clear_inferior_list): Declare.
13457 (one_inferior_p): Declare.
13458 (get_first_inferior): Declare.
13459 * linux-low.c (linux_wait_for_event): Replace accessing list
13460 implemention details with API function.
13461 * server.c (target_running): Ditto.
13462 (accumulate_file_name_length): New function.
13463 (emit_dll_description): New function.
13464 (handle_qxfer_libraries): Replace accessing list implemention
13465 details with API function.
13466 (handle_qxfer_threads_worker): New function.
13467 (handle_qxfer_threads_proper): Replace accessing list implemention
13468 details with API function.
13469 (handle_query): Ditto.
13470 (visit_actioned_threads_callback_ftype): New typedef.
13471 (visit_actioned_threads_data): New struct.
13472 (visit_actioned_threads): Rewrite to be find_inferior callback.
13473 (resume): Call find_inferior.
13474 (handle_status): Replace accessing list implemention
13475 details with API function.
13476 (process_serial_event): Replace accessing list implemention details
13477 with API function.
13478 * target.c (set_desired_inferior): Replace accessing list implemention
13479 details with API function.
13480 * tracepoint.c (same_process_p): New function.
13481 (gdb_agent_about_to_close): Replace accessing list implemention
13482 details with API function.
13483 * win32-low.c (child_delete_thread): Replace accessing list
13484 implemention details with API function.
13485 (match_dll_by_basename): New function.
13486 (dll_is_loaded_by_basename): New function.
13487 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13488 details call to dll_is_loaded_by_basename.
13489
13490 2014-02-19 Doug Evans <dje@google.com>
13491
13492 * dll.h (struct dll_info): Add comment.
13493 * gdbthread.h (struct thread_info): Add comment.
13494 (current_ptid): Simplify.
13495 * inferiors.c (add_process): Update.
13496 (remove_process): Update.
13497 * inferiors.h (struct process_info): Rename member "head" to "entry".
13498 * linux-low.c (delete_lwp): Update.
13499 (add_lwp): Update.
13500 (last_thread_of_process_p): Update.
13501 (kill_one_lwp_callback, linux_kill): Update.
13502 (status_pending_p_callback): Update.
13503 (wait_for_sigstop): Update. Simplify read of ptid.
13504 (start_step_over): Update.
13505 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13506 (get_lwp_thread): Update.
13507 (struct lwp_info): Rename member "head" to "entry".
13508 * regcache.h (inferior_list_entry): Delete.
13509 * server.c (kill_inferior_callback): Update.
13510 (detach_or_kill_inferior_callback): Update.
13511 (print_started_pid): Update.
13512 (print_attached_pid): Update.
13513 (process_serial_event): Simplify read of ptid.
13514 * thread-db.c (thread_db_create_event): Update.
13515 (thread_db_get_tls_address): Update.
13516 * win32-low.c (current_inferior_ptid): Simplify.
13517
13518 2014-02-19 Tom Tromey <tromey@redhat.com>
13519
13520 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13521 argument.
13522 (target_supports_btrace): Update.
13523
13524 2014-02-14 Yao Qi <yao@codesourcery.com>
13525
13526 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13527 (rsp-low-ipa.o): New target.
13528
13529 2014-02-12 Tom Tromey <tromey@redhat.com>
13530
13531 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13532 convert_ascii_to_int.
13533 * regcache.c (registers_to_string): Likewise.
13534 * remote-utils.c (decode_M_packet): Likewise.
13535 * server.c (process_serial_event): Likewise.
13536
13537 2014-02-12 Tom Tromey <tromey@redhat.com>
13538
13539 * server.c (handle_query, handle_v_run): Use hex2bin, not
13540 unhexify.
13541 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13542
13543 2014-02-12 Tom Tromey <tromey@redhat.com>
13544
13545 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13546 convert_int_to_ascii.
13547 * regcache.c (registers_to_string, collect_register_as_string):
13548 Likewise.
13549 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13550 Likewise.
13551 * server.c (process_serial_event): Likewise.
13552 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13553 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13554
13555 2014-02-12 Tom Tromey <tromey@redhat.com>
13556
13557 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13558 bin2hex, not hexify.
13559 * tracepoint.c (cmd_qtstatus): Likewise.
13560
13561 2014-02-12 Tom Tromey <tromey@redhat.com>
13562
13563 * remote-utils.c (monitor_output): Pass explicit length to
13564 hexify.
13565
13566 2014-02-12 Tom Tromey <tromey@redhat.com>
13567
13568 * tracepoint.c: Include rsp-low.h.
13569 * server.c: Include rsp-low.h.
13570 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13571 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13572 declare.
13573 * remote-utils.c: Include rsp-low.h.
13574 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13575 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13576 (convert_int_to_ascii, convert_ascii_to_int): Move to
13577 common/rsp-low.c.
13578 * regcache.c: Include rsp-low.h.
13579 * ax.c: Include rsp-low.h.
13580 * Makefile.in (SFILES): Add common/rsp-low.c.
13581 (OBS): Add rsp-low.o.
13582 (rsp-low.o): New target.
13583
13584 2014-02-12 Tom Tromey <tromey@redhat.com>
13585
13586 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13587 Include print-utils.h.
13588 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13589 (plongest, thirty_two, phex_nz): Remove.
13590 * Makefile.in (SFILES): Add common/print-utils.c.
13591 (OBS): Add print-utils.o.
13592 (print-utils-ipa.o): New target.
13593 (print-utils.o): New target.
13594 (IPA_OBJS): Add print-utils-ipa.o.
13595
13596 2014-02-06 Tom Tromey <tromey@redhat.com>
13597
13598 * Makefile.in (SFILES): Fix indentation.
13599
13600 2014-02-05 Doug Evans <dje@google.com>
13601
13602 * linux-low.c (linux_wait_for_event): Improve comment.
13603 (linux_wait_1): Keep current_inferior in sync with event_child.
13604
13605 2014-01-22 Doug Evans <dje@google.com>
13606
13607 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13608
13609 2014-01-22 Doug Evans <dje@google.com>
13610
13611 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13612 * configure: Regenerate.
13613 * config.in: Regenerate.
13614 * Makefile.in (SFILES): Add debug.c.
13615 (OBS): Add debug.o.
13616 * debug.c: New file.
13617 * debug.h: New file.
13618 * linux-aarch64-low.c (*): Update all debugging printfs to use
13619 debug_printf instead of fprintf.
13620 * linux-arm-low.c (*): Ditto.
13621 * linux-cris-low.c (*): Ditto.
13622 * linux-crisv32-low.c (*): Ditto.
13623 * linux-m32r-low.c (*): Ditto.
13624 * linux-sparc-low.c (*): Ditto.
13625 * linux-x86.c (*): Ditto.
13626 * linux-low.c (*): Ditto.
13627 (linux_wait_1): Add calls to debug_enter, debug_exit.
13628 (linux_wait): Remove redundant debugging printf.
13629 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13630 (linux_resume, unstop_all_lwps): Ditto.
13631 * mem-break.c (*): Update all debugging printfs to use
13632 debug_printf instead of fprintf.
13633 * remote-utils.c (*): Ditto.
13634 * thread-db.c (*): Ditto.
13635 * server.c #include <ctype.h>, "gdb_vecs.h".
13636 (debug_threads): Moved to debug.c.
13637 (*): Update all debugging printfs to use debug_printf instead of
13638 fprintf.
13639 (start_inferior): Replace call to fflush with call to debug_flush.
13640 (monitor_show_help): Mention set debug-format.
13641 (parse_debug_format_options): New function.
13642 (handle_monitor_command): Handle "monitor set debug-format".
13643 (gdbserver_usage): Mention --debug-format.
13644 (main): Parse --debug-format.
13645 * server.h (debug_threads): Declaration moved to debug.h.
13646 #include "debug.h".
13647 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13648 trace_debug_1 that uses debug_printf.
13649 (tracepoint_look_up_symbols): Update all debugging printfs to use
13650 debug_printf instead of fprintf.
13651
13652 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13653
13654 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13655 sys/ptrace.h.
13656
13657 2014-01-17 Pedro Alves <palves@redhat.com>
13658
13659 PR build/16445
13660 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13661 defined after including gdb_proc_service.h.
13662
13663 2014-01-16 Doug Evans <dje@google.com>
13664
13665 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13666 (match_dll): Use it.
13667
13668 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13669
13670 * target.h (target_ops) <read_btrace>: Change parameters and
13671 return type to allow error reporting.
13672 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13673 trace reading errors on.
13674 * linux-low.c (linux_low_read_btrace): Pass trace reading
13675 errors on.
13676 (linux_low_disable_btrace): New.
13677
13678 2014-01-15 Doug Evans <dje@google.com>
13679
13680 * inferiors.c (thread_id_to_gdb_id): Delete.
13681 * inferiors.h (thread_id_to_gdb_id): Delete.
13682
13683 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13684
13685 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13686 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13687 versions.
13688
13689 2014-01-08 Pedro Alves <palves@redhat.com>
13690
13691 * server.c (handle_status): Don't discard previous queued stop
13692 replies or thread's pending status here.
13693 (main) <disconnection>: Do it here instead.
13694
13695 2014-01-08 Pedro Alves <palves@redhat.com>
13696
13697 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13698 * server.c (visit_actioned_threads, handle_pending_status): New
13699 function.
13700 (handle_v_cont): Factor out parts to ...
13701 (resume): ... this new function. If in all-stop, and a thread
13702 being resumed has a pending status, report it without actually
13703 resuming.
13704 (myresume): Adjust to use the new 'resume' function.
13705 (clear_pending_status_callback, set_pending_status_callback)
13706 (find_status_pending_thread_callback): New functions.
13707 (handle_status): Handle the case of multiple threads having
13708 interesting statuses to report. Report threads' real last signal
13709 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13710 with an interesting thread to report the status for, instead of
13711 always reporting the status of the first thread.
13712
13713 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13714
13715 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13716 * gdbreplay.c (gdbreplay_version): Likewise.
13717
13718 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13719
13720 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13721 iov.iov_len with the real length in use.
13722
13723 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13724
13725 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13726 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13727 for all targets that use win32-low.c.
13728 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13729 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13730
13731 2013-12-13 Pedro Alves <palves@redhat.com>
13732
13733 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13734 if equal to TARGET_WAITKIND_LOADED.
13735 * win32-low.c (cached_status): New static global.
13736 (win32_wait): Add declaration.
13737 (do_initial_child_stuff): Flush all initial pending debug events
13738 up to the initial breakpoint.
13739 (win32_wait): If CACHED_STATUS was set, return that instead
13740 of doing a real wait. Remove the code resuming the execution
13741 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13742 during the initial phase. Also remove the code changing
13743 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13744 TARGET_WAITKIND_STOPPED.
13745
13746 2013-12-11 Yao Qi <yao@codesourcery.com>
13747
13748 * notif.c (handle_notif_ack): Return 0 if no notification
13749 matches.
13750
13751 2013-11-20 Doug Evans <dje@google.com>
13752
13753 * linux-low.c (linux_set_resume_request): Fix comment.
13754
13755 2013-11-20 Doug Evans <dje@google.com>
13756
13757 * linux-low.c (resume_status_pending_p): Tweak comment.
13758
13759 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13760
13761 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13762 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13763 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13764 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13765 (srv_amd64_regobj): Add amd64-mpx.o.
13766 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13767 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13768 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13769 * i387-fp.c (num_pl_bnd_register) Added constant.
13770 (num_pl_bnd_cfg_registers) Added constant.
13771 (struct i387_xsave) Added reserved area and MPX fields.
13772 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13773 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13774 function.
13775 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13776 (init_registers_amd64_mpx_linux): Declare new function.
13777 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13778 (x86_64_regmap): Add MPX registers.
13779 (x86_linux_read_description): Add MPX case.
13780 (initialize_low_arch): Initialize MPX targets.
13781
13782 2013-11-18 Tom Tromey <tromey@redhat.com>
13783
13784 * configure: Rebuild.
13785 * configure.ac: Don't check for stdlib.h.
13786 * gdbreplay.c: Unconditionally include stdlib.h.
13787
13788 2013-11-18 Tom Tromey <tromey@redhat.com>
13789
13790 * config.in: Rebuild.
13791 * configure: Rebuild.
13792 * configure.ac: Don't use AC_HEADER_DIRENT.
13793
13794 2013-11-18 Tom Tromey <tromey@redhat.com>
13795
13796 * server.h: Don't check HAVE_STRING_H.
13797 * gdbreplay.c: Don't check HAVE_STRING_H.
13798 * configure: Rebuild.
13799
13800 2013-11-18 Tom Tromey <tromey@redhat.com>
13801
13802 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13803 LIBGNU.
13804
13805 2013-11-08 Tom Tromey <tromey@redhat.com>
13806
13807 * configure, config.in: Rebuild.
13808 * configure.ac: Remove unused configury.
13809
13810 2013-11-08 Tom Tromey <tromey@redhat.com>
13811
13812 * acinclude.m4: Include common.m4, codeset.m4.
13813 * configure, config.in: Rebuild.
13814 * configure.ac: Use GDB_AC_COMMON.
13815
13816 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13817
13818 * linux-s390-low.c (HWCAP_S390_TE): New define.
13819 (s390_arch_setup): Consider the TE field in the HWCAP for
13820 determining 'have_regset_tdb'.
13821
13822 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13823
13824 PR gdb/16014
13825 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13826 call to sizeof.
13827
13828 2013-10-02 Pedro Alves <palves@redhat.com>
13829
13830 * server.c (process_serial_event): Don't output "GDBserver
13831 exiting" if GDB is connected through stdio.
13832 * target.c (mywait): Likewise, be silent if GDB is connected
13833 through stdio.
13834
13835 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13836
13837 * lynx-low.c (lynx_add_threads_after_attach): New function.
13838 (lynx_attach): Remove call to add_thread. Add call to
13839 lynx_add_threads_after_attach instead.
13840
13841 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13842
13843 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13844 * config.in, configure: Regenerated.
13845
13846 2013-09-18 Yao Qi <yao@codesourcery.com>
13847
13848 PR server/15959
13849 * server.c (start_inferior): Clear 'resume_info'.
13850
13851 2013-09-16 Jiong Wang <jiwang@tilera.com>
13852
13853 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13854 for each register.
13855
13856 2013-09-16 Jiong Wang <jiwang@tilera.com>
13857
13858 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13859 linux-tile-low.o to srv_tgtobj.
13860
13861 2013-09-16 Will Newton <will.newton@linaro.org>
13862
13863 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13864 out regs.
13865
13866 2013-09-06 Pedro Alves <palves@redhat.com>
13867
13868 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13869 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13870 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13871 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13872 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13873 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13874
13875 2013-09-06 Pedro Alves <palves@redhat.com>
13876
13877 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13878 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13879
13880 2013-09-06 Pedro Alves <palves@redhat.com>
13881
13882 * linux-amd64-ipa.c: Include tracepoint.h.
13883 * linux-i386-ipa.c: Include tracepoint.h.
13884
13885 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13886
13887 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13888 (ps_get_thread_area): New function.
13889
13890 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13891
13892 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13893 (initialize_low_arch): Call init_registers_crisv32 rather than
13894 init_register_crisv32.
13895
13896 2013-09-05 Pedro Alves <palves@redhat.com>
13897
13898 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13899 to ...
13900 * hostio.h: ... this new file.
13901 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13902 win32-low.c: Include hostio.h.
13903
13904 2013-09-05 Pedro Alves <palves@redhat.com>
13905
13906 * server.h (gdb_client_data, handler_func, callback_handler_func)
13907 (delete_file_handler, add_file_handler, append_callback_event)
13908 (delete_callback_event, start_event_loop, initialize_event_loop):
13909 Move to event-loop.h and include it.
13910 * event-loop.h: New file.
13911
13912 2013-09-05 Pedro Alves <palves@redhat.com>
13913
13914 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13915 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13916 (loaded_dll, unloaded_dll): Move to ...
13917 * dll.h: ... this new file.
13918 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13919
13920 2013-09-05 Pedro Alves <palves@redhat.com>
13921
13922 * server.h (current_process, get_thread_process, all_processes)
13923 (add_inferior_to_list, for_each_inferior, current_inferior)
13924 (remove_inferior, add_process, remove_process, find_process_pid)
13925 (have_started_inferiors_p, have_attached_inferiors_p)
13926 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13927 (clear_inferiors, find_inferior, find_inferior_id)
13928 (inferior_target_data, set_inferior_target_data)
13929 (inferior_regcache_data, set_inferior_regcache_data): Move to
13930 inferiors.h, and include it.
13931 * inferiors.h: New file.
13932
13933 2013-09-05 Pedro Alves <palves@redhat.com>
13934
13935 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13936 Move ...
13937 * ax.h: ... here.
13938
13939 2013-09-05 Pedro Alves <palves@redhat.com>
13940
13941 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13942 tracepoint.h.
13943 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13944 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13945 (handle_tracepoint_general_set, handle_tracepoint_query)
13946 (tracepoint_finished_step, tracepoint_was_hit)
13947 (release_while_stepping_state_list, current_traceframe)
13948 (in_readonly_region, traceframe_read_mem)
13949 (fetch_traceframe_registers, traceframe_read_sdata)
13950 (traceframe_read_info, struct fast_tpoint_collect_status)
13951 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13952 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13953 (supply_fast_tracepoint_registers)
13954 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13955 (ipa_tdesc, claim_trampoline_space)
13956 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13957 (agent_mem_read, agent_get_trace_state_variable_value)
13958 (agent_set_trace_state_variable_value, agent_tsv_read)
13959 (agent_mem_read_string, get_raw_reg_func_addr)
13960 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13961 * tracepoint.h: ... this new file.
13962
13963 2013-09-05 Pedro Alves <palves@redhat.com>
13964
13965 * server.h (perror_with_name, error, fatal, warning, paddress)
13966 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13967 include it.
13968 * utils.h: New file.
13969
13970 2013-09-05 Pedro Alves <palves@redhat.com>
13971
13972 * server.h (remote_debug, noack_mode, transport_is_reliable)
13973 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13974 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13975 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13976 (write_enn, initialize_async_io, enable_async_io)
13977 (disable_async_io, check_remote_input_interrupt_request)
13978 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13979 (dead_thread_notify, prepare_resume_reply)
13980 (decode_address_to_semicolon, decode_address, decode_m_packet)
13981 (decode_M_packet, decode_X_packet, decode_xfer_write)
13982 (decode_search_memory_packet, unhexify, hexify)
13983 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13984 (look_up_one_symbol, relocate_instruction)
13985 (monitor_output): Move to remote-utils.h, and include it.
13986 * remote-utils.h: New file.
13987
13988 2013-09-05 Pedro Alves <palves@redhat.com>
13989
13990 * server.h (_): Delete.
13991
13992 2013-09-02 Pedro Alves <palves@redhat.com>
13993
13994 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13995 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13996 allocated.
13997 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13998
13999 2013-09-02 Pierre Muller <muller@sourceware.org>
14000
14001 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
14002 or WriteProcessMemory complete successfully and handle
14003 ERROR_PARTIAL_COPY error.
14004
14005 2013-09-02 Pedro Alves <palves@redhat.com>
14006
14007 * server.c (gdb_read_memory): Return -1 on traceframe memory read
14008 error instead of EIO.
14009
14010 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14011
14012 PR server/15604
14013 * linux-low.c: Include filestuff.h.
14014 (linux_create_inferior) <pid == 0>: Call close_most_fds.
14015 * lynx-low.c: Include filestuff.h.
14016 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
14017 * server.c: Include filestuff.h.
14018 (main): Call notice_open_fds.
14019 * spu-low.c: Include filestuff.h.
14020 (spu_create_inferior) <pid == 0>: Call close_most_fds.
14021
14022 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
14023
14024 * Makefile.in: Explain why ../target and ../nat are not
14025 listed as include file search paths.
14026 (linux-waitpid.o): New object file rule.
14027 * configure.srv (srv_native_linux_obj): New variable.
14028 Replace all occurrences of linux native object files with
14029 $srv_native_linux_obj.
14030 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
14031 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
14032 (linux_enable_event_reporting): Remove declaration.
14033 (my_waitpid): Moved to common/linux-waitpid.c.
14034 (linux_wait_for_event): Pass ptid when calling
14035 linux_enable_event_reporting.
14036 (linux_supports_tracefork_flag): Remove.
14037 (linux_enable_event_reporting): Likewise.
14038 (linux_tracefork_grandchild): Remove.
14039 (STACK_SIZE): Moved to common/linux-ptrace.c.
14040 (linux_tracefork_child): Remove.
14041 (linux_test_for_tracefork): Remove.
14042 (linux_look_up_symbols): Call linux_supports_traceclone.
14043 (initialize_low): Remove call to linux_test_for_tracefork.
14044 * linux-low.h (PTRACE_TYPE_ARG3): Move to
14045 common/linux-ptrace.h.
14046 (PTRACE_TYPE_ARG4): Likewise.
14047 Include linux-ptrace.h.
14048
14049 2013-08-21 Pedro Alves <palves@redhat.com>
14050
14051 * config.in: Renegerate.
14052
14053 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
14054
14055 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
14056 (SFILES): Remove $(srcdir)/common/target-common.c and
14057 add $(srcdir)/target/waitstatus.c.
14058 (OBS): Remove target-common.o and add waitstatus.o.
14059 (server_h): Remove $(srcdir)/../common/target-common.h and
14060 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
14061 and $(srcdir)/../target/waitstatus.h.
14062 (target-common.o): Remove.
14063 (waitstatus.o): New target object file.
14064 * target.h: Do not include target-common.h and
14065 include target/resume.h, target/wait.h and
14066 target/waitstatus.h.
14067
14068 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
14069
14070 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14071 to PTRACE_TYPE_ARG3.
14072 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14073 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
14074 PTRACE_TYPE_ARG4.
14075 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
14076 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
14077
14078 2013-07-27 Jie Zhang <jie@codesourcery.com>
14079 Daniel Jacobowitz <dan@codesourcery.com>
14080 Yao Qi <yao@codesourcery.com>
14081
14082 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
14083 (mips-linux-watch.o): New rule.
14084 (mips_linux_watch_h): New variable.
14085 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
14086 srv_tgtobj.
14087 * linux-mips-low.c: Include mips-linux-watch.h.
14088 (struct arch_process_info, struct arch_lwp_info): New.
14089 (update_watch_registers_callback): New function.
14090 (mips_linux_new_process, mips_linux_new_thread) New functions.
14091 (mips_linux_prepare_to_resume, mips_insert_point): New
14092 functions.
14093 (mips_remove_point, mips_stopped_by_watchpoint): New
14094 functions.
14095 (rsp_bp_type_to_target_hw_bp_type): New function.
14096 (mips_stopped_data_address): New function.
14097 (the_low_target): Add watchpoint support functions.
14098
14099 2013-07-27 Yao Qi <yao@codesourcery.com>
14100
14101 * i386-low.c: Include break-common.h.
14102 (enum target_hw_bp_type): Remove.
14103
14104 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
14105
14106 * Makefile.in (SFILES): /common/target-common.c.
14107 (OBS): Add target-common.o.
14108 (server_h): Add $(srcdir)/../common/target-common.h.
14109 (target-common.o): New target.
14110 * server.c (queue_stop_reply_callback): Free
14111 status string after use.
14112 * target.c (target_waitstatus_to_string): Remove.
14113 * target.h: Include target-common.h.
14114 (resume_kind): Likewise.
14115 (target_waitkind): Likewise.
14116 (target_waitstatus): Likewise.
14117 (TARGET_WNOHANG): Likewise.
14118
14119 2013-07-04 Yao Qi <yao@codesourcery.com>
14120
14121 * Makefile.in (host_alias): Use @host_noncanonical@.
14122 (target_alias): Use @target_noncanonical@.
14123 * configure.ac: Use ACX_NONCANONICAL_TARGET and
14124 ACX_NONCANONICAL_HOST.
14125 * configure: Regenerated.
14126
14127 Revert:
14128 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14129
14130 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14131 * configure: Rebuild.
14132 * Makefile.in (version_host, version_target): Get from configure.
14133 (version.c): Use $(version_host) and $(version_target).
14134
14135 2013-07-03 Pedro Alves <palves@redhat.com>
14136
14137 * Makefile.in (config.status): Depend on development.sh.
14138 * acinclude.m4: Include libmcheck.m4.
14139 * configure: Regenerate.
14140
14141 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14142
14143 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
14144 attribute inside the parentheses.
14145 (winapi_DebugSetProcessKillOnExit): Ditto.
14146 (winapi_DebugBreakProcess): Ditto.
14147 (winapi_GenerateConsoleCtrlEvent): Ditto.
14148
14149 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14150
14151 * notif.h (notif_event): Add a dummy member to avoid compiler
14152 errors.
14153
14154 2013-07-01 Pedro Alves <palves@redhat.com>
14155
14156 * hostio.c (HOSTIO_PATH_MAX): Define.
14157 (require_filename, handle_open, handle_unlink, handle_readlink):
14158 Use it.
14159
14160 2013-07-01 Pedro Alves <palves@redhat.com>
14161
14162 * server.h: Include "pathmax.h".
14163 * linux-low.c: Don't include sys/param.h.
14164 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14165 MAXPATHLEN.
14166 * win32-low.c: Don't include sys/param.h.
14167 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14168
14169 2013-07-01 Pedro Alves <palves@redhat.com>
14170
14171 * event-loop.c: Don't check HAVE_UNISTD_H before including
14172 <unistd.h>.
14173 * gdbreplay.c: Likewise.
14174 * remote-utils.c: Likewise.
14175 * server.c: Likewise.
14176 * configure.ac: Don't check for unistd.h.
14177 * configure: Regenerate.
14178
14179 2013-06-28 Tom Tromey <tromey@redhat.com>
14180
14181 * Makefile.in (version.c): Use version.in, not
14182 common/version.in.
14183
14184 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14185
14186 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14187 * configure: Rebuild.
14188 * Makefile.in (version_host, version_target): Get from configure.
14189 (version.c): Use $(version_host) and $(version_target).
14190
14191 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14192
14193 Fix trace-status to output user name without trailing colon.
14194 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14195
14196 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14197
14198 Fix trace-status to output proper start-time and stop-time.
14199 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14200 output start time and stop time in hex as gdb expects.
14201
14202 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14203
14204 * tracepoint.c (build_traceframe_info_xml): Output trace state
14205 variables present in the trace buffer.
14206
14207 2013-06-24 Tom Tromey <tromey@redhat.com>
14208
14209 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14210 create-version.sh.
14211 (version.o): Remove.
14212 * gdbreplay.c: Include version.h.
14213 (version, host_name): Don't declare.
14214 * server.h: Include version.h.
14215 (version, host_name): Don't declare.
14216
14217 2013-06-12 Pedro Alves <palves@redhat.com>
14218
14219 * linux-x86-low.c (linux_is_elf64): Delete global.
14220 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14221 with local linux_pid_exe_is_elf_64_file use.
14222
14223 2013-06-11 Pedro Alves <palves@redhat.com>
14224
14225 * linux-low.c (regset_disabled, disable_regset): New functions.
14226 (regsets_fetch_inferior_registers)
14227 (regsets_store_inferior_registers): Use them.
14228 (initialize_regsets_info); Don't allocate the disabled_regsets
14229 array here.
14230 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14231 comment.
14232
14233 2013-06-11 Pedro Alves <palves@redhat.com>
14234
14235 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14236 xmalloc.
14237
14238 2013-06-11 Pedro Alves <palves@redhat.com>
14239
14240 * linux-x86-low.c (initialize_low_arch): Call
14241 init_registers_x32_avx_linux.
14242
14243 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14244
14245 Fix compatibility with Android Bionic.
14246 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14247 it is not empty.
14248
14249 2013-06-07 Pedro Alves <palves@redhat.com>
14250
14251 PR server/14823
14252 * Makefile.in (OBS): Add tdesc.o.
14253 (IPA_OBJS): Add tdesc-ipa.o.
14254 (tdesc-ipa.o): New rule.
14255 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14256 interface.
14257 * linux-low.c (new_inferior): Delete.
14258 (disabled_regsets, num_regsets): Delete.
14259 (linux_add_process): Adjust to set the new per-process
14260 new_inferior flag.
14261 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14262 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14263 was a stop. When calling arch_setup, switch the current inferior
14264 to the thread that got an event.
14265 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14266 (regsets_fetch_inferior_registers)
14267 (regsets_store_inferior_registers): New regsets_info parameter.
14268 Adjust to use it.
14269 (linux_register_in_regsets): New regs_info parameter. Adjust to
14270 use it.
14271 (register_addr, fetch_register, store_register): New usrregs_info
14272 parameter. Adjust to use it.
14273 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14274 parameter regs_info. Adjust to use it.
14275 (linux_fetch_registers): Get the current inferior's regs_info, and
14276 adjust to use it.
14277 (linux_store_registers): Ditto.
14278 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14279 (initialize_low): Don't initialize the target_regsets here. Call
14280 initialize_low_arch.
14281 * linux-low.h (target_regsets): Delete declaration.
14282 (struct regsets_info): New.
14283 (struct usrregs_info): New.
14284 (struct regs_info): New.
14285 (struct process_info_private) <new_inferior>: New field.
14286 (struct linux_target_ops): Delete the num_regs, regmap, and
14287 regset_bitmap fields. New field regs_info.
14288 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14289 * i387-fp.c (num_xmm_registers): Delete.
14290 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14291 calls to new interface.
14292 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14293 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14294 Infer the number of xmm registers from the regcache's target
14295 description.
14296 * i387-fp.h (num_xmm_registers): Delete.
14297 * inferiors.c (add_thread): Don't install the thread's regcache
14298 here.
14299 * proc-service.c (gregset_info): Fetch the current inferior's
14300 regs_info. Adjust to use it.
14301 * regcache.c: Include tdesc.h.
14302 (register_bytes, reg_defs, num_registers)
14303 (gdbserver_expedite_regs): Delete.
14304 (get_thread_regcache): If the thread doesn't have a regcache yet,
14305 create one, instead of aborting gdbserver.
14306 (regcache_invalidate_one): Rename to ...
14307 (regcache_invalidate_thread): ... this.
14308 (regcache_invalidate_one): New.
14309 (regcache_invalidate): Only invalidate registers of the current
14310 process.
14311 (init_register_cache): Add target_desc parameter, and use it.
14312 (new_register_cache): Ditto. Assert the target description has a
14313 non zero registers_size.
14314 (regcache_cpy): Add assertions. Adjust.
14315 (realloc_register_cache, set_register_cache): Delete.
14316 (registers_to_string, registers_from_string): Adjust.
14317 (find_register_by_name, find_regno, find_register_by_number)
14318 (register_cache_size): Add target_desc parameter, and use it.
14319 (free_register_cache_thread, free_register_cache_thread_one)
14320 (regcache_release, register_cache_size): New.
14321 (register_size): Add target_desc parameter, and use it.
14322 (register_data, supply_register, supply_register_zeroed)
14323 (supply_regblock, supply_register_by_name, collect_register)
14324 (collect_register_as_string, collect_register_by_name): Adjust.
14325 * regcache.h (struct target_desc): Forward declare.
14326 (struct regcache) <tdesc>: New field.
14327 (init_register_cache, new_register_cache): Add target_desc
14328 parameter.
14329 (regcache_invalidate_thread): Declare.
14330 (regcache_invalidate_one): Delete declaration.
14331 (regcache_release): Declare.
14332 (find_register_by_number, register_cache_size, register_size)
14333 (find_regno): Add target_desc parameter.
14334 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14335 declarations.
14336 * remote-utils.c: Include tdesc.h.
14337 (outreg, prepare_resume_reply): Adjust.
14338 * server.c: Include tdesc.h.
14339 (gdbserver_xmltarget): Delete declaration.
14340 (get_features_xml, process_serial_event): Adjust.
14341 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14342 declare.
14343 (struct process_info) <tdesc>: New field.
14344 (ipa_tdesc): Declare.
14345 * tdesc.c: New file.
14346 * tdesc.h: New file.
14347 * tracepoint.c: Include tdesc.h.
14348 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14349 (get_context_regcache): Adjust to pass ipa_tdesc down.
14350 (do_action_at_tracepoint): Adjust to get the register cache size
14351 from the context regcache's description.
14352 (traceframe_walk_blocks): Adjust to get the register cache size
14353 from the current trace frame's description.
14354 (traceframe_get_pc): Adjust to get current trace frame's
14355 description and pass it down.
14356 (gdb_collect): Adjust to get the register cache size from the
14357 IPA's description.
14358 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14359 (gdbserver_xmltarget): Delete.
14360 (initialize_low_tracepoint): Set the ipa's target description.
14361 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14362 (initialize_low_tracepoint): Set the ipa's target description.
14363 * linux-x86-low.c: Include tdesc.h.
14364 [__x86_64__] (is_64bit_tdesc): New.
14365 (ps_get_thread_area, x86_get_thread_area): Use it.
14366 (i386_cannot_store_register): Rename to ...
14367 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14368 (i386_cannot_fetch_register): Rename to ...
14369 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14370 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14371 to new interface.
14372 (target_regsets): Rename to ...
14373 (x86_regsets): ... this.
14374 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14375 interface.
14376 (x86_siginfo_fixup): Use is_64bit_tdesc.
14377 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14378 (tdesc_x32_avx_linux, tdesc_x32_linux)
14379 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14380 Declare.
14381 (x86_linux_update_xmltarget): Delete.
14382 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14383 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14384 (AMD64_LINUX_USER64_CS): New.
14385 (x86_linux_read_description): New, based on
14386 x86_linux_update_xmltarget.
14387 (same_process_callback): New.
14388 (x86_arch_setup_process_callback): New.
14389 (x86_linux_update_xmltarget): New.
14390 (x86_regsets_info): New.
14391 (amd64_linux_regs_info): New.
14392 (i386_linux_usrregs_info): New.
14393 (i386_linux_regs_info): New.
14394 (x86_linux_regs_info): New.
14395 (x86_arch_setup): Reimplement.
14396 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14397 (x86_emit_ops): Ditto.
14398 (the_low_target): Adjust. Install x86_linux_regs_info,
14399 x86_cannot_fetch_register, and x86_cannot_store_register.
14400 (initialize_low_arch): New.
14401 * linux-ia64-low.c (tdesc_ia64): Declare.
14402 (ia64_fetch_register): Adjust.
14403 (ia64_usrregs_info, regs_info): New globals.
14404 (ia64_regs_info): New function.
14405 (the_low_target): Adjust.
14406 (initialize_low_arch): New function.
14407 * linux-sparc-low.c (tdesc_sparc64): Declare.
14408 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14409 Adjust.
14410 (sparc_arch_setup): New function.
14411 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14412 (the_low_target): Adjust.
14413 (initialize_low_arch): New function.
14414 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14415 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14416 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14417 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14418 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14419 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14420 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14421 (tdesc_powerpc_isa205_vsx64l): Declare.
14422 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14423 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14424 (ppc_set_pc, ppc_get_hwcap): Adjust.
14425 (ppc_usrregs_info): Forward declare.
14426 (!__powerpc64__) ppc_regmap_adjusted: New global.
14427 (ppc_arch_setup): Adjust to the current process'es target
14428 description.
14429 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14430 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14431 (ppc_store_evrregset): Adjust.
14432 (target_regsets): Rename to ...
14433 (ppc_regsets): ... this, and make static.
14434 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14435 (ppc_regs_info): New function.
14436 (the_low_target): Adjust.
14437 (initialize_low_arch): New function.
14438 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14439 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14440 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14441 (tdesc_s390x_linux64v2): Declare.
14442 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14443 (s390_fill_gregset, s390_store_last_break): Adjust.
14444 (target_regsets): Rename to ...
14445 (s390_regsets): ... this, and make static.
14446 (s390_get_pc, s390_set_pc): Adjust.
14447 (s390_get_hwcap): New target_desc parameter, and use it.
14448 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14449 (s390_arch_setup): Adjust to set the current process'es target
14450 description. Don't adjust the regmap.
14451 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14452 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14453 (regs_info_3264): New globals.
14454 (s390_regs_info): New function.
14455 (the_low_target): Adjust.
14456 (initialize_low_arch): New function.
14457 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14458 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14459 [__mips64] (init_registers_mips_linux)
14460 (init_registers_mips_dsp_linux): Delete defines.
14461 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14462 (have_dsp): New global.
14463 (mips_read_description): New, based on mips_arch_setup.
14464 (mips_arch_setup): Reimplement.
14465 (get_usrregs_info): New function.
14466 (mips_cannot_fetch_register, mips_cannot_store_register)
14467 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14468 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14469 (target_regsets): Rename to ...
14470 (mips_regsets): ... this, and make static.
14471 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14472 (dsp_regs_info, regs_info): New globals.
14473 (mips_regs_info): New function.
14474 (the_low_target): Adjust.
14475 (initialize_low_arch): New function.
14476 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14477 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14478 Declare.
14479 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14480 (arm_read_description): New, with bits factored from
14481 arm_arch_setup.
14482 (arm_arch_setup): Reimplement.
14483 (target_regsets): Rename to ...
14484 (arm_regsets): ... this, and make static.
14485 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14486 (arm_regs_info): New function.
14487 (the_low_target): Adjust.
14488 (initialize_low_arch): New function.
14489 * linux-m68k-low.c (tdesc_m68k): Declare.
14490 (target_regsets): Rename to ...
14491 (m68k_regsets): ... this, and make static.
14492 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14493 (m68k_regs_info): New function.
14494 (m68k_arch_setup): New function.
14495 (the_low_target): Adjust.
14496 (initialize_low_arch): New function.
14497 * linux-sh-low.c (tdesc_sharch): Declare.
14498 (target_regsets): Rename to ...
14499 (sh_regsets): ... this, and make static.
14500 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14501 (sh_regs_info, sh_arch_setup): New functions.
14502 (the_low_target): Adjust.
14503 (initialize_low_arch): New function.
14504 * linux-bfin-low.c (tdesc_bfin): Declare.
14505 (bfin_arch_setup): New function.
14506 (bfin_usrregs_info, regs_info): New globals.
14507 (bfin_regs_info): New function.
14508 (the_low_target): Adjust.
14509 (initialize_low_arch): New function.
14510 * linux-cris-low.c (tdesc_cris): Declare.
14511 (cris_arch_setup): New function.
14512 (cris_usrregs_info, regs_info): New globals.
14513 (cris_regs_info): New function.
14514 (the_low_target): Adjust.
14515 (initialize_low_arch): New function.
14516 * linux-cris-low.c (tdesc_crisv32): Declare.
14517 (cris_arch_setup): New function.
14518 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14519 (cris_regs_info): New function.
14520 (the_low_target): Adjust.
14521 (initialize_low_arch): New function.
14522 * linux-m32r-low.c (tdesc_m32r): Declare.
14523 (m32r_arch_setup): New function.
14524 (m32r_usrregs_info, regs_info): New globals.
14525 (m32r_regs_info): Adjust.
14526 (initialize_low_arch): New function.
14527 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14528 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14529 (tic6x_usrregs_info): Forward declare.
14530 (tic6x_read_description): New function, based on ...
14531 (tic6x_arch_setup): ... this. Reimplement.
14532 (target_regsets): Rename to ...
14533 (tic6x_regsets): ... this, and make static.
14534 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14535 (tic6x_regs_info): New function.
14536 (the_low_target): Adjust.
14537 (initialize_low_arch): New function.
14538 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14539 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14540 (target_regsets): Rename to ...
14541 (xtensa_regsets): ... this, and make static.
14542 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14543 globals.
14544 (xtensa_arch_setup, xtensa_regs_info): New functions.
14545 (the_low_target): Adjust.
14546 (initialize_low_arch): New function.
14547 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14548 (nios2_arch_setup): Set the current process'es tdesc.
14549 (target_regsets): Rename to ...
14550 (nios2_regsets): ... this.
14551 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14552 (nios2_regs_info): New function.
14553 (the_low_target): Adjust.
14554 (initialize_low_arch): New function.
14555 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14556 (aarch64_arch_setup): Set the current process'es tdesc.
14557 (target_regsets): Rename to ...
14558 (aarch64_regsets): ... this.
14559 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14560 (aarch64_regs_info): New function.
14561 (the_low_target): Adjust.
14562 (initialize_low_arch): New function.
14563 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14564 globals.
14565 (target_regsets): Rename to ...
14566 (tile_regsets): ... this.
14567 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14568 (tile_regs_info): New function.
14569 (tile_arch_setup): Set the current process'es tdesc.
14570 (the_low_target): Adjust.
14571 (initialize_low_arch): New function.
14572 * spu-low.c (tdesc_spu): Declare.
14573 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14574 * win32-arm-low.c (tdesc_arm): Declare.
14575 (arm_arch_setup): New function.
14576 (the_low_target): Install arm_arch_setup instead of
14577 init_registers_arm.
14578 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14579 (init_windows_x86): Rename to ...
14580 (i386_arch_setup): ... this. Set `win32_tdesc'.
14581 (the_low_target): Adjust.
14582 * win32-low.c (win32_tdesc): New global.
14583 (child_add_thread): Don't create the thread cache here.
14584 (do_initial_child_stuff): Set the new process'es tdesc.
14585 * win32-low.h (struct target_desc): Forward declare.
14586 (win32_tdesc): Declare.
14587 * lynx-i386-low.c (tdesc_i386): Declare global.
14588 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14589 * lynx-low.c (lynx_tdesc): New global.
14590 (lynx_add_process): Set the new process'es tdesc.
14591 * lynx-low.h (struct target_desc): Forward declare.
14592 (lynx_tdesc): Declare global.
14593 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14594 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14595 * nto-low.c (nto_tdesc): New global.
14596 (do_attach): Set the new process'es tdesc.
14597 * nto-low.h (struct target_desc): Forward declare.
14598 (nto_tdesc): Declare.
14599 * nto-x86-low.c (tdesc_i386): Declare.
14600 (nto_x86_arch_setup): Set `nto_tdesc'.
14601
14602 2013-06-04 Gary Benson <gbenson@redhat.com>
14603
14604 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14605 to qSupported response when appropriate.
14606 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14607 with nonzero-length annex.
14608 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14609 arguments supplied in annex.
14610
14611 2013-05-31 Doug Evans <dje@google.com>
14612
14613 PR server/15594
14614 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14615 64 bits in 64-cross-32 environment.
14616
14617 2013-05-28 Pedro Alves <palves@redhat.com>
14618
14619 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14620 (aarch64-without-fpu.c): Delete rule.
14621 * configure.srv (aarch64*-*-linux*): Remove references to
14622 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14623 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14624 declaration.
14625
14626 2013-05-24 Pedro Alves <palves@redhat.com>
14627
14628 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14629 instead of strchr/decode_address. Error if the range isn't split
14630 with a ','. Don't assume there's be a ':' in the action.
14631
14632 2013-05-23 Yao Qi <yao@codesourcery.com>
14633 Pedro Alves <palves@redhat.com>
14634
14635 * linux-low.c (lwp_in_step_range): New function.
14636 (linux_wait_1): If the thread was range stepping and stopped
14637 outside the stepping range, report the stop to GDB. Otherwise,
14638 continue stepping. Add range stepping debug output.
14639 (linux_set_resume_request): Copy the step range from the resume
14640 request to the lwp.
14641 (linux_supports_range_stepping): New.
14642 (linux_target_ops) <supports_range_stepping>: Set to
14643 linux_supports_range_stepping.
14644 * linux-low.h (struct linux_target_ops)
14645 <supports_range_stepping>: New field.
14646 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14647 * linux-x86-low.c (x86_supports_range_stepping): New.
14648 (the_low_target) <supports_range_stepping>: Set to
14649 x86_supports_range_stepping.
14650 * server.c (handle_v_cont): Handle 'r' action.
14651 (handle_v_requests): Append ";r" if the target supports range
14652 stepping.
14653 * target.h (struct thread_resume) <step_range_start,
14654 step_range_end>: New fields.
14655 (struct target_ops) <supports_range_stepping>:
14656 New field.
14657 (target_supports_range_stepping): New macro.
14658
14659 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14660
14661 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14662 confusion in comment.
14663
14664 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14665
14666 * lynx-low.c (struct process_info_private): New type.
14667 (lynx_add_process): New function.
14668 (lynx_create_inferior, lynx_attach): Replace calls to
14669 add_process by calls to lynx_add_process.
14670 (lynx_resume): If PTID is null, then try using
14671 current_process()->private->last_wait_event_ptid.
14672 Add comments.
14673 (lynx_clear_inferiors): Delete. The contents of that function
14674 has been inlined in lynx_mourn;
14675 (lynx_wait_1): Save the ptid in the process's private data.
14676 (lynx_mourn): Free the process' private data. Replace call
14677 to lynx_clear_inferiors by call to clear_inferiors.
14678
14679 2013-05-17 Yao Qi <yao@codesourcery.com>
14680
14681 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14682 the right place.
14683
14684 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14685
14686 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14687 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14688 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14689 PT_TEXT_END_ADDR guards. Update comments.
14690 (linux_target_op) <read_offsets>: Conditionally define to
14691 linux_read_offsets if the target is UCLIBC and if it defines
14692 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14693
14694 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14695 Andrew Jenner <andrew@codesourcery.com>
14696
14697 * Makefile.in (SFILES): Add linux-nios2-low.c.
14698 (clean): Add action to delete nios2-linux.c.
14699 (nios2-linux.c): New rule.
14700 * configure.srv: Add nios2*-*-linux*.
14701 * linux-nios2-low.c: New.
14702
14703 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14704
14705 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14706
14707 2013-04-25 Hui Zhu <hui@codesourcery.com>
14708
14709 PR gdb/15186
14710 * ax.c (ax_printf): Add fflush.
14711
14712 2013-04-22 Tom Tromey <tromey@redhat.com>
14713
14714 * Makefile.in (SFILES): Add filestuff.c.
14715 (OBS): Add filestuff.o.
14716 (filestuff.o): New target.
14717 * config.in, configure: Rebuild.
14718 * configure.ac: Check for fdwalk, pipe2.
14719
14720 2013-04-17 Pedro Alves <palves@redhat.com>
14721
14722 * configure.ac (USE_THREAD_DB): Delete variable.
14723 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14724 Don't AC_SUBST USE_THREAD_DB.
14725 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14726 * config.in, configure: Regenerate.
14727
14728 2013-04-16 Pedro Alves <palves@redhat.com>
14729
14730 * linux-low.h (struct lwp_info) <thread_known>: Move under
14731 the USE_THREAD_DB #ifdef.
14732
14733 2013-04-16 Pedro Alves <palves@redhat.com>
14734
14735 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14736 (linux-low.o): Delete rule.
14737 * linux-low.h: Always include "gdb_thread_db.h" instead of
14738 conditionally including thread_db.h.
14739 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14740 HAVE_THREAD_DB_H.
14741
14742 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14743
14744 * Makefile.in (install-only): Fix make install regression.
14745
14746 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14747
14748 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14749 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14750 installation.
14751 * gdbserver.1: Remove.
14752
14753 2013-03-22 Pedro Alves <palves@redhat.com>
14754
14755 * linux-low.c (handle_extended_wait): Don't call
14756 linux_enable_event_reporting.
14757
14758 2013-03-15 Tony Theodore <tonyt@logyst.com>
14759
14760 PR build/9098:
14761 * Makefile.in (SHELL): Use @SHELL@.
14762
14763 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14764
14765 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14766 compiler warning.
14767
14768 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14769
14770 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14771 Remove extraneous NULL element.
14772
14773 2013-03-13 Yao Qi <yao@codesourcery.com>
14774
14775 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14776 'V' block in trace frame.
14777
14778 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14779
14780 * target.h (struct target_ops): Add btrace ops.
14781 (target_supports_btrace): New macro.
14782 (target_enable_btrace): New macro.
14783 (target_disable_btrace): New macro.
14784 (target_read_btrace): New macro.
14785 * gdbthread.h (struct thread_info): Add btrace field.
14786 * server.c: Include btrace-common.h.
14787 (handle_btrace_general_set): New function.
14788 (handle_btrace_enable): New function.
14789 (handle_btrace_disable): New function.
14790 (handle_general_set): Call handle_btrace_general_set.
14791 (handle_qxfer_btrace): New function.
14792 (struct qxfer qxfer_packets[]): Add btrace entry.
14793 * inferiors.c (remove_thread): Disable btrace.
14794 * linux-low: Include linux-btrace.h.
14795 (linux_low_enable_btrace): New function.
14796 (linux_low_read_btrace): New function.
14797 (linux_target_ops): Add btrace ops.
14798 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14799 Add srv_linux_btrace=yes.
14800 (x86_64-*-linux*): Add linux-btrace.o.
14801 Add srv_linux_btrace=yes.
14802 * configure.ac: Define HAVE_LINUX_BTRACE.
14803 * config.in: Regenerated.
14804 * configure: Regenerated.
14805
14806 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14807
14808 * server.c (handle_qxfer): Preserve error message if -3 is
14809 returned.
14810 (qxfer): Document the -3 return value.
14811
14812 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14813
14814 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14815 (linux_btrace_h): New variable.
14816 (linux-btrace.o): New rule.
14817
14818 2013-03-08 Stan Shebs <stan@codesourcery.com>
14819 Hafiz Abid Qadeer <abidh@codesourcery.com>
14820
14821 * tracepoint.c (trace_buffer_size): New global.
14822 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14823 (init_trace_buffer): Change to one-argument function. Allocate
14824 trace buffer memory.
14825 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14826 handle QTBuffer:size packet.
14827 (cmd_bigqtbuffer_size): New function.
14828 (initialize_tracepoint): Call init_trace_buffer with
14829 DEFAULT_TRACE_BUFFER_SIZE.
14830 * server.c (handle_query): Add QTBuffer:size in the
14831 supported packets.
14832
14833 2013-03-07 Yao Qi <yao@codesourcery.com>
14834
14835 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14836 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14837 of -1.
14838 (cmd_qtsp): Adjust condition. Do post increment.
14839 Set cur_action and cur_step_action back to 0.
14840
14841 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14842
14843 PR server/15236
14844 * linux-low.c (linux_write_memory): Return early success if LEN is
14845 zero.
14846
14847 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14848
14849 * configure.srv: Add x86_64-*-cygwin* as target.
14850
14851 2013-02-28 Tom Tromey <tromey@redhat.com>
14852
14853 * configure.ac: Invoke AC_SYS_LARGEFILE.
14854 * configure, config.in: Rebuild.
14855
14856 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14857
14858 * win32-low.c: Throughout, fix format strings and casts of
14859 printf-like functions to avoid type related warnings on all
14860 platforms.
14861 (get_child_debug_event): Print dwDebugEventCode as hex since
14862 that's how it's usually documented.
14863
14864 2013-02-28 Yao Qi <yao@codesourcery.com>
14865
14866 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14867 pulongest.
14868
14869 2013-02-27 Jiong Wang <jiwang@tilera.com>
14870
14871 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14872 (reg-tilegx32.c): New rule.
14873 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14874 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14875 different register info initializer according to elf class.
14876 (init_registers_tilgx32): New function. The tilegx32 register info
14877 initializer.
14878 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14879 (tile_store_gregset): Likewise.
14880
14881 2013-02-27 Yao Qi <yao@codesourcery.com>
14882
14883 * server.c (process_point_options): Print debug message when
14884 debug_threads is true.
14885
14886 2013-02-26 Yao Qi <yao@codesourcery.com>
14887
14888 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14889
14890 2013-02-19 Pedro Alves <palves@redhat.com>
14891 Kai Tietz <ktietz@redhat.com>
14892
14893 PR gdb/15161
14894
14895 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14896 instead of strtoul to extract address from packet.
14897 (process_serial_event) <'z'>: Likewise.
14898
14899 2013-02-18 Yao Qi <yao@codesourcery.com>
14900
14901 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14902
14903 2013-02-14 Pedro Alves <palves@redhat.com>
14904
14905 Plug memory leak.
14906
14907 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14908 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14909
14910 2013-02-14 Pedro Alves <palves@redhat.com>
14911
14912 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14913
14914 2013-02-14 Pedro Alves <palves@redhat.com>
14915
14916 * tracepoint.c (save_string): Delete.
14917 (add_tracepoint_action): Use savestring instead of save_string.
14918
14919 2013-02-12 Pedro Alves <palves@redhat.com>
14920
14921 * linux-xtensa-low.c: Ditto.
14922 * xtensa-xtregs.c: Ditto.
14923
14924 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14925
14926 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14927 thread_db.
14928
14929 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14930
14931 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14932 aarch64_num_wp_regs and aarch64_num_bp_regs to
14933 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14934
14935 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14936
14937 * linux-aarch64-low.c (ps_get_thread_area): Replace
14938 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14939
14940 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14941 Marcus Shawcroft <marcus.shawcroft@arm.com>
14942 Nigel Stephens <nigel.stephens@arm.com>
14943 Yufeng Zhang <yufeng.zhang@arm.com>
14944
14945 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14946 (aarch64.c, aarch64-without-fpu.c): New targets.
14947 * configure.srv (aarch64*-*-linux*): New.
14948 * linux-aarch64-low.c: New file.
14949
14950 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14951
14952 * linux-low.c (handle_extended_wait, linux_create_inferior)
14953 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14954 (dequeue_one_deferred_signal, linux_resume_one_thread)
14955 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14956 (linux_tracefork_grandchild, linux_test_for_tracefork)
14957 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14958 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14959 where the argument is 0.
14960
14961 2013-01-25 Yao Qi <yao@codesourcery.com>
14962
14963 * event-loop.c: Include "queue.h".
14964 (gdb_event_p): New typedef.
14965 (struct gdb_event) <next_event>: Remove.
14966 (event_queue): Change to QUEUE(gdb_event_p).
14967 (async_queue_event): Remove.
14968 (gdb_event_xfree): New.
14969 (initialize_event_loop): New.
14970 (process_event): Use API from QUEUE.
14971 (wait_for_event): Likewise.
14972 * server.c (main): Call initialize_event_loop.
14973 * server.h (initialize_event_loop): Declare.
14974
14975 2013-01-18 Yao Qi <yao@codesourcery.com>
14976
14977 * ax.h (struct eval_agent_expr_context): New.
14978 (gdb_eval_agent_expr): Update declaration.
14979 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14980 TFRAME. Add new argument CTX.
14981 * server.h (struct eval_agent_expr_context): Declare.
14982 (agent_mem_read, agent_tsv_read): Update declaration.
14983 (agent_mem_read_string): Likewise.
14984 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14985 (add_traceframe_block): Add new argument TPOINT.
14986 Increase TPOINT->traceframe_usage.
14987 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14988 eval_tracepoint_agent_expr.
14989 (condition_true_at_tracepoint): Likewise.
14990 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14991 (agent_mem_read_string, agent_tsv_read): Likewise.
14992
14993 2013-01-16 Yao Qi <yao@codesourcery.com>
14994
14995 * linux-low.c (linux_resume_one_lwp): Don't check
14996 'lwp->bp_reinsert != 0'.
14997
14998 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14999 Pedro Alves <palves@redhat.com>
15000
15001 * lynx-low.c (ptrace_request_to_str): Define a temporary
15002 macro and use it to simplify this function's implementation.
15003
15004 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15005
15006 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
15007 sets errno.
15008
15009 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15010
15011 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
15012
15013 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15014
15015 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
15016
15017 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15018
15019 * lynx-low.c (lynx_resume): Use the resume_info parameter
15020 to determine the ptid for the lynx_ptrace call, unless
15021 it is equal to minus_one_ptid, in which case we use the
15022 ptid of the current_inferior.
15023 (lynx_wait_1): After having received a thread create/exit
15024 event, resume the inferior's execution using the signaling
15025 thread's ptid, rather than the old ptid.
15026
15027 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15028
15029 * lynx-low.c (lynx_resume): Delete variable ret.
15030
15031 2013-01-01 Joel Brobecker <brobecker@adacore.com>
15032
15033 * gdbreplay.c (gdbreplay_version): Update copyright year.
15034 * server.c (gdbserver_version): Likewise.
15035
15036 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15037
15038 * lynx-low.c (lynx_wait_1): Add debug trace before adding
15039 new thread.
15040
15041 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15042
15043 * lynx-low.c (ptrace_request_to_str): Add handling for
15044 PTRACE_GETTRACESIG.
15045
15046 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15047
15048 * lynx-low.c (lynx_attach): Delete variable new_process.
15049
15050 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15051
15052 * lynx-low.c (lynx_create_inferior): Delete variable
15053 new_process.
15054
15055 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15056
15057 * lynx-low.c (ptrace_request_to_str): Do not handle
15058 PTRACE_GETTHREADLIST if this macro does not exist.
15059
15060 2012-12-15 Yao Qi <yao@codesourcery.com>
15061
15062 * Makefile.in (OBS): Add notif.o.
15063 * notif.c, notif.h: New.
15064 * server.c: Include "notif.h".
15065 (struct vstop_notif) <next>: Remove.
15066 <base>: New field.
15067 (queue_stop_reply): Update.
15068 (push_event, send_next_stop_reply): Remove.
15069 (discard_queued_stop_replies): Update.
15070 (notif_stop): New variable.
15071 (handle_v_stopped): Remove.
15072 (handle_v_requests): Don't call handle_v_stopped. Call
15073 handle_ack_notif instead.
15074 (queue_stop_reply_callback): Call notif_event_enque instead
15075 of queue_stop_reply.
15076 (handle_status): Don't call send_next_stop_reply, call
15077 notif_write_event instead.
15078 (kill_inferior_callback): Likewise.
15079 (detach_or_kill_inferior_callback): Likewise.
15080 (main): Call initialize_notif.
15081 (process_serial_event): Call QUEUE_is_empty.
15082 (handle_target_event): Call notif_push instead of push event.
15083 * server.h (push_event): Remove declaration.
15084
15085 2012-12-10 Tom Tromey <tromey@redhat.com>
15086
15087 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
15088 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
15089 macros.
15090 (.c.o): Rewrite.
15091 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
15092 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
15093 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
15094 (amd64-linux-ipa.o, ax.o): Rewrite.
15095 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
15096 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
15097 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
15098 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
15099 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
15100 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
15101 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
15102 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
15103 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
15104 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
15105 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
15106 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
15107 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
15108 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
15109 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
15110 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
15111 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
15112 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
15113 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
15114 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
15115 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
15116 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
15117 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
15118 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
15119 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
15120 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
15121 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
15122 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
15123 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
15124 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
15125 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
15126 (reg-tilegx.o): Remove.
15127 (all_object_files): New macro.
15128 Include .deps files.
15129 * aclocal.m4, configure: Rebuild.
15130 * acinclude.m4: Include depstand.m4, lead-dot.m4.
15131 * configure.ac: Invoke ZW_CREATE_DEPDIR,
15132 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
15133
15134 2012-12-05 Tom Tromey <tromey@redhat.com>
15135
15136 PR gdb/14917:
15137 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
15138
15139 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
15140
15141 * configure.ac: Check for linux/perf_event.h.
15142 * config.in: Regenerated.
15143 * configure: Regenerated.
15144
15145 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
15146
15147 * hostio.c (handle_readlink): Decrease buffer size
15148 parameter passed to readlink by one byte.
15149
15150 2012-11-26 Yao Qi <yao@codesourcery.com>
15151
15152 * configure.ac (build_warnings): Append '-Wempty-body'.
15153 * configure: Regenerated.
15154 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
15155 body.
15156
15157 2012-11-15 Pierre Muller <muller@sourceware.org>
15158
15159 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
15160 * config.in: Regenerate.
15161 * configure: Regenerate.
15162 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15163 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15164 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15165 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15166 header.
15167 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15168 instead of <sys/wait.h> header.
15169 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15170
15171 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15172
15173 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15174 (various make rules): Remove -DGDBSERVER
15175
15176 2012-11-09 Yao Qi <yao@codesourcery.com>
15177
15178 * spu-low.c (current_ptid): Move it to ..
15179 * gdbthread.h: ... here. New.
15180 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15181 * server.c (myresume, process_serial_event): Likewise.
15182 * thread-db.c (thread_db_find_new_threads): Likewise.
15183 * tracepoint.c (run_inferior_command): Likewise.
15184
15185 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15186
15187 * server.c (handle_search_memory_1): Include access length in
15188 warning message.
15189
15190 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15191
15192 * linux-crisv32-low.c: Fix compile errors.
15193
15194 2012-09-04 Yao Qi <yao@codesourcery.com>
15195
15196 * tracepoint.c (cmd_qtsv): Adjust debug message.
15197 Don't check CUR_TPOINT.
15198
15199 2012-08-28 Yao Qi <yao@codesourcery.com>
15200
15201 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15202 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15203 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15204 Remove declarations of xmalloc, xreallloc, xstrdup and
15205 freeargv.
15206 * Makefile.in (libiberty_h): New.
15207 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15208 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15209
15210 2012-08-23 Yao Qi <yao@codesourcery.com>
15211
15212 * server.h: Remove declaration of 'xsnprintf'.
15213
15214 2012-08-22 Keith Seitz <keiths@redhat.com>
15215
15216 * server.h: Include build-gnulib-gbserver/config.h.
15217 * gdbreplay.c: Likewise.
15218
15219 2012-08-08 Doug Evans <dje@google.com>
15220
15221 * Makefile.in (SFILES): Add gdb_vecs.c.
15222 (OBS): Add gdb_vecs.o.
15223 (gdb_vecs_h, host_defs_h): New variables.
15224 (thread-db.o): Add $(gdb_vecs_h) dependency.
15225 (gdb_vecs.o): New rule.
15226 * thread-db.c: #include "gdb_vecs.h".
15227 (thread_db_load_search): Use a vector to iterate over path elements.
15228 Handle text appearing after "$pdir".
15229
15230 * configure.ac: Add check for strstr.
15231 * config.in: Regenerate.
15232 * configure: Regenerate.
15233
15234 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15235
15236 * hostio.c (handle_pread): If pread fails, fall back to attempting
15237 lseek/read.
15238 (handle_pwrite): Likewise for pwrite.
15239
15240 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15241
15242 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15243 between unsupported TYPE and unimplementable ADDR/LEN combination.
15244 (arm_insert_point): Act on new return value.
15245
15246 2012-07-31 Pedro Alves <palves@redhat.com>
15247
15248 * server.c (process_point_options): Only skip tokens if we find
15249 one that is unrecognized. Don't treat 'X' specially while
15250 skipping unrecognized tokens.
15251
15252 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15253
15254 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15255 to 4-byte-align HW breakpoint addresses for Thumb.
15256
15257 2012-07-27 Yao Qi <yao@codesourcery.com>
15258
15259 PR remote/14161.
15260
15261 * server.h: Declare gdb_agent_about_to_close.
15262 * target.c (kill_inferior): Include "agent.h".
15263 New. Send command 'kill'.
15264 * target.h (kill_inferior): Removed macro.
15265 * tracepoint.c (gdb_agent_about_to_close): New.
15266 (gdb_agent_helper_thread): Handle command 'close'.
15267 Wait endlessly until the inferior stops.
15268 Install gdb_agent_remove_socket to atexit hook.
15269 (agent_socket_name): New static variable.
15270 (gdb_agent_socket_init): Replace local variable 'name' with
15271 'agent_socket_name'.
15272 (gdb_agent_remove_socket): New.
15273
15274 2012-07-27 Yao Qi <yao@codesourcery.com>
15275
15276 * server.c (process_point_options): Stop at 'X' when parsing.
15277
15278 2012-07-19 Michael Eager <eager@eagercon.com>
15279
15280 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15281 to hw_execute.
15282 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15283 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15284 hardware breakpoint.
15285
15286 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15287
15288 * gdbserver/linux-low.c (initialize_low): Call
15289 linux_ptrace_init_warnings.
15290
15291 2012-07-02 Doug Evans <dje@google.com>
15292
15293 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15294 pointer to int.
15295
15296 2012-07-02 Stan Shebs <stan@codesourcery.com>
15297
15298 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15299 (ax.o): Add it to build rule.
15300 (ax-ipa.o): Ditto.
15301 (OBS): Add format.o.
15302 (IPA_OBS): Add format.o.
15303 * server.c (handle_query): Claim support for breakpoint commands.
15304 (process_point_options): Add command case.
15305 (process_serial_event): Leave running if there are printfs in
15306 effect.
15307 * mem-break.h (any_persistent_commands): Declare.
15308 (add_breakpoint_commands): Declare.
15309 (gdb_no_commands_at_breakpoint): Declare.
15310 (run_breakpoint_commands): Declare.
15311 * mem-break.c (struct point_command_list): New struct.
15312 (struct breakpoint): New field command_list.
15313 (any_persistent_commands): New function.
15314 (add_commands_to_breakpoint): New function.
15315 (add_breakpoint_commands): New function.
15316 (gdb_no_commands_at_breakpoint): New function.
15317 (run_breakpoint_commands): New function.
15318 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15319 locally.
15320 * ax.c: Include format.h.
15321 (ax_printf): New function.
15322 (gdb_eval_agent_expr): Add printf opcode.
15323
15324 2012-06-13 Yao Qi <yao@codesourcery.com>
15325
15326 * server.c (start_inferior): Remove duplicated writes to fields
15327 'last_resume_kind' and 'last_status' of 'current_inferior'.
15328
15329 2012-06-12 Yao Qi <yao@codesourcery.com>
15330 Pedro Alves <palves@redhat.com>
15331
15332 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15333 comment.
15334 * server.c (handle_v_cont): Extend comment.
15335
15336 2012-06-11 Yao Qi <yao@codesourcery.com>
15337
15338 * linux-low.c (linux_attach): Add 'static'.
15339
15340 2012-06-06 Yao Qi <yao@codesourcery.com>
15341
15342 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15343
15344 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15345
15346 Fix gcc -flto compilation warning.
15347 * server.c (main): Make variable multi_mode and attach volatile.
15348
15349 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15350
15351 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15352 if the platform doesn't know about it.
15353
15354 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15355
15356 * Makefile.in (SFILES): Add linux-tile-low.c.
15357 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15358 * configure.srv: Handle tilegx-*-linux*.
15359 * linux-tile-low.c: New file.
15360
15361 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15362
15363 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15364
15365 2012-05-24 Pedro Alves <palves@redhat.com>
15366
15367 PR gdb/7205
15368
15369 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15370
15371 2012-05-24 Pedro Alves <palves@redhat.com>
15372
15373 PR gdb/7205
15374
15375 Replace target_signal with gdb_signal throughout.
15376
15377 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15378
15379 * linux-low.c (linux_store_registers): Avoid the copying sequence
15380 when no data has been retrieved by ptrace.
15381
15382 2012-05-22 Will Deacon <will.deacon@arm.com>
15383
15384 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15385 Include asm/ptrace.h.
15386 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15387 already defined.
15388
15389 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15390
15391 * linux-low.c (linux_store_registers): Don't re-retrieve data
15392 with ptrace that has already been obtained from /proc. Always
15393 copy any data retrieved with ptrace to the buffer supplied.
15394
15395 2012-05-11 Yao Qi <yao@codesourcery.com>
15396 Pedro Alves <palves@redhat.com>
15397
15398 * linux-low.c (enum stopping_threads_kind): New.
15399 (stopping_threads): Change type to `enum stopping_threads_kind'.
15400 (handle_extended_wait): If stopping and suspending threads, leave
15401 the new_lwp suspended too.
15402 (linux_wait_for_event): Adjust.
15403 (stop_all_lwps): Set `stopping_threads' to
15404 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15405 whether we're suspending threads or just stopping them. Assert no
15406 recursion happens.
15407
15408 2012-04-29 Yao Qi <yao@codesourcery.com>
15409
15410 * server.h: Move some code to ...
15411 * gdbthread.h: ... here. New.
15412 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15413 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15414 (nto-low.o, win32-low.o): Likewise.
15415 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15416 * regcache.c, remote-utils.c, server.c: Likewise.
15417 * target.c, tracepoint.c, win32-low.c: Likewise.
15418
15419 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15420
15421 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15422 (PTRACE_ARG4_TYPE): Likewise.
15423 (PTRACE_XFER_TYPE): Likewise.
15424 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15425 ptrace to PTRACE_ARG3_TYPE.
15426 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15427 (PTRACE_ARG4_TYPE): Likewise.
15428 (PTRACE_XFER_TYPE): Likewise.
15429 (linux_detach_one_lwp): Cast fourth argument of
15430 ptrace to long then PTRACE_ARG4_TYPE.
15431 (regsets_fetch_inferior_registers): Cast third argument of
15432 ptrace to long then PTRACE_ARG3_TYPE.
15433 (regsets_store_inferior_registers): Likewise.
15434
15435 2012-04-20 Pedro Alves <palves@redhat.com>
15436
15437 * configure: Regenerate.
15438
15439 2012-04-19 Pedro Alves <palves@redhat.com>
15440
15441 * Makefile.in (GNULIB_BUILDDIR): New.
15442 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15443 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15444 (all, install-only, uninstall, clean-info, all-lib, clean): No
15445 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15446 (maintainer-clean realclean distclean): Use subdir_do.
15447 (subdir_do): New.
15448 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15449 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15450 * acinclude.m4: Include acx_configure_dir.m4.
15451 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15452 calls. Call AC_PROG_RANLIB. Configure gnulib using
15453 ACX_CONFIGURE_DIR.
15454 (GNULIB): New.
15455 (GNULIB_STDINT_H): Adjust.
15456 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15457 * gdbreplay.c: Include build-gnulib/config.h.
15458 * server.h: Likewise.
15459 * aclocal.m4: Regenerate.
15460 * config.in: Regenerate.
15461 * configure: Regenerate.
15462
15463 2012-04-19 Pedro Alves <palves@redhat.com>
15464
15465 * Makefile.in (LIBGNU, INCGNU): Adjust.
15466 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15467 (all, install-only, uninstall, clean-info, all-lib, clean)
15468 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15469 * configure.ac: Adjust AC_OUTPUT output.
15470 * aclocal.m4: Regenerate.
15471 * configure: Regenerate.
15472
15473 2012-04-19 Pedro Alves <palves@redhat.com>
15474
15475 * Makefile.in (generated_files): New.
15476 (server_h): Remove the explicit dependency on config.h, and depend
15477 on $generated_files.
15478
15479 2012-04-19 Pedro Alves <palves@redhat.com>
15480
15481 * Makefile.in (INCGNU): Add -Ignulib.
15482
15483 2012-04-19 Pedro Alves <palves@redhat.com>
15484
15485 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15486 (INCGNU): ... this, and spell out -I here.
15487 (GNULIB_LIB): Rename to ...
15488 (LIBGNU): ... this.
15489 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15490
15491 2012-04-19 Pedro Alves <palves@redhat.com>
15492
15493 * config.in: Regenerate.
15494
15495 2012-04-19 Pedro Alves <palves@redhat.com>
15496
15497 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15498 * server.h (memmem): Remove declaration.
15499 * config.in: Regenerate.
15500 * configure: Regenerate.
15501
15502 2012-04-19 Yao Qi <yao@codesourcery.com>
15503
15504 * Makefile.in (SFILES): Add common/vec.c.
15505 (OBS): Add vec.o.
15506 (vec.o): New rule.
15507
15508 2012-04-19 Yao Qi <yao@codesourcery.com>
15509
15510 * remote-utils.c (prepare_resume_reply): Replace with macro
15511 target_core_of_thread.
15512 * server.c (handle_qxfer_threads_proper): Likewise.
15513 * target.h (traget_core_of_thread): New macro.
15514
15515 2012-04-18 Pedro Alves <palves@redhat.com>
15516
15517 * aclocal.m4: Regenerate.
15518 * configure: Regenerate.
15519
15520 2012-04-16 Yao Qi <yao@codesourcery.com>
15521
15522 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15523 duplicated on address.
15524
15525 2012-04-16 Yao Qi <yao@codesourcery.com>
15526
15527 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15528 (struct tracepoint_action_ops) <send>: New field.
15529 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15530 (agent_expr_send, x_tracepoint_action_send): New.
15531 (l_tracepoint_action_send): New.
15532 (cmd_qtdp): Download and install tracepoint
15533 according to `use_agent'.
15534 (run_inferior_command): Add one more parameter `len'.
15535 Update callers.
15536 (tracepoint_send_agent): New.
15537 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15538
15539 2012-04-16 Yao Qi <yao@codesourcery.com>
15540
15541 * tracepoint.c (download_tracepoints): Moved to ...
15542 (cmd_qtstart): ... here.
15543
15544 2012-04-14 Yao Qi <yao@codesourcery.com>
15545
15546 * tracepoint.c: Include inttypes.h.
15547 (struct collect_memory_action): Use sized types.
15548 (struct tracepoint): Likewise.
15549 (cmd_qtdp, stop_tracing): Update print specifiers.
15550 (cmd_qtp, response_tracepoint): Likewise.
15551 (collect_data_at_tracepoint): Likewise.
15552 (collect_data_at_step): Likewise.
15553
15554 2012-04-14 Yao Qi <yao@codesourcery.com>
15555
15556 Import gnulib module inttypes.
15557 * aclocal.m4, config.in, configure: Regenerated.
15558
15559 2012-04-14 Yao Qi <yao@codesourcery.com>
15560
15561 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15562 Makefile and config.status at last.
15563
15564 2012-04-13 Yao Qi <yao@codesourcery.com>
15565
15566 * tracepoint.c: Include stdint.h unconditionally.
15567
15568 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15569
15570 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15571 on BFD_HAVE_SYS_PROCFS_TYPE.
15572 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15573 * configure: Regenerate.
15574 * config.in: Likewise.
15575
15576 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15577
15578 * Makefile.in (clean): Also remove x32.c x32-linux.c
15579 x32-avx.c x32-avx-linux.c.
15580 (x32.o): New target.
15581 (x32.c): Likewise.
15582 (x32-linux.o): Likewise.
15583 (x32-linux.c): Likewise.
15584 (x32-avx.o): Likewise.
15585 (x32-avx.c): Likewise.
15586 (x32-avx-linux.o): Likewise.
15587 (x32-avx-linux.c): Likewise.
15588
15589 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15590 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15591 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15592 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15593 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15594 i386/x32-avx-linux.xml.
15595
15596 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15597 (init_registers_x32_avx_linux): Likwise.
15598 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15599 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15600
15601 2012-04-13 Pedro Alves <palves@redhat.com>
15602
15603 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15604 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15605 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15606 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15607 the sub-make.
15608
15609 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15610
15611 * linux-x86-low.c (compat_x32_clock_t): New.
15612 (compat_x32_siginfo_t): Likewise.
15613 (compat_x32_siginfo_from_siginfo): Likewise.
15614 (siginfo_from_compat_x32_siginfo): Likewise.
15615 (linux_is_elf64): Likewise.
15616 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15617 and siginfo_from_compat_x32_siginfo for x32.
15618 (x86_arch_setup): Set linux_is_elf64.
15619
15620 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15621
15622 PR gdb/13969
15623 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15624 e_machine field.
15625 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15626 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15627 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15628 compatible with process.
15629
15630 2012-04-12 Yao Qi <yao@codesourcery.com>
15631
15632 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15633 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15634 (install-only, install-info, clean): Handle sub dir gnulib.
15635 (all-lib, am--refresh): New targets.
15636 (memmem.o): Remove target.
15637 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15638 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15639 (AC_REPLACE_FUNCS): Remove memmem.
15640 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15641 (AC_OUTPUT): Generate Makefile in gnulib/.
15642 * aclocal.m4, config.in, configure: Regenerated.
15643
15644 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15645
15646 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15647
15648 2012-04-05 Pedro Alves <palves@redhat.com>
15649
15650 -Werror=strict-aliasing
15651
15652 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15653 pointer.
15654
15655 2012-04-04 Pedro Alves <palves@redhat.com>
15656
15657 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15658 (sparc_store_gregset_from_stack, sparc_store_gregset)
15659 (sparc_breakpoint_at): Fix formatting.
15660
15661 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15662
15663 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15664 are available.
15665 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15666 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15667 * config.in: Regenerate.
15668 * configure: Likewise.
15669
15670 2012-03-29 Pedro Alves <palves@redhat.com>
15671
15672 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15673 Correct ptrace arguments.
15674
15675 2012-03-28 Pedro Alves <palves@redhat.com>
15676
15677 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15678 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15679 (IA64_FR1_REGNUM): New defines.
15680 (ia64_fetch_register): New.
15681 (the_low_target): Install it.
15682 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15683 field.
15684 * linux-low.c (linux_fetch_registers): Try the
15685 the_low_target.fetch_register hook first.
15686
15687 * linux-arm-low.c (the_low_target): Adjust.
15688 * linux-bfin-low.c (the_low_target): Adjust.
15689 * linux-cris-low.c (the_low_target): Adjust.
15690 * linux-crisv32-low.c (the_low_target): Adjust.
15691 * linux-m32r-low.c (the_low_target): Adjust.
15692 * linux-m68k-low.c (the_low_target): Adjust.
15693 * linux-mips-low.c (the_low_target): Adjust.
15694 * linux-ppc-low.c (the_low_target): Adjust.
15695 * linux-s390-low.c (the_low_target): Adjust.
15696 * linux-sh-low.c (the_low_target): Adjust.
15697 * linux-sparc-low.c (the_low_target): Adjust.
15698 * linux-tic6x-low.c (the_low_target): Adjust.
15699 * linux-x86-low.c (the_low_target): Adjust.
15700 * linux-xtensa-low.c (the_low_target): Adjust.
15701
15702 2012-03-26 Pedro Alves <palves@redhat.com>
15703
15704 * server.c (handle_qxfer_libraries): Don't bail early if
15705 the_target->qxfer_libraries_svr4 is not NULL.
15706
15707 2012-03-26 Pedro Alves <palves@redhat.com>
15708
15709 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15710
15711 2012-03-23 Pedro Alves <palves@redhat.com>
15712
15713 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15714 "library-list-svr4" element's start tag when the the DSO list is
15715 empty.
15716
15717 2012-03-23 Pedro Alves <palves@redhat.com>
15718
15719 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15720 a variable whose type size is the same as the inferior's pointer
15721 size.
15722
15723 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15724
15725 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15726 struct siginfo.
15727 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15728 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15729 * linux-low.h: Include <signal.h>.
15730 (struct siginfo): Remove forward declaration.
15731 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15732 struct siginfo.
15733
15734 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15735
15736 * .gitignore: Ignore more files.
15737
15738 2012-03-19 Pedro Alves <palves@redhat.com>
15739 Jan Kratochvil <jan.kratochvil@redhat.com>
15740
15741 * server.c (cont_thread, general_thread): Add describing comments.
15742 (start_inferior): Clear `cont_thread'.
15743 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15744 of a process.
15745
15746 2012-03-15 Yao Qi <yao@codesourcery.com>
15747
15748 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15749 handling to ...
15750 (cmd_qtdp): ... here.
15751
15752 2012-03-15 Yao Qi <yao@codesourcery.com>
15753
15754 * tracepoint.c (struct tracepoint_action_ops): New.
15755 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15756 (m_tracepoint_action_download): New.
15757 (r_tracepoint_action_download): New.
15758 (x_tracepoint_action_download): New.
15759 (l_tracepoint_action_download): New.
15760 (add_tracepoint_action): Install `action->ops' according type.
15761 (download_tracepoint_1): Move code `download' function pointer
15762 of various tracepoint_action_ops.
15763
15764 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15765
15766 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15767 linux_ptrace_attach_warnings.
15768
15769 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15770
15771 * Makefile.in (linux-ptrace.o): New.
15772 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15773 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15774 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15775 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15776 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15777 of these targets.
15778 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15779
15780 2012-03-08 Yao Qi <yao@codesourcery.com>
15781 Pedro Alves <palves@redhat.com>
15782
15783 Fix PR server/13392.
15784 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15785 offset of JMP insn.
15786 * tracepoint.c (remove_tracepoint): New.
15787 (cmd_qtdp): Call remove_tracepoint when failed to install.
15788
15789 2012-03-07 Pedro Alves <palves@redhat.com>
15790
15791 * linux-low.c (get_detach_signal): New.
15792 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15793 Pass on pending signals to PTRACE_DETACH. Check the result of the
15794 ptrace call.
15795 * server.c (program_signals, program_signals_p): New.
15796 (handle_general_set): Handle QProgramSignals.
15797 * server.h (program_signals, program_signals_p): Declare.
15798
15799 2012-03-05 Pedro Alves <palves@redhat.com>
15800 Jan Kratochvil <jan.kratochvil@redhat.com>
15801
15802 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15803 New comment why.
15804
15805 2012-03-03 Yao Qi <yao@codesourcery.com>
15806
15807 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15808 agent_look_up_symbols.
15809
15810 2012-03-03 Yao Qi <yao@codesourcery.com>
15811
15812 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15813 (linux-x86-low.o): Likewise.
15814 * server.h: Remove in_process_agent_loaded.
15815 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15816 common/agent.c.
15817 Update callers.
15818
15819 2012-03-03 Yao Qi <yao@codesourcery.com>
15820
15821 * tracepoint.c (gdb_agent_capability): New global.
15822 (in_process_agent_loaded_ust): Renamed to
15823 `in_process_agent_supports_ust'.
15824 Update callers.
15825 (in_process_agent_supports_ust): Call agent_capability_check.
15826 (clear_installed_tracepoints): Assert that agent supports
15827 agent.
15828
15829 2012-03-03 Yao Qi <yao@codesourcery.com>
15830
15831 * linux-low.c (linux_supports_agent): New.
15832 (linux_target_ops): Initialize field `supports_agent' with
15833 linux_supports_agent.
15834 * target.h (struct target_ops) <supports_agent>: New.
15835 (target_supports_agent): New macro.
15836 * server.c (handle_general_set): Handle packet 'QAgent'.
15837 (handle_query): Send `QAgent+'.
15838 * Makefile.in (server.o): Depends on agent.h.
15839
15840 2012-03-03 Yao Qi <yao@codesourcery.com>
15841
15842 * Makefile.in (OBS): Add agent.o.
15843 Add new rule for agent.o.
15844 Track dependence of tracepoint.c on agent.h.
15845 * tracepoint.c (run_inferior_command_1):
15846 (run_inferior_command): Call agent_run_command.
15847 (gdb_ust_connect_sync_socket): Deleted. Move it to
15848 common/agent.c.
15849 (resume_thread, stop_thread): Likewise.
15850 (gdb_ust_socket_init): Renamed to ...
15851 (gdb_agent_socket_init): ... New.
15852 (gdb_ust_thread): Renamed to ...
15853 (gdb_agent_helper_thread): ... New.
15854 (gdb_ust_init): Move some code to ...
15855 (gdb_agent_init): ... here. New.
15856 [HAVE_UST]: Call gdb_ust_init.
15857 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15858 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15859 * config.in, configure: Regenerated.
15860
15861 2012-03-02 Pedro Alves <palves@redhat.com>
15862
15863 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15864 * linux-low.c (struct simple_pid_list): New.
15865 (stopped_pids): New a struct simple_pid_list pointer.
15866 (add_to_pid_list, pull_pid_from_list): New.
15867 (handle_extended_wait): Don't assume the first signal new children
15868 report is SIGSTOP. Adjust call to pull_pid_from_list.
15869 (linux_wait_for_lwp): Adjust.
15870
15871 2012-03-02 Yao Qi <yao@codesourcery.com>
15872
15873 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15874 debug log.
15875
15876 2012-03-02 Yao Qi <yao@codesourcery.com>
15877
15878 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15879 `stop_pc' and `tpoint'. Update caller.
15880
15881 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15882
15883 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15884 * linux-low.c (use_linux_regsets): New macro.
15885 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15886 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15887 (linux_register_in_regsets): New function.
15888 (usr_fetch_inferior_registers): Skip registers covered by
15889 regsets.
15890 (usr_store_inferior_registers): Likewise.
15891 (usr_fetch_inferior_registers): New macro.
15892 (usr_store_inferior_registers): Likewise.
15893 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15894 (linux_store_registers): Likewise.
15895 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15896 prototype.
15897 (init_registers_mips64_dsp_linux): Likewise.
15898 (init_registers_mips_linux): New macro.
15899 (init_registers_mips_dsp_linux): Likewise.
15900 (mips_dsp_num_regs): Likewise.
15901 (DSP_BASE, DSP_CONTROL): New fallback macros.
15902 (mips_base_regs): New macro.
15903 (mips_regmap): Use it. Fix the size.
15904 (mips_dsp_regmap): New variable.
15905 (mips_dsp_regset_bitmap): Likewise.
15906 (mips_arch_setup): New function.
15907 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15908 than mips_regmap.
15909 (mips_cannot_store_register): Likewise.
15910 (the_low_target): Update .arch_setup, .num_regs and .regmap
15911 initializers. Add .regset_bitmap initializer.
15912 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15913 initializer.
15914 * linux-bfin-low.c (the_low_target): Likewise.
15915 * linux-cris-low.c (the_low_target): Likewise.
15916 * linux-crisv32-low.c (the_low_target): Likewise.
15917 * linux-ia64-low.c (the_low_target): Likewise.
15918 * linux-m32r-low.c (the_low_target): Likewise.
15919 * linux-m68k-low.c (the_low_target): Likewise.
15920 * linux-ppc-low.c (the_low_target): Likewise.
15921 * linux-s390-low.c (the_low_target): Likewise.
15922 * linux-sh-low.c (the_low_target): Likewise.
15923 * linux-sparc-low.c (the_low_target): Likewise.
15924 * linux-tic6x-low.c (the_low_target): Likewise.
15925 * linux-x86-low.c (the_low_target): Likewise.
15926 * linux-xtensa-low.c (the_low_target): Likewise.
15927 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15928 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15929 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15930 srv_xmlfiles.
15931 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15932 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15933
15934 2012-02-29 Yao Qi <yao@codesourcery.com>
15935 Pedro Alves <palves@redhat.com>
15936
15937 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15938 `step_over_finished' is true.
15939
15940 2012-02-27 Pedro Alves <palves@redhat.com>
15941
15942 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15943 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15944
15945 2012-02-27 Pedro Alves <palves@redhat.com>
15946
15947 PR server/9684
15948 * linux-low.c (pid_is_stopped): New.
15949 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15950
15951 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15952
15953 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15954 of conditions.
15955
15956 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15957
15958 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15959
15960 2012-02-24 Luis Machado <lgustavo@codesourcery>
15961
15962 * server.c (handle_query): Advertise support for target-side
15963 breakpoint condition evaluation.
15964 (process_point_options): New function.
15965 (process_serial_event): When inserting a breakpoint, check for
15966 a target-side condition that should be evaluated.
15967
15968 * mem-break.c: Include regcache.h and ax.h.
15969 (point_cond_list_t): New data structure.
15970 (breakpoint) <cond_list>: New field.
15971 (find_gdb_breakpoint_at): Make non-static.
15972 (delete_gdb_breakpoint_at): Clear any target-side
15973 conditions.
15974 (clear_gdb_breakpoint_conditions): New function.
15975 (add_condition_to_breakpoint): Likewise.
15976 (add_breakpoint_condition): Likewise.
15977 (gdb_condition_true_at_breakpoint): Likewise.
15978 (gdb_breakpoint_here): Return result directly instead
15979 of going through a local variable.
15980
15981 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15982 (clear_gdb_breakpoint_conditions): Likewise.
15983 (add_breakpoint_condition): Likewise.
15984 (gdb_condition_true_at_breakpoint): Likewise.
15985
15986 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15987 (need_step_over_p): Take target-side breakpoint condition into
15988 consideration.
15989
15990 2012-02-24 Luis Machado <lgustavo@codesourcery>
15991
15992 * server.h: Include tracepoint.h.
15993 (agent_mem_read, agent_get_trace_state_variable_value,
15994 agent_set_trace_state_variable_value,
15995 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15996 get_set_tsv_func_addr): New prototypes.
15997
15998 * ax.h: New include file.
15999 * ax.c: New source file.
16000
16001 * tracepoint.c: Include ax.h.
16002 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
16003 agent_expr, eval_result_type): Move to ax.h.
16004 (parse_agent_expr): Rename to ...
16005 (gdb_parse_agent_expr): ... this, make it non-static and move
16006 to ax.h.
16007 (unparse_agent_expr) Rename to ...
16008 (gdb_unparse_agent_expr): ... this, make it non-static and move
16009 to ax.h.
16010 (eval_agent_expr): Rename to ...
16011 (eval_tracepoint_agent_expr): ... this.
16012 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
16013 forward declarations.
16014 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
16015 (agent_get_trace_state_variable_value): New function.
16016 (agent_set_trace_state_variable_value): New function.
16017 (cmd_qtdp): Call gdb_parse_agent_expr (...).
16018 (response_tracepoint): Call gdb_unparse_agent_expr (...).
16019 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
16020 (condition_true_at_tracepoint): Likewise.
16021 (parse_agent_expr): Rename to ...
16022 (gdb_parse_agent_expr): ... this and move to ax.c.
16023 (unparse_agent_expr): Rename to ...
16024 (gdb_unparse_agent_expr): ... this and move to ax.c.
16025 (gdb_agent_op_name): Move to ax.c.
16026 (eval_agent_expr): Rename to ...
16027 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
16028 and move to ax.c.
16029 (eval_tracepoint_agent_expr): New function.
16030 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
16031 non-static.
16032 (current_insn_ptr, emit_error, struct bytecode_address): Move to
16033 ax.c.
16034 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
16035 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
16036 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
16037 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
16038 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
16039 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
16040 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
16041 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
16042 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
16043 (compile_bytecodes): Remove forward declaration.
16044 (is_goto_target): Move to ax.c.
16045 (compile_bytecodes): Move to ax.c and call
16046 agent_get_trace_state_variable_value (...) and
16047 agent_set_trace_state_variable_value (...).
16048
16049 * Makefile.in: Update ax.c and IPA dependencies.
16050
16051 2012-02-24 Pedro Alves <palves@redhat.com>
16052
16053 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
16054 (cmd_bigqtbuffer_circular): ... this. Only handle
16055 'QTBuffer:circular:'.
16056 (handle_tracepoint_general_set): Adjust.
16057
16058 2012-02-16 Yao Qi <yao@codesourcery.com>
16059
16060 * inferiors.c: Move code to ...
16061 * dll.c: .... here. New.
16062 * server.h: Declare clear_dlls.
16063 * Makefile.in (SFILES): Add dll.c.
16064 (OBS): Add dll.o
16065 (dll.o): New rule.
16066
16067 2012-02-11 Yao Qi <yao@codesourcery.com>
16068
16069 * server.c: (handle_monitor_command): Add a new parameter
16070 `own_buf'.
16071 (handle_query): Update caller.
16072
16073 2012-02-09 Joel Brobecker <brobecker@adacore.com>
16074
16075 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
16076 * configure, config.in: Regenerate.
16077 * hostio.c: Provide an alternate implementation if HAVE_READLINK
16078 is not defined.
16079
16080 2012-02-02 Pedro Alves <palves@redhat.com>
16081
16082 Try SIGKILL first, then PTRACE_KILL.
16083 * linux-low.c (linux_kill_one_lwp): New.
16084 (linux_kill_one_lwp): Rename to ...
16085 (kill_one_lwp_callback): ... this. Use the new
16086 linux_kill_one_lwp.
16087
16088 2012-02-02 Pedro Alves <palves@redhat.com>
16089
16090 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
16091 inferior.
16092
16093 2012-01-27 Pedro Alves <palves@redhat.com>
16094
16095 * linux-low.c (linux_child_pid_to_exec_file): Delete.
16096 (elf_64_file_p): Make static.
16097 (linux_pid_exe_is_elf_64_file): New.
16098 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
16099 Delete declarations.
16100 (linux_pid_exe_is_elf_64_file): Declare.
16101 * linux-x86-low.c (x86_arch_setup): Use
16102 linux_pid_exe_is_elf_64_file.
16103
16104 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16105
16106 * linux-low.c (linux_wait_for_event_1): Rename to ...
16107 (linux_wait_for_event): ... here and merge it with former
16108 linux_wait_for_event - new variable wait_ptid, use it.
16109 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
16110
16111 2012-01-23 Pedro Alves <palves@redhat.com>
16112
16113 * server.c (main): Avoid yet another case of infinite loop while
16114 detaching/killing after a longjmp.
16115
16116 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16117
16118 Code cleanup.
16119 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
16120
16121 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
16122
16123 * hostio.c (handle_readlink): New function.
16124 (handle_vFile): Call it to handle "vFile:readlink" packets.
16125
16126 2012-01-20 Pedro Alves <palves@redhat.com>
16127 Ulrich Weigand <ulrich.weigand@linaro.org>
16128
16129 * server.c (handle_v_requests): Only support vAttach and vRun to
16130 start multiple processes when in extended protocol mode.
16131
16132 2012-01-17 Pedro Alves <palves@redhat.com>
16133
16134 * tracepoint.c (initialize_tracepoint): Use mmap instead of
16135 memalign plus mprotect to allocate the scratch buffer.
16136
16137 2012-01-13 Pedro Alves <palves@redhat.com>
16138
16139 * server.c (attach_inferior): Clear `cont_thread'.
16140
16141 2012-01-13 Pedro Alves <palves@redhat.com>
16142
16143 * server.c (main): Avoid infinite loop while detaching/killing
16144 after a longjmp.
16145
16146 2012-01-09 Doug Evans <dje@google.com>
16147
16148 * server.c (start_inferior): Set last_ptid in --wrapper case.
16149
16150 2012-01-06 Yao Qi <yao@codesourcery.com>
16151
16152 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
16153 defined.
16154 [IN_PROCESS_AGENT] (debug_agent): New global variable.
16155
16156 2012-01-04 Yao Qi <yao@codesourcery.com>
16157
16158 * tracepoint.c (cmd_qtdp): Print debug message
16159 for static tracepoint.
16160
16161 2012-01-04 Yao Qi <yao@codesourcery.com>
16162
16163 * tracepoint.c (trace_vdebug): Differentiate debug message
16164 between gdbserver and IPA.
16165
16166 2012-01-03 Yao Qi <yao@codesourcery.com>
16167
16168 * tracepoint.c (tracepoint_was_hit): Don't collect for
16169 static tracepoint.
16170
16171 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16172
16173 * terminal.h: Reformat copyright header.
16174
16175 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16176
16177 * server.c (gdbserver_version): Update copyright year.
16178 * gdbreplay.c (gdbreplay_version): Likewise.
16179
16180 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16181
16182 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16183
16184 Revert:
16185 2011-12-18 Hui Zhu <teawater@gmail.com>
16186 * linux-low.c (linux_create_inferior): Save return value to ret.
16187
16188 2011-12-18 Hui Zhu <teawater@gmail.com>
16189
16190 * linux-low.c (linux_create_inferior): Save return value to ret.
16191
16192 2011-12-16 Doug Evans <dje@google.com>
16193
16194 * linux-low.c (linux_create_inferior): If stdio connection,
16195 redirect stdin from /dev/null, stdout to stderr.
16196 * remote-utils.c (remote_is_stdio): New static global.
16197 (remote_connection_is_stdio): New function.
16198 (remote_prepare): Handle stdio connection.
16199 (remote_open): Ditto.
16200 (remote_close): Don't close stdin for stdio connections.
16201 (read_prim,write_prim): New functions. Replace all calls to
16202 read/write to these.
16203 * server.c (main): Watch for "-" argument. Move call to
16204 remote_prepare before start_inferior.
16205 * server.h (STDIO_CONNECTION_NAME): New macro.
16206 (remote_connection_is_stdio): Declare.
16207
16208 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16209 in debugging output.
16210
16211 2011-12-15 Yao Qi <yao@codesourcery.com>
16212
16213 * tracepoint.c: Include sys/syscall.h.
16214 (gdb_ust_thread): Remove preprocessor conditional.
16215
16216 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16217
16218 * linux-low.c (linux_detach_one_lwp): Call
16219 the_low_target.prepare_to_resume before detaching.
16220
16221 2011-12-14 Yao Qi <yao@codesourcery.com>
16222
16223 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16224 of write.
16225
16226 2011-12-14 Yao Qi <yao@codesourcery.com>
16227
16228 * i386-low.c (i386_low_stopped_data_address): Initialize local
16229 variable `control'.
16230
16231 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16232
16233 PR remote/13492
16234
16235 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16236 DR_CONTROL unless necessary. Extend comments.
16237 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16238 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16239
16240 2011-12-13 Yao Qi <yao@codesourcery.com>
16241
16242 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16243 macros.
16244 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16245
16246 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16247
16248 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16249 Print new debug message for such case.
16250
16251 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16252
16253 Fix overlapping memcpy.
16254 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16255 the read_inferior_memory transfer.
16256 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16257 write_inferior_memory transfer.
16258 (set_fast_tracepoint_jump): New variable buf. Use it for the
16259 read_inferior_memory and write_inferior_memory transfers.
16260 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16261 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16262 Use it for the write_inferior_memory transfer.
16263 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16264 buffers.
16265
16266 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16267
16268 * linux-low.c (fetch_register, store_register): Make code
16269 consistent, fix formatting.
16270
16271 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16272
16273 * linux-low.c (usr_store_inferior_registers): Factor out code
16274 to handle individual registers into...
16275 (store_register): ... this new function.
16276
16277 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16278
16279 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16280 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16281 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16282 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16283 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16284 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16285 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16286 (srv_xmlfiles): Add new XML files.
16287
16288 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16289 and <sys/uio.h>.
16290 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16291 (init_registers_s390_linux32v1): Add prototype.
16292 (init_registers_s390_linux32v2): Likewise.
16293 (init_registers_s390_linux64v1): Likewise.
16294 (init_registers_s390_linux64v2): Likewise.
16295 (init_registers_s390x_linux64v1): Likewise.
16296 (init_registers_s390x_linux64v2): Likewise.
16297 (s390_num_regs): Increment to 52.
16298 (s390_regmap): Add orig_r2 register.
16299 (s390_num_regs_3264): Increment to 68.
16300 (s390_regmap_3264): Add orig_r2 register.
16301 (s390_collect_ptrace_register): Handle orig_r2 register.
16302 (s390_supply_ptrace_register): Likewise.
16303 (s390_fill_last_break): New function.
16304 (s390_store_last_break): Likewise.
16305 (s390_fill_system_call): New function.
16306 (s390_store_system_call): Likewise.
16307 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16308 register sets.
16309 (s390_check_regset): New function.
16310 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16311 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16312 Update target_regsets for available register sets.
16313
16314 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16315 Jan Kratochvil <jan.kratochvil@redhat.com>
16316
16317 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16318 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16319 New.
16320 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16321 * linux-low.h (struct process_info_private): New member r_debug.
16322 * server.c (handle_qxfer_libraries): Call
16323 the_target->qxfer_libraries_svr4.
16324 (handle_qxfer_libraries_svr4): New function.
16325 (qxfer_packets): New entry "libraries-svr4".
16326 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16327 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16328 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16329 PACKET_qXfer_libraries_svr4.
16330
16331 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16332
16333 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16334 PSW address/mask between 8-byte and 16-byte formats.
16335 (s390_supply_ptrace_register): Likewise.
16336 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16337 basic addressing mode bit.
16338
16339 2011-11-24 Stan Shebs <stan@codesourcery.com>
16340
16341 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16342
16343 2011-11-17 Stan Shebs <stan@codesourcery.com>
16344
16345 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16346 (tracing_start_time): New global.
16347 (tracing_stop_time): New global.
16348 (tracing_user_name): New global.
16349 (tracing_notes): New global.
16350 (tracing_stop_note): New global.
16351 (cmd_qtstart): Set traceframe_usage, start_time.
16352 (stop_tracing): Set stop_time.
16353 (cmd_qtstatus): Report additional status.
16354 (cmd_qtp): New function.
16355 (handle_tracepoint_query): Call it.
16356 (cmd_qtnotes): New function.
16357 (handle_tracepoint_general_set): Call it.
16358 (get_timestamp): Rename from tsv_get_timestamp.
16359
16360 2011-11-14 Stan Shebs <stan@codesourcery.com>
16361 Kwok Cheung Yeung <kcy@codesourcery.com>
16362
16363 * linux-x86-low.c (small_jump_insn): New.
16364 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16365 trampoline and error message, build a trampoline and issue a small
16366 jump instruction to it.
16367 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16368 trampoline and error message.
16369 (x86_get_min_fast_tracepoint_insn_len): New.
16370 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16371 * linux-low.h (struct linux_target_ops): Add arguments to
16372 install_fast_tracepoint_jump_pad operation, add new operation.
16373 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16374 arguments.
16375 (linux_get_min_fast_tracepoint_insn_len): New function.
16376 (linux_target_op): Add new operation.
16377 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16378 (gdb_trampoline_buffer_end): Ditto.
16379 (gdb_trampoline_buffer_error): Ditto.
16380 (struct ipa_sym_addresses): Add fields for new IPA variables.
16381 (symbol_list): Add entries for new IPA variables.
16382 (struct tracepoint): Add fields to hold the address range of the
16383 trampoline used by the tracepoint.
16384 (trampoline_buffer_head): New static variable.
16385 (trampoline_buffer_tail): Ditto.
16386 (claim_trampoline_space): New function.
16387 (have_fast_tracepoint_trampoline_buffer): New function.
16388 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16389 structure.
16390 (install_fast_tracepoint): Ditto, also add error buffer argument.
16391 (cmd_qtminftpilen): New function.
16392 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16393 (fast_tracepoint_from_trampoline_address): New function.
16394 (fast_tracepoint_collecting): Handle trampoline as part of jump
16395 pad space.
16396 (set_trampoline_buffer_space): New function.
16397 (initialize_tracepoint): Initialize new IPA variables.
16398 * target.h (struct target_ops): Add arguments to
16399 install_fast_tracepoint_jump_pad operation, add new
16400 get_min_fast_tracepoint_insn_len operation.
16401 (target_get_min_fast_tracepoint_insn_len): New.
16402 (install_fast_tracepoint_jump_pad): Add arguments.
16403 * server.h (IPA_BUFSIZ): Define.
16404 * linux-i386-ipa.c: Include extra header files.
16405 (initialize_fast_tracepoint_trampoline_buffer): New function.
16406 (initialize_low_tracepoint): Call it.
16407 * server.h (set_trampoline_buffer_space): Declare.
16408 (claim_trampoline_space): Ditto.
16409 (have_fast_tracepoint_trampoline_buffer): Ditto.
16410
16411 2011-11-14 Yao Qi <yao@codesourcery.com>
16412
16413 * server.c (handle_query): Handle InstallInTrace for qSupported.
16414 * tracepoint.c (add_tracepoint): Sort list.
16415 (install_tracepoint, download_tracepoint): New.
16416 (cmd_qtdp): Call them to install and download tracepoints.
16417 (sort_tracepoints): Removed.
16418 (cmd_qtstart): Update.
16419
16420 2011-11-14 Yao Qi <yao@codesourcery.com>
16421
16422 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16423 * mem-break.h: Declare.
16424 * tracepoint.c (cmd_qtstart): Move some code to ...
16425 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16426 New.
16427 (download_tracepoints): Move some code to ...
16428 (download_tracepoint_1): ... here. New.
16429
16430 2011-11-08 Yao Qi <yao@codesourcery.com>
16431
16432 * remote-utils.c (relocate_instruction): A comment fix.
16433
16434 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16435
16436 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16437 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16438 dr_status_mirror and dr_control_mirror from debug_reg_state.
16439 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16440 (i386_initial_stuff): Remove use of deleted globals.
16441 (i386_get_thread_context, i386_set_thread_context,
16442 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16443 from debug_reg_state.
16444
16445 2011-11-05 Yao Qi <yao@codesourcery.com>
16446
16447 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16448 address as TPOINT's.
16449
16450 2011-11-02 Stan Shebs <stan@codesourcery.com>
16451
16452 * tracepoint.c (agent_mem_read_string): New function.
16453 (eval_agent_expr): Call it for tracenz.
16454 * server.c (handle_query): Report support for tracenz.
16455
16456 2011-11-02 Yao Qi <yao@codesourcery.com>
16457
16458 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16459
16460 2011-11-02 Yao Qi <yao@codesourcery.com>
16461
16462 * target.h: Fix a typo in comment.
16463
16464 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16465
16466 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16467 clobber the breakpoints' shadows with fast tracepoint jumps.
16468 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16469 * target.c (write_inferior_memory): Also pass MYADDR down to
16470 check_mem_write.
16471
16472 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16473
16474 * configure.ac: Check support for personality routine.
16475 * configure: Regenerate.
16476 * config.in: Likewise.
16477 * linux-low.c: Include <sys/personality.h>.
16478 Define ADDR_NO_RANDOMIZE if necessary.
16479 (linux_create_inferior): Disable address space randomization when
16480 forking inferior, if requested.
16481 (linux_supports_disable_randomization): New function.
16482 (linux_target_ops): Install it.
16483 * server.h (disable_randomization): Declare.
16484 * server.c (disable_randomization): New global variable.
16485 (handle_general_set): Handle QDisableRandomization.
16486 (handle_query): Likewise for qSupported.
16487 (main): Support --disable-randomization and --no-disable-randomization
16488 command line arguments.
16489 * target.h (struct target_ops): Add supports_disable_randomization.
16490 (target_supports_disable_randomization): New macro.
16491
16492 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16493
16494 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16495 ifdef check.
16496 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16497 [!PT_GETDSBT] (target_loadmap): New definition.
16498 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16499 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16500 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16501 and PT_GETDSBT to LINUX_LOADMAP.
16502 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16503 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16504
16505 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16506
16507 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16508 (arm_linux_hwbp_cap): New static variable.
16509 (arm_linux_get_hwbp_cap): Replace by ...
16510 (arm_linux_init_hwbp_cap): ... this new function.
16511 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16512 (arm_linux_get_hw_watchpoint_count): Likewise.
16513 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16514 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16515 (arm_prepare_to_resume): Use perror_with_name instead of error.
16516
16517 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16518
16519 * linux-arm-low.c: Include <signal.h>.
16520 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16521 (struct arm_linux_hwbp_cap): New data type.
16522 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16523 (struct arm_linux_hw_breakpoint): New data type.
16524 (MAX_BPTS, MAX_WPTS): Define.
16525 (struct arch_process_info, struct arch_lwp_info): New data types.
16526 (arm_linux_get_hwbp_cap): New function.
16527 (arm_linux_get_hw_breakpoint_count): Likewise.
16528 (arm_linux_get_hw_watchpoint_count): Likewise.
16529 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16530 (arm_hwbp_control_initialize): Likewise.
16531 (arm_hwbp_control_is_enabled): Likewise.
16532 (arm_hwbp_control_is_initialized): Likewise.
16533 (arm_hwbp_control_disable): Likewise.
16534 (arm_linux_hw_breakpoint_equal): Likewise.
16535 (arm_linux_hw_point_initialize): Likewise.
16536 (struct update_registers_data): New data structure.
16537 (update_registers_callback: New function.
16538 (arm_insert_point): Likewise.
16539 (arm_remove_point): Likewise.
16540 (arm_stopped_by_watchpoint): Likewise.
16541 (arm_stopped_data_address): Likewise.
16542 (arm_new_process): Likewise.
16543 (arm_new_thread): Likewise.
16544 (arm_prepare_to_resume): Likewise.
16545 (the_low_target): Register arm_insert_point, arm_remove_point,
16546 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16547 arm_new_thread, and arm_prepare_to_resume.
16548
16549 2011-09-15 Stan Shebs <stan@codesourcery.com>
16550
16551 * server.h (struct emit_ops): Add compare-goto fields.
16552 * tracepoint.c (gdb_agent_op_sizes): New table.
16553 (emit_eq_goto): New function.
16554 (emit_ne_goto): New function.
16555 (emit_lt_goto): New function.
16556 (emit_le_goto): New function.
16557 (emit_gt_goto): New function.
16558 (emit_ge_goto): New function.
16559 (is_goto_target): New function.
16560 (compile_bytecodes): Recognize special cases of compare-goto
16561 combinations and call specialized emitters for them.
16562 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16563 (amd64_emit_ne_goto): New function.
16564 (amd64_emit_lt_goto): New function.
16565 (amd64_emit_le_goto): New function.
16566 (amd64_emit_gt_goto): New function.
16567 (amd64_emit_ge_goto): New function.
16568 (amd64_emit_ops): Add the new functions.
16569 (i386_emit_eq_goto): New function.
16570 (i386_emit_ne_goto): New function.
16571 (i386_emit_lt_goto): New function.
16572 (i386_emit_le_goto): New function.
16573 (i386_emit_gt_goto): New function.
16574 (i386_emit_ge_goto): New function.
16575 (i386_emit_ops): Add the new functions.
16576
16577 2011-09-08 Stan Shebs <stan@codesourcery.com>
16578
16579 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16580 (i386_emit_epilogue): Restore %ebx.
16581
16582 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16583
16584 * server.c (step_thread): Remove definition.
16585 (process_serial_event): Don't handle Hs.
16586 * server.h (step_thread): Remove declaration.
16587 * target.c (set_desired_inferior): Remove use of step_thread.
16588
16589 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16590
16591 * linux-low.c: Include linux-procfs.h.
16592 (linux_attach_lwp_1): Update comments.
16593 (linux_attach): Scan for existing threads when attaching to a
16594 process that is the tgid.
16595 * Makefile.in: Update dependencies.
16596
16597 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16598
16599 * configure.srv: Add linux-procfs.o dependencies.
16600
16601 2011-08-14 Yao Qi <yao@codesourcery.com>
16602
16603 * target.h (struct target_ops): Fix indent.
16604 * win32-low.c (win32_target_ops): Fix comment.
16605
16606 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16607 Yao Qi <yao@codesourcery.com>
16608
16609 * Makefile.in (clean): Remove tic6x-*.c files.
16610 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16611 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16612 (tic6x-c64xp-linux.c): Likewise.
16613 * configure.srv: Add support for tic6x-*-uclinux.
16614 * linux-tic6x-low.c: New.
16615 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16616
16617 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16618 Yao Qi <yao@codesourcery.com>
16619
16620 * target.h (struct target_ops): Add read_loadmap.
16621 * linux-low.c (struct target_loadseg): New type.
16622 (struct target_loadmap): New type.
16623 (linux_read_loadmap): New function.
16624 (linux_target_ops): Add linux_read_loadmap.
16625 * server.c (handle_query): Support qXfer:fdpic:read packet.
16626 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16627 to NULL.
16628
16629 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16630
16631 * win32-low.c: Include <stdint.h>.
16632
16633 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16634
16635 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16636 to the inferior here.
16637 (i386_remove_aligned_watchpoint): Ditto.
16638 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16639 fit part of the watchpoint in the debug registers.
16640 (i386_update_inferior_debug_regs): New.
16641 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16642 registers, and only update the inferior on success.
16643 (i386_low_remove_watchpoint): Ditto.
16644
16645 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16646
16647 * linux-low.c (compare_ints, unique, list_threads, show_process,
16648 linux_core_of_thread): Delete.
16649 (linux_target_ops): Change linux_core_of_thread to
16650 linux_common_core_of_thread.
16651 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16652 * utils.c (malloc_failure): Change type of argument.
16653 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16654 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16655 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16656 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16657 (IPA_OBJS): Add common-utils-ipa.o.
16658 (ptid_h, linux_osdata_h): New macros.
16659 (server_h): Add common/common-utils.h, common/xml-utils.h,
16660 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16661 common/ptid.h.
16662 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16663 ptid.o, buffer.o): New rules.
16664 (linux-low.o): Add common/linux-osdata.h as a dependency.
16665 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16666 * configure.ac: Add AC_HEADER_DIRENT check.
16667 * config.in: Regenerate.
16668 * configure: Regenerate.
16669 * remote-utils.c (xml_escape_text): Delete.
16670 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16671 buffer_xml_printf): Move to common/buffer.c.
16672 * server.c (main): Remove call to initialize_inferiors.
16673 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16674 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16675 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16676 internal_error, gdb_assert, gdb_assert_fail): Delete.
16677 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16678 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16679 common/buffer.h.
16680 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16681 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16682 initialize_inferiors): Delete.
16683
16684 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16685
16686 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16687 symbol error.
16688
16689 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16690
16691 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16692 assertion.
16693 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16694
16695 2011-05-26 Yao Qi <yao@codesourcery.com>
16696
16697 * Makefile.in (thread-db.o): Track dependence to
16698 common/gdb_thread_db.h.
16699 * thread-db.c: include gdb_thread_db.h from right place.
16700
16701 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16702
16703 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16704 __FILE__ and __LINE__ to internal_error.
16705
16706 2011-05-13 Doug Evans <dje@google.com>
16707
16708 * thread-db.c (try_thread_db_load_from_sdir): New function.
16709 (try_thread_db_load_from_dir): New function.
16710 (thread_db_load_search): Handle $sdir, ignore $pdir.
16711 Remove trying of system directories if search of
16712 libthread-db-search-path fails, that is now done via $sdir.
16713
16714 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16715
16716 * server.c (handle_query): Add EnableDisableTracepoints to the list
16717 of supported features.
16718 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16719 tracepoints.
16720 (cmd_qtenable_disable): New.
16721 (cmd_qtstart): Install tracepoints even if disabled.
16722 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16723 receiving a QTEnable or QTDisable packet.
16724 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16725 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16726 tracepoints.
16727 (gdb_probe): Skip data collection if static tracepoint is disabled.
16728
16729 2011-05-10 Doug Evans <dje@google.com>
16730
16731 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16732
16733 2011-05-04 Doug Evans <dje@google.com>
16734
16735 * linux-low.c (linux_join): Skip process lookup.
16736 * spu-low.c (spu_join): Ditto.
16737 * server.c (join_inferiors_callback): Delete.
16738 (process_serial_event): For 'D' packet (detach) call join_inferior
16739 directly.
16740
16741 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16742
16743 * README: Don't mention xscale*-*-linux*.
16744 * configure.srv (xscale*-*-linux*): Don't handle target.
16745
16746 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16747
16748 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16749 casting pointers.
16750 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16751 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16752 (i386_emit_void_call_2): Likewise.
16753
16754 2011-04-26 Yao Qi <yao@codesourcery.com>
16755
16756 * linux-low.c: Move common macros to linux-ptrace.h.
16757 Include linux-ptrace.h.
16758 * Makefile.in (linux_ptrace_h): New.
16759 (linux-low.o): Depends on linux-ptrace.h.
16760
16761 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16762
16763 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16764 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16765 (remote_prepare): New function with most of the TCP code from ...
16766 (remote_open): ... here. Detect PORT here unconditionally. Move also
16767 setting transport_is_reliable.
16768 * server.c (run_once): New variable.
16769 (gdbserver_usage): Document it.
16770 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16771 the first run if RUN_ONCE.
16772 * server.h (run_once, remote_prepare): New declarations.
16773
16774 2011-04-19 Tom Tromey <tromey@redhat.com>
16775
16776 * win32-low.c (handle_load_dll): Remove duplicate "the".
16777
16778 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16779
16780 Remove support for old Cygwin 1.5 versions.
16781 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16782 function to avoid warning.
16783 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16784 warning.
16785
16786 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16787
16788 * gdbserver/server.h (Macro _): Define it if not available.
16789
16790 2011-03-14 Michael Snyder <msnyder@vmware.com>
16791
16792 * hostio.c (handle_close): Remove unnecessary null test.
16793
16794 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16795
16796 * Makefile.in (maintainer-clean realclean distclean): Remove
16797 "make ... subdir_do" command.
16798
16799 2011-03-10 Michael Snyder <msnyder@vmware.com>
16800
16801 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16802
16803 * server.c (handle_v_run): Free alloced buffer on early return.
16804
16805 2011-03-09 Yao Qi <yao@codesourcery.com>
16806
16807 Revert:
16808 2011-03-04 Yao Qi <yao@codesourcery.com>
16809
16810 * Makefile.in: Remove GNU make feature --directory.
16811
16812 2011-03-05 Yao Qi <yao@codesourcery.com>
16813
16814 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16815 (subdir_do): New make target. Copied from gdb/Makefile.
16816 (maintainer-clean, realclean, distclean, clean): Call corresponding
16817 make targets in common/Makefile.
16818
16819 2011-02-11 Yao Qi <yao@codesourcery.com>
16820
16821 * configure.ac: Call AC_PROG_RANLIB.
16822 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16823 * configure: Regenerate.
16824
16825 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16826
16827 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16828
16829 2011-03-06 Yao Qi <yao@codesourcery.com>
16830
16831 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16832
16833 2011-03-05 Yao Qi <yao@codesourcery.com>
16834
16835 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16836 (subdir_do): New make target. Copied from gdb/Makefile.
16837 (maintainer-clean, realclean, distclean, clean): Call corresponding
16838 make targets in common/Makefile.
16839
16840 2011-03-04 Yao Qi <yao@codesourcery.com>
16841
16842 * Makefile.in: Remove GNU make feature --directory.
16843
16844 2011-03-04 Michael Snyder <msnyder@vmware.com>
16845
16846 * server.c (queue_stop_reply): Call xmalloc not malloc.
16847
16848 2011-03-02 Michael Snyder <msnyder@vmware.com>
16849
16850 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16851
16852 2011-02-28 Michael Snyder <msnyder@vmware.com>
16853
16854 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16855 (cmd_qtframe): Ditto.
16856 (cmd_qtbuffer): Ditto.
16857 (cmd_bigqtbuffer): Ditto.
16858
16859 * utils.c (decimal2str): Initialize 'width' to nine, then
16860 don't mess with it.
16861
16862 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16863
16864 * hostio.c (require_data): Free *data, not data.
16865
16866 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16867
16868 * hostio.c (require_data): Use free, not xfree.
16869
16870 2011-02-27 Michael Snyder <msnyder@vmware.com>
16871
16872 * server.c (handle_query): Discard unused value.
16873
16874 * hostio.c (require_data): Free malloc memory before returning
16875 error.
16876
16877 2011-02-26 Michael Snyder <msnyder@vmware.com>
16878
16879 * linux-low.c (list_threads): Call closedir for dirent.
16880
16881 2011-02-27 Michael Snyder <msnyder@vmware.com>
16882
16883 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16884 a case statement falls through.
16885
16886 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16887
16888 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16889 in comparison.
16890
16891 2011-02-26 Michael Snyder <msnyder@vmware.com>
16892
16893 * utils.c (decimal2str): Eliminate dead code and dead param.
16894 (pulongest): Drop dead param from call to decimal2str.
16895 (plongest): Ditto.
16896
16897 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16898
16899 Revert the following patch (not approved yet):
16900 2011-02-21 Hui Zhu <teawater@gmail.com>
16901 * tracepoint.c (tp_printf): New function.
16902 (eval_agent_expr): Handle gdb_agent_op_printf.
16903
16904 2011-02-21 Hui Zhu <teawater@gmail.com>
16905
16906 * tracepoint.c (tp_printf): New function.
16907 (eval_agent_expr): Handle gdb_agent_op_printf.
16908
16909 2011-02-18 Tom Tromey <tromey@redhat.com>
16910
16911 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16912 (tracepoint.o): Likewise.
16913 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16914 (gdb_agent_op_names): Likewise.
16915
16916 2011-02-18 Tom Tromey <tromey@redhat.com>
16917
16918 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16919 gdb_agent_op_rot>: New constants.
16920 (gdb_agent_op_names): Add pick and roll.
16921 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16922 cases.
16923
16924 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16925
16926 * aclocal.m4: Regenerated with aclocal-1.11.1.
16927
16928 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16929
16930 * server.c (handle_qxfer_traceframe_info): New.
16931 (qxfer_packets): Register "traceframe-info".
16932 (handle_query): Report support for qXfer:traceframe-info:read+.
16933 * tracepoint.c (match_blocktype): New.
16934 (traceframe_find_block_type): Rename to ...
16935 (traceframe_walk_blocks): ... this. Add callback filter argument,
16936 and use it.
16937 (traceframe_find_block_type): New, reimplemented on top of
16938 traceframe_walk_blocks.
16939 (build_traceframe_info_xml): New.
16940 (traceframe_read_info): New.
16941 * server.h (traceframe_read_info): Declare.
16942
16943 2011-02-11 Yao Qi <yao@codesourcery.com>
16944
16945 * configure.ac: Call AC_PROG_RANLIB.
16946 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16947 * configure: Regenerate.
16948
16949 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16950
16951 * server.c (gdb_read_memory): Change return semantics to allow
16952 partial transfers.
16953 (handle_search_memory_1): Adjust.
16954 (process_serial_event) <'m' packet>: Handle partial transfers.
16955 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16956
16957 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16958
16959 * regcache.c (init_register_cache): Initialize
16960 regcache->register_status.
16961 (free_register_cache): Release regcache->register_status.
16962 (regcache_cpy): Copy register_status.
16963 (registers_to_string): Print 'x's for unavailable registers.
16964 (supply_register): Mark the register's status valid or
16965 unavailable, depending on whether a buffer was passed in or not.
16966 (supply_register_zeroed): New.
16967 (supply_regblock): Mark the registers' status valid or
16968 unavailable, depending on whether a buffer was passed in or not.
16969 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16970 (struct regcache): New `register_status' field.
16971 (supply_register_zeroed): Declare.
16972 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16973 supply_register_zeroed, rather than passing a NULL buffer to
16974 supply_register.
16975 * tracepoint.c (fetch_traceframe_registers): Update comment.
16976
16977 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16978
16979 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16980 buffer explicit.
16981
16982 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16983
16984 * server.h (decode_xfer_write): Change prototype.
16985 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16986 and don't extract the annex here.
16987 * server.c (decode_xfer_read): Remove `annex' parameter,
16988 and don't extract the annex here.
16989 (decode_xfer): New.
16990 (struct qxfer): New.
16991 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16992 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16993 (handle_qxfer_statictrace): New functions, abstracted out from
16994 handle_query, and made to use the struct qxfer interface.
16995 (handle_threads_qxfer_proper): Rename to ...
16996 (handle_qxfer_threads_proper): ... this.
16997 (handle_threads_qxfer): Rename to ...
16998 (handle_qxfer_threads): ... this. Adjust.
16999 (qxfer_packets): New array.
17000 (handle_qxfer): New function.
17001 (handle_query): Use handle_qxfer.
17002
17003 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
17004
17005 * gdbreplay.c: Shorten lines of >= 80 columns.
17006 * linux-low.c: Ditto.
17007 * linux-ppc-low.c: Ditto.
17008 * linux-s390-low.c: Ditto.
17009 * linux-sparc-low.c: Ditto.
17010 * linux-x86-low.c: Ditto.
17011 * linux-xtensa-low.c: Ditto.
17012 * mem-break.c: Ditto.
17013 * nto-low.c: Ditto.
17014 * regcache.h: Ditto.
17015 * remote-utils.c: Ditto.
17016 * server.c: Ditto.
17017 * server.h: Ditto.
17018 * thread-db.c: Ditto.
17019 * tracepoint.c: Ditto.
17020 * utils.c: Ditto.
17021 * win32-low.h: Ditto.
17022
17023 2011-01-05 Joel Brobecker <brobecker@adacore.com>
17024
17025 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
17026 update.
17027
17028 2011-01-01 Joel Brobecker <brobecker@adacore.com>
17029
17030 * server.c (gdbserver_version): Update copyright year in version
17031 output.
17032 * gdbreplay.c (gdbreplay_version): Ditto.
17033
17034 2010-12-29 Jie Zhang <jie.zhang@analog.com>
17035
17036 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
17037 * linux-bfin-low.c: New file.
17038 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
17039 PT_DATA_ADDR for BFIN targets.
17040 * Makefile.in (SFILES): Add linux-bfin-low.c.
17041 (clean): Remove reg-bfin.c.
17042 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
17043 * README: Mention supported Blackfin targets.
17044
17045 2010-12-23 Mike Frysinger <vapier@gentoo.org>
17046
17047 * .gitignore: New file.
17048
17049 2010-11-16 Mike Frysinger <vapier@gentoo.org>
17050
17051 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
17052
17053 2010-10-22 Jie Zhang <jie@codesourcery.com>
17054
17055 * Makefile.in: Add FLAGS_TO_PASS variable.
17056 (install): Remove dependency of install-only and recursively
17057 invoke make for install-only.
17058
17059 2010-10-04 Doug Evans <dje@google.com>
17060
17061 * Makefile.in (uninstall): Use $(DESTDIR).
17062
17063 2010-09-24 Pedro Alves <pedro@codesourcery.com>
17064
17065 PR gdb/11842
17066
17067 * linux-x86-low.c (compat_siginfo_from_siginfo)
17068 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
17069 si_code is < 0. Check for si_code == SI_TIMER before checking for
17070 si_code < 0.
17071
17072 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17073
17074 * lynx-i386-low.c: New file.
17075 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
17076
17077 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17078
17079 * lynx-low.c (ptrace_request_to_str): Remove handling for
17080 request values that have been removed in LynxOS 5.x.
17081
17082 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17083
17084 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
17085 <ptrace.h>
17086
17087 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
17088
17089 * configure.ac: Add --enable-inprocess-agent option.
17090 * configure: Rebuilt.
17091
17092 2010-09-06 Yao Qi <yao@codesourcery.com>
17093
17094 * linux-low.c (linux_kill): Remove unused variable.
17095 (linux_stabilize_threads): Likewise.
17096 * server.c (start_inferior): Likewise.
17097 (queue_stop_reply_callback): Likewise.
17098 * tracepoint.c (do_action_at_tracepoint): Likewise.
17099
17100 2010-09-06 Yao Qi <yao@codesourcery.com>
17101
17102 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
17103 on return.
17104
17105 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
17106
17107 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
17108
17109 2010-09-06 Pedro Alves <pedro@codesourcery.com>
17110
17111 * Makefile.in (install-only): Replace $IPA_DEPFILES with
17112 "$(IPA_DEPFILES)".
17113
17114 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17115
17116 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
17117 gdbserver/lynx-ppc-low.c: New files.
17118 * Makefile.in (lynx_low_h): New variable.
17119 (lynx-low.o, lynx-ppc-low.o): New rules.
17120 * configure.ac: On LynxOS, link with -lnetinet.
17121 * configure.srv: Add handling of powerpc-*-lynxos* targets.
17122 * configure: regenerate.
17123
17124 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17125
17126 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
17127 * configure.ac: Add check for vasprintf and vsnprintf.
17128 * configure, config.in: Regenerate.
17129 * server.h (vasprintf, vsnprintf): Add conditional declarations.
17130
17131 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17132
17133 * gdbreplay.c: Move include of alloca.h up, next to include of
17134 malloc.h.
17135 * server.h: Add include of malloc.h.
17136 * mem-break.c: Remove include of malloc.h.
17137 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
17138
17139 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17140
17141 * Makefile.in (memmem.o): Build with -Wno-error.
17142
17143 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17144
17145 * utils.c (xsnprintf): Make non-static.
17146 * server.h: Add xsnprintf declaration.
17147 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
17148 replace calls to snprintf by calls to xsnprintf throughout.
17149
17150 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17151
17152 * configure.ac: Add configure check for alloca.
17153 * configure, config.in: Regenerate.
17154 * server.h: Include alloca.h if it exists.
17155 * gdbreplay.c: Include alloca.h if it exists.
17156
17157 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17158
17159 * linux-low.c (__SIGRTMIN): Define if not already defined.
17160 (linux_create_inferior): Check for __ANDROID__ rather than
17161 __SIGRTMIN.
17162 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17163 are already deferred.
17164 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17165 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17166 stopped and already has a pending signal to report.
17167 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17168 a pending signal to report or is moving out of a jump pad.
17169 (linux_init_signals): Check for __ANDROID__ rather than
17170 __SIGRTMIN.
17171
17172 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17173
17174 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17175 debug_threads check. Avoid a linear search when not doing debug
17176 output.
17177
17178 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17179
17180 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17181 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17182 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17183 (process_event): Change local fd's type to gdb_fildes_t.
17184 (create_file_handler): Adjust prototype.
17185 (delete_file_handler): Adjust prototype.
17186 (handle_file_event): Adjust prototype. Use pfildes.
17187 (create_file_event): Adjsut prototype.
17188 * remote-utils.c (remote_desc, listen_desc): Change type to
17189 gdb_fildes_t.
17190 * server.h: New gdb_fildes_t typedef.
17191 [USE_WIN32API]: Include winsock2.h.
17192 (delete_file_handler, add_file_handler): Adjust prototypes.
17193 (pfildes): Declare.
17194 * utils.c (pfildes): New.
17195
17196 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17197
17198 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17199 * configure: Regenerate.
17200
17201 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17202
17203 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17204 (linux_done_accessing_memory): ... this.
17205 (linux_target_ops): Adjust.
17206 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17207 * nto-low.c (nto_target_ops): Adjust comment.
17208 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17209 * spu-low.c (spu_target_ops): Adjust comment.
17210 * target.h (target_ops): Rename unprepare_to_access_memory field
17211 to done_accessing_memory.
17212 (unprepare_to_access_memory): Rename to ...
17213 (done_accessing_memory): ... this.
17214
17215 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17216
17217 * linux-low.c (linux_prepare_to_access_memory): New.
17218 (linux_unprepare_to_access_memory): New.
17219 (linux_target_ops): Install them.
17220 * server.c (read_memory): Rename to ...
17221 (gdb_read_memory): ... this. Use
17222 prepare_to_access_memory/prepare_to_access_memory.
17223 (write_memory): Rename to ...
17224 (gdb_write_memory): ... this. Use
17225 prepare_to_access_memory/prepare_to_access_memory.
17226 (handle_search_memory_1): Adjust.
17227 (process_serial_event): Adjust.
17228 * target.h (struct target_ops): New fields
17229 prepare_to_access_memory and unprepare_to_access_memory.
17230 (prepare_to_access_memory, unprepare_to_access_memory): New.
17231 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17232 prepare_to_access_memory/prepare_to_access_memory.
17233 * nto-low.c (nto_target_ops): Adjust.
17234 * spu-low.c (spu_target_ops): Adjust.
17235 * win32-low.c (win32_target_ops): Adjust.
17236
17237 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17238
17239 * Makefile.in (WARN_CFLAGS): Get it from configure.
17240 (WERROR_CFLAGS): New.
17241 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17242 * configure.ac: Introduce --enable-werror, which adds -Werror to
17243 the compiler command line. Enabled by default. Disable with
17244 --disable-werror. Add -Wdeclaration-after-statement
17245 Wpointer-arith and -Wformat-nonliteral to warning flags.
17246 * configure: Regenerate.
17247
17248 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17249
17250 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17251
17252 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17253
17254 * gdbreplay.c (remote_error): New.
17255 (gdbchar): New.
17256 (expect): Use gdbchar. Check for error reading from GDB.
17257 Clarify sync error output.
17258 (play): Check for errors writing to GDB.
17259 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17260 * remote-utils.c (getpkt): Check for errors writing to the remote
17261 descriptor.
17262
17263 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17264
17265 * linux-low.c (linux_wait_1): Move non-debugging code out of
17266 `debug_threads' control.
17267
17268 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17269
17270 * linux-low.c (linux_wait_1): Don't set last_status here.
17271 * server.c (push_event, queue_stop_reply_callback): Assert we're
17272 not pushing a TARGET_WAITKIND_IGNORE event.
17273 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17274 (myresume, handle_target_event): Set the thread's last_resume_kind
17275 and last_status from the target returned status.
17276
17277 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17278
17279 PR threads/10729
17280
17281 * linux-x86-low.c (update_debug_registers_callback): New.
17282 (i386_dr_low_set_addr): Use it.
17283 (i386_dr_low_get_addr): New.
17284 (i386_dr_low_set_control): Use update_debug_registers_callback.
17285 (i386_dr_low_get_control): New.
17286 (i386_dr_low_get_status): Adjust.
17287 * linux-low.c (linux_stop_lwp): New.
17288 * linux-low.h (linux_stop_lwp): Declare.
17289
17290 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17291 argument instead of a i386_debug_reg_state.
17292 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17293 a i386_debug_reg_state.
17294 (i386_insert_aligned_watchpoint): Adjust.
17295 (i386_remove_aligned_watchpoint): Adjust.
17296 (i386_low_stopped_data_address): Read the debug registers from the
17297 inferior instead of from the mirrors.
17298 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17299 (i386_dr_low_get_addr): Declare.
17300 (i386_dr_low_get_control): Declare.
17301 (i386_dr_low_get_status): Change prototype.
17302
17303 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17304 (i386_dr_low_get_addr): New.
17305 (i386_dr_low_get_control): New.
17306 (i386_dr_low_get_status): Adjust prototype. Return
17307 dr_status_mirror.
17308 (i386_initial_stuff): Clear dr_status_mirror and
17309 dr_control_mirror.
17310 (i386_get_thread_context): Adjust.
17311 (i386_set_thread_context): Adjust.
17312 (i386_thread_added): Adjust.
17313
17314 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17315
17316 * linux-low.h (linux_thread_area): Delete declaration.
17317
17318 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17319
17320 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17321 after its termination.
17322
17323 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17324
17325 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17326 (gdb_wants_all_stopped): Delete.
17327 (linux_wait_1): Don't call them.
17328 * server.c (handle_v_cont): Tag all threads as want-stopped.
17329 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17330 stopped as "client-wants-stopped".
17331
17332 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17333
17334 * Makefile.in (signals_h): New.
17335 (server_h): Depend on it.
17336 (server.o): Don't depend on $(signals_def).
17337 (signals.o): Depend on $(signals_def).
17338
17339 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17340
17341 * Makefile.in (signals_def): New.
17342 (server_h): Append include/gdb/signals.h and signals_def.
17343 (server.o): Append signals_def.
17344
17345 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17346
17347 * server.c (handle_target_event): Use target_signal_to_host for
17348 resume_info.sig initialization.
17349 * target.h (struct thread_resume) <sig>: New comment.
17350
17351 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17352
17353 * server.c (handle_query): strcpy() the returned string from paddress()
17354 instead of sprintf().
17355 * utils.c (paddress): Return phex_nz().
17356
17357 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17358
17359 * server.c (handle_v_cont): Call mourn_inferior if process
17360 just exited.
17361 (myresume): Likewise.
17362
17363 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17364
17365 Static tracepoints, and integration with UST.
17366
17367 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17368 * mem-break.c (uninsert_all_breakpoints)
17369 (reinsert_all_breakpoints): New.
17370 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17371 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17372 (gdb_agent_ust_loaded, helper_thread_id)
17373 (gdb_agent_helper_thread_id): New macros.
17374 (struct ipa_sym_addresses): Add addr_ust_loaded,
17375 addr_helper_thread_id, addr_cmd_buf.
17376 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17377 (in_process_agent_loaded_ust): New.
17378 (write_e_ust_not_loaded): New.
17379 (maybe_write_ipa_ust_not_loaded): New.
17380 (struct collect_static_trace_data_action): New.
17381 (enum tracepoint_type) <static_tracepoint>: New.
17382 (struct tracepoint) <handle>: Mention static tracepoints.
17383 (struct static_tracepoint_ctx): New.
17384 (CMD_BUF_SIZE): New.
17385 (add_tracepoint_action): Handle static tracepoint actions.
17386 (unprobe_marker_at): New.
17387 (clear_installed_tracepoints): Handle static tracepoints.
17388 (cmd_qtdp): Handle static tracepoints.
17389 (probe_marker_at): New.
17390 (cmd_qtstart): Handle static tracepoints.
17391 (response_tracepoint): Handle static tracepoints.
17392 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17393 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17394 (get_context_regcache): Handle static tracepoints.
17395 (do_action_at_tracepoint): Handle static tracepoint actions.
17396 (traceframe_find_block_type): Handle static trace data blocks.
17397 (traceframe_read_sdata): New.
17398 (download_tracepoints): Download static tracepoint actions.
17399 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17400 (GDB_PROBE_NAME): New.
17401 (ust_ops): New.
17402 (GET_UST_SYM): New.
17403 (USTF): New.
17404 (dlsym_ust): New.
17405 (ust_marker_to_static_tracepoint): New.
17406 (gdb_probe): New.
17407 (collect_ust_data_at_tracepoint): New.
17408 (gdb_ust_probe): New.
17409 (UNIX_PATH_MAX, SOCK_DIR): New.
17410 (gdb_ust_connect_sync_socket): New.
17411 (resume_thread, stop_thread): New.
17412 (run_inferior_command): New.
17413 (init_named_socket): New.
17414 (gdb_ust_socket_init): New.
17415 (cstr_to_hexstr): New.
17416 (next_st): New.
17417 (first_marker, next_marker): New.
17418 (response_ust_marker): New.
17419 (cmd_qtfstm, cmd_qtsstm): New.
17420 (unprobe_marker_at, probe_marker_at): New.
17421 (cmd_qtstmat, gdb_ust_thread): New.
17422 (gdb_ust_init): New.
17423 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17424 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17425 (ST_REGENTRY): New.
17426 (x86_64_st_collect_regmap): New.
17427 (X86_64_NUM_ST_COLLECT_GREGS): New.
17428 (AMD64_RIP_REGNUM): New.
17429 (supply_static_tracepoint_registers): New.
17430 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17431 (ST_REGENTRY): New.
17432 (i386_st_collect_regmap): New.
17433 (i386_NUM_ST_COLLECT_GREGS): New.
17434 (supply_static_tracepoint_registers): New.
17435 * server.c (handle_query): Handle qXfer:statictrace:read.
17436 <qSupported>: Report support for StaticTracepoints, and
17437 qXfer:statictrace:read features.
17438 * server.h (traceframe_read_sdata)
17439 (supply_static_tracepoint_registers): Declare.
17440 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17441 (unpack_varlen_hex): Include in IPA build.
17442 * Makefile.in (ustlibs, ustinc): New.
17443 (IPA_OBJS): Add remote-utils-ipa.o.
17444 ($(IPA_LIB)): Link -ldl and -lpthread.
17445 (UST_CFLAGS): New.
17446 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17447 * config.in, configure: Regenerate.
17448
17449 2010-06-20 Ian Lance Taylor <iant@google.com>
17450 Pedro Alves <pedro@codesourcery.com>
17451
17452 * linux-x86-low.c (always_true): Delete.
17453 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17454 trying to fool the compiler with always_true.
17455
17456 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17457
17458 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17459 conditions in gdbserver.
17460
17461 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17462
17463 * spu-low.c (spu_read_memory): Wrap around local store limit.
17464 (spu_write_memory): Likewise.
17465
17466 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17467
17468 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17469 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17470 LONGEST uses.
17471 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17472 uses.
17473 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17474 uses with LONGEST uses.
17475
17476 2010-06-14 Stan Shebs <stan@codesourcery.com>
17477 Pedro Alves <pedro@codesourcery.com>
17478
17479 Bytecode compiler.
17480
17481 * linux-x86-low.c: Include limits.h.
17482 (add_insns): New.
17483 (always_true): New.
17484 (EMIT_ASM): New.
17485 (EMIT_ASM32): New.
17486 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17487 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17488 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17489 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17490 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17491 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17492 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17493 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17494 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17495 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17496 (amd64_emit_void_call_2): New.
17497 (amd64_emit_ops): New.
17498 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17499 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17500 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17501 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17502 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17503 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17504 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17505 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17506 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17507 (i386_emit_stack_adjust, i386_emit_int_call_1)
17508 (i386_emit_void_call_2): New.
17509 (i386_emit_ops): New.
17510 (x86_emit_ops): New.
17511 (the_low_target): Install x86_emit_ops.
17512 * server.h (struct emit_ops): New.
17513 (get_raw_reg_func_addr): Declare.
17514 (current_insn_ptr, emit_error): Declare.
17515 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17516 (set_trace_state_variable_value): New defines.
17517 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17518 addr_get_trace_state_variable_value and
17519 addr_set_trace_state_variable_value.
17520 (symbol_list): New fields for get_raw_reg,
17521 get_trace_state_variable_value and set_trace_state_variable_value.
17522 (condfn): New typedef.
17523 (struct tracepoint): New field `compiled_cond'.
17524 (do_action_at_tracepoint): Clear compiled_cond.
17525 (get_trace_state_variable_value, set_trace_state_variable_value):
17526 Export in the IPA.
17527 (condition_true_at_tracepoint): If there's a compiled condition,
17528 run that.
17529 (current_insn_ptr, emit_error): New globals.
17530 (struct bytecode_address): New.
17531 (get_raw_reg_func_addr): New.
17532 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17533 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17534 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17535 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17536 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17537 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17538 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17539 (compile_tracepoint_condition, compile_bytecodes): New.
17540 * target.h (emit_ops): Forward declare.
17541 (struct target_ops): New field emit_ops.
17542 (target_emit_ops): New.
17543 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17544 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17545 * linux-low.c (linux_emit_ops): New.
17546 (linux_target_ops): Install it.
17547 * linux-low.h (struct linux_target_ops): New field emit_ops.
17548
17549 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17550
17551 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17552 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17553
17554 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17555 Stan Shebs <stan@codesourcery.com>
17556
17557 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17558 (all): Depend on $(extra_libraries).
17559 (install-only): Install the IPA.
17560 (IPA_OBJS, IPA_LIB): New.
17561 (clean): Remove the IPA lib.
17562 (IPAGENT_CFLAGS): New.
17563 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17564 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17565 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17566 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17567 * configure.ac: Check for atomic builtins support in the compiler.
17568 (IPA_DEPFILES, extra_libraries): Define.
17569 * configure.srv (ipa_obj): Add description.
17570 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17571 (i[34567]86-*-linux*): Set ipa_obj.
17572 (x86_64-*-linux*): Set ipa_obj.
17573 * linux-low.c (stabilizing_threads): New.
17574 (supports_fast_tracepoints): New.
17575 (linux_detach): Stabilize threads before detaching.
17576 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17577 the lwp is either not stabilizing, or is moving out of a jump pad.
17578 (linux_fast_tracepoint_collecting): New.
17579 (maybe_move_out_of_jump_pad): New.
17580 (enqueue_one_deferred_signal): New.
17581 (dequeue_one_deferred_signal): New.
17582 (linux_wait_for_event_1): If moving out of a jump pad, defer
17583 pending signals to later.
17584 (linux_stabilize_threads): New.
17585 (linux_wait_1): Check if threads need moving out of jump pads, and
17586 do it if so.
17587 (stuck_in_jump_pad_callback): New.
17588 (move_out_of_jump_pad_callback): New.
17589 (lwp_running): New.
17590 (linux_resume_one_lwp): Handle moving out of jump pads.
17591 (linux_set_resume_request): Dequeue deferred signals.
17592 (need_step_over_p): Also step over fast tracepoint jumps.
17593 (start_step_over): Also uninsert fast tracepoint jumps.
17594 (finish_step_over): Also reinsert fast tracepoint jumps.
17595 (linux_install_fast_tracepoint_jump): New.
17596 (linux_target_ops): Install linux_stabilize_threads and
17597 linux_install_fast_tracepoint_jump_pad.
17598 * linux-low.h (linux_target_ops) <get_thread_area,
17599 install_fast_tracepoint_jump_pad>: New fields.
17600 (struct lwp_info) <collecting_fast_tracepoint,
17601 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17602 (linux_get_thread_area): Declare.
17603 * linux-x86-low.c (jump_insn): New.
17604 (x86_get_thread_area): New.
17605 (append_insns): New.
17606 (push_opcode): New.
17607 (amd64_install_fast_tracepoint_jump_pad): New.
17608 (i386_install_fast_tracepoint_jump_pad): New.
17609 (x86_install_fast_tracepoint_jump_pad): New.
17610 (the_low_target): Install x86_get_thread_area and
17611 x86_install_fast_tracepoint_jump_pad.
17612 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17613 (struct fast_tracepoint_jump): New.
17614 (fast_tracepoint_jump_insn): New.
17615 (fast_tracepoint_jump_shadow): New.
17616 (find_fast_tracepoint_jump_at): New.
17617 (fast_tracepoint_jump_here): New.
17618 (delete_fast_tracepoint_jump): New.
17619 (set_fast_tracepoint_jump): New.
17620 (uninsert_fast_tracepoint_jumps_at): New.
17621 (reinsert_fast_tracepoint_jumps_at): New.
17622 (set_breakpoint_at): Use write_inferior_memory.
17623 (uninsert_raw_breakpoint): Use write_inferior_memory.
17624 (check_mem_read): Mask out fast tracepoint jumps.
17625 (check_mem_write): Mask out fast tracepoint jumps.
17626 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17627 (set_fast_tracepoint_jump): Declare.
17628 (delete_fast_tracepoint_jump)
17629 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17630 (reinsert_fast_tracepoint_jumps_at): Declare.
17631 * regcache.c: Don't compile many functions when building the
17632 in-process agent library.
17633 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17634 the register buffer in the heap.
17635 (free_register_cache): If the register buffer isn't owned by the
17636 regcache, don't free it.
17637 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17638 pre-existing register caches.
17639 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17640 type.
17641 (convert_ascii_to_int): : Constify `from' parameter type.
17642 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17643 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17644 the needed buffer in-place.
17645 (relocate_instruction): New.
17646 * server.c (handle_query) <qSymbols>: If the target supports
17647 tracepoints, give it a chance of looking up symbols. Report
17648 support for fast tracepoints.
17649 (handle_status): Stabilize threads.
17650 (process_serial_event): Adjust.
17651 * server.h (struct fast_tracepoint_jump): Forward declare.
17652 (struct process_info) <fast_tracepoint_jumps>: New field.
17653 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17654 (decode_X_packet, decode_M_packet): Adjust.
17655 (relocate_instruction): Declare.
17656 (in_process_agent_loaded): Declare.
17657 (tracepoint_look_up_symbols): Declare.
17658 (struct fast_tpoint_collect_status): Declare.
17659 (fast_tracepoint_collecting): Declare.
17660 (force_unlock_trace_buffer): Declare.
17661 (handle_tracepoint_bkpts): Declare.
17662 (initialize_low_tracepoint)
17663 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17664 * target.h (struct target_ops) <stabilize_threads,
17665 install_fast_tracepoint_jump_pad>: New fields.
17666 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17667 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17668 [HAVE_STDINT_H]: Include stdint.h.
17669 (trace_debug_1): Rename to ...
17670 (trace_vdebug): ... this.
17671 (trace_debug): Rename to ...
17672 (trace_debug_1): ... this. Add `level' parameter.
17673 (trace_debug): New.
17674 (ATTR_USED, ATTR_NOINLINE): New.
17675 (IP_AGENT_EXPORT): New.
17676 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17677 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17678 (about_to_request_buffer_space, trace_buffer_is_full)
17679 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17680 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17681 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17682 (traceframe_write_count, traceframes_created)
17683 (trace_state_variables)
17684 New renaming defines.
17685 (struct ipa_sym_addresses): New.
17686 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17687 (symbol_list): New.
17688 (ipa_sym_addrs): New.
17689 (all_tracepoint_symbols_looked_up): New.
17690 (in_process_agent_loaded): New.
17691 (write_e_ipa_not_loaded): New.
17692 (maybe_write_ipa_not_loaded): New.
17693 (tracepoint_look_up_symbols): New.
17694 (debug_threads) [IN_PROCESS_AGENT]: New.
17695 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17696 (UNKNOWN_SIDE_EFFECTS): New.
17697 (stop_tracing): New.
17698 (flush_trace_buffer): New.
17699 (stop_tracing_bkpt): New.
17700 (flush_trace_buffer_bkpt): New.
17701 (read_inferior_integer): New.
17702 (read_inferior_uinteger): New.
17703 (read_inferior_data_pointer): New.
17704 (write_inferior_data_pointer): New.
17705 (write_inferior_integer): New.
17706 (write_inferior_uinteger): New.
17707 (struct collect_static_trace_data_action): Delete.
17708 (enum tracepoint_type): New.
17709 (struct tracepoint) <type>: New field `type'.
17710 <actions_str, step_actions, step_actions_str>: Only include in
17711 GDBserver.
17712 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17713 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17714 (tracepoints): Use IP_AGENT_EXPORT.
17715 (last_tracepoint): Don't include in the IPA.
17716 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17717 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17718 (alloced_trace_state_variables): New.
17719 (trace_state_variables): Use IP_AGENT_EXPORT.
17720 (traceframe_t): Delete unused variable.
17721 (circular_trace_buffer): Don't include in the IPA.
17722 (trace_buffer_start): Delete.
17723 (struct trace_buffer_control): New.
17724 (trace_buffer_free): Delete.
17725 (struct ipa_trace_buffer_control): New.
17726 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17727 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17728 New.
17729 (trace_buffer_ctrl): New.
17730 (TRACE_BUFFER_CTRL_CURR): New.
17731 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17732 Reimplement as macros.
17733 (trace_buffer_wrap): Delete.
17734 (traceframe_write_count, traceframe_read_count)
17735 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17736 (struct tracepoint_hit_ctx) <type>: New field.
17737 (struct fast_tracepoint_ctx): New.
17738 (memory_barrier): New.
17739 (cmpxchg): New.
17740 (record_tracepoint_error): Update atomically in the IPA.
17741 (clear_inferior_trace_buffer): New.
17742 (about_to_request_buffer_space): New.
17743 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17744 updating the same buffer.
17745 (add_tracepoint): Default the tracepoint's type to trap
17746 tracepoint, and orig_size to -1.
17747 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17748 internal variables.
17749 (create_trace_state_variable): New parameter `gdb'. Handle it.
17750 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17751 (cmd_qtdp): Handle fast tracepoints.
17752 (cmd_qtdv): Adjust.
17753 (max_jump_pad_size): New.
17754 (gdb_jump_pad_head): New.
17755 (get_jump_space_head): New.
17756 (claim_jump_space): New.
17757 (sort_tracepoints): New.
17758 (MAX_JUMP_SIZE): New.
17759 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17760 IPA.
17761 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17762 support. Upload fast traceframes, and delete internal IPA
17763 breakpoints.
17764 (stop_tracing_handler): New.
17765 (flush_trace_buffer_handler): New.
17766 (cmd_qtstop): Upload fast tracepoints.
17767 (response_tracepoint): Handle fast tracepoints.
17768 (tracepoint_finished_step): Upload fast traceframes. Set the
17769 tracepoint hit context's tracepoint type.
17770 (handle_tracepoint_bkpts): New.
17771 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17772 type. Add comment about fast tracepoints.
17773 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17774 non-existing action_str field.
17775 (get_context_regcache): Handle fast tracepoints.
17776 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17777 to the regcache.
17778 (fast_tracepoint_from_jump_pad_address): New.
17779 (fast_tracepoint_from_ipa_tpoint_address): New.
17780 (collecting_t): New.
17781 (force_unlock_trace_buffer): New.
17782 (fast_tracepoint_collecting): New.
17783 (collecting): New.
17784 (gdb_collect): New.
17785 (write_inferior_data_ptr): New.
17786 (target_tp_heap): New.
17787 (target_malloc): New.
17788 (download_agent_expr): New.
17789 (UALIGN): New.
17790 (download_tracepoints): New.
17791 (download_trace_state_variables): New.
17792 (upload_fast_traceframes): New.
17793 (IPA_FIRST_TRACEFRAME): New.
17794 (IPA_NEXT_TRACEFRAME_1): New.
17795 (IPA_NEXT_TRACEFRAME): New.
17796 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17797 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17798 (gdb_jump_pad_buffer_end): New.
17799 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17800 (initialize_tracepoint): Adjust.
17801 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17802 buffer. Initialize the low module.
17803 * utils.c (PREFIX, TOOLNAME): New.
17804 (malloc_failure): Use PREFIX.
17805 (error): In the IPA, an error causes an exit.
17806 (fatal, warning): Use PREFIX.
17807 (internal_error): Use TOOLNAME.
17808 (NUMCELLS): Increase to 10.
17809 * configure, config.in: Regenerate.
17810
17811 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17812
17813 * server.c (handle_query) <qSupported>: Do two passes over the
17814 qSupported string to avoid nesting strtok.
17815
17816 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17817
17818 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17819 (CDEPS): New.
17820 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17821 -Wl,--dynamic-list.
17822 * configure: Regenerate.
17823 * proc-service.list: New.
17824
17825 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17826
17827 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17828 New comment.
17829
17830 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17831
17832 * gdbreplay.c (remote_open): Check error return from socket() call by
17833 its equality to -1 not by it being negative.
17834 * remote-utils.c (remote_open): Likewise.
17835
17836 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17837
17838 * config.h: Regenerate.
17839
17840 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17841
17842 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17843 doesn't provide PTRACE_GET_THREAD_AREA.
17844
17845 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17846
17847 * linux-m68k-low.c: Include <asm/ptrace.h>
17848 (ps_get_thread_area): Implement.
17849
17850 2010-05-03 Doug Evans <dje@google.com>
17851
17852 * event-loop.c (struct callback_event): New struct.
17853 (callback_list): New global.
17854 (append_callback_event, delete_callback_event): New functions.
17855 (process_callback): New function.
17856 (start_event_loop): Call it.
17857 * remote-utils.c (NOT_SCHEDULED): Define.
17858 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17859 moved out of readchar.
17860 (readchar): Rewrite. Call reschedule before returning.
17861 (reset_readchar): New function.
17862 (remote_close): Call it.
17863 (process_remaining, reschedule): New functions.
17864 * server.h (callback_handler_func): New typedef.
17865 (append_callback_event, delete_callback_event): Declare.
17866
17867 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17868
17869 * proc-service.c (ps_pglobal_lookup): Use
17870 thread_db_look_up_one_symbol.
17871 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17872 parameter. Use it instead of all_symbols_looked_up.
17873 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17874 field.
17875 (all_symbols_looked_up): Don't declare.
17876 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17877 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17878 field.
17879 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17880 Set all_symbols_looked_up here.
17881 (thread_db_look_up_one_symbol): New.
17882 (thread_db_get_tls_address): Adjust.
17883 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17884 thread_db object on the heap, and tentatively set it in the
17885 process structure.
17886 (thread_db_init): Don't set all_symbols_looked_up here.
17887 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17888
17889 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17890
17891 * linux-low.c (linux_kill, linux_detach): Adjust.
17892 (status_pending_p_callback): Remove redundant statement. Check
17893 for !TARGET_WAITIKIND_IGNORE, instead of
17894 TARGET_WAITKIND_STOPPED.
17895 (handle_tracepoints): Make sure LWP is locked. Adjust.
17896 (linux_wait_for_event_1): Adjust.
17897 (linux_cancel_breakpoints): New.
17898 (unsuspend_one_lwp): New.
17899 (unsuspend_all_lwps): New.
17900 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17901 (send_sigstop_callback): Change return type to int, add new
17902 `except' parameter and handle it.
17903 (suspend_and_send_sigstop_callback): New.
17904 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17905 pass them down. If SUSPEND, also increment the lwp's suspend
17906 count.
17907 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17908 (need_step_over_p): Don't consider suspended LWPs.
17909 (start_step_over): Adjust.
17910 (proceed_one_lwp): Change return type to int, add new `except'
17911 parameter and handle it.
17912 (unsuspend_and_proceed_one_lwp): New.
17913 (proceed_all_lwps): Use find_inferior instead of
17914 for_each_inferior.
17915 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17916 also decrement the suspend count of LWPs. Pass `except' down,
17917 instead of hacking its suspend count.
17918 (linux_pause_all): Add `freeze' parameter. Adjust.
17919 (linux_unpause_all): New.
17920 (linux_target_ops): Install linux_unpause_all.
17921 * server.c (handle_status): Adjust.
17922 * target.h (struct target_ops): New fields `unpause_all' and
17923 `cancel_breakpoints'. Add new parameter to `pause_all'.
17924 (pause_all): Add new `freeze' parameter.
17925 (unpause_all): New.
17926 (cancel_breakpoints): New.
17927 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17928 cancel breakpoints.
17929 (cmd_qtstart): Pause threads.
17930 (stop_tracing): Pause threads, and cancel breakpoints.
17931 * win32-low.c (win32_target_ops): Adjust.
17932
17933 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17934
17935 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17936 the inferior right away from here...
17937 (linux_wait_1): ... to here, and adjust to check the thread's
17938 last_resume_kind instead of the lwp's step or stop_expected flags.
17939
17940 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17941
17942 * README: Use consistent `GDB' and `GDBserver' spellings.
17943
17944 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17945
17946 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17947 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17948 (linux_detach_one_lwp): Assume the lwp is stopped.
17949 (any_thread_of): Delete.
17950 (linux_detach): Stop all lwps here. Don't blindly delete all
17951 breakpoints.
17952 (delete_lwp_callback): New.
17953 (linux_mourn): Delete all lwps of the process that is gone.
17954 (linux_wait_1): Don't delete the last lwp of the process here.
17955 * mem-break.h (mark_breakpoints_out): Declare.
17956 * mem-break.c (mark_breakpoints_out): New.
17957 (free_all_breakpoints): Use it.
17958 * server.c (handle_target_event): If the process is gone, mark
17959 breakpoints out.
17960 * thread-db.c (struct thread_db) <create_bp>: New field.
17961 (thread_db_enable_reporting): Fix prototype. Store a thread event
17962 breakpoint reference in the thread_db struct.
17963 (thread_db_load_search): Clear the thread_db object.
17964 (try_thread_db_load_1): Ditto.
17965 (switch_to_process): New.
17966 (disable_thread_event_reporting): Use it.
17967 (remove_thread_event_breakpoints): New.
17968 (thread_db_detach, thread_db_mourn): Use it.
17969
17970 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17971
17972 * linux-low.c (linux_enable_event_reporting): New.
17973 (linux_wait_for_event_1, handle_extended_wait): Use it.
17974
17975 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17976
17977 * linux-low.c (linux_kill_one_lwp, linux_kill)
17978 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17979 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17980 SIGSTOP even if the LWP is stopped.
17981 (send_sigstop_callback): New.
17982 (stop_all_lwps): Use send_sigstop_callback instead.
17983 (linux_resume_one_thread): Adjust.
17984 (proceed_one_lwp): Still proceed an LWP that the client has
17985 requested to stop, if we haven't reported it as stopped yet. Make
17986 sure that LWPs the client want stopped, have a pending SIGSTOP.
17987
17988 2010-04-26 Doug Evans <dje@google.com>
17989
17990 * server.c (handle_general_set): Make static.
17991
17992 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17993 Print received char after testing for error/eof instead of before.
17994 (input_interrupt): Tweak comment.
17995
17996 2010-04-23 Doug Evans <dje@google.com>
17997
17998 * server.c (start_inferior): Print inferior argv if --debug.
17999
18000 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
18001
18002 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
18003 * nto-x86-low.c: Include server.h
18004
18005 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
18006
18007 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
18008 be consistent with other sources of this directory.
18009 (init_registers_amd64): Correct name of source file of this function
18010 in the comment.
18011
18012 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18013
18014 * configure.srv (x86_64-*-mingw*): New configuration for Windows
18015 64-bit executables.
18016
18017 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18018
18019 * win32-i386-low.c: Add 64-bit support.
18020 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
18021 (init_registers_amd64): Declare.
18022 (mappings): Add 64-bit version of array.
18023 (init_windows_x86): New function.
18024 (the_low_target): Change init_arch field to init_windows_x86.
18025
18026 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18027
18028 * win32-low.c: Adapt to support also 64-bit architecture.
18029 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
18030 (get_image_name): Use SIZE_T type for local variable `done'.
18031 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
18032 (toolhelp_get_dll_name): Idem.
18033 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
18034 Use uintptr_t typecast to avoid warning.
18035 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
18036 (handle_exception): Use phex_nz to avoid warning.
18037 (win32_wait): Remove unused local variable `process'.
18038
18039 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18040
18041 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
18042 `amd64-avx.o'.
18043
18044 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
18045
18046 * configure.ac: Use `ws2_32' library for srv_mingw.
18047 * configure: Regenerate.
18048 * gdbreplay.c: Include winsock2.h instead of winsock.h.
18049 * remote-utils.c: Likewise.
18050
18051 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
18052
18053 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
18054 if __x86_64__ is defined.
18055
18056 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18057
18058 * configure: Regenerate.
18059
18060 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18061
18062 * server.c (handle_query): Handle 'qGetTIBAddr' query.
18063 * target.h (target_ops): New get_tib_address field.
18064 * win32-low.h (win32_thread_info): Add thread_local_base field.
18065 * win32-low.c (child_add_thread): Add tlb argument.
18066 Set thread_local_base field to TLB.
18067 (get_child_debug_event): Adapt to child_add_thread change.
18068 (win32_get_tib_address): New function.
18069 (win32_target_ops): Set get_tib_address field to
18070 win32_get_tib_address.
18071 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
18072
18073 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18074
18075 * linux-low.c (linux_mourn): Also remove the process.
18076 * server.c (handle_target_event): Don't remove the process here.
18077 * nto-low.c (nto_mourn): New.
18078 (nto_target_ops): Install it.
18079 * spu-low.c (spu_mourn): New.
18080 (spu_target_ops): Install it.
18081 * win32-low.c (win32_mourn): New.
18082 (win32_target_ops): Install it.
18083
18084 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18085
18086 * server.h (buffer_xml_printf): Remove redundant `;'.
18087
18088 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18089
18090 * regcache.c (set_register_cache): Invalidate regcaches before
18091 changing the register cache layout.
18092 (regcache_invalidate_one): Allow a NULL regcache.
18093 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
18094 regcaches before changing the register cache layout or the target
18095 regsets.
18096
18097 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
18098
18099 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
18100 variable warning on Linux/x86-64.
18101
18102 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18103
18104 GDBserver disconnected tracing support.
18105
18106 * linux-low.c (linux_remove_process): Delete.
18107 (add_lwp): Don't set last_resume_kind here.
18108 (linux_kill): Use `mourn'.
18109 (linux_detach): Use `thread_db_detach', and `mourn'.
18110 (linux_mourn): New.
18111 (linux_attach_lwp_1): Adjust comment.
18112 (linux_attach): last_resume_kind moved the thread_info; adjust.
18113 (status_pending_p_callback): Adjust.
18114 (linux_wait_for_event_1): Adjust.
18115 (count_events_callback, select_singlestep_lwp_callback)
18116 (select_event_lwp_callback, cancel_breakpoints_callback)
18117 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
18118 (proceed_one_lwp): Adjust.
18119 (linux_async): Add debug output.
18120 (linux_thread_stopped): New.
18121 (linux_pause_all): New.
18122 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
18123 linux_pause_all.
18124 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
18125 (thread_db_free): Delete declaration.
18126 (thread_db_detach, thread_db_mourn): Declare.
18127 * thread-db.c (thread_db_init): Use thread_db_mourn.
18128 (thread_db_free): Delete, split in two.
18129 (disable_thread_event_reporting): New.
18130 (thread_db_detach): New.
18131 (thread_db_mourn): New.
18132
18133 * server.h (struct thread_info) <last_resume_kind>: New field.
18134 <attached>: Add comment.
18135 <gdb_detached>: New field.
18136 (handler_func): Change return type to int.
18137 (handle_serial_event, handle_target_event): Ditto.
18138 (gdb_connected): Declare.
18139 (tracing): Delete.
18140 (disconnected_tracing): Declare.
18141 (stop_tracing): Declare.
18142
18143 * server.c (handle_query) <qSupported>: Report support for
18144 disconnected tracing.
18145 (queue_stop_reply_callback): Account for running threads.
18146 (gdb_wants_thread_stopped): New.
18147 (gdb_wants_all_threads_stopped): New.
18148 (gdb_reattached_process): New.
18149 (handle_status): Clear the `gdb_detached' flag of all processes.
18150 In all-stop, stop all threads.
18151 (main): Be sure to leave tfind mode. Handle disconnected tracing.
18152 (process_serial_event): If the remote connection breaks, or if an
18153 exit was forced with "monitor exit", force an event loop exit.
18154 Handle disconnected tracing on detach.
18155 (handle_serial_event): Adjust.
18156 (handle_target_event): If GDB isn't connected, forward events back
18157 to the inferior, unless the last process exited, in which case,
18158 exit gdbserver. Adjust interface.
18159
18160 * remote-utils.c (remote_open): Don't block in accept. Instead
18161 register an event loop source on the listen socket file
18162 descriptor. Refactor bits into ...
18163 (listen_desc): ... this new global.
18164 (gdb_connected): ... this new function.
18165 (enable_async_notification): ... this new function.
18166 (handle_accept_event): ... this new function.
18167 (remote_close): Clear remote_desc.
18168
18169 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18170
18171 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18172 New fields.
18173 (mourn_inferior): Define.
18174 (target_process_qsupported): Avoid the dangling else problem.
18175 (thread_stopped): Define.
18176 (pause_all): Define.
18177 (target_waitstatus_to_string): Declare.
18178 * target.c (target_waitstatus_to_string): New.
18179
18180 * tracepoint.c (tracing): Make extern.
18181 (disconnected_tracing): New.
18182 (stop_tracing): Make extern. Handle tracing stops due to GDB
18183 disconnecting.
18184 (cmd_qtdisconnected): New.
18185 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18186 (handle_tracepoint_general_set): Handle QTDisconnected.
18187
18188 * event-loop.c (event_handler_func): Change return type to int.
18189 (process_event): Bail out if the event handler wants the event
18190 loop to stop.
18191 (handle_file_event): Ditto.
18192 (start_event_loop): Bail out if the event handler wants the event
18193 loop to stop.
18194
18195 * nto-low.c (nto_target_ops): Adjust.
18196 * spu-low.c (spu_wait): Don't remove the process here.
18197 (spu_target_ops): Adjust.
18198 * win32-low.c (win32_wait): Don't remove the process here.
18199 (win32_target_ops): Adjust.
18200
18201 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18202
18203 * regcache.c (realloc_register_cache): Invalidate inferior's
18204 regcache before recreating it.
18205
18206 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18207
18208 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18209
18210 2010-04-09 Stan Shebs <stan@codesourcery.com>
18211 Pedro Alves <pedro@codesourcery.com>
18212
18213 * server.h (LONGEST): New.
18214 (struct thread_info) <while_stepping>: New field.
18215 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18216 Declare.
18217 (initialize_tracepoint, handle_tracepoint_general_set)
18218 (handle_tracepoint_query, tracepoint_finished_step)
18219 (tracepoint_was_hit, release_while_stepping_state_list):
18220 (current_traceframe): Declare.
18221 * server.c (handle_general_set): Handle tracepoint packets.
18222 (read_memory): New.
18223 (write_memory): New.
18224 (handle_search_memory_1): Use read_memory.
18225 (handle_query): Report support for conditional tracepoints, trace
18226 state variables, and tracepoint sources. Handle tracepoint
18227 queries.
18228 (main): Initialize the tracepoints module.
18229 (process_serial_event): Handle traceframe reads/writes.
18230
18231 * linux-low.c (handle_tracepoints): New.
18232 (linux_wait_1): Call it.
18233 (linux_resume_one_lwp): Handle while-stepping.
18234 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18235 (linux_target_ops): Install them.
18236 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18237 New field.
18238 * linux-x86-low.c (x86_supports_tracepoints): New.
18239 (the_low_target). Install it.
18240
18241 * mem-break.h (delete_breakpoint): Declare.
18242 * mem-break.c (delete_breakpoint): Make external.
18243
18244 * target.h (struct target_ops): Add `supports_tracepoints',
18245 `read_pc', and `write_pc' fields.
18246 (target_supports_tracepoints): Define.
18247 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18248 (phex_nz): New.
18249
18250 * regcache.h (struct regcache) <registers_owned>: New field.
18251 (init_register_cache, regcache_cpy): Declare.
18252 (regcache_read_pc, regcache_write_pc): Declare.
18253 (register_cache_size): Declare.
18254 (supply_regblock): Declare.
18255 * regcache.c (init_register_cache): New.
18256 (new_register_cache): Use it.
18257 (regcache_cpy): New.
18258 (register_cache_size): New.
18259 (supply_regblock): New.
18260 (regcache_read_pc, regcache_write_pc): New.
18261
18262 * tracepoint.c: New.
18263
18264 * Makefile.in (OBS): Add tracepoint.o.
18265 (tracepoint.o): New rule.
18266
18267 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18268
18269 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18270 (i386-mmx.o): New.
18271 (i386-mmx.c): Likewise.
18272 (i386-mmx-linux.o): Likewise.
18273 (i386-mmx-linux.c): Likewise.
18274
18275 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18276 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18277 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18278 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18279
18280 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18281 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18282 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18283
18284 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18285
18286 * Makefile.in (clean): Updated.
18287 (i386-avx.o): New.
18288 (i386-avx.c): Likewise.
18289 (i386-avx-linux.o): Likewise.
18290 (i386-avx-linux.c): Likewise.
18291 (amd64-avx.o): Likewise.
18292 (amd64-avx.c): Likewise.
18293 (amd64-avx-linux.o): Likewise.
18294 (amd64-avx-linux.c): Likewise.
18295
18296 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18297 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18298 (srv_amd64_regobj): Add amd64-avx.o.
18299 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18300 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18301 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18302 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18303 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18304 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18305 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18306
18307 * i387-fp.c: Include "i386-xstate.h".
18308 (i387_xsave): New.
18309 (i387_cache_to_xsave): Likewise.
18310 (i387_xsave_to_cache): Likewise.
18311 (x86_xcr0): Likewise.
18312
18313 * i387-fp.h (i387_cache_to_xsave): Likewise.
18314 (i387_xsave_to_cache): Likewise.
18315 (x86_xcr0): Likewise.
18316
18317 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18318 * linux-crisv32-low.c (target_regsets): Likewise.
18319 * linux-m68k-low.c (target_regsets): Likewise.
18320 * linux-mips-low.c (target_regsets): Likewise.
18321 * linux-ppc-low.c (target_regsets): Likewise.
18322 * linux-s390-low.c (target_regsets): Likewise.
18323 * linux-sh-low.c (target_regsets): Likewise.
18324 * linux-sparc-low.c (target_regsets): Likewise.
18325 * linux-xtensa-low.c (target_regsets): Likewise.
18326
18327 * linux-low.c: Include <sys/uio.h>.
18328 (regsets_fetch_inferior_registers): Support nt_type.
18329 (regsets_store_inferior_registers): Likewise.
18330 (linux_process_qsupported): New.
18331 (linux_target_ops): Add linux_process_qsupported.
18332
18333 * linux-low.h (regset_info): Add nt_type.
18334 (linux_target_ops): Add process_qsupported.
18335
18336 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18337 and <sys/uio.h>.
18338 (init_registers_i386_avx_linux): New.
18339 (init_registers_amd64_avx_linux): Likewise.
18340 (xmltarget_i386_linux_no_xml): Likewise.
18341 (xmltarget_amd64_linux_no_xml): Likewise.
18342 (PTRACE_GETREGSET): Likewise.
18343 (PTRACE_SETREGSET): Likewise.
18344 (x86_fill_xstateregset): Likewise.
18345 (x86_store_xstateregset): Likewise.
18346 (use_xml): Likewise.
18347 (x86_linux_update_xmltarget): Likewise.
18348 (x86_linux_process_qsupported): Likewise.
18349 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18350 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18351 init_registers_i386_linux here. Call
18352 x86_linux_update_xmltarget.
18353 (the_low_target): Add x86_linux_process_qsupported.
18354
18355 * server.c (handle_query): Call target_process_qsupported.
18356
18357 * target.h (target_ops): Add process_qsupported.
18358 (target_process_qsupported): New.
18359
18360 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18361
18362 * inferiors.c (add_thread): Set last_status kind to
18363 TARGET_WAITKIND_IGNORE.
18364 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18365 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18366 (linux_wait_1): Move `thread' local definition to block that uses
18367 it. Don't NULL initialize `event_child'.
18368 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18369 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18370 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18371
18372 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18373
18374 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18375 an extended waitstatus, or by a watchpoint.
18376 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18377 thread was stepping or has been stopped by a watchpoint.
18378
18379 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18380
18381 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18382 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18383 of another, then delete the previous, and validate all
18384 breakpoints.
18385 (validate_inserted_breakpoint): New.
18386 (delete_disabled_breakpoints): New.
18387 (validate_breakpoints): New.
18388 (check_mem_read): Validate breakpoints before trusting their
18389 shadow. Delete disabled breakpoints.
18390 (check_mem_write): Validate breakpoints before trusting they
18391 should be inserted. Delete disabled breakpoints.
18392 * mem-break.h (validate_breakpoints):
18393 * server.c (handle_query): Validate breakpoints when we see a
18394 qSymbol query.
18395
18396 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18397
18398 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18399 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18400 if we could tell there's a GDB breakpoint at stop_pc.
18401 (need_step_over_p): Don't do a step over if we find a GDB
18402 breakpoint at the resume PC.
18403
18404 * mem-break.c (struct raw_breakpoint): New.
18405 (enum bkpt_type): New type `gdb_breakpoint'.
18406 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18407 fields. New field `raw'.
18408 (find_raw_breakpoint_at): New.
18409 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18410 breakpoint instead.
18411 (set_breakpoint_at): Adjust.
18412 (delete_raw_breakpoint): New.
18413 (release_breakpoint): New.
18414 (delete_breakpoint): Rename to...
18415 (delete_breakpoint_1): ... this. Add proc parameter. Use
18416 release_breakpoint. Return ENOENT.
18417 (delete_breakpoint): Reimplement.
18418 (find_breakpoint_at): Delete.
18419 (find_gdb_breakpoint_at): New.
18420 (delete_breakpoint_at): Delete.
18421 (set_gdb_breakpoint_at): New.
18422 (delete_gdb_breakpoint_at): New.
18423 (gdb_breakpoint_here): New.
18424 (set_reinsert_breakpoint): Use release_breakpoint.
18425 (uninsert_breakpoint): Rename to ...
18426 (uninsert_raw_breakpoint): ... this.
18427 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18428 (reinsert_raw_breakpoint): Change parameter type to
18429 raw_breakpoint.
18430 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18431 instead.
18432 (check_breakpoints): Adjust. Use release_breakpoint.
18433 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18434 (breakpoint_inserted_here): Ditto.
18435 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18436 Don't trust the breakpoint's shadow if it is not inserted.
18437 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18438 (delete_all_breakpoints): Adjust.
18439 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18440 use delete_breakpoint_1.
18441
18442 * mem-break.h (breakpoints_supported): Delete declaration.
18443 (set_gdb_breakpoint_at): Declare.
18444 (gdb_breakpoint_here): Declare.
18445 (delete_breakpoint_at): Delete.
18446 (delete_gdb_breakpoint_at): Declare.
18447
18448 * server.h (struct raw_breakpoint): Forward declare.
18449 (struct process_info): New field `raw_breakpoints'.
18450
18451 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18452 breakpoints.
18453
18454 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18455
18456 * linux-low.c (status_pending_p_callback): Fix comment.
18457 (linux_wait_for_event_1): Move most of the internal breakpoint
18458 handling from here...
18459 (linux_wait_1): ... to here.
18460 (count_events_callback): New.
18461 (select_singlestep_lwp_callback): New.
18462 (select_event_lwp_callback): New.
18463 (cancel_breakpoints_callback): New.
18464 (select_event_lwp): New.
18465 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18466 priority to all LWPs that have had events that should be reported
18467 to the client. Cancel breakpoints when about to reporting the
18468 event to the client, not while stopping lwps. No longer cancel
18469 finished single-steps here.
18470 (cancel_finished_single_step): Delete.
18471 (cancel_finished_single_steps): Delete.
18472
18473 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18474
18475 * mem-break.c (enum bkpt_type): New.
18476 (struct breakpoint): New field `type'.
18477 (set_breakpoint_at): Change return type to struct breakpoint
18478 pointer. Set type to `other_breakpoint' by default.
18479 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18480 in the breakpoint list.
18481 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18482 (reinsert_breakpoint): Rename to ...
18483 (reinsert_raw_breakpoint): ... this.
18484 (reinsert_breakpoints_at): Adjust.
18485 * mem-break.h (struct breakpoint): Declare.
18486 (set_breakpoint_at): Change return type to struct breakpoint
18487 pointer.
18488
18489 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18490
18491 * server.c (handle_query): Assign, not compare.
18492
18493 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18494
18495 Teach linux gdbserver to step-over-breakpoints.
18496
18497 * linux-low.c (can_hardware_single_step): New.
18498 (supports_breakpoints): New.
18499 (handle_extended_wait): If stopping threads, read the stop pc of
18500 the new cloned LWP.
18501 (get_pc): New.
18502 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18503 low target doesn't support retrieving the PC.
18504 (add_lwp): Set last_resume_kind to resume_continue.
18505 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18506 (linux_attach): Don't clear stop_expected. Set the lwp's
18507 last_resume_kind to resume_stop.
18508 (linux_detach_one_lwp): Don't check for removed breakpoints.
18509 (check_removed_breakpoint): Delete.
18510 (status_pending_p): Rename to ...
18511 (status_pending_p_callback): ... this. Don't check for removed
18512 breakpoints. Don't consider threads that are stopped from GDB's
18513 perspective.
18514 (linux_wait_for_lwp): Always read the stop_pc here.
18515 (cancel_breakpoint): New.
18516 (step_over_bkpt): New global.
18517 (linux_wait_for_event_1): Implement stepping over breakpoints.
18518 (gdb_wants_lwp_stopped): New.
18519 (gdb_wants_all_stopped): New.
18520 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18521 single-step traps here. Store the thread's last reported target
18522 wait status.
18523 (send_sigstop): Don't clear stop_expected. Always set it,
18524 instead.
18525 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18526 (cancel_finished_single_step): New.
18527 (cancel_finished_single_steps): New.
18528 (wait_for_sigstop): Don't cancel finished single-step traps here.
18529 (linux_resume_one_lwp): Don't check for removed breakpoints.
18530 Don't set `step' on non-hardware step archs.
18531 (linux_set_resume_request): Ignore resume_stop requests if already
18532 stopping or stopped. Set the lwp's last_resume_kind.
18533 (resume_status_pending_p): Don't check for removed breakpoints.
18534 (need_step_over_p): New.
18535 (start_step_over): New.
18536 (finish_step_over): New.
18537 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18538 requests. Clear the thread's last reported target waitstatus.
18539 Don't use the `suspended' flag. Don't consider pending breakpoints.
18540 (linux_resume): Start a step-over if necessary.
18541 (proceed_one_lwp): New.
18542 (proceed_all_lwps): New.
18543 (unstop_all_lwps): New.
18544 * linux-low.h (struct lwp_info): Rewrite comment for the
18545 `suspended' flag. Add the `stop_pc' field. Delete the
18546 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18547 Add `'last_resume_kind' and `need_step_over' fields.
18548 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18549 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18550 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18551 (set_raw_breakpoint_at): New.
18552 (set_breakpoint_at): Rewrite to use it.
18553 (reinsert_breakpoint_handler): Delete.
18554 (set_reinsert_breakpoint): New.
18555 (reinsert_breakpoint_by_bp): Delete.
18556 (delete_reinsert_breakpoints): New.
18557 (uninsert_breakpoint): Rewrite.
18558 (uninsert_breakpoints_at): New.
18559 (reinsert_breakpoint): Rewrite.
18560 (reinsert_breakpoints_at): New.
18561 (check_breakpoints): Rewrite.
18562 (breakpoint_here): New.
18563 (breakpoint_inserted_here): New.
18564 (check_mem_read): Adjust.
18565 * mem-break.h (breakpoints_supported, breakpoint_here)
18566 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18567 (reinsert_breakpoint_by_bp): Delete declaration.
18568 (delete_reinsert_breakpoints): Declare.
18569 (reinsert_breakpoint): Delete declaration.
18570 (reinsert_breakpoints_at): Declare.
18571 (uninsert_breakpoint): Delete declaration.
18572 (uninsert_breakpoints_at): Declare.
18573 (check_breakpoints): Adjust prototype.
18574 * server.h: Adjust include order.
18575 (struct thread_info): Declare here. Add a `last_status' field.
18576
18577 2010-03-23 Michael Snyder <msnyder@vmware.com>
18578
18579 * server.c (crc32): New function.
18580 (handle_query): Add handling for 'qCRC:' request.
18581
18582 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18583
18584 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18585 lwp had been stopped by a watchpoint.
18586
18587 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18588
18589 * server.h (internal_error): Declare.
18590 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18591 * utils.c (internal_error): New function.
18592
18593 2010-03-15 Andreas Schwab <schwab@redhat.com>
18594
18595 * configure.srv: Fix typo setting srv_regobj.
18596
18597 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18598
18599 * linux-low.c (fetch_register): Avoid passing a non string literal
18600 format to `error'.
18601 (usr_store_inferior_registers): Ditto.
18602
18603 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18604
18605 * linux-low.c (linux_write_memory): Bail out early if peeking
18606 memory failed.
18607
18608 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18609
18610 * linux-low.h (struct lwp_info): New fields
18611 `stopped_by_watchpoint' and `stopped_data_address'.
18612 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18613 here, and cache them in the lwp object.
18614 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18615 directly.
18616 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18617 field.
18618 (linux_stopped_by_watchpoint): Rewrite.
18619 (linux_stopped_data_address): Rewrite.
18620
18621 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18622
18623 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18624 switching the current inferior, not before.
18625
18626 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18627
18628 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18629 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18630 i386-linux.c and amd64-linux.c.
18631 (reg-i386.o): Removed.
18632 (reg-i386.c): Likewise.
18633 (reg-i386-linux.o): Likewise.
18634 (reg-i386-linux.c): Likewise.
18635 (reg-x86-64.o): Likewise.
18636 (reg-x86-64.c): Likewise.
18637 (reg-x86-64-linux.o): Likewise.
18638 (reg-x86-64-linux.c): Likewise.
18639 (i386.o): New.
18640 (i386.c): Likewise.
18641 (i386-linux.o): Likewise.
18642 (i386-linux.c): Likewise.
18643 (amd64.o): Likewise.
18644 (amd64.c): Likewise.
18645 (amd64-linux.o): Likewise.
18646 (amd64-linux.c): Likewise.
18647
18648 * configure.srv (srv_i386_regobj): New.
18649 (srv_i386_linux_regobj): Likewise.
18650 (srv_amd64_regobj): Likewise.
18651 (srv_amd64_linux_regobj): Likewise.
18652 (srv_i386_32bit_xmlfiles): Likewise.
18653 (srv_i386_64bit_xmlfiles): Likewise.
18654 (srv_i386_xmlfiles): Likewise.
18655 (srv_amd64_xmlfiles): Likewise.
18656 (srv_i386_linux_xmlfiles): Likewise.
18657 (srv_amd64_linux_xmlfiles): Likewise.
18658 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18659 srv_xmlfiles to $srv_i386_xmlfiles.
18660 (i[34567]86-*-mingw32ce*): Likewise.
18661 (i[34567]86-*-mingw*): Likewise.
18662 (i[34567]86-*-nto*): Likewise.
18663 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18664 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18665 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18666 (x86_64-*-linux*): Likewise.
18667
18668 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18669 (init_registers_amd64_linux): New.
18670 (x86_arch_setup): Replace init_registers_x86_64_linux with
18671 init_registers_amd64_linux.
18672
18673 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18674
18675 * configure.ac: Check for libdl. If it is not available link against
18676 static libthread_db.
18677 * configure: Regenerate.
18678
18679 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18680
18681 PR9605
18682
18683 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18684 handing a read watchpoint.
18685 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18686
18687 2010-02-12 Doug Evans <dje@google.com>
18688
18689 * linux-low.c (linux_supports_tracefork_flag): Document.
18690 (linux_look_up_symbols): Add comment.
18691
18692 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18693
18694 * regcache.c (supply_register): Clear regcache if buf is NULL.
18695
18696 2010-02-02 Nicolas Roche <roche@sourceware.org>
18697 Joel Brobecker <brobecker@adacore.com>
18698
18699 * inferiors.c (find_inferior): Add function documentation.
18700 (unloaded_dll): Handle the case where the unloaded dll has not
18701 been previously registered in the dll list.
18702
18703 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18704
18705 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18706 (thumb2_breakpoint): New.
18707 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18708
18709 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18710
18711 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18712 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18713 breakpoints.
18714
18715 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18716
18717 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18718
18719 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18720
18721 * linux-s390-low.c (s390_collect_ptrace_register)
18722 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18723
18724 2010-01-21 Doug Evans <dje@google.com>
18725
18726 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18727 (PTRACE_ARG4_TYPE): New macro.
18728 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18729 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18730 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18731 (usr_store_inferior_registers): Ditto.
18732 (linux_read_memory, linux_write_memory): Ditto.
18733 (linux_test_for_tracefork): Ditto.
18734
18735 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18736 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18737
18738 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18739
18740 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18741 target.
18742
18743 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18744
18745 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18746 prototype to take a regcache. Adjust.
18747
18748 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18749
18750 * regcache.h (struct thread_info): Forward declare.
18751 (struct regcache): New.
18752 (new_register_cache): Adjust prototype.
18753 (get_thread_regcache): Declare.
18754 (free_register_cache): Adjust prototype.
18755 (registers_to_string, registers_from_string): Ditto.
18756 (supply_register, supply_register_by_name, collect_register)
18757 (collect_register_as_string, collect_register_by_name): Ditto.
18758 * regcache.c (struct inferior_regcache_data): Delete.
18759 (get_regcache): Rename to ...
18760 (get_thread_regcache): ... this. Adjust. Switch inferior before
18761 fetching registers.
18762 (regcache_invalidate_one): Adjust.
18763 (regcache_invalidate): Fix prototype.
18764 (new_register_cache): Return the new register cache.
18765 (free_register_cache): Change prototype.
18766 (realloc_register_cache): Adjust.
18767 (registers_to_string): Change prototype to take a regcache. Adjust.
18768 (registers_from_string): Ditto.
18769 (register_data): Ditto.
18770 (supply_register): Ditto.
18771 (supply_register_by_name): Ditto.
18772 (collect_register): Ditto.
18773 (collect_register_as_string): Ditto.
18774 (collect_register_by_name): Ditto.
18775 * server.c (process_serial_event): Adjust.
18776 * linux-low.h (regset_fill_func, regset_store_func): Change
18777 prototype.
18778 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18779 Change prototype.
18780 * linux-low.c (get_stop_pc): Adjust.
18781 (check_removed_breakpoint): Adjust.
18782 (linux_wait_for_event): Adjust.
18783 (linux_resume_one_lwp): Adjust.
18784 (fetch_register): Add regcache parameter. Adjust.
18785 (usr_store_inferior_registers): Ditto.
18786 (regsets_fetch_inferior_registers): Ditto.
18787 (regsets_store_inferior_registers): Ditto.
18788 (linux_fetch_registers, linux_store_registers): Ditto.
18789 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18790 regcache. Adjust.
18791 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18792 Ditto.
18793 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18794 prototype to take a regcache.
18795 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18796 * remote-utils.c (convert_ascii_to_int, outreg)
18797 (prepare_resume_reply): Change prototype to take a regcache.
18798 Adjust.
18799 * target.h (struct target_ops) <fetch_registers, store_registers>:
18800 Change prototype to take a regcache.
18801 (fetch_inferior_registers, store_inferior_registers): Change
18802 prototype to take a regcache. Adjust.
18803 * proc-service.c (ps_lgetregs): Adjust.
18804 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18805 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18806 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18807 take a regcache. Adjust.
18808 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18809 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18810 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18811 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18812 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18813 (cris_cannot_fetch_register):
18814 (cris_breakpoint_at): Change prototype to take a regcache.
18815 Adjust.
18816 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18817 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18818 to take a regcache. Adjust.
18819 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18820 Adjust.
18821 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18822 take a regcache. Adjust.
18823 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18824 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18825 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18826 * linux-mips-low.c (mips_get_pc):
18827 (mips_set_pc): Change prototype to take a regcache. Adjust.
18828 (mips_reinsert_addr): Adjust.
18829 (mips_collect_register): Change prototype to take a regcache.
18830 Adjust.
18831 (mips_supply_register):
18832 (mips_collect_register_32bit, mips_supply_register_32bit)
18833 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18834 (mips_store_fpregset): Ditto.
18835 * linux-ppc-low.c (ppc_supply_ptrace_register)
18836 (ppc_supply_ptrace_register): Ditto.
18837 (parse_spufs_run): Adjust.
18838 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18839 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18840 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18841 take a regcache. Adjust.
18842 * linux-s390-low.c (s390_collect_ptrace_register)
18843 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18844 (s390_set_pc): Change prototype to take a regcache. Adjust.
18845 (s390_arch_setup): Adjust.
18846 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18847 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18848 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18849 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18850 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18851 regcache. Adjust.
18852 (sparc_breakpoint_at): Adjust.
18853 * linux-xtensa-low.c (xtensa_fill_gregset):
18854 (xtensa_store_gregset):
18855 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18856 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18857 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18858 prototype to take a regcache. Adjust.
18859 * win32-arm-low.c (arm_fetch_inferior_register)
18860 (arm_store_inferior_register): Change prototype to take a
18861 regcache. Adjust.
18862 * win32-i386-low.c (i386_fetch_inferior_register)
18863 (i386_store_inferior_register): Change prototype to take a
18864 regcache. Adjust.
18865 * win32-low.c (child_fetch_inferior_registers)
18866 (child_store_inferior_registers): Change prototype to take a
18867 regcache. Adjust.
18868 (win32_wait): Adjust.
18869 (win32_fetch_inferior_registers): Change prototype to take a
18870 regcache. Adjust.
18871 (win32_store_inferior_registers): Adjust.
18872 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18873 store_inferior_register>: Change prototype to take a regcache.
18874
18875 2010-01-20 Doug Evans <dje@google.com>
18876
18877 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18878 #ifdef.
18879 (linux_wait_for_event1, linux_init_signals): Ditto.
18880 (W_STOPCODE): Provide definition if missing.
18881
18882 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18883
18884 * linux-low.c (linux_core_of_thread): New.
18885 (compare_ints, show_process, list_threads): New.
18886 (linux_qxfer_osdata): Report threads and cores.
18887 (linux_target_op): Register linux_core_of_thread.
18888 * remote-utils.c (prepare_resume_reply): Report the core.
18889 (buffer_xml_printf): Support %d specifier.
18890 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18891 New.
18892 (handle_query): Handle qXfer:threads. Announce availability
18893 thereof.
18894 * target.h (struct target_ops): New field core_of_thread.
18895
18896 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18897
18898 * Makefile.in (clean): Remove new generated files.
18899 (reg-s390.o, reg-s390.c): Remove rules.
18900 (reg-s390x.o, reg-s390x.c): Likewise.
18901 (s390-linux32.o, s390-linux32.c): Add rules.
18902 (s390-linux64.o, s390-linux64.c): Likewise.
18903 (s390x-linux64.o, s390x-linux64.c): Likewise.
18904 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18905 * linux-s390-low.c: Include <elf.h>.
18906 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18907 (init_registers_s390): Remove prototype.
18908 (init_registers_s390x): Likewise.
18909 (init_registers_s390_linux32): Add prototype.
18910 (init_registers_s390_linux64): Likewise.
18911 (init_registers_s390x_linux64): Likewise.
18912 (s390_num_regs_3264): New define.
18913 (s390_regmap_3264): New global variable.
18914 (s390_cannot_fetch_register): Remove obsolete check.
18915 (s390_cannot_store_register): Likewise.
18916 (s390_collect_ptrace_register): Handle upper/lower register halves.
18917 (s390_supply_ptrace_register): Likewise.
18918 (s390_fill_gregset): Update to register number changes.
18919 (s390_get_hwcap): New routine.
18920 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18921 Install appropriate regmap and register set.
18922
18923 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18924
18925 * server.c (gdbserver_version): Update copyright year to 2010.
18926 * gdbreplay.c (gdbreplay_version): Likewise.
18927
18928 2009-12-28 Doug Evans <dje@google.com>
18929
18930 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18931 elf/external.h. Include <elf.h> instead but only if necessary.
18932
18933 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18934
18935 * linux-low.c (linux_remove_process): Remove `detaching'
18936 parameter. Don't release/detach from thread_db here.
18937 (linux_kill): Release/detach from thread_db here, ...
18938 (linux_detach): ... and here, before actually detaching.
18939 (linux_wait_1): ... and here, when a process exits.
18940 * thread-db.c (any_thread_of): New.
18941 (thread_db_free): Switch the current inferior to a thread of the
18942 passed in process.
18943
18944 2009-12-21 Doug Evans <dje@google.com>
18945
18946 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18947
18948 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18949 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18950 warning ifndef __NR_tkill. Move setting of errno there too.
18951 Delete unnecessary resetting of errno after syscall.
18952 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18953
18954 * configure.ac: Check for dladdr.
18955 * config.in: Regenerate.
18956 * configure: Regenerate.
18957 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18958 (try_thread_db_load): Update.
18959
18960 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18961
18962 2009-12-18 Doug Evans <dje@google.com>
18963
18964 * event-loop.c: Include unistd.h if it exists.
18965
18966 * linux-low.c (my_waitpid): Move definition away from being in
18967 between linux_tracefork_child/linux_test_for_tracefork.
18968
18969 * gdb_proc_service.h (psaddr_t): Fix type.
18970 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18971 signature to match glibc.
18972
18973 2009-12-16 Doug Evans <dje@google.com>
18974
18975 * linux-low.c (linux_read_memory): Fix argument to read.
18976
18977 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18978
18979 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18980 events, don't leave current_inferior pointing at null.
18981
18982 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18983
18984 * win32-low.c (LOG): Delete.
18985 (OUTMSG): Output to stderr.
18986 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18987 on compile time LOG macro.
18988 (win32_wait): Fix debug output.
18989
18990 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18991
18992 * win32-low.c (win32_add_one_solib): If the dll name is
18993 "ntdll.dll", prepend the system directory to the dll path.
18994
18995 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18996
18997 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18998
18999 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
19000 Vladimir Prus <vladimir@codesourcery.com>
19001
19002 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
19003 * configure.ac: Check for __mcoldfire__ and set
19004 gdb_cv_m68k_is_coldfire.
19005 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
19006 reg-cf.o and reg-m68k.o.
19007 * configure: Regenerated.
19008
19009 2009-11-16 Pedro Alves <pedro@codesourcery.com>
19010
19011 * linux-low.c (linux_remove_process): Add `detaching' parameter.
19012 Pass it to thread_db_free.
19013 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
19014 proper `detaching' argument to linux_remove_process.
19015 * linux-low.h (thread_db_free): Add `detaching' parameter.
19016 * thread-db.c (thread_db_init): Pass false as `detaching' argument
19017 to thread_db_free.
19018 (thread_db_free): Add `detaching' parameter. Only
19019 call td_ta_clear_event if detaching from process.
19020
19021 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
19022
19023 * thread-db.c (thread_db_free): Fix typo.
19024
19025 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
19026
19027 PR gdb/10838
19028 * thread-db.c (thread_db_free): Call td_ta_clear_event.
19029
19030 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
19031
19032 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
19033 with an i686 compiler.
19034 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
19035 needed.
19036 * configure: Rebuilt.
19037
19038 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
19039
19040 PR gdb/10783
19041
19042 * server.c (handle_search_memory_1): Correct read_addr initialization
19043 in loop for searching subsequent chunks.
19044
19045 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
19046
19047 * configure.ac: New --with-libthread-db option.
19048 * thread-db.c: Allow direct dependence on libthread_db.
19049 (thread_db_free): Adjust.
19050 * config.in: Regenerate.
19051 * configure: Likewise.
19052
19053 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
19054
19055 PR gdb/10757
19056 * thread-db.c (attach_thread): New function.
19057 (maybe_attach_thread): Return success/failure.
19058 (find_new_threads_callback): Adjust.
19059 (thread_db_find_new_threads): Loop until no new threads.
19060
19061 2009-10-13 Pedro Alves <pedro@codesourcery.com>
19062
19063 * proc-service.c (ps_lgetregs): Formatting.
19064
19065 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
19066
19067 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
19068 * configure.ac: Adjust.
19069 * linux-low.h (struct process_info_private): Move members to struct
19070 thread_db.
19071 (thread_db_free, thread_db_handle_monitor_command): New prototype.
19072 * linux-low.c (linux_remove_process): Adjust.
19073 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
19074 * server.c (handle_query): Move code ...
19075 (handle_monitor_command): ... here. New function.
19076 * target.h (struct target_ops): New member.
19077 * thread-db.c (struct thread_db): New.
19078 (libthread_db_search_path): New variable.
19079 (thread_db_create_event, thread_db_enable_reporting)
19080 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
19081 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
19082 (try_thread_db_load_1, dladdr_to_soname): New functions.
19083 (try_thread_db_load, thread_db_load_search): New functions.
19084 (thread_db_init): Search for libthread_db.
19085 (thread_db_free): New function.
19086 (thread_db_handle_monitor_command): Likewise.
19087 * config.in: Regenerate.
19088 * configure: Regenerate.
19089
19090 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
19091
19092 * spu-low.c (spu_kill): Wait for inferior to terminate.
19093 Call clear_inferiors.
19094 (spu_detach): Call clear_inferiors.
19095
19096 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19097
19098 * aclocal.m4: Regenerate.
19099 * config.in: Likewise.
19100 * configure: Likewise.
19101
19102 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19103
19104 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
19105 (parse_spufs_run): New function.
19106 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
19107 (ppc_breakpoint_at): Handle SPU breakpoints.
19108
19109 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19110
19111 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
19112 (SPUFS_MAGIC): Define.
19113 (spu_enumerate_spu_ids): New function.
19114 (linux_qxfer_spu): New function.
19115 (linux_target_ops): Install linux_qxfer_spu.
19116
19117 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19118
19119 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
19120 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
19121 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
19122 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
19123 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
19124 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
19125 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
19126 (init_registers_powerpc_cell32l): Add prototype.
19127 (init_registers_powerpc_cell64l): Likewise.
19128 (ppc_arch_setup): Detect Cell/B.E. architecture.
19129
19130 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19131
19132 * Makefile.in (datarootdir): New variable.
19133
19134 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19135
19136 * linux-low.c (linux_write_memory): Update debugging output.
19137 * Makefile.in (clean): Add new descriptions.
19138 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
19139 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
19140 * configure.srv: Add new files for arm*-*-linux*.
19141 * linux-arm-low.c: Add new declarations.
19142 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
19143 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
19144 (HWCAP_VFPv3D16): New.
19145 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
19146 instead of __IWMMXT__.
19147 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
19148 (arm_arch_setup): New.
19149 (target_regsets): Remove #ifdef. Add VFP regset.
19150 (the_low_target): Use arm_arch_setup.
19151
19152 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19153
19154 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
19155 the main thread again.
19156
19157 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
19158
19159 Adding Neutrino gdbserver.
19160 * configure: Regenerated.
19161 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19162 * configure.srv (i[34567]86-*-nto*): New target.
19163 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19164 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19165 (nto_comctrl) [__QNX__]: New function.
19166 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19167
19168 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19169
19170 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19171 srv_tgtobj.
19172
19173 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19174 Pedro Alves <pedro@codesourcery.com>
19175
19176 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19177 don't support CONTEXT_EXTENDED_REGISTERS.
19178 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19179 (the_low_target): Install them.
19180 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19181 failing with ERROR_PIPE_NOT_CONNECTED.
19182
19183 2009-06-30 Doug Evans <dje@google.com>
19184 Pierre Muller <muller@ics.u-strasbg.fr>
19185
19186 Add h/w watchpoint support to x86-linux, win32-i386.
19187 * Makefile.in (SFILES): Add i386-low.c
19188 (i386_low_h): Define.
19189 (i386-low.o): Add dependencies.
19190 (linux-x86-low.o): Add i386-low.h dependency.
19191 (win32-i386-low.o): Ditto.
19192 * i386-low.c: New file.
19193 * i386-low.h: New file.
19194 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19195 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19196 * linux-low.c (linux_add_process): Initialize arch_private.
19197 (linux_remove_process): Free arch_private.
19198 (add_lwp): Initialize arch_private.
19199 (delete_lwp): Free arch_private.
19200 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19201 provided.
19202 * linux-low.h (process_info_private): New member arch_private.
19203 (lwp_info): New member arch_private.
19204 (linux_target_ops): New members new_process, new_thread,
19205 prepare_to_resume.
19206 (ptid_of): New macro.
19207 * linux-x86-low.c: Include stddef.h, i386-low.h.
19208 (arch_process_info): New struct.
19209 (arch_lwp_info): New struct.
19210 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19211 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19212 (i386_dr_low_get_status): New function.
19213 (x86_insert_point, x86_remove_point): New functions.
19214 (x86_stopped_by_watchpoint): New function.
19215 (x86_stopped_data_address): New function.
19216 (x86_linux_new_process, x86_linux_new_thread): New functions.
19217 (x86_linux_prepare_to_resume): New function.
19218 (the_low_target): Add entries for insert_point, remove_point,
19219 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19220 prepare_to_resume.
19221 * server.c (debug_hw_points): New global.
19222 (monitor_show_help): Document set debug-hw-points.
19223 (handle_query): Process "set debug-hw-points".
19224 * server.h (debug_hw_points): Declare.
19225 (paddress): Declare.
19226 * utils.c (NUMCELLS, CELLSIZE): New macros.
19227 (get_sell, xsnprintf, paddress): New functions.
19228 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19229 remove_point, stopped_by_watchpoint, stopped_data_address.
19230 * win32-i386-low.c: Include i386-low.h.
19231 (debug_reg_state): Replaces dr.
19232 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19233 (i386_dr_low_get_status): New function.
19234 (i386_insert_point, i386_remove_point): New functions.
19235 (i386_stopped_by_watchpoint): New function.
19236 (i386_stopped_data_address): New function.
19237 (i386_initial_stuff): Update.
19238 (get_thread_context,set_thread_context,i386_thread_added): Update.
19239 (the_low_target): Add entries for insert_point,
19240 remove_point, stopped_by_watchpoint, stopped_data_address.
19241 * win32-low.c (win32_insert_watchpoint): New function.
19242 (win32_remove_watchpoint): New function.
19243 (win32_stopped_by_watchpoint): New function.
19244 (win32_stopped_data_address): New function.
19245 (win32_target_ops): Add entries for insert_watchpoint,
19246 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19247 * win32-low.h (win32_target_ops): New members insert_point,
19248 remove_point, stopped_by_watchpoint, stopped_data_address.
19249
19250 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19251
19252 * server.c (process_serial_event): Re-return unsupported, not
19253 error, if the type isn't recognized. Re-allow supporting only
19254 insert or remove packets. Also call require_running for
19255 breakpoints. Add missing break statement to default case. Tidy.
19256 * target.h (struct target_ops): Rename insert_watchpoint to
19257 insert_point, and remove_watchpoint to remove_point.
19258
19259 * linux-low.h (struct linux_target_ops): Likewise.
19260 * linux-low.c (linux_insert_watchpoint): Rename to ...
19261 (linux_insert_point): ... this. Adjust.
19262 (linux_remove_watchpoint): Rename to ...
19263 (linux_remove_point): ... this. Adjust.
19264 (linux_target_ops): Adjust.
19265 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19266 (cris_insert_point): ... this.
19267 (cris_remove_watchpoint): Rename to ...
19268 (cris_remove_point): ... this.
19269 (the_low_target): Adjust.
19270
19271 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19272
19273 * server.c (handle_v_kill): Pass signal_pid to
19274 kill_inferior if multi_process is zero.
19275
19276 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19277
19278 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19279 * target.h (target_ops): Comment for *_watchpoint to make it clear
19280 the functions can get types '0' and '1'.
19281
19282 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19283
19284 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19285 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19286 * regcache.c (get_regcache): Likewise.
19287 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19288 * win32-low.c (child_fetch_inferior_registers): Remove check for
19289 regno 0.
19290
19291 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19292 Pedro Alves <pedro@codesourcery.com>
19293
19294 * target.h (struct target_ops) <supports_multi_process>: New
19295 callback.
19296 (target_supports_multi_process): New.
19297 * server.c (handle_query): Even if GDB reports support, only
19298 enable multi-process if the target also supports it. Report
19299 multi-process support only if the target backend supports it.
19300 * linux-low.c (linux_supports_multi_process): New function.
19301 (linux_target_ops): Install it as target_supports_multi_process
19302 callback.
19303
19304 2009-05-24 Doug Evans <dje@google.com>
19305
19306 Global renaming of find_thread_pid to find_thread_ptid.
19307 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19308 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19309 All callers updated.
19310
19311 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19312 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19313 directly.
19314
19315 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19316 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19317 (linux_resume_one_lwp): Ditto.
19318
19319 2009-05-23 Doug Evans <dje@google.com>
19320
19321 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19322 from struct inferior_list_entry * to struct lwp_info *.
19323 All callers updated.
19324
19325 2009-05-13 Doug Evans <dje@google.com>
19326
19327 * linux-x86-low.c: Don't include assert.h.
19328 (x86_siginfo_fixup): Use fatal, not assert.
19329 (x86_arch_setup): Fix comment.
19330
19331 2009-05-12 Doug Evans <dje@google.com>
19332
19333 Biarch support for i386/amd64 gdbserver.
19334 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19335 Add linux-x86-low.c.
19336 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19337 (linux-x86-low.o): Add.
19338 * linux-x86-64-low.c: Delete.
19339 * linux-i386-low.c: Delete.
19340 * linux-x86-low.c: New file.
19341 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19342 linux-x86-low.o.
19343 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19344 linux-x86-low.o.
19345 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19346 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19347 (linux_child_pid_to_exec_file): New function.
19348 (elf_64_header_p, elf_64_file_p): New functions.
19349 (siginfo_fixup): New function.
19350 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19351 give target a chance to convert layout.
19352 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19353 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19354
19355 2009-05-07 Doug Evans <dje@google.com>
19356
19357 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19358 (regsets_store_inferior_registers): Ditto.
19359
19360 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19361
19362 PR server/10048
19363
19364 * linux-low.c (must_set_ptrace_flags): Delete.
19365 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19366 of the global.
19367 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19368 `lwp->must_set_ptrace_flags' instead.
19369 (linux_wait_for_event_1): Set ptrace options here.
19370 (linux_wait_1): ... not here.
19371
19372 2009-04-30 Doug Evans <dje@google.com>
19373
19374 * inferiors.c (started_inferior_callback): New function.
19375 (attached_inferior_callback): New function.
19376 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19377 * server.c (print_started_pid, print_attached_pid): New functions.
19378 (detach_or_kill_for_exit): New function.
19379 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19380 * server.h (have_started_inferiors_p): Declare.
19381 (have_attached_inferiors_p): Declare.
19382
19383 * inferiors.c (remove_process): Fix memory leak, free process.
19384 * linux-low.c (linux_remove_process): New function.
19385 (linux_kill): Call it instead of remove_process.
19386 (linux_detach, linux_wait_1): Ditto.
19387
19388 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19389
19390 * configure.srv: Add x86 Windows CE target.
19391
19392 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19393
19394 * inferiors.c (get_thread_process): Make global.
19395 * server.h (get_thread_process): Add prototype.
19396 * thread-db.c (find_one_thread): Use get_thread_process
19397 instead of current_process.
19398 (thread_db_get_tls_address): Do not crash if called when
19399 thread layer is not yet initialized.
19400
19401 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19402
19403 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19404 * spu-low.c (current_tid): Rename to ...
19405 (current_ptid): ... this.
19406 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19407 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19408 ptid_get_lwp (current_ptid) instead of current_tid.
19409 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19410 instead of current_tid. Use find_process_pid to verify pid
19411 argument is valid. Pass proper argument to remove_process.
19412 (spu_thread_alive): Compare current_ptid instead of current_tid.
19413 (spu_resume): Likewise.
19414
19415 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19416
19417 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19418 variable.
19419
19420 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19421
19422 Implement the multiprocess extensions, and add linux multiprocess
19423 support.
19424
19425 * server.h (ULONGEST): Declare.
19426 (struct ptid, ptid_t): New.
19427 (minus_one_ptid, null_ptid): Declare.
19428 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19429 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19430 (struct inferior_list_entry): Change `id' type from unsigned from
19431 to ptid_t.
19432 (struct sym_cache, struct breakpoint, struct
19433 process_info_private): Forward declare.
19434 (struct process_info): Declare.
19435 (current_process): Declare.
19436 (all_processes): Declare.
19437 (initialize_inferiors): Declare.
19438 (add_thread): Adjust to use ptid_t.
19439 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19440 (add_process, remove_process, find_thread_pid): Declare.
19441 (find_inferior_id): Adjust to use ptid_t.
19442 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19443 (multi_process): Declare.
19444 (push_event): Adjust to use ptid_t.
19445 (read_ptid, write_ptid): Declare.
19446 (prepare_resume_reply): Adjust to use ptid_t.
19447 (clear_symbol_cache): Declare.
19448 * inferiors.c (all_processes): New.
19449 (null_ptid, minus_one_ptid): New.
19450 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19451 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19452 (add_thread): Change unsigned long to ptid. Remove gdb_id
19453 parameter. Adjust.
19454 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19455 (gdb_id_to_thread): Rename to ...
19456 (find_thread_pid): ... this. Change unsigned long to ptid.
19457 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19458 (loaded_dll, pull_pid_from_list): Adjust.
19459 (add_process, remove_process, find_process_pid)
19460 (get_thread_process, current_process, initialize_inferiors): New.
19461 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19462 (struct target_waitstatus) <related_pid>: Ditto.
19463 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19464 return type to int.
19465 (struct target_ops) <join>: Add `pid' argument.
19466 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19467 (struct target_ops) <wait>: Add `ptid' field. Change return type
19468 to ptid.
19469 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19470 (mywait): Add `ptid' argument. Change return type to ptid_t.
19471 (target_pid_to_str): Declare.
19472 * target.c (set_desired_inferior): Adjust to use ptids.
19473 (mywait): Add new `ptid' argument. Adjust.
19474 (target_pid_to_str): New.
19475 * mem-break.h (free_all_breakpoints): Declare.
19476 * mem-break.c (breakpoints): Delelete.
19477 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19478 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19479 to use per-process breakpoint list.
19480 (free_all_breakpoints): New.
19481 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19482 (symbol_cache, all_symbols_looked_up): Delete.
19483 (hexchars): New.
19484 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19485 read_ptid): New.
19486 (prepare_resume_reply): Change ptid argument's type from unsigned
19487 long to ptid_t. Adjust. Implement W;process and X;process.
19488 (free_sym_cache, clear_symbol_cache): New.
19489 (look_up_one_symbol): Adjust to per-process symbol cache. *
19490 * server.c (cont_thread, general_thread, step_thread): Change type
19491 to ptid_t.
19492 (attached): Delete.
19493 (multi_process): New.
19494 (last_ptid): Change type to ptid_t.
19495 (struct vstop_notif) <ptid>: Change type to ptid_t.
19496 (queue_stop_reply, push_event): Change `ptid' argument's type to
19497 ptid_t.
19498 (discard_queued_stop_replies): Add `pid' argument.
19499 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19500 changes. Don't reference the `attached' global.
19501 (attach_inferior): Adjust to mywait interface changes.
19502 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19503 features. Handle and report "multiprocess+". Handle
19504 "qAttached:PID".
19505 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19506 changes.
19507 (handle_v_kill): New.
19508 (handle_v_stopped): Adjust to use target_pid_to_str.
19509 (handle_v_requests): Allow multiple attaches and runs when
19510 multiprocess extensions are in effect. Handle "vKill".
19511 (myresume): Adjust to use ptids.
19512 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19513 (handle_status): Adjust to discard_queued_stop_replies interface
19514 change.
19515 (first_thread_of, kill_inferior_callback)
19516 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19517 (main): Call initialize_inferiors. Adjust to use ptids, killing
19518 and detaching from all inferiors. Handle multiprocess packet
19519 variants.
19520 * linux-low.h: Include gdb_proc_service.h.
19521 (struct process_info_private): New.
19522 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19523 <lwpid_of>: Use ptid_get_lwp.
19524 (get_lwp_thread): Adjust.
19525 (struct lwp_info): Add `dead' member.
19526 (find_lwp_pid): Declare.
19527 * linux-low.c (thread_db_active): Delete.
19528 (new_inferior): Adjust comment.
19529 (inferior_pid): Delete.
19530 (linux_add_process): New.
19531 (handle_extended_wait): Adjust.
19532 (add_lwp): Change unsigned long to ptid.
19533 (linux_create_inferior): Add process to processes table. Adjust
19534 to use ptids. Don't set new_inferior here.
19535 (linux_attach_lwp): Rename to ...
19536 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19537 it. Adjust to use ptids.
19538 (linux_attach_lwp): New.
19539 (linux_attach): Add process to processes table. Don't set
19540 new_inferior here.
19541 (struct counter): New.
19542 (second_thread_of_pid_p, last_thread_of_process_p): New.
19543 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19544 multiple processes.
19545 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19546 processes. Remove process from process table.
19547 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19548 to multiple processes.
19549 (any_thread_of): New.
19550 (linux_detach): Add `pid' argument, and handle it. Remove process
19551 from processes table.
19552 (linux_join): Add `pid' argument. Handle it.
19553 (linux_thread_alive): Change unsighed long argument to ptid_t.
19554 Consider dead lwps as not being alive.
19555 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19556 threads we're not interested in.
19557 (same_lwp, find_lwp_pid): New.
19558 (linux_wait_for_lwp): Change `pid' argument's type from int to
19559 ptid_t. Adjust.
19560 (linux_wait_for_event): Rename to ...
19561 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19562 from int to ptid_t. Adjust.
19563 (linux_wait_for_event): New.
19564 (linux_wait_1): Add `ptid' argument. Change return type to
19565 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19566 that exit from the process table.
19567 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19568 Adjust.
19569 (mark_lwp_dead): New.
19570 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19571 stopping all threads, mark its main lwp as dead.
19572 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19573 ptids.
19574 (fetch_register, usr_store_inferior_registers)
19575 (regsets_fetch_inferior_registers)
19576 (regsets_store_inferior_registers, linux_read_memory)
19577 (linux_write_memory): Inline `inferior_pid'.
19578 (linux_look_up_symbols): Adjust to use per-process
19579 `thread_db_active'.
19580 (linux_request_interrupt): Adjust to use ptids.
19581 (linux_read_auxv): Inline `inferior_pid'.
19582 (initialize_low): Don't reference thread_db_active.
19583 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19584 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19585 (ps_getpid): Return the pid of the current inferior.
19586 * thread-db.c (proc_handle, thread_agent): Delete.
19587 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19588 per-process data.
19589 (find_one_thread): Change argument type to ptid_t. Adjust to
19590 per-process data.
19591 (maybe_attach_thread): Adjust to per-process data and ptids.
19592 (thread_db_find_new_threads): Ditto.
19593 (thread_db_init): Ditto.
19594 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19595 processes table. Adjust to use ptids.
19596 (spu_kill, spu_detach): Adjust interface. Remove process from
19597 processes table.
19598 (spu_join, spu_thread_alive): Adjust interface.
19599 (spu_wait): Adjust interface. Remove process from processes
19600 table. Adjust to use ptids.
19601 * win32-low.c (current_inferior_tid): Delete.
19602 (current_inferior_ptid): New.
19603 (debug_event_ptid): New.
19604 (thread_rec): Take a ptid. Adjust.
19605 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19606 (child_delete_thread): Ditto.
19607 (do_initial_child_stuff): Add `attached' argument. Add process to
19608 processes table.
19609 (child_fetch_inferior_registers, child_store_inferior_registers):
19610 Adjust.
19611 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19612 (win32_attach): Pass 1 to do_initial_child_stuff.
19613 (win32_kill): Adjust interface. Remove process from processes
19614 table.
19615 (win32_detach): Ditto.
19616 (win32_join): Adjust interface.
19617 (win32_thread_alive): Take a ptid.
19618 (win32_resume): Adjust to use ptids.
19619 (get_child_debug_event): Ditto.
19620 (win32_wait): Adjust interface. Remove exiting process from
19621 processes table.
19622
19623 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19624
19625 Non-stop mode support.
19626
19627 * server.h (non_stop): Declare.
19628 (gdb_client_data, handler_func): Declare.
19629 (delete_file_handler, add_file_handler, start_event_loop):
19630 Declare.
19631 (handle_serial_event, handle_target_event, push_event)
19632 (putpkt_notif): Declare.
19633 * target.h (enum resume_kind): New.
19634 (struct thread_resume): Replace `step' field by `kind' field.
19635 (TARGET_WNOHANG): Define.
19636 (struct target_ops) <wait>: Add `options' argument.
19637 <supports_non_stop, async, start_non_stop>: New fields.
19638 (target_supports_non_stop, target_async): New.
19639 (start_non_stop): Declare.
19640 (mywait): Add `options' argument.
19641 * target.c (mywait): Add `options' argument. Print child exit
19642 notifications here.
19643 (start_non_stop): New.
19644 * server.c (non_stop, own_buf, mem_buf): New globals.
19645 (struct vstop_notif): New.
19646 (notif_queue): New global.
19647 (queue_stop_reply, push_event, discard_queued_stop_replies)
19648 (send_next_stop_reply): New.
19649 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19650 interface changes.
19651 (attach_inferior): In non-stop mode, don't wait for the target
19652 here.
19653 (handle_general_set): Handle QNonStop.
19654 (handle_query): When handling qC, return the current general
19655 thread, instead of the first thread of the list.
19656 (handle_query): If the backend supports non-stop mode, include
19657 QNonStop+ in the qSupported query response.
19658 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19659 and non-stop mode.
19660 (handle_v_attach, handle_v_run): Handle non-stop mode.
19661 (handle_v_stopped): New.
19662 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19663 (myresume): Adjust to use resume_kind. Handle non-stop.
19664 (queue_stop_reply_callback): New.
19665 (handle_status): Handle non-stop mode.
19666 (main): Clear non_stop flag on reconnection. Use the event-loop.
19667 Refactor serial protocol handling from here ...
19668 (process_serial_event): ... to this new function. When GDB
19669 selects any thread, select one here. In non-stop mode, wait until
19670 GDB acks all pending events before exiting.
19671 (handle_serial_event, handle_target_event): New.
19672 * remote-utils.c (remote_open): Install remote_desc in the event
19673 loop.
19674 (remote_close): Remove remote_desc from the event loop.
19675 (putpkt_binary): Rename to...
19676 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19677 (putpkt_binary): New as wrapper around putpkt_binary_1.
19678 (putpkt_notif): New.
19679 (prepare_resume_reply): In non-stop mode, don't change the
19680 general_thread.
19681 * event-loop.c: New.
19682 * Makefile.in (OBJ): Add event-loop.o.
19683 (event-loop.o): New rule.
19684
19685 * linux-low.h (pid_of): Moved here.
19686 (lwpid_of): New.
19687 (get_lwp_thread): Use lwpid_of.
19688 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19689 * linux-low.c (pid_of): Delete.
19690 (inferior_pid): Use lwpid_of.
19691 (linux_event_pipe): New.
19692 (target_is_async_p): New.
19693 (delete_lwp): New.
19694 (handle_extended_wait): Use lwpid_of.
19695 (add_lwp): Don't set lwpid field.
19696 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19697 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19698 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19699 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19700 first. Adjust to linux_wait_for_event interface changes. Use
19701 lwpid_of.
19702 (linux_detach): Don't delete the main lwp here.
19703 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19704 (status_pending_p): Don't consider explicitly suspended lwps.
19705 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19706 pointer. Add OPTIONS argument. Change return type to int. Use
19707 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19708 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19709 pointer. Add status pointer argument. Return a pid instead of a
19710 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19711 changes. In non-stop mode, don't switch to a random thread.
19712 (linux_wait): Rename to...
19713 (linux_wait_1): ... this. Add target_options argument, and handle
19714 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19715 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19716 clean exit and signal exit code. Don't stop all threads in
19717 non-stop mode. In all-stop mode, only stop all threads when
19718 reporting a stop to GDB. Handle explicit thread stop requests.
19719 (async_file_flush, async_file_mark): New.
19720 (linux_wait): New.
19721 (send_sigstop): Use lwpid_of.
19722 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19723 interface changes. In non-stop mode, don't switch to a random
19724 thread.
19725 (linux_resume_one_lwp): Use lwpid_of.
19726 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19727 (linux_resume_one_thread): ... this. Handle resume_stop. In
19728 non-stop mode, don't look for pending flag in all threads.
19729 (resume_status_pending_p): Don't consider explicitly suspended
19730 threads.
19731 (my_waitpid): Reimplement. Emulate __WALL.
19732 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19733 Use lwpid_of.
19734 (sigchld_handler, linux_supports_non_stop, linux_async)
19735 (linux_start_non_stop): New.
19736 (linux_target_ops): Register linux_supports_non_stop, linux_async
19737 and linux_start_non_stop.
19738 (initialize_low): Install SIGCHLD handler.
19739 * thread-db.c (thread_db_create_event, find_one_thread)
19740 (thread_db_get_tls_address): Use lwpid_of.
19741 * win32-low.c (win32_detach): Adjust to use resume_kind.
19742 (win32_wait): Add `options' argument.
19743 * spu-low.c (spu_resume): Adjust to use resume_kind.
19744 (spu_wait): Add `options' argument.
19745
19746 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19747
19748 Decouple target code from remote protocol.
19749
19750 * target.h (enum target_waitkind): New.
19751 (struct target_waitstatus): New.
19752 (struct target_ops) <wait>: Return an unsigned long. Take a
19753 target_waitstatus pointer instead of a char pointer.
19754 (mywait): Likewise.
19755 * target.c (mywait): Change prototype to return an unsigned long.
19756 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19757 * server.h (thread_from_wait, old_thread_from_wait): Delete
19758 declarations.
19759 (prepare_resume_reply): Change prototype to take a
19760 target_waitstatus.
19761 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19762 (last_status, last_ptid): New.
19763 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19764 pid instead of a signal.
19765 (attach_inferior): Remove "status" and "signal" parameters.
19766 Adjust.
19767 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19768 not as an address.
19769 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19770 (handle_v_requests, myresume): Remove "status" and "signal"
19771 parameters. Adjust.
19772 (handle_status): New.
19773 (main): Delete local `status'. Adjust.
19774 * remote-utils.c: Include target.h.
19775 (prepare_resume_reply): Change prototype to take a
19776 target_waitstatus. Adjust.
19777
19778 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19779 interface.
19780 * spu-low.c (spu_wait): Adjust.
19781 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19782 Delete.
19783 (win32_wait): Adjust.
19784
19785 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19786
19787 * target.h (struct thread_resume): Delete leave_stopped member.
19788 (struct target_ops): Add a `n' argument to the `resume' callback.
19789 * server.c (start_inferior): Adjust.
19790 (handle_v_cont, myresume): Adjust.
19791 * linux-low.c (check_removed_breakpoint): Adjust to resume
19792 interface change, and to removed leave_stopped field.
19793 (resume_ptr): Delete.
19794 (struct thread_resume_array): New.
19795 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19796 resume interface change.
19797 (linux_continue_one_thread, linux_queue_one_thread)
19798 (resume_status_pending_p): Check if the resume field is NULL
19799 instead of checking the leave_stopped member.
19800 (linux_resume): Adjust to the target resume interface change.
19801 * spu-low.c (spu_resume): Adjust to the target resume interface
19802 change.
19803 * win32-low.c (win32_detach, win32_resume): Ditto.
19804
19805 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19806
19807 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19808 flag.
19809 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19810 pending.
19811 (linux_continue_one_thread): Only preserve the stepping flag if
19812 there's a pending breakpoint.
19813
19814 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19815
19816 * server.c (main): After the inferior having exited, call
19817 remote_close before exiting gdbserver.
19818
19819 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19820
19821 Fix size of FPSCR in Power 7 processors.
19822 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19823 (PPC_FEATURE_HAS_DFP): New #define.
19824 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19825 size of the FPSCR.
19826
19827 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19828
19829 * server.c (handle_query) Whitespace and formatting.
19830
19831 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19832
19833 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19834 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19835 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19836 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19837 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19838 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19839 Makefile.in, configure.ac: Fix whitespace throughout.
19840 * configure: Regenerate.
19841
19842 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19843
19844 * inferiors.c (find_inferior): Make it safe for the callback
19845 function to delete the currently iterated inferior.
19846
19847 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19848
19849 * Makefile.in (linuw_low_h): Move higher.
19850 (thread-db.o): Depend on $(linux_low_h).
19851
19852 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19853
19854 Rename "process" to "lwp" throughout.
19855
19856 * linux-low.c (all_processes): Rename to...
19857 (all_lwps): ... this.
19858 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19859 (add_process): Rename to ...
19860 (add_lwp): ... this. Adjust.
19861 (linux_create_inferior): Adjust.
19862 (linux_attach_lwp): Adjust.
19863 (linux_attach): Adjust.
19864 (linux_kill_one_process): Rename to ...
19865 (linux_kill_one_lwp): ... this. Adjust.
19866 (linux_kill): Adjust.
19867 (linux_detach_one_process): Rename to ...
19868 (linux_detach_one_lwp): ... this. Adjust.
19869 (linux_detach): Adjust.
19870 (check_removed_breakpoint): Adjust.
19871 (status_pending_p): Adjust.
19872 (linux_wait_for_process): Rename to ...
19873 (linux_wait_for_lwp): ... this. Adjust.
19874 (linux_wait_for_event): Adjust.
19875 (send_sigstop): Adjust.
19876 (wait_for_sigstop): Adjust.
19877 (stop_all_processes): Rename to ...
19878 (stop_all_lwps): ... this.
19879 (linux_resume_one_process): Rename to ...
19880 (linux_resume_one_lwp): ... this. Adjust.
19881 (linux_set_resume_request, linux_continue_one_thread)
19882 (linux_queue_one_thread, resume_status_pending_p)
19883 (usr_store_inferior_registers, regsets_store_inferior_registers)
19884 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19885 Adjust.
19886 * linux-low.h (get_process): Rename to ...
19887 (get_lwp): ... this. Adjust.
19888 (get_thread_process): Rename to ...
19889 (get_thread_lwp): ... this. Adjust.
19890 (get_process_thread): Rename to ...
19891 (get_lwp_thread): ... this. Adjust.
19892 (struct process_info): Rename to ...
19893 (struct lwp_info): ... this.
19894 (all_processes): Rename to ...
19895 (all_lwps): ... this.
19896 * proc-service.c (ps_lgetregs): Adjust.
19897 * thread-db.c (thread_db_create_event, find_one_thread)
19898 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19899
19900 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19901
19902 * server.c (handle_query): Handle "qAttached".
19903
19904 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19905
19906 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19907 GPLv3, update license URL.
19908
19909 2009-03-01 Doug Evans <dje@google.com>
19910
19911 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19912 (server_h): Add gdb_signals.h.
19913 (signals.o): Update.
19914 * server.h (target_signal_from_host,target_signal_to_host_p)
19915 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19916
19917 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19918
19919 * remote-utils.c (getpkt): Also generate remote-debug
19920 information if noack_mode is set.
19921
19922 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19923
19924 * server.c (handle_query): Report qXfer:siginfo:read and
19925 qXfer:siginfo:write as supported and handle them.
19926 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19927 * linux-low.c (linux_xfer_siginfo): New.
19928 (linux_target_ops): Set it.
19929
19930 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19931
19932 * server.c (gdbserver_usage): Mention --remote-debug.
19933 (main): Accept '--remote-debug' switch.
19934
19935 2009-01-18 Doug Evans <dje@google.com>
19936
19937 * regcache.c (new_register_cache): No need to check result of xcalloc.
19938 * server.c (handle_search_memory): Back out calls to xmalloc,
19939 result is checked and error is returned to user upon failure.
19940 (handle_query): Ditto. Add more checks for result of malloc.
19941 (handle_v_cont): Check result of malloc, report error back to
19942 user upon failure.
19943 (handle_v_run): Ditto. Call freeargv.
19944 * server.h (freeargv): Declare.
19945 * utils.c (freeargv): New fn.
19946
19947 2009-01-15 Doug Evans <dje@google.com>
19948
19949 * gdbreplay.c (perror_with_name): Make arg const char *.
19950 * server.h (target_signal_to_name): Make return type const char *.
19951 * thread-db.c (thread_db_err_str): Make return type const char *.
19952 * utils.c (perror_with_name): Make arg const char *.
19953
19954 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19955
19956 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19957 when handling a EXIT_PROCESS_DEBUG_EVENT.
19958
19959 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19960
19961 * gdbreplay.c (gdbreplay_version): Update copyright year.
19962 * server.c (gdbserver_version): Likewise.
19963
19964 2009-01-05 Doug Evans <dje@google.com>
19965
19966 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19967 (handle_extended_wait): Improve comment.
19968
19969 2008-12-13 Doug Evans <dje@google.com>
19970
19971 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19972 * server.h (ATTR_MALLOC): New macro.
19973 (xmalloc,xcalloc,xstrdup): Declare.
19974 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19975 * inferiors.c: Ditto.
19976 * linux-low.c: Ditto.
19977 * mem-break.c: Ditto.
19978 * regcache.c: Ditto.
19979 * remote-utils.c: Ditto.
19980 * server.c: Ditto.
19981 * target.c: Ditto.
19982 * win32-low.c: Ditto.
19983
19984 2008-12-12 Doug Evans <dje@google.com>
19985
19986 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19987 in debugging printf.
19988
19989 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19990
19991 2008-12-09 Doug Evans <dje@google.com>
19992
19993 * linux-low.h (struct process_info): Delete member tid, unused.
19994 * thread-db.c (find_one_thread): Update.
19995 (maybe_attach_thread): Update.
19996
19997 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19998
19999 * target.h (struct target_ops): Add qxfer_osdata member.
20000 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
20001 and dirent.h.
20002 (linux_qxfer_osdata): New functions.
20003 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
20004 callback.
20005 * server.c (handle_query): Handle "qXfer:osdata:read:".
20006 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
20007 (buffer_xml_printf): New functions.
20008 * server.h (struct buffer): New.
20009 (buffer_grow_str, buffer_grow_str0): New macros.
20010 (buffer_grow, buffer_free, buffer_init, buffer_finish)
20011 (buffer_xml_printf): Declare.
20012
20013 2008-11-24 Doug Evans <dje@google.com>
20014
20015 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
20016
20017 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
20018
20019 * server.c (handle_v_run): Always use the supplied argument list.
20020
20021 2008-11-19 Bob Wilson <bob.wilson@acm.org>
20022
20023 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
20024 (xtensa_regmap_table): Add entry for scompare1.
20025
20026 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
20027
20028 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
20029 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
20030 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
20031 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
20032 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
20033 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
20034 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
20035 XML target descriptions.
20036 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
20037 when inferior is running on an ISA 2.05 or later processor. Add
20038 special case to return offset for full 64-bit slot of FPSCR when
20039 in 32-bits.
20040
20041 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
20042
20043 * Makefile.in (SFILES, clean): Added sparc64 files.
20044 (reg-sparc64.o, reg-sparc64.c): New.
20045 * configure.srv (sparc*-*-linux*): New configuration.
20046 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
20047 syscall arguments for SPARC.
20048 (regsets_store_inferior_registers): Likewise.
20049 * linux-sparc-low.c: New file.
20050
20051 2008-10-21 Doug Evans <dje@google.com>
20052
20053 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
20054 (READLINE_DIR,READLINE_DEP): Delete.
20055 (INTERNAL_CFLAGS): Update.
20056 (LINTFLAGS): Update.
20057
20058 2008-10-10 Pedro Alves <pedro@codesourcery.com>
20059
20060 * server.c (handle_v_run): If GDB didn't specify an argv, use the
20061 whole argv from the last run, not just argv[0].
20062
20063 2008-09-08 Pedro Alves <pedro@codesourcery.com>
20064
20065 * regcache.c (new_register_cache): Return NULL if the register
20066 cache size isn't known yet.
20067 (free_register_cache): Avoid dereferencing a NULL regcache.
20068
20069 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20070
20071 * configure.srv: Merge MIPS and MIPS64.
20072
20073 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
20074
20075 * Makefile.in (uninstall): Apply $(EXEEXT) too.
20076
20077 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
20078
20079 * Makefile.in: Add required vsx dependencies.
20080
20081 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
20082 Declare init_registers_powerpc_vsx32l.
20083 Declare init_registers_powerpc_vsx64l.
20084 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
20085 (ppc_arch_setup): Check for VSX in hwcap.
20086 (ppc_fill_vsxregset): New function.
20087 (ppc_store_vsxregset): New function.
20088 Add new VSX entry in regset_info target_regsets.
20089
20090 * configure.srv: Add new VSX dependencies.
20091
20092 2008-08-12 Pedro Alves <pedro@codesourcery.com>
20093
20094 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
20095 (remote_open): Set or clear transport_is_reliable.
20096 (putpkt_binary): Don't expect acks in noack mode.
20097 (getpkt): Don't send ack/nac in noack mode.
20098 * server.c (handle_general_set): Handle QStartNoAckMode.
20099 (handle_query): If connected by tcp pass QStartNoAckMode+ in
20100 qSupported.
20101 (main): Reset noack_mode on every connection.
20102 * server.h (noack_mode): Declare.
20103
20104 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
20105
20106 * Makefile.in (GDBREPLAY_OBS): New variable.
20107 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
20108
20109 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
20110 Daniel Jacobowitz <dan@codesourcery.com>
20111
20112 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
20113 (usr_store_inferior_registers): Likewise.
20114 (regsets_store_inferior_registers): Likewise.
20115
20116 2008-07-31 Rolf Jansen <rj@surtec.com>
20117 Pedro Alves <pedro@codesourcery.com>
20118
20119 * configure.ac: Check for memmem declaration.
20120 * server.c [HAVE_MALLOC_H]: Include malloc.h.
20121 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
20122 (disable_packet_qfThreadInfo): Unconditionally compile.
20123 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
20124 * configure, config.in: Regenerate.
20125
20126 2008-07-28 Doug Kwan <dougkwan@google.com>
20127
20128 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
20129 (linux_write_memory): Remove declaration of errno.
20130
20131 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
20132
20133 * linux-low.c (handle_extended_wait): Do not use "status"
20134 variable uninitialized.
20135
20136 2008-07-07 Pedro Alves <pedro@codesourcery.com>
20137
20138 * server.c (handle_v_attach): Inhibit reporting dll changes.
20139
20140 2008-06-27 Pedro Alves <pedro@codesourcery.com>
20141
20142 * remote-utils.c (prepare_resume_reply): If requested, don't
20143 output "thread:TID" in the T stop reply.
20144
20145 * server.c (disable_packet_vCont, disable_packet_Tthread)
20146 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
20147 (handle_query): If requested, disable support for qC, qfThreadInfo
20148 and qsThreadInfo.
20149 (handle_v_requests): If requested, disable support for vCont.
20150 (gdbserver_show_disableable): New.
20151 (main): Handle --disable-packet and --disable-packet=LIST.
20152
20153 * server.h (disable_packet_vCont, disable_packet_Tthread)
20154 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
20155
20156 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
20157
20158 * server.c (gdbserver_usage): Mention --version.
20159
20160 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20161
20162 * Makefile.in (gdbreplay.o): New rule.
20163
20164 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20165
20166 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20167 message, not gdbserver.
20168
20169 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20170 Nathan Sidwell <nathan@codesourcery.com>
20171 Joseph Myers <joseph@codesourcery.com>
20172
20173 * acinclude.m4: Include ../../config/acx.m4.
20174 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20175 * configure, config.in: Regenerate.
20176 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20177 * server.c (gdbserver_version): Print PKGVERSION.
20178 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20179 (main): Adjust gdbserver_usage calls.
20180 * gdbreplay.c (version, host_name): Add declarations.
20181 (gdbreplay_version, gdbreplay_usage): New.
20182 (main): Accept --version and --help options.
20183
20184 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20185
20186 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20187 (arm_breakpoint_at): Handle Thumb.
20188 (the_low_target): Add comment.
20189
20190 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20191
20192 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20193
20194 2008-05-09 Doug Evans <dje@google.com>
20195
20196 * server.h (decode_search_memory_packet): Declare.
20197 * remote-utils.c (decode_search_memory_packet): New fn.
20198 * server.c (handle_search_memory_1): New fn.
20199 (handle_search_memory): New fn.
20200 (handle_query): Process qSearch:memory packets.
20201
20202 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20203
20204 * regcache.c (registers_length): Remove.
20205 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20206 full register packet.
20207 * regcache.h (registers_length): Remove prototype.
20208 * server.h (PBUFSIZ): Define to 16384.
20209
20210 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20211
20212 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20213 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20214 powerpc-64l.o, and powerpc-altivec64l.o.
20215 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20216 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20217 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20218 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20219 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20220 to srv_xmlfiles.
20221
20222 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20223 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20224 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20225 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20226 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20227 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20228 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20229 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20230 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20231 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20232 (clean): Update.
20233
20234 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20235 (init_registers_powerpc_32l): ... this new prototype.
20236 (init_registers_powerpc_32): Remove, replace by ...
20237 (init_registers_powerpc_altivec32l): ... this new prototype.
20238 (init_registers_powerpc_e500): Remove, replace by ...
20239 (init_registers_powerpc_e500l): ... this new prototype.
20240 (init_registers_ppc64): Remove, replace by ...
20241 (init_registers_powerpc_64l): ... this new prototype.
20242 (init_registers_powerpc_64): Remove, replace by ...
20243 (init_registers_powerpc_altivec64l): ... this new prototype.
20244 (ppc_num_regs): Set to 73.
20245 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20246 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20247 (ppc_cannot_store_register): Handle orig_r3 and trap.
20248 (ppc_arch_setup): Update init_registers_... calls.
20249 (ppc_fill_gregset): Handle orig_r3 and trap.
20250
20251 * inferiors.c (clear_inferiors): Reset current_inferior.
20252
20253 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20254
20255 * acinclude.m4: Add override.m4.
20256 * configure: Regenerate.
20257
20258 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20259
20260 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20261 initial call to init_register_ppc64.
20262
20263 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20264
20265 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20266 single powerpc*-*-linux* case.
20267 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20268
20269 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20270
20271 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20272 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20273 from reg_xmlfiles.
20274 * linux-ppc-low.c: Include <elf.h>.
20275 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20276 (ppc_hwcap): New global variable.
20277 (ppc_regmap): Remove __SPE__ #ifdef sections.
20278 (ppc_regmap_e500): New global variable.
20279 (ppc_cannot_store_register): Update __SPE__ special case.
20280 (ppc_get_hwcap): New function.
20281 (ppc_arch_setup): Use it to determine whether inferior supports
20282 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20283 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20284 Do not access registers if target does not support AltiVec.
20285 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20286 Do not access registers if target does not support SPE.
20287 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20288
20289 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20290
20291 * linux-low.c (disabled_regsets, num_regsets): New.
20292 (use_regsets_p): Delete.
20293 (linux_wait_for_process): Clear disabled_regsets.
20294 (regsets_fetch_inferior_registers): Check and set it.
20295 (regsets_store_inferior_registers): Likewise.
20296 (linux_fetch_registers, linux_store_registers): Do not use
20297 use_regsets_p.
20298 (initialize_low): Allocate disabled_regsets.
20299
20300 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20301
20302 * Makefile.in (LIBOBJS): New.
20303 (OBS): Use LIBOBJS.
20304 (memmem.o): New rule.
20305 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20306 * configure: Regenerated.
20307
20308 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20309
20310 * server.c (handle_query): Never return "unsupported" for
20311 qXfer:features:read queries.
20312
20313 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20314
20315 * server.c (get_features_xml): Fix inverted condition.
20316 (handle_query): Always support qXfer:feature:read.
20317
20318 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20319
20320 * server.c (wrapper_argv): New.
20321 (start_inferior): Handle wrapper_argv. If set, expect an extra
20322 trap.
20323 (gdbserver_usage): Document --wrapper.
20324 (main): Parse --wrapper.
20325
20326 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20327
20328 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20329 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20330 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20331 (ppc_set_pc): Likewise.
20332 (ppc_arch_setup): New function.
20333 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20334 of collect_register.
20335 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20336
20337 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20338
20339 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20340 instead of linux-ppc64-low.o.
20341 * linux-ppc64-low.c: Remove file.
20342 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20343 (linux-ppc64-low.o): Remove rule.
20344
20345 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20346 (init_registers_powerpc_64): Likewise.
20347 (ppc_regmap): Conditionally define depending on __powerpc64__.
20348 (ppc_cannot_store_register): Do not special-case "fpscr" when
20349 compiled on __powerpc64__.
20350 (ppc_collect_ptrace_register): New function.
20351 (ppc_supply_ptrace_register): New function.
20352 (ppc_breakpoint): Change type to "unsigned int".
20353 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20354 (the_low_target): Conditionally provide initializers for the
20355 arch_setup member depending on __powerpc64__. Install
20356 collect_ptrace_register and supply_ptrace_register members.
20357
20358 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20359
20360 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20361 * server.c (gdbserver_xmltarget): Define.
20362 (get_features_xml): Use it to replace "target.xml" and arch_string.
20363
20364 * configure.srv: Remove srv_xmltarget. Add XML files that were
20365 mentioned there to srv_xmlfiles instead. Remove conditional tests
20366 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20367 srv_xmlfiles and srv_regobj to include all possible choices.
20368 * configure.ac (srv_xmltarget): Remove.
20369 (srv_xmlfiles): Do not add "target.xml".
20370 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20371 checks for supplementary target information.
20372 * configure: Regenerate.
20373 * Makefile.in (XML_TARGET): Remove.
20374 (target.xml): Remove rule.
20375 (clean): Do not clean up target.xml.
20376 (.PRECIOUS): Do not mention target.xml.
20377
20378 * target.h (struct target_ops): Remove arch_string member.
20379 * linux-low.c (linux_arch_string): Remove.
20380 (linux_target_ops): Remove arch_string initializer.
20381 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20382 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20383 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20384 * spu-low.c (spu_arch_string): Remove.
20385 (spu_target_ops): Remove arch_string initializer.
20386 * win32-low.c (win32_arch_string): Remove.
20387 (win32_target_ops): Remove arch_string initializer.
20388 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20389 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20390 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20391
20392 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20393
20394 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20395 by collect_ptrace_register and supply_ptrace_register hooks.
20396 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20397 instead of checking for the_low_target.left_pad_xfer.
20398 (usr_store_inferior_registers): Use collect_ptrace_register callback
20399 instead of checking for the_low_target.left_pad_xfer.
20400
20401 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20402 (s390_supply_ptrace_register): Likewise.
20403 (s390_fill_gregset): Call s390_collect_ptrace_register.
20404 (the_low_target): Update.
20405
20406 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20407 (ppc_supply_ptrace_register): Likewise.
20408 (the_low_target): Update.
20409
20410 * linux-i386-low.c (the_low_target): Update.
20411 * linux-x86-64-low.c (the_low_target): Update.
20412
20413 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20414
20415 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20416 reg-s390.o and reg-s390x.o.
20417
20418 * linux-low.c (new_inferior): New global variable.
20419 (linux_create_inferior, linux_attach): Set it.
20420 (linux_wait_for_process): Call the_low_target.arch_setup after the
20421 target has stopped for the first time.
20422 (initialize_low): Do not call the_low_target.arch_setup.
20423
20424 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20425 (s390_set_pc): Likewise.
20426 (s390_arch_setup): New function.
20427 (the_low_target): Use s390_arch_setup as arch_setup routine.
20428
20429 * regcache.c (realloc_register_cache): New function.
20430 (set_register_cache): Call it for each existing regcache.
20431
20432 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20433
20434 * server.h (init_registers): Remove prototype.
20435
20436 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20437 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20438 instead of init_registers ().
20439 * linux-arm-low.c (init_registers_arm): Add prototype.
20440 (init_registers_arm_with_iwmmxt): Likewise.
20441 (the_low_target): Add initializer for arch_setup field.
20442 * linux-cris-low.c (init_registers_cris): Add prototype.
20443 (the_low_target): Add initializer for arch_setup field.
20444 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20445 (the_low_target): Add initializer for arch_setup field.
20446 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20447 (the_low_target): Add initializer for arch_setup field.
20448 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20449 (the_low_target): Add initializer for arch_setup field.
20450 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20451 (the_low_target): Add initializer for arch_setup field.
20452 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20453 (the_low_target): Add initializer for arch_setup field.
20454 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20455 (init_registers_mips64_linux): Likewise.
20456 (the_low_target): Add initializer for arch_setup field.
20457 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20458 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20459 (the_low_target): Add initializer for arch_setup field.
20460 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20461 (init_registers_powerpc_64): Likewise.
20462 (the_low_target): Add initializer for arch_setup field.
20463 * linux-s390-low.c (init_registers_s390): Add prototype.
20464 (init_registers_s390x): Likewise.
20465 (the_low_target): Add initializer for arch_setup field.
20466 * linux-sh-low.c (init_registers_sh): Add prototype.
20467 (the_low_target): Add initializer for arch_setup field.
20468 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20469 (the_low_target): Add initializer for arch_setup field.
20470 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20471 (the_low_target): Add initializer for arch_setup field.
20472
20473 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20474 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20475 instead of init_registers ().
20476 * win32-arm-low.c (init_registers_arm): Add prototype.
20477 (the_low_target): Add initializer for arch_setup field.
20478 * win32-i386-low.c (init_registers_i386): Add prototype.
20479 (the_low_target): Add initializer for arch_setup field.
20480
20481 * spu-low.c (init_registers_spu): Add prototype.
20482 (initialize_low): Call initialie_registers_spu () instead of
20483 initialize_registers ().
20484
20485 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20486
20487 * server.c (handle_v_requests): When handling the vRun and vAttach
20488 packets, if already debugging a process, don't kill it. Return an
20489 error instead.
20490
20491 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20492
20493 * server.c (handle_query): Correct length check.
20494
20495 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20496
20497 * win32-low.c (do_initial_child_stuff): Add process handle
20498 parameter. Set current_process_handle and current_process_id from the
20499 parameters. Clear globals.
20500 (win32_create_inferior): Don't set current_process_handle and
20501 current_process_id here. Instead pass them on the call to
20502 do_initial_child_stuff.
20503 (win32_attach): Likewise.
20504 (win32_clear_inferiors): New.
20505 (win32_kill): Don't close the current process handle or the
20506 current thread handle here. Instead call win32_clear_inferiors.
20507 (win32_detach): Don't open a new handle to the process. Call
20508 win32_clear_inferiors.
20509 (win32_join): Don't rely on current_process_handle; open a new
20510 handle using the process id.
20511 (win32_wait): Call win32_clear_inferiors when the inferior process
20512 has exited.
20513
20514 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20515
20516 * server.c (monitor_show_help): Add "exit".
20517
20518 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20519
20520 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20521 (clean): Add reg-xtensa.c.
20522 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20523 * configure.srv (xtensa*-*-linux*) New target.
20524 * linux-xtensa-low.c: New.
20525 * xtensa-xtregs.c: New.
20526
20527 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20528
20529 * hostio.c: Don't include errno.h.
20530 (errno_to_fileio_errno): Move to hostio-errno.
20531 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20532 error number outputting to the target->hostio_last_error callback.
20533 (hostio_packet_error): Use FILEIO_EINVAL directly.
20534 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20535 calls to hostio_error.
20536 * hostio-errno.c: New.
20537 * server.h (hostio_last_error_from_errno): Declare.
20538 * target.h (target_ops): Add hostio_last_error member.
20539 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20540 as hostio_last_error handler.
20541 * spu-low.c (spu_target_ops): Likewise.
20542 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20543 (wince_hostio_last_error): New functions.
20544 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20545 as hostio_last_error handler.
20546 (win32_target_ops) [!_WIN32_WCE]: Register
20547 hostio_last_error_from_errno as hostio_last_error handler.
20548 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20549 (hostio-errno.o): New rule.
20550 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20551 * configure.srv (srv_hostio_err_objs): New variable. Default to
20552 hostio-errno.o.
20553 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20554 * configure: Regenerate.
20555
20556 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20557
20558 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20559 (linux_kill, linux_detach): Clean up the process list.
20560 * remote-utils.c (remote_open): Improve port number parsing.
20561 (putpkt_binary, input_interrupt): Only send interrupts if the target
20562 is running.
20563 * server.c (extended_protocol): Make static.
20564 (attached): Define earlier.
20565 (exit_requested, response_needed, program_argv): New variables.
20566 (target_running): New.
20567 (start_inferior): Clear attached here.
20568 (attach_inferior): Set attached here.
20569 (require_running): Define.
20570 (handle_query): Use require_running and target_running. Implement
20571 "monitor exit".
20572 (handle_v_attach, handle_v_run): New.
20573 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20574 (gdbserver_usage): Update.
20575 (main): Redo argument parsing. Handle --debug and --multi. Handle
20576 --attach along with other options or after the port. Save
20577 program_argv. Support no initial program. Resynchronize
20578 communication with GDB after an error. Handle "monitor exit".
20579 Use require_running and target_running. Always allow the extended
20580 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20581 restart in extended mode.
20582 * README: Refer to the GDB manual. Update --attach usage.
20583
20584 2007-12-20 Andreas Schwab <schwab@suse.de>
20585
20586 * linux-low.c (STACK_SIZE): Define.
20587 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20588 (linux_test_for_tracefork): Likewise.
20589
20590 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20591
20592 * linux-low.c (linux_wait_for_event): Update messages. Do not
20593 reinsert auto-delete breakpoints.
20594 * mem-break.c (struct breakpoint): Change return type of handler to
20595 int.
20596 (set_breakpoint_at): Update handler type.
20597 (reinsert_breakpoint_handler): Return 1 instead of calling
20598 delete_breakpoint.
20599 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20600 setting a new one.
20601 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20602 * mem-break.h (set_breakpoint_at): Update handler type.
20603 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20604 * win32-low.c (auto_delete_breakpoint): New.
20605 (get_child_debug_event): Use it.
20606
20607 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20608
20609 * configure.ac: Check for pread and pwrite.
20610 * hostio.c (handle_pread): Fall back to lseek and read.
20611 (handle_pwrite): Fall back to lseek and write.
20612 * config.in, configure: Regenerated.
20613
20614 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20615
20616 * server.c (myresume): Add own_buf argument.
20617 (main): Update calls.
20618
20619 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20620
20621 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20622 * remote-utils.c (remote_open): Do not call disable_async_io.
20623 (block_async_io): Delete.
20624 (unblock_async_io): Make static.
20625 (initialize_async_io): New.
20626 * server.c (handle_v_cont): Handle async I/O here.
20627 (myresume): Likewise. Move other common resume tasks here...
20628 (main): ... from here. Call initialize_async_io. Disable async
20629 I/O before the main loop.
20630 * server.h (initialize_async_io): Declare.
20631 (block_async_io, unblock_async_io): Delete prototypes.
20632 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20633
20634 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20635
20636 * remote-utils.c (readchar): Allow binary data in received messages.
20637
20638 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20639
20640 * win32-low.c (attaching): New global.
20641 (win32_create_inferior): Clear the `attaching' global.
20642 (win32_attach): Set the `attaching' global.
20643 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20644 attaching. Only set a breakpoint at the entry point if not
20645 attaching.
20646
20647 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20648
20649 * server.c (main): Don't report dll events on the initial
20650 connection on attaches.
20651
20652 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20653
20654 * server.c (main): Relax numerical bases supported for the pid of
20655 the --attach command line argument.
20656
20657 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20658
20659 * win32-low.c (win32_attach): Call OpenProcess before
20660 DebugActiveProcess, not after. Add last error output to error
20661 call.
20662
20663 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20664
20665 * win32-low.c (win32_get_thread_context)
20666 (win32_set_thread_context): New functions.
20667 (thread_rec): Use win32_get_thread_context.
20668 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20669 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20670 field.
20671
20672 2007-12-03 Leo Zayas
20673 Pedro Alves <pedro_alves@portugalmail.pt>
20674
20675 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20676 global variables.
20677 (child_add_thread): Minor cleanup.
20678 (child_continue): Resume artificially suspended threads before
20679 calling ContinueDebugEvent.
20680 (suspend_one_thread): New.
20681 (fake_breakpoint_event): New.
20682 (get_child_debug_event): Change return type to int. Check here if
20683 gdb sent an interrupt request. If a soft interrupt was requested,
20684 fake a breakpoint event. Return 0 if there is no event to handle,
20685 and 1 otherwise.
20686 (win32_wait): Don't check here if gdb sent an interrupt request.
20687 Ensure there is a valid event to handle.
20688 (win32_request_interrupt): Add soft interruption method as last
20689 resort.
20690
20691 2007-12-03 Leo Zayas
20692 Pedro Alves <pedro_alves@portugalmail.pt>
20693
20694 * win32-low.h (win32_thread_info): Add descriptions to the
20695 structure members. Replace `suspend_count' counter by a
20696 `suspended' flag.
20697 * win32-low.c (thread_rec): Update condition of when to get the
20698 context from the inferior. Rely on ContextFlags being set if it
20699 has already been retrieved. Only suspend the inferior thread if
20700 we haven't already. Warn if that fails.
20701 (continue_one_thread): s/suspend_count/suspended/. Only call
20702 ResumeThread once. Warn if that fails.
20703
20704 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20705
20706 * win32-low.c (win32_wait): Don't read from the inferior when it
20707 has already exited.
20708
20709 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20710
20711 * Makefile.in (win32_low_h): New variable.
20712 (win32-low.o): Add dependency on $(win32_low_h).
20713 (win32-arm-low.o, win32-i386-low.o): New rules.
20714
20715 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20716
20717 * hostio.c: Correct copyright year.
20718
20719 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20720
20721 * Makefile.in (OBS): Add hostio.o.
20722 (hostio.o): New rule.
20723 * server.h (handle_vFile): Declare.
20724 * hostio.c: New file.
20725 * server.c (handle_v_requests): Take packet_len and new_packet_len
20726 for binary packets. Call handle_vFile.
20727 (main): Update call to handle_v_requests.
20728
20729 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20730
20731 * linux-low.c: Include <sched.h>.
20732
20733 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20734
20735 * linux-low.c (linux_tracefork_grandchild): New.
20736 (linux_tracefork_child): Use clone.
20737 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20738
20739 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20740
20741 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20742
20743 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20744
20745 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20746
20747 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20748
20749 * inferiors.c (change_inferior_id): Delete.
20750 (add_pid_to_list, pull_pid_from_list): New.
20751 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20752 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20753 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20754 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20755 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20756 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20757 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20758 (using_threads): Always set to 1.
20759 (handle_extended_wait): New.
20760 (add_process): Do not set TID.
20761 (linux_create_inferior): Set must_set_ptrace_flags.
20762 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20763 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20764 (linux_thread_alive): Rename TID argument to LWPID.
20765 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20766 (linux_wait_for_event): Do not use TID or check using_threads. Update
20767 call to dead_thread_notify. Call handle_extended_wait.
20768 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20769 (send_sigstop): Delete sigstop_sent.
20770 (wait_for_sigstop): Avoid TID.
20771 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20772 (linux_test_for_tracefork): New.
20773 (linux_lookup_signals): Use thread_db_active and
20774 linux_supports_tracefork_flag.
20775 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20776 * linux-low.h (get_process_thread): Avoid TID.
20777 (struct process_ifo): Move thread_known and tid to the end. Remove
20778 sigstop_sent.
20779 (linux_attach_lwp, thread_db_init): Update prototypes.
20780 * server.h (change_inferior_id): Delete prototype.
20781 (add_pid_to_list, pull_pid_from_list): New prototypes.
20782 * thread-db.c (thread_db_use_events): New.
20783 (find_first_thread): Rename to...
20784 (find_one_thread): ...this. Update callers and messages. Do not
20785 call fatal. Check thread_db_use_events. Do not call
20786 change_inferior_id or new_thread_notify.
20787 (maybe_attach_thread): Update. Do not call new_thread_notify.
20788 (thread_db_init): Set thread_db_use_events. Check use_events.
20789 * utils.c (fatal, warning): Correct message prefix.
20790
20791 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20792
20793 * Makefile.in (clean): Remove new files.
20794 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20795 (powerpc-64.o, powerpc-64.c): New rules.
20796 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20797 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20798 with SPE.
20799 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20800 SPE targets.
20801 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20802 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20803 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20804 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20805 (target_regsets): Add AltiVec and SPE register sets.
20806 * configure.ac: Check for AltiVec and SPE.
20807 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20808 (ppc_fill_vrregset, ppc_store_vrregset): New.
20809 (target_regsets): Add AltiVec register set.
20810 * configure: Regenerated.
20811
20812 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20813
20814 * linux-low.c (O_LARGEFILE): Define.
20815 (linux_read_memory): Use /proc/PID/mem.
20816 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20817 * configure, config.in: Regenerated.
20818
20819 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20820
20821 * linux-low.c (linux_wait_for_event): Do not pass signals while
20822 single-stepping.
20823
20824 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20825
20826 * win32-low.c (create_process): New.
20827 (win32_create_inferior): Use create_process instead of
20828 CreateProcess. If create_process failed retry appending an ".exe"
20829 suffix. Store the GetLastError result immediatelly after
20830 create_process calls and use it on the call to error.
20831
20832 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20833
20834 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20835
20836 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20837
20838 * configure.ac: Switch license to GPLv3.
20839
20840 2007-08-01 Michael Snyder <msnyder@access-company.com>
20841
20842 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20843
20844 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20845
20846 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20847 typedef.
20848 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20849 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20850 CloseToolhelp32Snapshot.
20851 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20852 CloseToolhelp32Snapshot.
20853
20854 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20855
20856 * server.c (main): Check for inferior exit before main loop.
20857
20858 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20859
20860 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20861 instead of on tmp_desc.
20862
20863 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20864 Daniel Jacobowitz <dan@codesourcery.com>
20865
20866 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20867 (add_thread): Minor cleanups.
20868 (clear_inferiors): Move lower in the file. Clear the DLL
20869 list.
20870 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20871 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20872 (xml_escape_text): New.
20873 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20874 for qSupported.
20875 (handle_v_cont): Report errors.
20876 (gdbserver_version): Update.
20877 (main): Correct size of own_buf. Do not report initial DLL events.
20878 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20879 (unloaded_dll, xml_escape_text): New.
20880 * win32-low.c (enum target_waitkind): Update comments.
20881 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20882 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20883 (win32_EnumProcessModules, win32_GetModuleInformation)
20884 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20885 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20886 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20887 (win32_Module32First, win32_Module32Next, load_toolhelp)
20888 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20889 (get_child_debug_event): Handle DLL events.
20890 (win32_wait): Likewise.
20891
20892 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20893
20894 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20895 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20896
20897 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20898
20899 * win32-low.c (handle_output_debug_string): Ignore event if not
20900 waiting.
20901
20902 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20903
20904 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20905
20906 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20907
20908 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20909
20910 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20911
20912 * inferiors.c (change_inferior_id): Add comment.
20913 * linux-low.c (check_removed_breakpoint): Add an early
20914 prototype. Improve debug output.
20915 (linux_attach): Doc update.
20916 (linux_detach_one_process, linux_detach): Clean up before releasing
20917 each process.
20918 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20919 * linux-low.h (struct process_info): Doc improvement.
20920 * mem-break.c (delete_all_breakpoints): New.
20921 * mem-break.h (delete_all_breakpoints): New prototype.
20922 * thread-db.c (find_first_thread): New.
20923 (thread_db_create_event): Call it instead of
20924 thread_db_find_new_threads. Clean up unused variables.
20925 (maybe_attach_thread): Remove first thread handling.
20926 (thread_db_find_new_threads): Use find_first_thread.
20927 (thread_db_get_tls_address): Likewise.
20928
20929 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20930
20931 * thread-db.c (thread_db_find_new_threads): Add prototype.
20932 (thread_db_create_event): Check for the main thread before adding
20933 a new thread.
20934 (maybe_attach_thread): Only enable event reporting if TID == 0.
20935 (thread_db_get_tls_address): Check for new threads.
20936
20937 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20938
20939 * linux-low.c (linux_create_inferior): Try execv before execvp.
20940 * spu-low.c (spu_create_inferior): Likewise.
20941
20942 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20943
20944 * linux-low.c (linux_create_inferior): Change execv to execvp.
20945 * spu-low.c (spu_create_inferior): Likewies.
20946
20947 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20948
20949 * Makefile.in (clean): Clean new files instead of deleted ones.
20950 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20951 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20952 rules.
20953 * configure.srv: Specify XML files and new regformats for MIPS and
20954 MIPS64 GNU/Linux.
20955 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20956 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20957 an entry for the restart register.
20958 (mips_cannot_fetch_register, mips_cannot_store_register)
20959 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20960 register names to match the XML descriptions.
20961 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20962 restart register instead of $0.
20963
20964 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20965 Markus Deuling <deuling@de.ibm.com>
20966
20967 * remote-utils.c (decode_xfer_write): New function.
20968 * server.h (decode_xfer_write): Add prototype.
20969 * server.c (handle_query): Add PACKET_LEN argument. Support
20970 qXfer:spu:read and qXfer:spu:write packets.
20971 (main): Pass packet_len to handle_query.
20972 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20973 * target.h (target_ops): Add qxfer_spu.
20974
20975 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20976
20977 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20978 accessing non-seekable spufs files.
20979
20980 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20981
20982 * server.c (handle_query): Add reply for qC packet.
20983
20984 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20985 Leo Zayas <lerele@champenstudios@com>
20986
20987 * server.h (check_remote_input_interrupt_request): New function.
20988 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20989 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20990 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20991 (check_remote_input_interrupt_request): New function.
20992 * server.h (check_remote_input_interrupt_request): Declare.
20993 * win32-low.c (winapi_DebugBreakProcess,
20994 winapi_GenerateConsoleCtrlEvent): New typedefs.
20995 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20996 to 250 ms.
20997 (win32_wait): Check for remote interrupt request
20998 with check_remote_input_interrupt_request.
20999 (win32_request_interrupt): New function.
21000 (win32_target_op): Set request_interrupt to win32_request_interrupt.
21001
21002 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21003
21004 * win32-low.c (debug_registers_changed,
21005 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
21006 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
21007 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
21008 (thread_rec): Get context using the low target.
21009 (child_add_thread): Call thread_added on the low target,
21010 which does the same thing.
21011 (regptr): Delete.
21012 (do_initial_child_stuff): Remove debug registers references.
21013 Set context using the low target. Resume threads after
21014 setting the contexts.
21015 (child_continue): Remove dead variable. Remove debug
21016 registers references.
21017 (child_fetch_inferior_registers): Go through the low target.
21018 (do_child_store_inferior_registers): Remove.
21019 (child_store_inferior_registers): Go through the low target.
21020 (win32_resume): Remove debug registers references.
21021 Set context using the low target.
21022 (handle_exception): Change return type to void. Don't record
21023 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
21024 first chance exception.
21025 (get_child_debug_event): Change return type to void. Remove
21026 goto loop. Always return after waiting for debug event.
21027 (win32_wait): Convert to switch statement. Handle spurious
21028 events.
21029
21030 * win32-i386-low.c (debug_registers_changed,
21031 debug_registers_used): New.
21032 (initial_stuff): Rename to ...
21033 (i386_initial_stuff): ... this. Clear debug registers
21034 state variables.
21035 (store_debug_registers): Delete.
21036 (i386_get_thread_context): New.
21037 (load_debug_registers): Delete.
21038 (i386_set_thread_context): New.
21039 (i386_thread_added): New.
21040 (single_step): Rename to ...
21041 (i386_single_step): ... this.
21042 (do_fetch_inferior_registers): Rename to ...
21043 (i386_fetch_inferior_register): ... this.
21044 (i386_store_inferior_register): New.
21045 (the_low_target): Adapt to new interface.
21046
21047 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
21048 (arm_get_thread_context): New.
21049 (arm_set_thread_context): New.
21050 (regptr): New.
21051 (do_fetch_inferior_registers): Rename to ...
21052 (arm_fetch_inferior_register): ... this.
21053 (arm_store_inferior_register): New.
21054 (arm_wince_breakpoint): Reimplement as unsigned long.
21055 (arm_wince_breakpoint_len): Define.
21056 (the_low_target): Adapt to new interface.
21057
21058 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
21059 load_debug_registers. Add get_thread_context, set_thread_context,
21060 thread_added and store_inferior_register. Rename
21061 fetch_inferior_registers to fetch_inferior_register.
21062 (regptr): Remove declaration.
21063
21064 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21065
21066 * linux-low.c (linux_detach): Change return type to int. Return 0.
21067 * spu-low.c (spu_detach): Likewise.
21068
21069 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21070
21071 * target.h (target_ops): Change return type of detach to int.
21072 Add join.
21073 (join_inferior): New.
21074 * server.c (main): Don't skip detach support on mingw32.
21075 If the inferior doesn't support detaching return error.
21076 Call join_inferior instead of using waitpid.
21077 * linux-low.c (linux_join): New.
21078 (linux_target_op): Add linux_join.
21079 * spu-low.c (spu_join): New.
21080 (spu_target_ops): Add spu_join.
21081 * win32-low.c (win32_detach): Adapt to new interface.
21082 Reopen current_process_handle before detaching. Issue a child
21083 resume before detaching.
21084 (win32_join): New.
21085 (win32_target_op): Add win32_join.
21086
21087 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21088
21089 * win32-low.c (win32-attach): Fix return value.
21090 * target.h (target_ops): Describe ATTACH return values.
21091
21092 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21093
21094 * win32-low.c (GETPROCADDRESS): Define.
21095 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
21096 (winapi_DebugSetProcessKillOnExit): Likewise.
21097 (win32_create_inferior): Force usage of ansi CreateProcessA.
21098 (win32_attach): Use GETPROCADDRESS.
21099 (win32_detach): Likewise.
21100
21101 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21102
21103 * win32-low.c (win32_wait): Don't use WSTOPSIG.
21104
21105 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
21106
21107 * win32-low.c: Commit leftover changes from 2007-03-29.
21108
21109 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21110
21111 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
21112 fields short instead of int. Add explicit padding.
21113 (i387_cache_to_fsave): Remove unnecessary casts.
21114 (i387_fsave_to_cache): Doc fix.
21115 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
21116
21117 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21118
21119 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
21120 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
21121
21122 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21123
21124 * configure.srv (arm*-*-mingw32ce*): Move near the other
21125 arm targets.
21126
21127 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21128
21129 * configure.ac: Add errno checking.
21130 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
21131 sys/file.h and malloc.h.
21132 (AC_CHECK_DECLS): Add perror.
21133 (srv_mingwce): Handle.
21134 * configure.srv (i[34567]86-*-cygwin*): Add
21135 win32-i386-low.o to srv_tgtobj.
21136 (i[34567]86-*-mingw*): Likewise.
21137 (arm*-*-mingw32ce*): Add case.
21138 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21139 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
21140 [__MINGW32CE__] (strerror): New function.
21141 [__MINGW32CE__] (errno): Define to GetLastError.
21142 [__MINGW32CE__] (COUNTOF): New macro.
21143 (remote_open): Remove extra close call.
21144 * mem-break.c (delete_breakpoint_at): New function.
21145 * mem-break.h (delete_breakpoint_at): Declare.
21146 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21147 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
21148 [USE_WIN32API] (read, write): Add char* casts.
21149 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
21150 * server.h: Include wincecompat.h on Windows CE.
21151 [HAVE_ERRNO_H]: Check.
21152 (perror): Declare if not declared.
21153 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
21154 (perror_with_name): Remove errno declaration.
21155 * wincecompat.h: New.
21156 * wincecompat.c: New.
21157 * win32-low.h: New.
21158 * win32-arm-low.c: New.
21159 * win32-i386-low.c: New.
21160 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21161 (OUTMSG2): Make it safe.
21162 (_T): New macro.
21163 (COUNTOF): New macro.
21164 (NUM_REGS): Get it from the low target.
21165 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21166 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21167 (thread_rec): Let low target handle debug registers.
21168 (child_add_thread): Likewise.
21169 (child_init_thread_list): Likewise.
21170 (continue_one_thread): Likewise.
21171 (regptr): New.
21172 (do_child_fetch_inferior_registers): Move to ...
21173 * win32-i386-low.c: ... here, and rename to ...
21174 (do_fetch_inferior_registers): ... this.
21175 * win32-low.c (child_fetch_inferior_registers):
21176 Go through the low target.
21177 (do_child_store_inferior_registers): Use regptr.
21178 (strwinerror): New function.
21179 (win32_create_inferior): Handle Windows CE.
21180 Use strwinerror instead of strerror on Windows error
21181 codes. Add program to the error output.
21182 Don't close the main thread handle on Windows CE.
21183 (win32_attach): Use coredll.dll on Windows CE.
21184 (win32_kill): Close current process and current
21185 thread handles.
21186 (win32_detach): Use coredll.dll on Windows CE.
21187 (win32_resume): Let low target handle debug registers, and
21188 step request.
21189 (handle_exception): Add/Remove initial breakpoint. Avoid
21190 non-existant WSTOPSIG on Windows CE.
21191 (win32_read_inferior_memory): Cast to remove warning.
21192 (win32_arch_string): Go through the low target.
21193 (initialize_low): Call set_breakpoint_data with the low
21194 target's breakpoint.
21195 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21196 FOP_REGNUM, mappings): Move to ...
21197 * win32-i386-low.c: ... here.
21198 * win32-low.c (win32_thread_info): Move to ...
21199 * win32-low.h: ... here.
21200 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21201 win32-arm-low.c and wincecompat.c.
21202 (all:): Add $EXEEXT.
21203 (install-only:): Likewise.
21204 (gdbserver:): Likewise.
21205 (gdbreplay:): Likewise.
21206 * config.in: Regenerate.
21207 * configure: Regenerate.
21208
21209 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21210
21211 * win32-low.c: Rename typedef thread_info to
21212 win32_thread_info throughout.
21213
21214 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21215
21216 * win32-i386-low.c: Rename to ...
21217 * win32-low.c: ... this.
21218 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21219 * Makefile.in: Likewise.
21220
21221 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21222
21223 * remote-utils.c (monitor_output): Constify msg parameter.
21224 * server.h (monitor_output): Likewise.
21225 * win32-i386-low.c (handle_output_debug_string): New.
21226 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21227 handle_output_debug_string.
21228 (get_child_debug_event): Likewise.
21229
21230 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21231
21232 * server.c (main): Correct strtoul check.
21233
21234 2007-03-27 Jon Ringle <jon@ringle.org>
21235
21236 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21237
21238 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21239
21240 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21241
21242 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21243
21244 * terminal.h: Check HAVE_SGTTY_H.
21245
21246 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21247
21248 * remote-utils.c (remote_open): Print out the assigned port number.
21249
21250 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21251
21252 * remote-utils.c (monitor_output): New function.
21253 * server.c (debug_threads): Define here.
21254 (monitor_show_help): New function.
21255 (handle_query): Handle qRcmd.
21256 (main): Do not handle 'd' packet.
21257 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21258 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21259 of debug_threads.
21260
21261 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21262
21263 * Makefile.in (EXEEXT): New.
21264 (clean): Use $(EXEEXT).
21265
21266 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21267
21268 * target.h (target_ops): Rename send_signal to request_interrupt,
21269 and remove enum target_signal parameter.
21270 * linux-low.c (linux_request_interrupt): Rename from
21271 linux_send_signal, and always send SIGINT.
21272 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21273 and always send SIGINT.
21274 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21275 of send_signal.
21276 (input_interrupt): Likewise.
21277
21278 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21279
21280 * server.c (get_features_xml): Check if target implemented
21281 arch_string.
21282 * win32-i386-low.c (win32_arch_string): New.
21283 (win32_target_ops): Add win32_arch_string as arch_string member.
21284
21285 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21286
21287 * spu-low.c (spu_arch_string): New.
21288 (spu_target_ops): Add spu_arch_string.
21289
21290 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21291
21292 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21293 * configure.ac: Do not check for terminal.h.
21294 * configure, config.in: Regenerated.
21295
21296 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21297
21298 * Makefile.in (OBS): Add $(XML_BUILTIN).
21299 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21300 (clean): Update.
21301 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21302 (arm-with-iwmmxt.c): New.
21303 * config.in, configure: Regenerate.
21304 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21305 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21306 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21307 (arm*-*-linux*): Add iWMMXt and regset support.
21308 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21309 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21310 (arm_store_wmmxregset, target_regsets): New.
21311 * server.c (get_features_xml): Take annex argument. Check builtin
21312 XML documents.
21313 (handle_query): Handle multiple annexes.
21314
21315 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21316
21317 * remote-utils.c [USE_WIN32API] (read, write): Define.
21318 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21319 write.
21320
21321 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21322
21323 * linux-i386-low.c (the_low_target): Set arch_string.
21324 * linux-x86-64-low.c (the_low_target): Likewise.
21325 * linux-low.c (linux_arch_string): New.
21326 (linux_target_ops): Add it.
21327 * linux-low.h (struct linux_target_ops): Add arch_string.
21328 * server.c (write_qxfer_response): Use const void * for DATA.
21329 (get_features_xml): New.
21330 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21331 * target.h (struct target_ops): Add arch_string method.
21332
21333 2007-01-03 Denis Pilat <denis.pilat@st.com>
21334 Daniel Jacobowitz <dan@codesourcery.com>
21335
21336 * linux-low.c (linux_kill): Handle being called with no threads.
21337 * win32-i386-low.c (win32_kill): Likewise.
21338 (get_child_debug_event): Clear current_process_handle.
21339
21340 2006-12-30 Denis PILAT <denis.pilat@st.com>
21341 Daniel Jacobowitz <dan@codesourcery.com>
21342
21343 * remote-utils.c (remote_open): Check the type of specified
21344 serial port devices before opening them.
21345 * server.c (main): Kill the inferior if an error occurs during
21346 the first remote_open.
21347
21348 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21349
21350 * README: Update supported targets.
21351
21352 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21353
21354 * Makefile.in (clean): Remove reg-mips64.c.
21355 (reg-mips64.c, reg-mips64.o): New rules.
21356 * configure.srv: Handle mips64. Include regset support for mips.
21357 * linux-mips-low.c (union mips_register): New.
21358 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21359 (mips_breakpoint, mips_breakpoint_at): Use int.
21360 (mips_collect_register, mips_supply_register)
21361 (mips_collect_register_32bit, mips_supply_register_32bit)
21362 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21363 (mips_store_fpregset, target_regsets): New.
21364 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21365
21366 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21367
21368 * configure.srv: Add target "spu*-*-*".
21369 * Makefile.in (clean): Remove reg-spu.c.
21370 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21371 * spu-low.c: New file.
21372
21373 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21374
21375 * configure.ac: Correct td_thr_tls_get_addr test.
21376 * configure: Regenerated.
21377
21378 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21379
21380 * linux-low.c (linux_wait_for_event): Reformat. Use the
21381 pass_signals array.
21382 * remote-utils.c (decode_address_to_semicolon): New.
21383 * server.c (pass_signals, handle_general_set): New.
21384 (handle_query): Mention QPassSignals for qSupported.
21385 (main): Call handle_general_set.
21386 * server.h (pass_signals, decode_address_to_semicolon): New.
21387
21388 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21389
21390 * server.c (handle_query): Correct error handling for read_auxv.
21391
21392 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21393
21394 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21395 and srv_linux_thread_db to yes.
21396 * linux-s390-low.c (s390_fill_gregset): New function.
21397 (target_regsets): Define data structure.
21398
21399 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21400
21401 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21402 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21403 * config.in, configure: Regenerated.
21404 * inferiors.c (gdb_id_to_thread): New function.
21405 (gdb_id_to_thread_id): Use it.
21406 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21407 * linux-low.h (struct process_info): Add th member.
21408 (thread_db_get_tls_address): New prototype.
21409 * remote-utils.c (decode_address): Make non-static.
21410 * server.c (handle_query): Handle qGetTLSAddr.
21411 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21412 * target.h (struct target_ops): Add get_tls_address.
21413 * thread-db.c (maybe_attach_thread): Save the thread handle.
21414 (thread_db_get_tls_address): New.
21415
21416 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21417
21418 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21419 (linux_resume_one_process): Take a siginfo_t *. Update all
21420 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21421 (struct pending_signals): Add a siginfo_t.
21422 (linux_wait_for_process): Always set last_status.
21423 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21424 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21425 * linux-low.h (struct process_info): Add last_status.
21426
21427 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21428
21429 * remote-utils.c (try_rle): New function.
21430 (putpkt_binary): Use it.
21431
21432 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21433
21434 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21435 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21436 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21437 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21438 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21439 point registers.
21440
21441 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21442
21443 * server.c (terminal_fd): New variable.
21444 (old_foreground_pgrp): Likewise.
21445 (restore_old_foreground_pgrp): New function.
21446 (start_inferior): Record the terminal file descriptor in terminal_fd
21447 and its original foreground group in old_foreground_pgrp. Register
21448 restore_old_foreground_pgrp with atexit().
21449
21450 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21451
21452 * server.c (handle_query): Correct qPart to qXfer.
21453
21454 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21455
21456 * configure.ac: Check for more headers which are missing on
21457 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21458 * configure.srv: Add Cygwin and mingw32.
21459 * remote-utils.c: Don't include headers unconditionally which
21460 are missing on mingw32. Include <winsock.h> for mingw32.
21461 (remote_open): Adjust for mingw32 support. Flush
21462 standard error after writing to it.
21463 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21464 (unblock_async_io, enable_async_io, disable_async_io)
21465 (readchar, getpkt): Update for Winsock support.
21466 (prepare_resume_reply): Expect a protocol signal number.
21467 * server.c: Disable <sys/wait.h> on mingw32.
21468 (start_inferior): Adjust for mingw32 support. Flush
21469 standard error after writing to it.
21470 (attach_inferior): Likewise. Use protocol signal
21471 numbers.
21472 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21473 and names.
21474 * win32-i386-low.c: New file.
21475 * Makefile.in (XM_CLIBS): Set.
21476 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21477 (win32-i386-low.o): New dependency rule.
21478 * linux-low.c (linux_wait): Use target signal numbers.
21479 * target.h (struct target_ops): Doc fix.
21480 * server.h (target_signal_to_name): New prototype.
21481 * gdbreplay.c: Don't include headers unconditionally which
21482 are missing on mingw32. Include <winsock.h> for mingw32.
21483 (remote_close, remote_open): Adjust for Winsock support.
21484 * configure, config.in: Regenerated.
21485
21486 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21487
21488 * server.c (decode_xfer_read, write_qxfer_response): New.
21489 (handle_query): Take a packet length argument. Handle
21490 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21491 the qSupported response.
21492 (main): Update call to handle_query.
21493
21494 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21495
21496 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21497 (putpkt_binary): Renamed from putpkt and adjusted for binary
21498 data.
21499 (putpkt): New wrapper for putpkt_binary.
21500 (readchar): Don't mask off the high bit.
21501 (decode_X_packet): New function.
21502 * server.c (main): Call putpkt_binary if a handler sets the packet
21503 length. Save the length of the incoming packet. Handle 'X'.
21504 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21505
21506 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21507
21508 * server.c (handle_query): Handle qSupported.
21509
21510 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21511
21512 * remote-utils.c (all_symbols_looked_up): New variable.
21513 (look_up_one_symbol): Check it.
21514 * server.h (look_up_one_symbol): New declaration.
21515 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21516
21517 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21518
21519 * Makefile.in (linux-arm-low.o): Update dependencies.
21520 * linux-arm-low.c: Include "gdb_proc_service.h".
21521 (PTRACE_GET_THREAD_AREA): Define.
21522 (ps_get_thread_area): New function.
21523
21524 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21525
21526 * configure.srv (m68k*-*-uclinux*): New target.
21527 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21528 (linux_resume_one_process): Remove extraneous cast.
21529 (linux_read_offsets): New.
21530 (linux_target_op): Add linux_read_offsets on mmuless systems.
21531 * server.c (handle_query): Add qOffsets logic.
21532 * target.h (struct target_ops): Add read_offsets.
21533
21534 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21535
21536 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21537 (PTRACE_GET_THREAD_AREA): Define.
21538 (ps_get_thread_area): New function.
21539 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21540 (linux-x86-64-low.o): Update.
21541
21542 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21543
21544 * configure.ac: Remove checks for prfpregset_t.
21545 * gdb_proc_service.h: New file.
21546 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21547 new "gdb_proc_service.h".
21548 * proc-service.c: Likewise.
21549 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21550 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21551 * Makefile.in (gdb_proc_service_h): Updated.
21552 * configure, config.in: Regenerated.
21553
21554 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21555
21556 * remote-utils.c (prepare_resume_reply): Move declaration
21557 of gdb_id_from_wait to the top of the block.
21558
21559 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21560
21561 * linux-low.c (regsets_store_inferior_registers): Read the regset
21562 from the target before filling it.
21563
21564 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21565
21566 * server.c (attach_inferior): Return SIGTRAP for a successful
21567 attach.
21568
21569 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21570
21571 * Makefile.in (OBS): Add version.o.
21572 (STAGESTUFF): Delete.
21573 (version.o): Add dependencies.
21574 (version.c): Replace rule.
21575 (clean): Remove version.c.
21576 * server.c (gdbserver_version): New.
21577 (gdbserver_usage): Use printf.
21578 (main): Handle --version and --help.
21579 * server.h (version, host_name): Add declarations.
21580
21581 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21582
21583 * linux-arm-low.c:
21584 * linux-arm-low.c:
21585 * inferiors.c:
21586 * i387-fp.h:
21587 * i387-fp.c:
21588 * gdbreplay.c:
21589 * regcache.c:
21590 * proc-service.c:
21591 * mem-break.h:
21592 * mem-break.c:
21593 * linux-x86-64-low.c:
21594 * linux-sh-low.c:
21595 * linux-s390-low.c:
21596 * linux-ppc64-low.c:
21597 * linux-ppc-low.c:
21598 * linux-mips-low.c:
21599 * linux-m68k-low.c:
21600 * linux-m32r-low.c:
21601 * linux-low.h:
21602 * linux-low.c:
21603 * linux-ia64-low.c:
21604 * linux-i386-low.c:
21605 * linux-crisv32-low.c:
21606 * thread-db.c:
21607 * terminal.h:
21608 * target.h:
21609 * target.c:
21610 * server.h:
21611 * server.c:
21612 * remote-utils.c:
21613 * regcache.h:
21614 * utils.c:
21615 * Makefile.in:
21616 * configure.ac:
21617 * gdbserver.1: Add (C) after Copyright. Update the FSF
21618 address.
21619
21620 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21621
21622 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21623 (arm_breakpoint_at): Recognize both breakpoints.
21624 (the_low_target): Use the correct breakpoint instruction.
21625
21626 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21627
21628 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21629 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21630 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21631 (the_low_target): Update.
21632
21633 2005-10-25 Andreas Schwab <schwab@suse.de>
21634
21635 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21636
21637 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21638 (ia64_num_regs): Reduce to 462.
21639
21640 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21641
21642 * acinclude.m4: Correct quoting.
21643 * aclocal.m4: Regenerated.
21644
21645 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21646 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21647 (thread_db_init): Call thread_db_err_str.
21648 * configure.ac: Check for TD_VERSION.
21649 * config.in, configure: Regenerated.
21650
21651 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21652
21653 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21654
21655 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21656
21657 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21658 is not available. Define HAVE_PTRACE_GETREGS if it is.
21659 * config.in, configure: Regenerated.
21660 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21661 * linux-i386-low.c, linux-m68k-low.c: Update to use
21662 HAVE_PTRACE_GETREGS.
21663 * linux-low.c (regsets_fetch_inferior_registers)
21664 (regsets_store_inferior_registers): Only return 0 if we processed
21665 GENERAL_REGS.
21666 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21667 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21668
21669 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21670
21671 * inferiors.c (struct thread_info): Add gdb_id.
21672 (add_thread): Add gdb_id argument.
21673 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21674 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21675 calls to add_thread.
21676 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21677 * server.c (handle_query): Use thread_to_gdb_id.
21678 (handle_v_cont, main): Use gdb_id_to_thread_id.
21679 * server.h (add_thread): Update prototype.
21680 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21681 prototypes.
21682
21683 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21684
21685 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21686 left-padded registers.
21687 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21688 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21689
21690 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21691
21692 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21693 * configure: Regenerate.
21694 * config.in: Regenerate.
21695 * server.h (NEED_DECLARATION_STRERROR):
21696 Replace with !HAVE_DECL_STRERROR.
21697
21698 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21699
21700 * linux-low.c (linux_wait, linux_send_signal): Don't test
21701 an unsigned long variable for > 0 if it could be MAX_ULONG.
21702 * server.c (myresume): Likewise.
21703 * target.c (set_desired_inferior): Likewise.
21704
21705 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21706
21707 * configure.ac: Simplify and improve check for socklen_t.
21708 * configure, config.in: Regenerate.
21709
21710 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21711
21712 * acconfig.h: Remove.
21713 * configure.ac: Add a test for socklen_t. Use three-argument
21714 AC_DEFINE throughout.
21715 * config.in: Regenerated using autoheader 2.59.
21716 * configure: Regenerated.
21717
21718 * gdbreplay.c (socklen_t): Provide a default.
21719 (remote_open): Use socklen_t.
21720 * remote-utils.c (socklen_t): Provide a default.
21721 (remote_open): Use socklen_t.
21722 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21723 unsigned char.
21724
21725 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21726 char for buffers.
21727 * linux-low.c (linux_read_memory, linux_write_memory)
21728 (linux_read_auxv): Likewise.
21729 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21730 (check_mem_write): Likewise.
21731 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21732 Likewise.
21733 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21734 (registers_from_string, register_data): Likewise.
21735 * server.c (handle_query, main): Likewise.
21736 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21737 (decode_M_packet): Likewise.
21738 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21739 * target.h (struct target_ops): Update read_memory, write_memory,
21740 and read_auxv.
21741 (read_inferior_memory, write_inferior_memory): Update.
21742 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21743 to unsigned char *.
21744 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21745 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21746 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21747 linux-s390-low.c, linux-sh-low.c: Update for changes in
21748 read_inferior_memory and the_low_target->breakpoint.
21749
21750 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21751
21752 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21753 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21754 * configure.srv: Add powerpc64-*-linux*.
21755 * linux-ppc64-low.c: New file.
21756
21757 2005-05-23 Orjan Friberg <orjanf@axis.com>
21758
21759 * linux-cris-low.c: New file with support for CRIS.
21760 * linux-crisv32-low.c: Ditto for CRISv32.
21761 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21762 (clean): Add reg-cris.c and reg-crisv32.c.
21763 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21764 reg-crisv32.o, and reg-crisv32.c to make rules.
21765 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21766 recognized targets.
21767
21768 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21769
21770 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21771 of sizeof (PTRACE_XFER_TYPE).
21772 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21773
21774 2005-05-12 Orjan Friberg <orjanf@axis.com>
21775
21776 * target.h (struct target_ops): Add insert_watchpoint,
21777 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21778 pointers for hardware watchpoint support.
21779 * linux-low.h (struct linux_target_ops): Ditto.
21780 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21781 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21782 to linux_target_ops.
21783 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21784 reply packet.
21785 * server.c (main): Recognize 'Z' and 'z' packets.
21786
21787 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21788
21789 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21790 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21791 (the_low_target): Add new members.
21792
21793 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21794
21795 * proc-service.c (ps_lgetregs): Search all_processes instead of
21796 all_threads.
21797
21798 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21799
21800 * server.c (start_inferior): Change return type to int.
21801 (attach_inferior): Change sigptr to int *.
21802 (handle_v_cont, handle_v_requests): Change signal to int *.
21803 (main): Change signal to int.
21804
21805 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21806
21807 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21808 * configure.srv: Add m32r*-*-linux*.
21809 * linux-m32r-low.c: New file.
21810
21811 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21812
21813 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21814
21815 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21816
21817 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21818 Take unsigned long arguments for PIDs.
21819 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21820 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21821 (wait_for_sigstop, linux_resume_one_process)
21822 (regsets_fetch_inferior_registers, linux_send_signal)
21823 (linux_read_auxv): Likewise. Update the types of variables holding
21824 PIDs. Update format string specifiers.
21825 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21826 * remote-utils.c (prepare_resume_reply): Likewise.
21827 * server.c (cont_thread, general_thread, step_thread)
21828 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21829 unsigned long.
21830 (handle_query): Update format specifiers.
21831 (handle_v_cont, main): Use strtoul for thread IDs.
21832 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21833 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21834 (general_thread, step_thread, thread_from_wait)
21835 (old_thread_from_wait): Update.
21836 * target.h (struct thread_resume): Use unsigned long for THREAD.
21837 (struct target_ops): Use unsigned long for arguments to attach and
21838 thread_alive.
21839
21840 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21841
21842 * acinclude.m4: Include bfd/bfd.m4 directly.
21843 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21844 <agriffis@toolchain.org>.
21845 * aclocal.m4, configure: Regenerated.
21846
21847 2005-01-07 Andrew Cagney <cagney@gnu.org>
21848
21849 * configure.ac: Rename configure.in, require autoconf 2.59.
21850 * configure: Re-generate.
21851
21852 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21853
21854 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21855 LIBS when finished.
21856 * aclocal.m4: Regenerated.
21857 * configure: Regenerated.
21858
21859 2004-11-21 Andreas Schwab <schwab@suse.de>
21860
21861 * linux-m68k-low.c (m68k_num_gregs): Define.
21862 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21863 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21864 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21865 (m68k_breakpoint_at): New. Add to the_low_target.
21866
21867 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21868 srv_linux_thread_db to yes.
21869
21870 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21871
21872 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21873 (ARCH_SET_FS): Likewise.
21874 (ARCH_GET_FS): Likewise.
21875 (ARCH_GET_GS): Likewise.
21876
21877 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21878
21879 * linux-i386-low.c (ps_get_thread_area): New.
21880 * linux-x86-64-low.c (ps_get_thread_area): New.
21881 * linux-low.c: Include <sys/syscall.h>.
21882 (linux_kill_one_process): Don't kill the first thread here.
21883 (linux_kill): Kill the first thread here.
21884 (kill_lwp): New function.
21885 (send_sigstop, linux_send_signal): Use it.
21886 * proc-service.c: Clean up #ifdefs.
21887 (fpregset_info): Delete.
21888 (ps_lgetregs): Update and enable implementation.
21889 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21890 implementations.
21891 * remote-utils.c (struct sym_cache, symbol_cache): New.
21892 (input_interrupt): Print a clearer message.
21893 (async_io_enabled): New variable.
21894 (enable_async_io, disable_async_io): Use it. Update comments.
21895 (look_up_one_symbol): Use the symbol cache.
21896 * thread-db.c (thread_db_look_up_symbols): New function.
21897 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21898
21899 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21900
21901 * configure.in: Test for -rdynamic.
21902 * configure: Regenerated.
21903 * Makefile (INTERNAL_LDFLAGS): New.
21904 (gdbserver, gdbreplay): Use it.
21905
21906 2004-09-02 Andrew Cagney <cagney@gnu.org>
21907
21908 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21909
21910 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21911
21912 * linux-low.c (linux_wait): Clear all_processes list also.
21913
21914 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21915
21916 * linux-low.c: Include <errno.h>. Remove extern declaration of
21917 errno.
21918
21919 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21920
21921 * gdbreplay.c, server.h, utils.c: Update copyright years.
21922
21923 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21924
21925 * server.c (main): Print child status or termination signal from
21926 variable 'signal', not 'sig'.
21927
21928 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21929
21930 * linux-low.c (linux_read_memory): Change return type to
21931 int. Check for and return error from ptrace().
21932 * target.c (read_inferior_memory): Change return type to int. Pass
21933 back return status from the_target->read_memory().
21934 * target.h (struct target_ops): Adapt *read_memory() prototype.
21935 Update comment.
21936 (read_inferior_memory): Adapt prototype.
21937 * server.c (main): Return an error packet if
21938 read_inferior_memory() returns an error.
21939
21940 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21941
21942 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21943 Unify with other clean targets.
21944
21945 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21946
21947 * server.c (handle_v_cont): Call set_desired_inferior.
21948
21949 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21950
21951 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21952
21953 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21954
21955 * linux-low.c (linux_wait): Unblock async I/O.
21956 (linux_resume): Block and enable async I/O.
21957 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21958 * server.h (block_async_io, unblock_async_io): Add prototypes.
21959
21960 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21961
21962 * remote-utils.c (remote_open): Print a status notice after
21963 opening a TCP port.
21964 * server.c (attach_inferior): Print a status notice after
21965 attaching.
21966
21967 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21968
21969 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21970
21971 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21972
21973 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21974 error packet.
21975 * server.c, target.h: Update copyright years.
21976
21977 2004-02-25 Roland McGrath <roland@redhat.com>
21978
21979 * target.h (struct target_ops): New member `read_auxv'.
21980 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21981 * linux-low.c (linux_read_auxv): New function.
21982 (linux_target_ops): Initialize `read_auxv' member to that.
21983
21984 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21985
21986 Committed by Jim Blandy <jimb@redhat.com>.
21987
21988 * linux-s390-low.c (s390_num_regs): Update.
21989 (s390_regmap): Remove control registers. Use __s390x__ predefine
21990 instead of GPR_SIZE to distiguish s390 and s390x targets.
21991
21992 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21993
21994 * linux-low.c: Update copyright year.
21995 (check_removed_breakpoint): Clear pending_is_breakpoint.
21996 (linux_set_resume_request, linux_queue_one_thread)
21997 (resume_status_pending_p): New functions.
21998 (linux_continue_one_thread): Use process->resume.
21999 (linux_resume): Only resume threads if there are no pending events.
22000 * linux-low.h (struct process_info): Add resume request
22001 pointer.
22002
22003 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
22004
22005 * regcache.c (new_register_cache): Clear the allocated register
22006 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
22007
22008 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
22009
22010 * linux-low.c (linux_resume): Take a struct thread_resume *
22011 argument.
22012 (linux_wait): Update call.
22013 (resume_ptr): New static variable.
22014 (linux_continue_one_thread): Renamed from
22015 linux_continue_one_process. Use resume_ptr.
22016 (linux_resume): Use linux_continue_one_thread.
22017 * server.c (handle_v_cont, handle_v_requests): New functions.
22018 (myresume): New function.
22019 (main): Handle 'v' case.
22020 * target.h (struct thread_resume): New type.
22021 (struct target_ops): Change argument of "resume" to struct
22022 thread_resume *.
22023 (myresume): Delete macro.
22024
22025 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
22026
22027 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
22028 (uninstall): Support DESTDIR.
22029
22030 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
22031
22032 * configure.srv: Add xscale*linux copy of arm*linux entry.
22033
22034 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
22035
22036 * linux-arm-low.c (arm_reinsert_addr): New function.
22037 (the_low_target): Add arm_reinsert_addr.
22038
22039 2003-07-08 Mark Kettenis <kettenis@gnu.org>
22040
22041 * mem-break.c: Remove whitespace at end of file.
22042
22043 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22044
22045 * configure.in: Check whether we need to prototype strerror.
22046 * server.h: Optionally prototype strerror.
22047 * gdbreplay.c (perror_with_name): Use strerror.
22048 * linux-low.c (linux_attach_lwp): Use strerror.
22049 * utils.c (perror_with_name): Use strerror.
22050 * config.in, configure: Regenerated.
22051
22052 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22053
22054 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
22055 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
22056
22057 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
22058
22059 * Makefile.in (SFILES): Update.
22060 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
22061 low-sun3.c: Remove files.
22062
22063 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
22064
22065 * linux-low.c: Move comment to linux_thread_alive where it belonged.
22066 (linux_detach_one_process, linux_detach): New functions.
22067 (linux_target_ops): Add linux_detach.
22068 * server.c (main): Handle 'D' packet.
22069 * target.h (struct target_ops): Add "detach" member.
22070 (detach_inferior): Define.
22071
22072 2003-06-13 Mark Kettenis <kettenis@gnu.org>
22073
22074 From Kelley Cook <kelleycook@wideopenwest.com>:
22075 * configure.srv: Accept i[34567]86 variants.
22076
22077 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
22078
22079 * linux-low.c (linux_wait_for_event): Correct comment typos.
22080 (linux_resume_one_process): Call check_removed_breakpoint.
22081 (linux_send_signal): New function.
22082 (linux_target_ops): Add linux_send_signal.
22083 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
22084 of kill.
22085 * target.h (struct target_ops): Add send_signal.
22086
22087 2003-05-29 Jim Blandy <jimb@redhat.com>
22088
22089 * linux-low.c (usr_store_inferior_registers): Transfer buf in
22090 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
22091 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
22092 away part of the register's value.
22093
22094 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
22095
22096 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
22097 (linux_wait_for_event, linux_init_signals): Likewise.
22098
22099 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
22100
22101 * configure.in: Check for stdlib.h.
22102 * configure: Regenerated.
22103 * config.in: Regenerated.
22104
22105 2003-01-04 Andreas Schwab <schwab@suse.de>
22106
22107 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
22108
22109 2003-01-02 Andrew Cagney <ac131313@redhat.com>
22110
22111 * Makefile.in: Remove obsolete code.
22112
22113 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
22114
22115 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
22116 defined(PT_FPR0_HI).
22117
22118 2002-11-17 Stuart Hughes <seh@zee2.com>
22119
22120 * linux-arm-low.c (arm_num_regs): Increase.
22121 (arm_regmap): Include status register.
22122
22123 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
22124
22125 * linux-low.c (register_addr): Remove incorrect -1 check.
22126
22127 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
22128
22129 * linux-low.c (linux_create_inferior): Call setpgid. Return
22130 the new PID.
22131 (unstopped_p, linux_signal_pid): Remove.
22132 (linux_target_ops): Remove linux_signal_pid.
22133 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
22134 global instead of target method.
22135 * target.h (struct target_ops): Remove signal_pid. Update comment
22136 for create_inferior.
22137 * server.c (signal_pid): New variable.
22138 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
22139 gdbserver. Set the child to be the foreground process group.
22140 (attach_inferior): Set signal_pid.
22141
22142 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
22143
22144 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
22145
22146 2002-08-20 Jim Blandy <jimb@redhat.com>
22147
22148 * Makefile.in (LDFLAGS): Allow the configure script to establish a
22149 default for this.
22150
22151 2002-08-01 Andrew Cagney <cagney@redhat.com>
22152
22153 * Makefile.in: Make chill references obsolete.
22154
22155 2002-07-24 Kevin Buettner <kevinb@redhat.com>
22156
22157 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
22158 * configure: Regenerate.
22159 * config.in: Regenerate.
22160
22161 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22162
22163 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22164 (perror_with_name, remote_close, remote_open, expect, play): Static.
22165
22166 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22167
22168 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22169 byte offsets instead of an array of indexes.
22170 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22171
22172 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22173
22174 * regcache.c: Add comment.
22175
22176 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22177
22178 * thread-db.c: New file.
22179 * proc-service.c: New file.
22180 * acinclude.m4: New file.
22181 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22182 proc-service.o, and thread-db.o.
22183 (linux-low.o): Add USE_THREAD_DB.
22184 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22185 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22186 * aclocal.m4: Regenerated.
22187 * config.in: Regenerated.
22188 * configure: Regenerated.
22189 * configure.in: Check for proc_service.h, sys/procfs.h,
22190 thread_db.h, and linux/elf.h headrs.
22191 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22192 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22193 Check for -lthread_db and thread support.
22194 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22195 PowerPC, and SuperH.
22196 * i387-fp.c: Constify arguments.
22197 * i387-fp.h: Likewise.
22198 * inferiors.c: (struct thread_info): Renamed from
22199 `struct inferior_info'. Remove PID member. Use generic inferior
22200 list header. All uses updated.
22201 (inferiors, signal_pid): Removed.
22202 (all_threads): New variable.
22203 (get_thread): Define.
22204 (add_inferior_to_list): New function.
22205 (for_each_inferior): New function.
22206 (change_inferior_id): New function.
22207 (add_inferior): Removed.
22208 (remove_inferior): New function.
22209 (add_thread): New function.
22210 (free_one_thread): New function.
22211 (remove_thread): New function.
22212 (clear_inferiors): Use for_each_inferior and free_one_thread.
22213 (find_inferior): New function.
22214 (find_inferior_id): New function.
22215 (inferior_target_data): Update argument type.
22216 (set_inferior_target_data): Likewise.
22217 (inferior_regcache_data): Likewise.
22218 (set_inferior_regcache_data): Likewise.
22219 * linux-low.c (linux_bp_reinsert): Remove.
22220 (all_processes, stopping_threads, using_thrads)
22221 (struct pending_signals, debug_threads, pid_of): New.
22222 (inferior_pid): Replace with macro.
22223 (struct inferior_linux_data): Remove.
22224 (get_stop_pc, add_process): New functions.
22225 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22226 Use add_process and add_thread.
22227 (linux_attach_lwp): New function, based on old linux_attach. Use
22228 add_process and add_thread. Set stop_expected for new threads.
22229 (linux_attach): New function.
22230 (linux_kill_one_process): New function.
22231 (linux_kill): Kill all LWPs.
22232 (linux_thread_alive): Use find_inferior_id.
22233 (check_removed_breakpoints, status_pending_p): New functions.
22234 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22235 Update. Use WNOHANG. Wait for cloned processes also. Update process
22236 struct for the found process.
22237 (linux_wait_for_event): New function.
22238 (linux_wait): Use it. Support LWPs.
22239 (send_sigstop, wait_for_sigstop, stop_all_processes)
22240 (linux_resume_one_process, linux_continue_one_process): New functions.
22241 (linux_resume): Support LWPs.
22242 (REGISTER_RAW_SIZE): Remove.
22243 (fetch_register): Use register_size instead. Call supply_register.
22244 (usr_store_inferior_registers): Likewise. Call collect_register.
22245 Fix recursive case.
22246 (regsets_fetch_inferior_registers): Improve error message.
22247 (regsets_store_inferior_registers): Add debugging.
22248 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22249 (unstopped_p, linux_signal_pid): New functions.
22250 (linux_target_ops): Add linux_signal_pid.
22251 (linux_init_signals): New function.
22252 (initialize_low): Call it. Initialize using_threads.
22253 * regcache.c (inferior_regcache_data): Add valid
22254 flag.
22255 (get_regcache): Fetch registers lazily. Add fetch argument
22256 and update all callers.
22257 (regcache_invalidate_one, regcache_invalidate): New
22258 functions.
22259 (new_register_cache): Renamed from create_register_cache.
22260 Return the new regcache.
22261 (free_register_cache): Change argument to a void *.
22262 (registers_to_string, registers_from_string): Call get_regcache
22263 with fetch flag set.
22264 (register_data): Make static. Pass fetch flag to get_regcache.
22265 (supply_register): Call get_regcache with fetch flag clear.
22266 (collect_register): Call get_regcache with fetch flag set.
22267 (collect_register_as_string): New function.
22268 * regcache.h: Update.
22269 * remote-utils.c (putpkt): Flush after debug output and use
22270 stderr.
22271 Handle input interrupts while waiting for an ACK.
22272 (input_interrupt): Use signal_pid method.
22273 (getpkt): Flush after debug output and use stderr.
22274 (outreg): Use collect_register_as_string.
22275 (new_thread_notify, dead_thread_notify): New functions.
22276 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22277 and general_thread.
22278 (look_up_one_symbol): Flush after debug output.
22279 * server.c (step_thread, server_waiting): New variables.
22280 (start_inferior): Don't use signal_pid. Update call to mywait.
22281 (attach_inferior): Update call to mywait.
22282 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22283 (main): Don't fetch/store registers explicitly. Use
22284 set_desired_inferior. Support proposed ``Hs'' packet. Update
22285 calls to mywait.
22286 * server.h: Update.
22287 (struct inferior_list, struct_inferior_list_entry): New.
22288 * target.c (set_desired_inferior): New.
22289 (write_inferior_memory): Constify.
22290 (mywait): New function.
22291 * target.h: Update.
22292 (struct target_ops): New signal_pid method.
22293 (mywait): Removed macro, added prototype.
22294
22295 * linux-low.h (regset_func): Removed.
22296 (regset_fill_func, regset_store_func): New.
22297 (enum regset_type): New.
22298 (struct regset_info): Add type field. Use new operation types.
22299 (struct linux_target_ops): stop_pc renamed to get_pc.
22300 Add decr_pc_after_break and breakpoint_at.
22301 (get_process, get_thread_proess, get_process_thread)
22302 (strut process_info, all_processes, linux_attach_lwp)
22303 (thread_db_init): New.
22304
22305 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22306 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22307 (the_low_target): Add new members.
22308 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22309 (i386_store_fpxregset): Constify.
22310 (target_regsets): Add new kind identifier.
22311 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22312 (i386_set_pc): Add debugging.
22313 (i386_breakpoint_at): New function.
22314 (the_low_target): Add new members.
22315 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22316 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22317 (mips_breakpoint_at): New.
22318 (the_low_target): Add new members.
22319 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22320 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22321 (the_low_target): Add new members.
22322 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22323 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22324 (the_low_target): Add new members.
22325 * linux-x86-64-low.c (target_regsets): Add new kind
22326 identifier.
22327
22328 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22329
22330 From Martin Pool <mbp@samba.org>:
22331 * server.c (gdbserver_usage): New function.
22332 (main): Call it.
22333
22334 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22335
22336 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22337 stop_at -> stop_pc.
22338
22339 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22340
22341 * Makefile.in: Remove obsolete code.
22342
22343 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22344
22345 * linux-low.c (regsets_fetch_inferior_registers),
22346 (regsets_store_inferior_registers): Removed cast to int from
22347 ptrace() calls.
22348 * regcache.h: Added declaration of struct inferior_info.
22349
22350 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22351
22352 * inferiors.c (struct inferior_info): Add regcache_data.
22353 (add_inferior): Call create_register_cache.
22354 (clear_inferiors): Call free_register_cache.
22355 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22356 * regcache.c (struct inferior_regcache_data): New.
22357 (registers): Remove.
22358 (get_regcache): New function.
22359 (create_register_cache, free_register_cache): New functions.
22360 (set_register_cache): Don't initialize the register cache here.
22361 (registers_to_string, registers_from_string, register_data): Call
22362 get_regcache.
22363 * regcache.h: Add prototypes.
22364 * server.h: Likewise.
22365
22366 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22367
22368 * mem-break.c: New file.
22369 * mem-break.h: New file.
22370 * Makefile.in: Add mem-break.o rule; update server.h
22371 dependencies.
22372 * inferiors.c (struct inferior_info): Add target_data
22373 member.
22374 (clear_inferiors): Free target_data member if set.
22375 (inferior_target_data, set_inferior_target_data): New functions.
22376 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22377 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22378 * linux-low.c (linux_bp_reinsert): New variable.
22379 (struct inferior_linux_data): New.
22380 (linux_create_inferior): Use set_inferior_target_data.
22381 (linux_attach): Likewise. Call add_inferior.
22382 (linux_wait_for_one_inferior): New function.
22383 (linux_wait): Call it.
22384 (linux_write_memory): Add const.
22385 (initialize_low): Call set_breakpoint_data.
22386 * linux-low.h (struct linux_target_ops): Add breakpoint
22387 handling members.
22388 * server.c (attach_inferior): Remove extra add_inferior
22389 call.
22390 * server.h: Include mem-break.h. Update inferior.c
22391 prototypes.
22392 * target.c (read_inferior_memory)
22393 (write_inferior_memory): New functions.
22394 * target.h (read_inferior_memory)
22395 (write_inferior_memory): Change macros to prototypes.
22396 (struct target_ops): Update comments. Add const to write_memory
22397 definition.
22398
22399 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22400
22401 * linux-low.c (usr_store_inferior_registers): Support
22402 registers which are allowed to fail to store.
22403 * linux-low.h (linux_target_ops): Likewise.
22404 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22405 (ppc_cannot_store_register): FPSCR may not be storable.
22406
22407 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22408
22409 * server.h: Include <string.h> if HAVE_STRING_H.
22410 * ChangeLog: Correct paths in last ChangeLog entry.
22411
22412 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22413
22414 * linux-low.h: Remove obsolete prototypes.
22415 (struct linux_target_ops): New.
22416 (extern the_low_target): New.
22417 * linux-low.c (num_regs, regmap): Remove declarations.
22418 (register_addr): Use the_low_target explicitly.
22419 (fetch_register): Likewise.
22420 (usr_fetch_inferior_registers): Likewise.
22421 (usr_store_inferior_registers): Likewise.
22422 * linux-arm-low.c (num_regs): Remove.
22423 (arm_num_regs): Define.
22424 (arm_regmap): Renamed from regmap, made static.
22425 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22426 made static.
22427 (arm_cannot_store_register): Renamed from cannot_store_register,
22428 made static.
22429 (the_low_target): New.
22430 * linux-i386-low.c (num_regs): Remove.
22431 (i386_num_regs): Define.
22432 (i386_regmap): Renamed from regmap, made static.
22433 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22434 made static.
22435 (i386_cannot_store_register): Renamed from cannot_store_register,
22436 made static.
22437 (the_low_target): New.
22438 * linux-ia64-low.c (num_regs): Remove.
22439 (ia64_num_regs): Define.
22440 (ia64_regmap): Renamed from regmap, made static.
22441 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22442 made static.
22443 (ia64_cannot_store_register): Renamed from cannot_store_register,
22444 made static.
22445 (the_low_target): New.
22446 * linux-m68k-low.c (num_regs): Remove.
22447 (m68k_num_regs): Define.
22448 (m68k_regmap): Renamed from regmap, made static.
22449 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22450 made static.
22451 (m68k_cannot_store_register): Renamed from cannot_store_register,
22452 made static.
22453 (the_low_target): New.
22454 * linux-mips-low.c (num_regs): Remove.
22455 (mips_num_regs): Define.
22456 (mips_regmap): Renamed from regmap, made static.
22457 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22458 made static.
22459 (mips_cannot_store_register): Renamed from cannot_store_register,
22460 made static.
22461 (the_low_target): New.
22462 * linux-ppc-low.c (num_regs): Remove.
22463 (ppc_num_regs): Define.
22464 (ppc_regmap): Renamed from regmap, made static.
22465 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22466 made static.
22467 (ppc_cannot_store_register): Renamed from cannot_store_register,
22468 made static.
22469 (the_low_target): New.
22470 * linux-s390-low.c (num_regs): Remove.
22471 (s390_num_regs): Define.
22472 (s390_regmap): Renamed from regmap, made static.
22473 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22474 made static.
22475 (s390_cannot_store_register): Renamed from cannot_store_register,
22476 made static.
22477 (the_low_target): New.
22478 * linux-sh-low.c (num_regs): Remove.
22479 (sh_num_regs): Define.
22480 (sh_regmap): Renamed from regmap, made static.
22481 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22482 made static.
22483 (sh_cannot_store_register): Renamed from cannot_store_register,
22484 made static.
22485 (the_low_target): New.
22486 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22487 (the_low_target): New.
22488
22489 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22490
22491 * Makefile.in: Add stamp-h target.
22492 * configure.in: Create stamp-h.
22493 * configure: Regenerated.
22494
22495 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22496
22497 * inferiors.c: New file.
22498 * target.c: New file.
22499 * target.h: New file.
22500 * Makefile.in: Add target.o and inferiors.o. Update
22501 dependencies.
22502 * linux-low.c (inferior_pid): New static variable,
22503 moved from server.c.
22504 (linux_create_inferior): Renamed from create_inferior.
22505 Call add_inferior. Return 0 on success instead of a PID.
22506 (linux_attach): Renamed from myattach.
22507 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22508 (linux_thread_alive): Renamed from mythread_alive.
22509 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22510 child dies.
22511 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22512 (regsets_store_inferior_registers): Correct error message.
22513 Add missing ``return 0''.
22514 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22515 (linux_store_registers): Renamed from store_inferior_registers.
22516 (linux_read_memory): Renamed from read_inferior_memory.
22517 (linux_write_memory): Renamed from write_inferior_memory.
22518 (linux_target_ops): New structure.
22519 (initialize_low): Call set_target_ops ().
22520 * remote-utils.c (unhexify): New function.
22521 (hexify): New function.
22522 (input_interrupt): Send signals to ``signal_pid''.
22523 * server.c (inferior_pid): Remove.
22524 (start_inferior): Update create_inferior call.
22525 (attach_inferior): Call add_inferior.
22526 (handle_query): New function.
22527 (main): Call handle_query for `q' packets.
22528 * server.h: Include "target.h". Remove obsolete prototypes.
22529 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22530
22531 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22532
22533 * Makefile.in: Add WARN_CFLAGS. Update configury
22534 dependencies.
22535 * configure.in: Check for <string.h>
22536 * configure: Regenerate.
22537 * config.in: Regenerate.
22538 * gdbreplay.c: Include needed system headers.
22539 (remote_open): Remove strchr prototype.
22540 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22541 * regcache.c (supply_register): Change buf argument to const void *.
22542 (supply_register_by_name): Likewise.
22543 (collect_register): Change buf argument to void *.
22544 (collect_register_by_name): Likewise.
22545 * regcache.h: Add missing prototypes.
22546 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22547 * server.c (handle_query): New function.
22548 (attached): New static variable, moved out of main.
22549 (main): Quiet longjmp clobber warnings.
22550 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22551 * utils.c (error): Remove NORETURN.
22552 (fatal): Likewise.
This page took 0.598353 seconds and 5 git commands to generate.