gdbserver: convert the global dll list into a process_info field
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2021-03-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 * inferiors.h (struct process_info) <all_dlls, dlls_changed>: New
4 fields.
5 * dll.h (loaded_dll)
6 (unloaded_dll): Declare an overloaded version that takes a proc
7 parameter.
8 * dll.cc (loaded_dll)
9 (unloaded_dll): Implement the overloaded versions.
10 (clear_dlls): Clear all process' dll lists.
11 (all_dlls, dlls_changed): Remove the global variables.
12 * remote-utils.cc (prepare_resume_reply): Update to consider a dll
13 list per proc.
14 * server.cc (handle_qxfer_libraries): Ditto.
15 (handle_v_attach): Ditto.
16 (captured_main): Ditto.
17
18 2021-02-23 Simon Marchi <simon.marchi@polymtl.ca>
19
20 * linux-low.cc (linux_process_target::filter_event): Return
21 void.
22 * linux-low.h (class linux_process_target) <filter_event>:
23 Return void.
24
25 2021-02-12 Tom Tromey <tromey@adacore.com>
26
27 * gdbreplay.cc (remote_desc): Remove.
28 (remote_desc_in, remote_desc_out): New globals.
29 (remote_close): Update.
30 (remote_open): Handle "-".
31 (remote_open): Update.
32 (logchar): Log to stderr.
33 (expect, play): Update.
34
35 2021-02-12 Tom Tromey <tromey@adacore.com>
36
37 * gdbreplay.cc (remote_open): Constify.
38
39 2021-02-05 Paul E. Murphy <murphyp@linux.ibm.com>
40
41 * Makefile.in (UNDO_GNULIB_CFLAGS): Disable
42 gnulib free replacement too.
43 * common-defs.h [USE_WIN32API](read, write): Undefine
44 gnulib versions before defining these macros.
45
46 2021-02-03 Pedro Alves <pedro@palves.net>
47
48 * linux-low.cc (linux_process_target::complete_ongoing_step_over):
49 Discard step SIGTRAP, unless GDB wanted the thread to step.
50
51 2021-02-03 Pedro Alves <pedro@palves.net>
52
53 * server.cc (discard_queued_stop_replies): Don't ever discard the
54 notification at the head of the list.
55
56 2021-01-20 Simon Marchi <simon.marchi@polymtl.ca>
57
58 * ax.cc (bytecode_address_table): Make static.
59 * debug.cc (debug_file): Make static.
60 * linux-low.cc (stopping_threads): Make static.
61 (step_over_bkpt): Make static.
62 * linux-x86-low.cc (amd64_emit_ops, i386_emit_ops): Make static.
63 * tracepoint.cc (stop_tracing_bkpt, flush_trace_buffer_bkpt,
64 alloced_trace_state_variables, trace_buffer_ctrl,
65 tracing_start_time, tracing_stop_time, tracing_user_name,
66 tracing_notes, tracing_stop_note): Make static.
67
68 2021-01-20 Tom de Vries <tdevries@suse.de>
69
70 * linux-x86-low.cc (collect_register_i386): New function.
71 (x86_fill_gregset): Remove memset. Use collect_register_i386.
72
73 2021-01-07 Tom de Vries <tdevries@suse.de>
74
75 * Makefile.in (LIBIBERTY_NORMAL, LIBIBERTY_NOASAN, LIBIBERTY_PIC):
76 (LIBIBERTY_FOR_SHLIB): New var.
77 (LIBIBERTY): Set using $(LIBIBERTY_NORMAL).
78 (IPA_LIB): Use LIBIBERTY_FOR_SHLIB instead of LIBIBERTY in target rule.
79
80 2021-01-04 Simon Marchi <simon.marchi@efficios.com>
81
82 * debug.cc (debug_print_depth): New.
83
84 2021-01-01 Joel Brobecker <brobecker@adacore.com>
85
86 * server.cc (gdbserver_version): Update copyright year.
87 * gdbreplay.cc (gdbreplay_version): Likewise.
88
89 2020-12-16 Luis Machado <luis.machado@linaro.org>
90
91 * linux-aarch64-low.cc (address_significant): New function.
92 (aarch64_target::low_stopped_data_address): Handle the TBI.
93
94 2020-12-11 Andrew Burgess <andrew.burgess@embecosm.com>
95
96 * Makefile.in (IPA_LIB): Include libiberty library.
97
98 2020-11-11 Andrew Burgess <andrew.burgess@embecosm.com>
99
100 * server.cc (gdbserver_usage): Add missing option to usage text.
101 (gdbserver_show_disableable): Likewise.
102
103 2020-11-02 Simon Marchi <simon.marchi@efficios.com>
104
105 * ax.cc: Fix indentation.
106 * dll.cc: Fix indentation.
107 * inferiors.h: Fix indentation.
108 * linux-low.cc: Fix indentation.
109 * linux-nios2-low.cc: Fix indentation.
110 * linux-ppc-ipa.cc: Fix indentation.
111 * linux-ppc-low.cc: Fix indentation.
112 * linux-x86-low.cc: Fix indentation.
113 * linux-xtensa-low.cc: Fix indentation.
114 * regcache.cc: Fix indentation.
115 * server.cc: Fix indentation.
116 * tracepoint.cc: Fix indentation.
117
118 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
119
120 * acinclude.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
121 AC_LANG_PROGRAM.
122 * configure: Re-generate.
123
124 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
125
126 * configure: Re-generate.
127
128 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
129
130 * configure: Re-generate.
131
132 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
133
134 * configure: Re-generate.
135
136 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
137
138 * configure: Re-generate.
139
140 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
141
142 * configure.ac: Modernize.
143 * configure: Re-generate.
144
145 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
146
147 * configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
148 AC_CANONICAL_SYSTEM.
149 * configure: Re-generate.
150
151 2020-10-26 Pedro Alves <pedro@palves.net>
152
153 * netbsd-low.cc (netbsd_waitpid, netbsd_process_target::kill)
154 (netbsd_qxfer_libraries_svr4): Use gdb::handle_eintr without
155 explicit type.
156
157 2020-10-25 Simon Marchi <simon.marchi@polymtl.ca>
158
159 * acinclude.m4: Update ptrace.m4 path.
160
161 2020-10-24 Simon Marchi <simon.marchi@polymtl.ca>
162
163 * config.in: Re-generate.
164 * configure: Re-generate.
165
166 2020-10-21 Simon Marchi <simon.marchi@polymtl.ca>
167
168 * server.cc (handle_general_set): Don't use sprintf with
169 argument overlapping buffer.
170
171 2020-10-20 Tom Tromey <tromey@adacore.com>
172
173 PR gdb/26742:
174 * inferiors.cc (remove_thread): Clear current_thread before
175 freeing the thread.
176
177 2020-10-13 Kamil Rytarowski <n54@gmx.com>x
178
179 * netbsd-low.cc (netbsd_tdesc): Remove.
180 (netbsd_add_process): Likewise.
181 (netbsd_process_target::create_inferior): Update.
182
183 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
184
185 * linux-arc-low.cc (arc_linux_read_description): Release the
186 unique_ptr returned from arc_create_target_description.
187
188 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
189
190 * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
191 or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
192
193 2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
194
195 * linux-low.cc (linux_process_target::handle_extended_wait):
196 Release the unique_ptr returned from allocate_target_description.
197 * linux-riscv-low.cc (riscv_target::low_arch_setup): Likewise.
198 * linux-x86-low.cc (tdesc_amd64_linux_no_xml): Change type.
199 (tdesc_i386_linux_no_xml): Change type.
200 (x86_linux_read_description): Borrow pointer from unique_ptr
201 object.
202 (x86_target::get_ipa_tdesc_idx): Likewise.
203 (initialize_low_arch): Likewise.
204 * tdesc.cc (allocate_target_description): Update return type.
205
206 2020-10-07 Tom Tromey <tromey@adacore.com>
207
208 * server.cc (handle_search_memory): Remove dead code.
209
210 2020-10-07 Tom Tromey <tromey@adacore.com>
211
212 * server.cc (handle_search_memory_1): Remove.
213 (handle_search_memory): Use simple_search_memory.
214
215 2020-10-07 Simon Marchi <simon.marchi@efficios.com>
216
217 * Makefile.in (COMPILE): Add CXXFLAGS.
218 (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
219 (gdbserver$(EXEEXT)): Add CXXFLAGS.
220 (gdbreplay$(EXEEXT)): Add CXXFLAGS.
221 ($(IPA_LIB)): Add CXXFLAGS.
222 (IPAGENT_COMPILE): Add CXXFLAGS.
223
224 2020-10-07 Anton Kolesov <anton.kolesov@synopsys.com>
225
226 * configure.srv: Support ARC architecture.
227 * Makefile.in: Add linux-arc-low.cc and arch/arc.o.
228 * linux-arc-low.cc: New file.
229
230 2020-10-07 Kamil Rytarowski <n54@gmx.com>
231
232 * netbsd-low.cc (get_dynamic, get_r_debug, read_one_ptr)
233 (netbsd_qxfer_libraries_svr4): Remove "target" argument and update.
234 (netbsd_process_target::qxfer_libraries_svr4): Update.
235
236 2020-10-07 Kamil Rytarowski <n54@gmx.com>
237
238 * netbsd-low.cc: Fix whitespace formatting.
239 * netbsd-amd64-low.cc: Likewise.
240
241 2020-10-07 Kamil Rytarowski <n54@gmx.com>
242
243 * netbsd-low.cc (netbsd_process_target::read_memory)
244 (netbsd_process_target::write_memory): Update.
245
246 2020-10-07 Kamil Rytarowski <n54@gmx.com>
247
248 * netbsd-aarch64-low.cc: Add.
249 * Makefile.in (SFILES): Register "netbsd-aarch64-low.c".
250 * configure.srv: Add aarch64*-*-netbsd*.
251
252 2020-10-06 Shahab Vahedi <shahab@synopsys.com>
253
254 * regcache.cc (register_data): Remove unused "fetch" argument.
255
256 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
257
258 * server.cc (handle_monitor_command): Handle "set
259 debug-event-loop".
260 (captured_main): Handle "--debug-event-loop".
261 (monitor_show_help): Mention new setting.
262 (gdbserver_usage): Mention new flag.
263
264 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
265
266 * linux-low.cc (linux_process_target::async): Pass name to
267 add_file_handler.
268 * remote-utils.cc (handle_accept_event): Likewise.
269 (remote_open): Likewise.
270
271 2020-10-01 Kamil Rytarowski <n54@gmx.com>
272
273 * netbsd-i386-low.cc: Add.
274 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
275 * configure.srv: Add i[34567]86-*-netbsd*.
276
277 2020-10-01 Kamil Rytarowski <n54@gmx.com>
278
279 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
280 (netbsd_target_regsets): Now const.
281 (the_low_target): Remove.
282 (class netbsd_amd64_target, the_netbsd_amd64_target)
283 (the_netbsd_target): Add.
284 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
285 low_arch_setup ().
286 (netbsd_process_target::fetch_registers)
287 (netbsd_process_target::store_registers, initialize_low): Update.
288 (the_netbsd_target): Remove.
289 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
290 (the_low_target, netbsd_tdesc): Remove.
291 (netbsd_process_target::get_regs_info)
292 (netbsd_process_target::low_arch_setup): Add.
293
294 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
295
296 * win32-low.cc: Remove local wow64_process variable.
297 * win32-low.h: Remove local wow64_process variable.
298
299 2020-09-18 Tom Tromey <tromey@adacore.com>
300
301 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
302 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
303 (netbsd_process_target::wait): Change type of target_options.
304 * win32-low.h (class win32_process_target) <wait>: Update.
305 * win32-low.cc (win32_process_target::wait): Update.
306 * target.h (class process_stratum_target) <wait>: Update.
307 (mywait): Update.
308 * target.cc (mywait, target_wait): Change type of "options".
309 * linux-low.h (class linux_process_target) <wait, wait_1>:
310 Update.
311 * linux-low.cc (linux_process_target::wait)
312 (linux_process_target::wait_1): Update.
313
314 2020-09-15 Tom Tromey <tromey@adacore.com>
315
316 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
317 (xmltarget_amd64_linux_no_xml): Now arrays.
318
319 2020-09-14 Tom Tromey <tromey@adacore.com>
320
321 * tracepoint.cc (eval_result_names): Now const.
322 * ax.cc (gdb_agent_op_names): Now const.
323
324 2020-09-10 Kamil Rytarowski <n54@gmx.com>
325
326 * netbsd-low.cc: Add.
327 * netbsd-low.h: Likewise.
328 * netbsd-amd64-low.cc: Likewise.
329 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
330 "netbsd-amd64-low.cc".
331 * configure.srv: Add x86_64-*-netbsd*.
332
333 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
334
335 * server.cc (captured_main): Accept multiple `--selftest=`
336 options. Pass all `--selftest=` arguments to run_tests.
337
338 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
339
340 * configure, config.in: Regenerate.
341
342 2020-07-26 Eli Zaretskii <eliz@gnu.org>
343
344 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
345 When checking whether socklen_t type is defined, use ws2tcpip.h if
346 it is available and sys/socket.h isn't.
347 * configure: Regenerate.
348 * config.in: Regenerate.
349
350 2020-07-22 Pedro Alves <pedro@palves.net>
351
352 * inferiors.cc (switch_to_process): New, moved here from
353 thread-db.cc, and made extern.
354 * inferiors.h (switch_to_process): Declare.
355 * server.cc: Include "gdbsupport/scoped_restore.h".
356 (handle_qxfer_threads_proper): Now returns bool. Prepare to
357 access memory around target calls.
358 (handle_qxfer_threads): Handle errors.
359 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
360
361 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
362
363 * linux-low.cc (stopped_pids): Make static.
364
365 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
366
367 * tdesc.cc (allocate_target_description): Add header comment.
368 (target_desc_deleter::operator()): New function.
369 * tdesc.h (struct target_desc): Declare as final.
370
371 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
372
373 * server.cc (handle_query): Use std::vector of
374 std::string for `qsupported` vector. Use separate
375 vector for unknowns.
376 * target.h (class process_stratum_target) <process_qsupported>:
377 Change parameters to array_view of const char *.
378 (target_process_qsupported): Remove `count` parameter.
379 * target.cc (process_stratum_target::process_qsupported): Change
380 parameters to array_view of const char *.
381 * linux-x86-low.cc (class x86_target) <process_qsupported>:
382 Likewise.
383
384 2020-06-29 Tom de Vries <tdevries@suse.de>
385
386 * ax.h: Include gdbsupport/debug_agent.h.
387
388 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
389
390 * tdesc.cc (struct tdesc_compatible_info): New struct.
391 (tdesc_compatible_info_list): New function.
392 (tdesc_compatible_info_arch_name): New function.
393
394 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
395
396 Use std::list to stop pending signal instead of manually-created
397 linked list.
398 * linux-low.h: Include <list>.
399 (struct pending_signal): Move here from linux-low.cc.
400 (struct lwp_info) <pending_signals>
401 <pending_signals_to_report>: Update the type.
402 * linux-low.cc (struct pending_signals): Remove.
403 (linux_process_target::delete_lwp)
404 (linux_process_target::add_lwp)
405 (enqueue_one_deferred_signal)
406 (dequeue_one_deferred_signal)
407 (enqueue_pending_signal)
408 (linux_process_target::resume_one_lwp_throw)
409 (linux_process_target::thread_needs_step_over)
410 (linux_process_target::resume_one_thread)
411 (linux_process_target::proceed_one_lwp): Update the use of pending
412 signal list.
413
414 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
415
416 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
417 Remove.
418
419 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
420
421 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
422 * configure.srv: Remove mingw32ce cases.
423 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
424 * win32-low.h (to_back_slashes): Remove.
425 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
426
427 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
428
429 * Makefile.in (SFILES): linux-tile-low.cc.
430 * configure.srv: Remove tilegx case.
431 * linux-tile-low.cc: Remove.
432
433 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
434
435 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
436 * configure.srv: Remove m32r case.
437 * linux-m32r-low.cc: Remove.
438
439 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
440
441 * Makefile.in (SFILES): Remove linux-cris-low.c.
442 * configure.srv: Remove cris cases.
443 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
444
445 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
446
447 * Makefile.in (SFILES): Remove linux-bfin-low.c.
448 * configure.srv: Remove bfin case.
449 * linux-bfin-low.cc: Remove.
450 * linux-low.cc: Remove BFIN-conditional code.
451
452 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
453
454 * configure: Re-generate.
455 * configure.ac: Remove srv_qnx test.
456 * configure.srv: Remove nto case.
457 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
458 * remote-utils.c: Remove __QNX__-guarded code.
459
460 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
461
462 * configure: Re-generate.
463 * configure.ac: Remove srv_lynxos test.
464 * configure.srv: Remove lynxos cases.
465 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
466 Remove.
467
468 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
469
470 * README: Fix a few outdated or incoherent things.
471
472 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
473
474 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
475 (win32_clear_inferiors): Use open_process_used.
476 (get_child_debug_event): Likewise.
477
478 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
479
480 PR gdbserver/25893
481 * linux-low.cc (linux_process_target::create_inferior),
482 lynx-low.cc (lynx_process_target::create_inferior),
483 win32-low.cc (win32_process_target::create_inferior): Use
484 construct_inferior_arguments instead of stringify_argv
485 to get string representation which properly escapes
486 special characters.
487 * server.cc (handle_v_run): Just pass empty program arg
488 as such, since any further processing is now handled via
489 construct_inferior_arguments.
490
491 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
492
493 * nto-low.cc (nto_process_target::create_inferior): Pass
494 argv to spawnp function as char **.
495
496 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
497
498 * server.cc (captured_main), (handle_v_run): No longer
499 insert extra NULL element to args vector.
500
501 2020-05-23 Pedro Alves <palves@redhat.com>
502
503 * gdb-safe-ctype.h: New.
504
505 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
506
507 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
508 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
509 (ia64_target::low_breakpoint_at): Ditto.
510
511 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
512
513 * win32-i386-low.cc (i386_supports_z_point_type): Handle
514 Z_PACKET_HW_BP z_type.
515 (i386_insert_point): Handle raw_bkpt_type type.
516 (i386_remove_point): Likewise.
517
518 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
519
520 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
521 Add arch/i386.o.
522 * win32-arm-low.cc (arm_num_regs): New function.
523 (struct win32_target_ops): Use arm_num_regs.
524 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
525 processes.
526 (i386_get_thread_context): Likewise.
527 (i386_prepare_to_resume): Likewise.
528 (i386_thread_added): Likewise.
529 (i386_single_step): Likewise.
530 (i386_fetch_inferior_register): Likewise.
531 (i386_store_inferior_register): Likewise.
532 (i386_arch_setup): Likewise.
533 (i386_win32_num_regs): New function.
534 (struct win32_target_ops): Use i386_win32_num_regs.
535 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
536 processes.
537 (win32_require_context): Likewise.
538 (child_add_thread): Likewise.
539 (do_initial_child_stuff): Likewise.
540 (continue_one_thread): Likewise.
541 (win32_process_target::resume): Likewise.
542 (load_psapi): Likewise.
543 (win32_add_all_dlls): Likewise.
544 (maybe_adjust_pc): Likewise.
545 (win32_process_target::qxfer_siginfo): Likewise.
546 (initialize_low): Likewise.
547 * win32-low.h (struct win32_target_ops): Change num_regs to
548 callback function.
549
550 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
551
552 * configure.ac: Remove check for fs_base/gs_base in
553 user_regs_struct.
554 * configure: Re-generate.
555 * config.in: Re-generate.
556 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
557 x86_store_gregset): Adjust.
558
559 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
560
561 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
562 comparison.
563
564 2020-04-16 Tom Tromey <tromey@adacore.com>
565
566 * win32-low.cc (windows_nat::handle_access_violation): New
567 function.
568
569 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
570
571 * win32-low.cc (get_child_debug_event): Fix format string warning.
572
573 2020-04-13 Tom Tromey <tom@tromey.com>
574
575 * server.h (gdb_fildes_t): Remove typedef.
576 * remote-utils.c (remote_desc, list_desc): Now int.
577 (INVALID_DESCRIPTOR): Remove.
578 (gdb_connected, remote_close)
579 (check_remote_input_interrupt_request): Update.
580 * utils.h (pfildes): Don't declare.
581 * utils.c (pfildes): Remove.
582
583 2020-04-13 Tom Tromey <tom@tromey.com>
584
585 * server.h (handle_serial_event, handle_target_event): Update.
586 * server.c: Don't call initialize_event_loop.
587 (keep_processing_events): New global.
588 (handle_serial_event): Return void. Set keep_processing_events.
589 (handle_target_event): Return void.
590 (start_event_loop): Move from event-loop.c. Rewrite.
591 * remote-utils.c (handle_accept_event): Return void.
592 (reset_readchar): Use delete_timer.
593 (process_remaining): Return void.
594 (reschedule): Use create_timer.
595 * event-loop.h: Remove.
596 * event-loop.cc: Remove.
597 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
598
599 2020-04-13 Tom Tromey <tom@tromey.com>
600
601 * server.c (invoke_async_signal_handlers)
602 (check_async_event_handlers, flush_streams, gdb_select): New
603 functions.
604
605 2020-04-13 Tom Tromey <tom@tromey.com>
606
607 * configure: Rebuild.
608 * config.in: Rebuild.
609
610 2020-04-08 Tom Tromey <tromey@adacore.com>
611
612 PR gdb/22992
613 * win32-low.c (child_continue): Call matching_pending_stop.
614 (get_child_debug_event): Call fetch_pending_stop. Push pending
615 stop when needed.
616
617 2020-04-08 Tom Tromey <tromey@adacore.com>
618
619 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
620 (win32_process_target::supports_stopped_by_sw_breakpoint):
621 Declare.
622 * win32-low.c (win32_supports_z_point_type): Always handle
623 Z_PACKET_SW_BP.
624 (win32_insert_point): Call insert_memory_breakpoint when needed.
625 (win32_remove_point): Call remove_memory_breakpoint when needed.
626 (win32_process_target::stopped_by_sw_breakpoint)
627 (win32_process_target::supports_stopped_by_sw_breakpoint): New
628 methods.
629 (win32_target_ops): Update.
630 (maybe_adjust_pc): New function.
631 (win32_wait): Call maybe_adjust_pc.
632
633 2020-04-08 Tom Tromey <tromey@adacore.com>
634
635 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
636 field.
637 * win32-i386-low.c (the_low_target): Update.
638 * win32-arm-low.c (the_low_target): Update.
639
640 2020-04-08 Tom Tromey <tromey@adacore.com>
641
642 * win32-low.h (win32_process_target::read_pc)
643 (win32_process_target::write_pc): Declare.
644 * win32-low.c (win32_process_target::read_pc)
645 (win32_process_target::write_pc): New methods.
646 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
647 functions.
648 (the_low_target): Update.
649 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
650 functions.
651 (the_low_target): Update.
652
653 2020-04-08 Tom Tromey <tromey@adacore.com>
654
655 * win32-low.c (win32_kill, get_child_debug_event): Use
656 wait_for_debug_event.
657
658 2020-04-08 Tom Tromey <tromey@adacore.com>
659
660 * win32-low.c (child_continue): Call continue_last_debug_event.
661
662 2020-04-08 Tom Tromey <tromey@adacore.com>
663
664 * win32-low.c (handle_exception): Remove.
665 (windows_nat::handle_ms_vc_exception): New function.
666 (get_child_debug_event): Add "continue_status" parameter.
667 Update.
668 (win32_wait): Update.
669
670 2020-04-08 Tom Tromey <tromey@adacore.com>
671
672 * win32-low.c (windows_nat::handle_load_dll): Rename from
673 handle_load_dll. No longer static.
674 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
675 No longer static.
676
677 2020-04-08 Tom Tromey <tromey@adacore.com>
678
679 * win32-low.c (handle_output_debug_string): Add parameter. Change
680 return type.
681 (win32_kill, get_child_debug_event): Update.
682
683 2020-04-08 Tom Tromey <tromey@adacore.com>
684
685 * win32-low.c (current_process_handle, current_process_id)
686 (main_thread_id, last_sig, current_event, siginfo_er): Move to
687 nat/windows-nat.c.
688
689 2020-04-08 Tom Tromey <tromey@adacore.com>
690
691 * win32-low.c (get_image_name): Remove.
692 (handle_load_dll): Update.
693
694 2020-04-08 Tom Tromey <tromey@adacore.com>
695
696 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
697 No longer static. Change parameters.
698 (child_add_thread, child_fetch_inferior_registers)
699 (child_store_inferior_registers, win32_resume)
700 (win32_get_tib_address): Update.
701
702 2020-04-08 Tom Tromey <tromey@adacore.com>
703
704 * win32-low.h (struct win32_target_ops): Use qualified names where
705 needed.
706 * win32-i386-low.c: Add "using namespace".
707 * win32-low.c: Add "using namespace".
708 * win32-arm-low.c: Add "using namespace".
709
710 2020-04-08 Tom Tromey <tromey@adacore.com>
711
712 * win32-low.c (delete_thread_info): Don't call CloseHandle.
713
714 2020-04-08 Tom Tromey <tromey@adacore.com>
715
716 * win32-low.c (win32_require_context, suspend_one_thread): Use
717 windows_thread_info::suspend.
718 (continue_one_thread): Use windows_thread_info::resume.
719 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
720
721 2020-04-08 Tom Tromey <tromey@adacore.com>
722
723 * win32-i386-low.c (update_debug_registers)
724 (i386_prepare_to_resume, i386_thread_added): Update.
725
726 2020-04-08 Tom Tromey <tromey@adacore.com>
727
728 * win32-low.c (child_add_thread): Use new.
729 (delete_thread_info): Use delete.
730
731 2020-04-08 Tom Tromey <tromey@adacore.com>
732
733 * win32-low.h (struct windows_thread_info): Remove.
734
735 2020-04-08 Tom Tromey <tromey@adacore.com>
736
737 * win32-low.h (struct windows_thread_info): Rename from
738 win32_thread_info. Remove typedef.
739 (struct win32_target_ops, win32_require_context): Update.
740 * win32-low.c (win32_get_thread_context)
741 (win32_set_thread_context, win32_prepare_to_resume)
742 (win32_require_context, thread_rec, child_add_thread)
743 (delete_thread_info, continue_one_thread)
744 (child_fetch_inferior_registers, child_store_inferior_registers)
745 (win32_resume, suspend_one_thread, win32_get_tib_address):
746 Update.
747 * win32-i386-low.c (update_debug_registers)
748 (win32_get_current_dr, i386_get_thread_context)
749 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
750 (i386_fetch_inferior_register, i386_store_inferior_register):
751 Update.
752 * win32-arm-low.c (arm_get_thread_context)
753 (arm_fetch_inferior_register, arm_store_inferior_register):
754 Update.
755
756 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
757
758 * linux-low.h (struct linux_target_ops): Remove.
759 (the_low_target): Remove.
760 * linux-x86-low.cc (the_low_target): Remove.
761 * linux-aarch64-low.cc (the_low_target): Ditto.
762 * linux-arm-low.cc (the_low_target): Ditto.
763 * linux-bfin-low.cc (the_low_target): Ditto.
764 * linux-cris-low.cc (the_low_target): Ditto.
765 * linux-crisv32-low.cc (the_low_target): Ditto.
766 * linux-ia64-low.cc (the_low_target): Ditto.
767 * linux-m32r-low.cc (the_low_target): Ditto.
768 * linux-m68k-low.cc (the_low_target): Ditto.
769 * linux-mips-low.cc (the_low_target): Ditto.
770 * linux-nios2-low.cc (the_low_target): Ditto.
771 * linux-ppc-low.cc (the_low_target): Ditto.
772 * linux-riscv-low.cc (the_low_target): Ditto.
773 * linux-s390-low.cc (the_low_target): Ditto.
774 * linux-sh-low.cc (the_low_target): Ditto.
775 * linux-sparc-low.cc (the_low_target): Ditto.
776 * linux-tic6x-low.cc (the_low_target): Ditto.
777 * linux-tile-low.cc (the_low_target): Ditto.
778 * linux-xtensa-low.cc (the_low_target): Ditto.
779
780 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
781
782 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
783 linux target define the op by overriding the declaration in
784 process_stratum_target.
785
786 * linux-low.h (struct linux_target_ops): Remove the op.
787 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
788 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
789 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
790 (x86_get_ipa_tdesc_idx): Turn into...
791 (x86_target::get_ipa_tdesc_idx): ...this.
792 (the_low_target): Remove the op field.
793 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
794 (ppc_get_ipa_tdesc_idx): Turn into...
795 (ppc_target::get_ipa_tdesc_idx): ...this.
796 (the_low_target): Remove the op field.
797 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
798 (s390_get_ipa_tdesc_idx): Turn into...
799 (s390_target::get_ipa_tdesc_idx): ...this.
800 (the_low_target): Remove the op field.
801
802 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
803
804 Turn the 'get_syscall_trapinfo' linux target op into a method
805 of process_stratum_target.
806
807 * linux-low.h (struct linux_target_ops): Remove the op.
808 (class linux_process_target) <get_syscall_trapinfo>
809 <gdb_catch_this_syscall>
810 <low_supports_catch_syscall>
811 <low_get_syscall_trapinfo>: Declare.
812 * linux-low.cc (get_syscall_trapinfo): Turn into...
813 (linux_process_target::get_syscall_trapinfo): ...this.
814 (linux_process_target::low_get_syscall_trapinfo): Define.
815 (gdb_catch_this_syscall_p): Turn into...
816 (linux_process_target::gdb_catch_this_syscall): ...this.
817 (linux_process_target::low_supports_catch_syscall): Define.
818
819 Update the callers below.
820
821 (linux_process_target::wait_1)
822 (linux_process_target::supports_catch_syscall)
823
824 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
825 <low_get_syscall_trapinfo>: Declare.
826 (x86_target::low_supports_catch_syscall): Define.
827 (x86_get_syscall_trapinfo): Turn into...
828 (x86_target::low_get_syscall_trapinfo): ...this.
829 (the_low_target): Remove the op field.
830 * linux-aarch64-low.cc (class aarch64_target)
831 <low_supports_catch_syscall>
832 <low_get_syscall_trapinfo>: Declare.
833 (aarch64_target::low_supports_catch_syscall): Define.
834 (aarch64_get_syscall_trapinfo): Turn into...
835 (aarch64_target::low_get_syscall_trapinfo): ...this.
836 (the_low_target): Remove the op field.
837 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
838 <low_get_syscall_trapinfo>: Declare.
839 (arm_target::low_supports_catch_syscall): Define.
840 (arm_get_syscall_trapinfo): Turn into...
841 (arm_target::low_get_syscall_trapinfo): ...this.
842 (the_low_target): Remove the op field.
843 * linux-ppc-low.cc (the_low_target): Remove the op field.
844 * linux-s390-low.cc (the_low_target): Remove the op field.
845
846 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
847
848 Remove the 'supports_hardware_single_step' linux target op and
849 override the process_stratum_target's op definition in
850 linux_process_target to return true.
851
852 * linux-low.h (struct linux_target_ops): Remove the op.
853 (class linux_process_target) <finish_step_over>
854 <maybe_hw_step>: Declare.
855 * linux-low.cc (can_hardware_single_step): Remove.
856 (maybe_hw_step): Turn into...
857 (linux_process_target::maybe_hw_step): ...this.
858 (finish_step_over): Turn into...
859 (linux_process_target::finish_step_over): ...this.
860 (linux_process_target::supports_hardware_single_step): Update
861 to return true.
862
863 Update the callers below.
864
865 (linux_process_target::single_step)
866 (linux_process_target::resume_one_lwp_throw)
867
868 * linux-arm-low.cc (class arm_target)
869 <supports_hardware_single_step>: Declare.
870 (arm_supports_hardware_single_step): Turn into...
871 (arm_target::supports_hardware_single_step): ...this.
872 (the_low_target): Remove the op field.
873 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
874 (the_low_target): Remove the op field.
875 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
876 Remove.
877 (the_low_target): Remove the op field.
878 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
879 (the_low_target): Remove the op field.
880 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
881 (the_low_target): Remove the op field.
882 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
883 (the_low_target): Remove the op field.
884 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
885 (the_low_target): Remove the op field.
886 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
887 (the_low_target): Remove the op field.
888 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
889 (the_low_target): Remove the op field.
890 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
891 (the_low_target): Remove the op field.
892 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
893 (the_low_target): Remove the op field.
894 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
895 (the_low_target): Remove the op field.
896 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
897 Remove.
898 (the_low_target): Remove the op field.
899
900 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
901
902 Turn the 'supports_range_stepping' linux target op into a method
903 of linux_process_target.
904
905 * linux-low.h (struct linux_target_ops): Remove the op.
906 (class linux_process_target) <low_supports_range_stepping>: Declare.
907 * linux-low.cc (linux_process_target::low_supports_range_stepping):
908 Define.
909 (linux_process_target::supports_range_stepping): Update the call
910 site.
911 * linux-x86-low.cc (class x86_target)
912 <low_supports_range_stepping>: Declare.
913 (x86_supports_range_stepping): Turn into...
914 (x86_target::low_supports_range_stepping): ...this.
915 (the_low_target): Remove the op field.
916 * linux-aarch64-low.cc (class aarch64_target)
917 <low_supports_range_stepping>: Declare.
918 (aarch64_supports_range_stepping): Turn into...
919 (aarch64_target::low_supports_range_stepping): ...this.
920 (the_low_target): Remove the op field.
921 * linux-arm-low.cc (the_low_target): Remove the op field.
922 * linux-bfin-low.cc (the_low_target): Ditto.
923 * linux-crisv32-low.cc (the_low_target): Ditto.
924 * linux-m32r-low.cc (the_low_target): Ditto.
925 * linux-m68k-low.cc (the_low_target): Ditto.
926 * linux-ppc-low.cc (the_low_target): Ditto.
927 * linux-s390-low.cc (the_low_target): Ditto.
928 * linux-sh-low.cc (the_low_target): Ditto.
929 * linux-tic6x-low.cc (the_low_target): Ditto.
930 * linux-tile-low.cc (the_low_target): Ditto.
931 * linux-xtensa-low.cc (the_low_target): Ditto.
932
933 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
934
935 Remove the 'emit_ops' linux target ops and let the concrete
936 linux target define the op by overriding the declaration of
937 process_stratum_target.
938
939 * linux-low.h (struct linux_target_ops): Remove the op.
940 (class linux_process_target) <emit_ops>: Remove.
941 * linux-low.cc (linux_process_target::emit_ops): Remove.
942 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
943 (x86_emit_ops): Turn into...
944 (x86_target::emit_ops): ...this.
945 (the_low_target): Remove the op field.
946 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
947 (aarch64_emit_ops): Turn into...
948 (aarch64_target::emit_ops): ...this.
949 (the_low_target): Remove the op field.
950 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
951 (ppc_emit_ops): Turn into...
952 (ppc_target::emit_ops): ...this.
953 (the_low_target): Remove the op field.
954 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
955 (s390_emit_ops): Turn into...
956 (s390_target::emit_ops): ...this.
957 (the_low_target): Remove the op field.
958 * linux-arm-low.cc (the_low_target): Remove the op field.
959 * linux-bfin-low.cc (the_low_target): Ditto.
960 * linux-crisv32-low.cc (the_low_target): Ditto.
961 * linux-m32r-low.cc (the_low_target): Ditto.
962 * linux-m68k-low.cc (the_low_target): Ditto.
963 * linux-sh-low.cc (the_low_target): Ditto.
964 * linux-tic6x-low.cc (the_low_target): Ditto.
965 * linux-tile-low.cc (the_low_target): Ditto.
966 * linux-xtensa-low.cc (the_low_target): Ditto.
967
968 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
969
970 Remove the 'install_fast_tracepoint_jump_pad' and
971 'get_min_fast_tracepoint_insn_len' linux target ops to let the
972 concrete linux target define the ops by overriding the declarations
973 of process_stratum_target.
974
975 * linux-low.h (struct linux_target_ops): Remove the ops.
976 (class linux_process_target) <supports_fast_tracepoints>
977 <install_fast_tracepoint_jump_pad>
978 <get_min_fast_tracepoint_insn_len>: Remove.
979 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
980 (linux_process_target::install_fast_tracepoint_jump_pad)
981 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
982 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
983 <install_fast_tracepoint_jump_pad>
984 <get_min_fast_tracepoint_insn_len>: Declare.
985 (x86_target::supports_fast_tracepoints): Define.
986 (x86_install_fast_tracepoint_jump_pad): Turn into...
987 (x86_target::install_fast_tracepoint_jump_pad): ...this.
988 (x86_get_min_fast_tracepoint_insn_len): Turn into...
989 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
990 (the_low_target): Remove the op fields.
991 * linux-aarch64-low.cc (class aarch64_target)
992 <supports_fast_tracepoints>
993 <install_fast_tracepoint_jump_pad>
994 <get_min_fast_tracepoint_insn_len>: Declare.
995 (aarch64_target::supports_fast_tracepoints): Define.
996 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
997 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
998 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
999 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
1000 (the_low_target): Remove the op fields.
1001 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
1002 <install_fast_tracepoint_jump_pad>
1003 <get_min_fast_tracepoint_insn_len>: Declare.
1004 (ppc_target::supports_fast_tracepoints): Define.
1005 (ppc_install_fast_tracepoint_jump_pad): Turn into...
1006 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
1007 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
1008 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
1009 (the_low_target): Remove the op fields.
1010 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
1011 <install_fast_tracepoint_jump_pad>
1012 <get_min_fast_tracepoint_insn_len>: Declare.
1013 (s390_target::supports_fast_tracepoints): Define.
1014 (s390_install_fast_tracepoint_jump_pad): Turn into...
1015 (s390_target::install_fast_tracepoint_jump_pad): ...this.
1016 (s390_get_min_fast_tracepoint_insn_len): Turn into...
1017 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
1018 (the_low_target): Remove the op fields.
1019 * linux-arm-low.cc (the_low_target): Remove the op fields.
1020 * linux-bfin-low.cc (the_low_target): Ditto.
1021 * linux-crisv32-low.cc (the_low_target): Ditto.
1022 * linux-m32r-low.cc (the_low_target): Ditto.
1023 * linux-m68k-low.cc (the_low_target): Ditto.
1024 * linux-sh-low.cc (the_low_target): Ditto.
1025 * linux-tic6x-low.cc (the_low_target): Ditto.
1026 * linux-tile-low.cc (the_low_target): Ditto.
1027 * linux-xtensa-low.cc (the_low_target): Ditto.
1028
1029 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1030
1031 Turn the 'get_thread_area' linux target op into a method of
1032 process_stratum_target.
1033
1034 * linux-low.h (struct linux_target_ops): Remove the op.
1035 (class linux_process_target) <stuck_in_jump_pad>
1036 <linux_fast_tracepoint_collecting>
1037 <low_get_thread_area>: Declare.
1038 * linux-low.cc (supports_fast_tracepoints): Remove.
1039 (linux_fast_tracepoint_collecting): Turn into...
1040 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
1041 (linux_process_target::low_get_thread_area): Define.
1042 (stuck_in_jump_pad_callback): Turn into...
1043 (linux_process_target::stuck_in_jump_pad): ...this.
1044
1045 Update the caller below.
1046
1047 (linux_process_target::stabilize_threads)
1048
1049 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
1050 Declare.
1051 (x86_get_thread_area): Turn into...
1052 (x86_target::low_get_thread_area): ...this.
1053 (the_low_target): Remove the op field.
1054 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
1055 Declare.
1056 (aarch64_get_thread_area): Turn into...
1057 (aarch64_target::low_get_thread_area): ...this.
1058 (the_low_target): Remove the op field.
1059 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
1060 Declare.
1061 (ppc_get_thread_area): Turn into...
1062 (ppc_target::low_get_thread_area): ...this.
1063 (the_low_target): Remove the op field.
1064 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
1065 Declare.
1066 (s390_get_thread_area): Turn into...
1067 (s390_target::low_get_thread_area): ...this.
1068 (the_low_target): Remove the op field.
1069 * linux-arm-low.cc (the_low_target): Remove the op field.
1070 * linux-bfin-low.cc (the_low_target): Ditto.
1071 * linux-crisv32-low.cc (the_low_target): Ditto.
1072 * linux-m32r-low.cc (the_low_target): Ditto.
1073 * linux-m68k-low.cc (the_low_target): Ditto.
1074 * linux-sh-low.cc (the_low_target): Ditto.
1075 * linux-tic6x-low.cc (the_low_target): Ditto.
1076 * linux-tile-low.cc (the_low_target): Ditto.
1077 * linux-xtensa-low.cc (the_low_target): Ditto.
1078
1079 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1080
1081 Remote the 'supports_tracepoints' linux target op and let the
1082 concrete linux target define it by overriding the op declared in
1083 process_stratum_target.
1084
1085 * linux-low.h (struct linux_target_ops): Remove the op.
1086 (class linux_process_target) <supports_tracepoints>: Remove.
1087 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
1088 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
1089 Declare.
1090 (x86_supports_tracepoints): Turn into...
1091 (x86_target::supports_tracepoints): ...this.
1092 (the_low_target): Remove the op field.
1093 * linux-aarch64-low.cc (class aarch64_target)
1094 <supports_tracepoints>: Declare.
1095 (aarch64_supports_tracepoints): Turn into...
1096 (aarch64_target::supports_tracepoints): ...this.
1097 (the_low_target): Remove the op field.
1098 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
1099 Declare.
1100 (ppc_supports_tracepoints): Turn into...
1101 (ppc_target::supports_tracepoints): ...this.
1102 (the_low_target): Remove the op field.
1103 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
1104 Declare.
1105 (s390_supports_tracepoints): Turn into...
1106 (s390_target::supports_tracepoints): ...this.
1107 (the_low_target): Remove the op field.
1108 * linux-arm-low.cc (the_low_target): Remove the op field.
1109 * linux-bfin-low.cc (the_low_target): Ditto.
1110 * linux-crisv32-low.cc (the_low_target): Ditto.
1111 * linux-m32r-low.cc (the_low_target): Ditto.
1112 * linux-m68k-low.cc (the_low_target): Ditto.
1113 * linux-sh-low.cc (the_low_target): Ditto.
1114 * linux-tic6x-low.cc (the_low_target): Ditto.
1115 * linux-tile-low.cc (the_low_target): Ditto.
1116 * linux-xtensa-low.cc (the_low_target): Ditto.
1117
1118 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1119
1120 Remove the 'process_qsupported' linux target op and let a concrete
1121 linux target define the op by overriding the op declaration in
1122 process_stratum_target.
1123
1124 * linux-low.h (struct linux_target_ops): Remove the op.
1125 (class linux_process_target) <process_qsupported>: Remove.
1126 * linux-low.cc (linux_process_target::process_qsupported): Remove.
1127 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
1128 (x86_linux_process_qsupported): Turn into...
1129 (x86_target::process_qsupported): ...this.
1130 (the_low_target): Remove the op field.
1131 * linux-aarch64-low.cc (the_low_target): Remove the op
1132 field.
1133 * linux-arm-low.cc (the_low_target): Ditto.
1134 * linux-bfin-low.cc (the_low_target): Ditto.
1135 * linux-crisv32-low.cc (the_low_target): Ditto.
1136 * linux-m32r-low.cc (the_low_target): Ditto.
1137 * linux-m68k-low.cc (the_low_target): Ditto.
1138 * linux-ppc-low.cc (the_low_target): Ditto.
1139 * linux-s390-low.cc (the_low_target): Ditto.
1140 * linux-sh-low.cc (the_low_target): Ditto.
1141 * linux-tic6x-low.cc (the_low_target): Ditto.
1142 * linux-tile-low.cc (the_low_target): Ditto.
1143 * linux-xtensa-low.cc (the_low_target): Ditto.
1144
1145 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1146
1147 Turn the 'prepare_to_resume' linux target op into a method of
1148 linux_process_target.
1149
1150 * linux-low.h (struct linux_target_ops): Remove the op.
1151 (class linux_process_target) <low_prepare_to_resume>: Declare.
1152 * linux-low.cc (linux_process_target::low_prepare_to_resume):
1153 Define.
1154
1155 Update the callers below:
1156
1157 (linux_process_target::resume_one_lwp_throw)
1158 (linux_process_target::low_prepare_to_resume)
1159
1160 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
1161 Declare.
1162 (x86_target::low_prepare_to_resume): Define.
1163 (the_low_target): Remove the op field.
1164 * linux-aarch64-low.cc (class aarch64_target)
1165 <low_prepare_to_resume>: Declare.
1166 (aarch64_target::low_prepare_to_resume): Define.
1167 (the_low_target): Remove the op field.
1168 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
1169 Declare.
1170 (arm_prepare_to_resume): Turn into...
1171 (arm_target::low_prepare_to_resume): ...this.
1172 (the_low_target): Remove the op field.
1173 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
1174 Declare.
1175 (mips_linux_prepare_to_resume): Turn into...
1176 (mips_target::low_prepare_to_resume): ...this.
1177 (the_low_target): Remove the op field.
1178 * linux-bfin-low.cc (the_low_target): Remove the op field.
1179 * linux-crisv32-low.cc (the_low_target): Ditto.
1180 * linux-m32r-low.cc (the_low_target): Ditto.
1181 * linux-m68k-low.cc (the_low_target): Ditto.
1182 * linux-ppc-low.cc (the_low_target): Ditto.
1183 * linux-s390-low.cc (the_low_target): Ditto.
1184 * linux-sh-low.cc (the_low_target): Ditto.
1185 * linux-tic6x-low.cc (the_low_target): Ditto.
1186 * linux-tile-low.cc (the_low_target): Ditto.
1187 * linux-xtensa-low.cc (the_low_target): Ditto.
1188
1189 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1190
1191 Turn the 'new_process', 'delete_process', 'new_thread',
1192 'delete_thread', and 'new_fork' linux target ops into methods
1193 of linux_process_target.
1194
1195 * linux-low.h (struct linux_target_ops): Remove the ops.
1196 (class linux_process_target) <add_linux_process>
1197 <add_lwp>
1198 <delete_lwp>
1199 <attach_lwp>
1200 <detach_one_lwp>
1201 <check_zombie_leaders>
1202 <filter_exit_event>
1203 <low_new_process>
1204 <low_delete_process>
1205 <low_new_thread>
1206 <low_delete_thread>
1207 <low_new_fork>: Declare.
1208 * linux-low.cc (delete_lwp): Turn into...
1209 (linux_process_target::delete_lwp): ...this.
1210 (linux_process_target::low_delete_thread): Define.
1211 (linux_add_process): Turn into...
1212 (linux_process_target::add_linux_process): ...this.
1213 (linux_process_target::low_new_process): Define.
1214 (linux_process_target::low_delete_process): Define.
1215 (linux_process_target::low_new_fork): Define.
1216 (add_lwp): Turn into...
1217 (linux_process_target::add_lwp): ...this.
1218 (linux_process_target::low_new_thread): Define.
1219 (linux_attach_lwp): Turn into...
1220 (linux_process_target::attach_lwp): ...this.
1221 (linux_detach_one_lwp): Turn into...
1222 (linux_process_target::detach_one_lwp): ...this.
1223 (linux_detach_lwp_callback): Remove and inline...
1224 (linux_process_target::detach): ...here.
1225 (check_zombie_leaders): Turn into...
1226 (linux_process_target::check_zombie_leaders): ...this.
1227 (filter_exit_event): Turn into...
1228 (linux_process_target::filter_exit_event): ...this.
1229
1230 Update the callers below.
1231
1232 (linux_process_target::handle_extended_wait)
1233 (linux_process_target::create_inferior)
1234 (attach_proc_task_lwp_callback)
1235 (linux_process_target::attach)
1236 (linux_process_target::detach)
1237 (linux_process_target::mourn)
1238 * thread-db.cc (attach_thread)
1239
1240 * linux-x86-low.cc (class x86_target) <low_new_process>
1241 <low_delete_process>
1242 <low_new_thread>
1243 <low_delete_thread>
1244 <low_new_fork>: Declare.
1245 (x86_linux_new_process): Turn into...
1246 (x86_target::low_new_process): ...this.
1247 (x86_linux_delete_process): Turn into...
1248 (x86_target::low_delete_process): ...this.
1249 (x86_target::low_new_thread): Define.
1250 (x86_target::low_delete_thread): Define.
1251 (x86_linux_new_fork): Turn into...
1252 (x86_target::low_new_fork): ...this.
1253 (the_low_target): Remove the op fields.
1254 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
1255 <low_delete_process>
1256 <low_new_thread>
1257 <low_delete_thread>
1258 <low_new_fork>: Declare.
1259 (aarch64_linux_new_process): Turn into...
1260 (aarch64_target::low_new_process): ...this.
1261 (aarch64_linux_delete_process): Turn into...
1262 (aarch64_target::low_delete_process): ...this.
1263 (aarch64_target::low_new_thread): Define.
1264 (aarch64_target::low_delete_thread): Define.
1265 (aarch64_linux_new_fork): Turn into...
1266 (aarch64_target::low_new_fork): ...this.
1267 (the_low_target): Remove the op fields.
1268 * linux-arm-low.cc (class arm_target) <low_new_process>
1269 <low_delete_process>
1270 <low_new_thread>
1271 <low_delete_thread>
1272 <low_new_fork>: Declare.
1273 (arm_new_process): Turn into...
1274 (arm_target::low_new_process): ...this.
1275 (arm_delete_process): Turn into...
1276 (arm_target::low_delete_process): ...this.
1277 (arm_new_thread): Turn into...
1278 (arm_target::low_new_thread): ...this.
1279 (arm_delete_thread): Turn into...
1280 (arm_target::low_delete_thread): ...this.
1281 (arm_new_fork): Turn into...
1282 (arm_target::low_new_fork): ...this.
1283 (the_low_target): Remove the op fields.
1284 * linux-mips-low.cc (class mips_target) <low_new_process>
1285 <low_delete_process>
1286 <low_new_thread>
1287 <low_delete_thread>
1288 <low_new_fork>: Declare.
1289 (mips_linux_new_process): Turn into...
1290 (mips_target::low_new_process): ...this.
1291 (mips_linux_delete_process): Turn into...
1292 (mips_target::low_delete_process): ...this.
1293 (mips_linux_new_thread): Turn into...
1294 (mips_target::low_new_thread): ...this.
1295 (mips_linux_delete_thread): Turn into...
1296 (mips_target::low_delete_thread): ...this.
1297 (mips_linux_new_fork): Turn into...
1298 (mips_target::low_new_fork): ...this.
1299 (the_low_target): Remove the op fields.
1300 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1301 * linux-crisv32-low.cc (the_low_target): Ditto.
1302 * linux-m32r-low.cc (the_low_target): Ditto.
1303 * linux-m68k-low.cc (the_low_target): Ditto.
1304 * linux-ppc-low.cc (the_low_target): Ditto.
1305 * linux-s390-low.cc (the_low_target): Ditto.
1306 * linux-sh-low.cc (the_low_target): Ditto.
1307 * linux-tic6x-low.cc (the_low_target): Ditto.
1308 * linux-tile-low.cc (the_low_target): Ditto.
1309 * linux-xtensa-low.cc (the_low_target): Ditto.
1310
1311 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1312
1313 Turn the 'siginfo_fixup' linux target op into a method of
1314 linux_process_target.
1315
1316 * linux-low.h (struct linux_target_ops): Remove the op.
1317 (class linux_process_target) <siginfo_fixup>
1318 <low_siginfo_fixup>: Declare.
1319 * linux-low.cc (siginfo_fixup): Turn into...
1320 (linux_process_target::siginfo_fixup): ...this.
1321 (linux_process_target::low_siginfo_fixup): Define.
1322 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1323 (x86_siginfo_fixup): Turn into...
1324 (x86_target::low_siginfo_fixup): ...this.
1325 (the_low_target): Remove the op field.
1326 * linux-aarch64-low.cc (class aarch64_target):
1327 <low_siginfo_fixup>: Declare.
1328 (aarch64_linux_siginfo_fixup): Turn into...
1329 (aarch64_target::low_siginfo_fixup): ...this.
1330 (the_low_target): Remove the op field.
1331 * linux-arm-low.cc (the_low_target): Remove the op field.
1332 * linux-bfin-low.cc (the_low_target): Ditto.
1333 * linux-crisv32-low.cc (the_low_target): Ditto.
1334 * linux-m32r-low.cc (the_low_target): Ditto.
1335 * linux-m68k-low.cc (the_low_target): Ditto.
1336 * linux-mips-low.cc (the_low_target): Ditto.
1337 * linux-ppc-low.cc (the_low_target): Ditto.
1338 * linux-s390-low.cc (the_low_target): Ditto.
1339 * linux-sh-low.cc (the_low_target): Ditto.
1340 * linux-tic6x-low.cc (the_low_target): Ditto.
1341 * linux-tile-low.cc (the_low_target): Ditto.
1342 * linux-xtensa-low.cc (the_low_target): Ditto.
1343
1344 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1345
1346 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1347 linux target ops into methods of linux_process_target.
1348
1349 * linux-low.h (struct linux_target_ops): Remove the ops.
1350 (class linux_process_target) <low_collect_ptrace_register>
1351 <low_store_ptrace_register>: Declare.
1352 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1353 (linux_process_target::low_supply_ptrace_register): Define.
1354
1355 Update the callers below.
1356
1357 (linux_process_target::fetch_register)
1358 (linux_process_target::store_register)
1359
1360 * linux-x86-low.cc (the_low_target): Remove the op fields.
1361 * linux-aarch64-low.cc (the_low_target): Ditto.
1362 * linux-arm-low.cc (the_low_target): Ditto.
1363 * linux-bfin-low.cc (the_low_target): Ditto.
1364 * linux-crisv32-low.cc (the_low_target): Ditto.
1365 * linux-m32r-low.cc (the_low_target): Ditto.
1366 * linux-m68k-low.cc (the_low_target): Ditto.
1367 * linux-sh-low.cc (the_low_target): Ditto.
1368 * linux-sparc-low.cc (the_low_target): Ditto.
1369 * linux-tic6x-low.cc (the_low_target): Ditto.
1370 * linux-tile-low.cc (the_low_target): Ditto.
1371 * linux-xtensa-low.cc (the_low_target): Ditto.
1372 * linux-mips-low.cc (class mips_target)
1373 <low_collect_ptrace_register>
1374 <low_supply_ptrace_register>: Declare.
1375 (mips_collect_ptrace_register): Turn into ...
1376 (mips_target::low_collect_ptrace_register): ...this.
1377 (mips_supply_ptrace_register): Turn into...
1378 (mips_target::low_supply_ptrace_register): ...this.
1379 (the_low_target): Remove the op fields.
1380 * linux-ppc-low.cc (class ppc_target)
1381 <low_collect_ptrace_register>
1382 <low_supply_ptrace_register>: Declare.
1383 (ppc_collect_ptrace_register): Turn into ...
1384 (ppc_target::low_collect_ptrace_register): ...this.
1385 (ppc_supply_ptrace_register): Turn into ...
1386 (ppc_target::low_supply_ptrace_register): ...this.
1387 (ppc_fill_gregset): Update for the calls to
1388 low_collect_ptrace_register.
1389 (the_low_target): Remove the op fields.
1390 * linux-s390-low.cc (class s390_target)
1391 <low_collect_ptrace_register>
1392 <low_supply_ptrace_register>: Declare.
1393 (s390_collect_ptrace_register): Turn into ...
1394 (s390_target::low_collect_ptrace_register): ...this.
1395 (s390_supply_ptrace_register): Turn into ...
1396 (s390_target::low_supply_ptrace_register): ...this.
1397 (s390_fill_gregset): Update for the calls to
1398 low_collect_ptrace_register.
1399 (the_low_target): Remove the op fields.
1400
1401 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1402
1403 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1404 target ops into methods of linux_process_target.
1405
1406 * linux-low.h (struct linux_target_ops): Remove the ops.
1407 (class linux_process_target) <check_stopped_by_watchpoint>
1408 <low_stopped_by_watchpoint>
1409 <low_stopped_data_address>: Declare.
1410 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1411 (linux_process_target::check_stopped_by_watchpoint): ...this.
1412 (linux_process_target::low_stopped_by_watchpoint): Define.
1413 (linux_process_target::low_stopped_data_address): Define.
1414 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1415 <low_stopped_data_address>: Declare.
1416 (x86_stopped_by_watchpoint): Turn into...
1417 (x86_target::low_stopped_by_watchpoint): ...this.
1418 (x86_stopped_data_address): Turn into...
1419 (x86_target::low_stopped_data_address): ...this.
1420 (the_low_target): Remove the op fields.
1421 * linux-aarch64-low.cc (class aarch64_target)
1422 <low_stopped_by_watchpoint>
1423 <low_stopped_data_address>: Declare.
1424 (aarch64_stopped_by_watchpoint): Turn into...
1425 (aarch64_target::low_stopped_by_watchpoint): ...this.
1426 (aarch64_stopped_data_address): Turn into...
1427 (aarch64_target::low_stopped_data_address): ...this.
1428 (the_low_target): Remove the op fields.
1429 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1430 <low_stopped_data_address>: Declare.
1431 (arm_stopped_by_watchpoint): Turn into...
1432 (arm_target::low_stopped_by_watchpoint): ...this.
1433 (arm_stopped_data_address): Turn into...
1434 (arm_target::low_stopped_data_address): ...this.
1435 (the_low_target): Remove the op fields.
1436 * linux-crisv32-low.cc (class crisv32_target)
1437 <low_stopped_by_watchpoint>
1438 <low_stopped_data_address>: Declare.
1439 (cris_stopped_by_watchpoint): Turn into...
1440 (crisv32_target::low_stopped_by_watchpoint): ...this.
1441 (cris_stopped_data_address): Turn into...
1442 (crisv32_target::low_stopped_data_address): ...this.
1443 (the_low_target): Remove the op fields.
1444 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1445 <low_stopped_data_address>: Declare.
1446 (mips_stopped_by_watchpoint): Turn into...
1447 (mips_target::low_stopped_by_watchpoint): ...this.
1448 (mips_stopped_data_address): Turn into...
1449 (mips_target::low_stopped_data_address): ...this.
1450 (the_low_target): Remove the op fields.
1451 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1452 * linux-m32r-low.cc (the_low_target): Ditto.
1453 * linux-m68k-low.cc (the_low_target): Ditto.
1454 * linux-ppc-low.cc (the_low_target): Ditto.
1455 * linux-s390-low.cc (the_low_target): Ditto.
1456 * linux-sh-low.cc (the_low_target): Ditto.
1457 * linux-sparc-low.cc (the_low_target): Ditto.
1458 * linux-tic6x-low.cc (the_low_target): Ditto.
1459 * linux-tile-low.cc (the_low_target): Ditto.
1460 * linux-xtensa-low.cc (the_low_target): Ditto.
1461
1462 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1463
1464 Turn the 'insert_point' and 'remove_point' linux target ops into
1465 methods of linux_process_target.
1466
1467 * linux-low.h (struct linux_target_ops): Remove the ops.
1468 (class linux_process_target) <low_insert_point>
1469 <low_remove_point>: Declare.
1470 * linux-low.cc (linux_process_target::low_insert_point)
1471 (linux_process_target::low_remove_point): Define.
1472 (linux_process_target::insert_point)
1473 (linux_process_target::remove_point): Update for calls to
1474 low_insert_point and low_remove_point.
1475 * linux-x86-low.cc (class x86_target) <low_insert_point>
1476 <low_remove_point>: Declare.
1477 (x86_insert_point): Turn into...
1478 (x86_target::low_insert_point): ...this.
1479 (x86_remove_point): Turn into...
1480 (x86_target::low_remove_point): ...this.
1481 (the_low_target): Remove the op fields.
1482 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1483 <low_remove_point>: Declare.
1484 (aarch64_insert_point): Turn into...
1485 (aarch64_target::low_insert_point): ...this.
1486 (aarch64_remove_point): Turn into...
1487 (aarch64_target::low_remove_point): ...this.
1488 (the_low_target): Remove the op fields.
1489 * linux-arm-low.cc (class arm_target) <low_insert_point>
1490 <low_remove_point>: Declare.
1491 (arm_insert_point): Turn into...
1492 (arm_target::low_insert_point): ...this.
1493 (arm_remove_point): Turn into...
1494 (arm_target::low_remove_point): ...this.
1495 (the_low_target): Remove the op fields.
1496 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1497 <low_remove_point>: Declare.
1498 (crisv32_insert_point): Turn into...
1499 (crisv32_target::low_insert_point): ...this.
1500 (crisv32_remove_point): Turn into...
1501 (crisv32_target::low_remove_point): ...this.
1502 (the_low_target): Remove the op fields.
1503 * linux-mips-low.cc (class mips_target) <low_insert_point>
1504 <low_remove_point>: Declare.
1505 (mips_insert_point): Turn into...
1506 (mips_target::low_insert_point): ...this.
1507 (mips_remove_point): Turn into...
1508 (mips_target::low_remove_point): ...this.
1509 (the_low_target): Remove the op fields.
1510 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1511 <low_remove_point>: Declare.
1512 (ppc_insert_point): Turn into...
1513 (ppc_target::low_insert_point): ...this.
1514 (ppc_remove_point): Turn into...
1515 (ppc_target::low_remove_point): ...this.
1516 (the_low_target): Remove the op fields.
1517 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1518 * linux-m32r-low.cc (the_low_target): Ditto.
1519 * linux-m68k-low.cc (the_low_target): Ditto.
1520 * linux-s390-low.cc (the_low_target): Ditto.
1521 * linux-sh-low.cc (the_low_target): Ditto.
1522 * linux-sparc-low.cc (the_low_target): Ditto.
1523 * linux-tic6x-low.cc (the_low_target): Ditto.
1524 * linux-tile-low.cc (the_low_target): Ditto.
1525 * linux-xtensa-low.cc (the_low_target): Ditto.
1526
1527 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1528
1529 Remove the 'supports_z_point_type' linux target op and let the
1530 concrete linux target define it by overriding the op declared in
1531 process_stratum_target.
1532
1533 * linux-low.cc (linux_process_target::supports_z_point_type):
1534 Remove.
1535 * linux-low.h (struct linux_target_ops): Remove the op.
1536 (class linux_process_target) <supports_z_point_type>: Remove.
1537 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1538 Declare.
1539 (x86_supports_z_point_type): Turn into...
1540 (x86_target::supports_z_point_type): ...this.
1541 (the_low_target): Remove the op field.
1542 * linux-aarch64-low.cc (class aarch64_target)
1543 <supports_z_point_type>: Declare.
1544 (aarch64_supports_z_point_type): Turn into...
1545 (aarch64_target::supports_z_point_type): ...this.
1546 (the_low_target): Remove the op field.
1547 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1548 Declare.
1549 (arm_supports_z_point_type): Turn into...
1550 (arm_target::supports_z_point_type): ...this.
1551 (the_low_target): Remove the op field.
1552 * linux-crisv32-low.cc (class crisv32_target)
1553 <supports_z_point_type>: Declare.
1554 (cris_supports_z_point_type): Turn into...
1555 (crisv32_target::supports_z_point_type): ...this.
1556 (the_low_target): Remove the op field.
1557 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1558 Declare.
1559 (mips_supports_z_point_type): Turn into...
1560 (mips_target::supports_z_point_type): ...this.
1561 (the_low_target): Remove the op field.
1562 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1563 Declare.
1564 (ppc_supports_z_point_type): Turn into...
1565 (ppc_target::supports_z_point_type): ...this.
1566 (the_low_target): Remove the op field.
1567 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1568 Declare.
1569 (s390_supports_z_point_type): Turn into...
1570 (s390_target::supports_z_point_type): ...this.
1571 (the_low_target): Remove the op field.
1572 * linux-bfin-low.cc (the_low_target): Remove the op field.
1573 * linux-m32r-low.cc (the_low_target): Ditto.
1574 * linux-m68k-low.cc (the_low_target): Ditto.
1575 * linux-sh-low.cc (the_low_target): Ditto.
1576 * linux-sparc-low.cc (the_low_target): Ditto.
1577 * linux-tic6x-low.cc (the_low_target): Ditto.
1578 * linux-tile-low.cc (the_low_target): Ditto.
1579 * linux-xtensa-low.cc (the_low_target): Ditto.
1580
1581 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1582
1583 Turn the 'breakpoint_at' linux target op into a method of
1584 linux_process_target.
1585
1586 * linux-low.h (struct linux_target_ops): Remove the op.
1587 (class linux_process_target) <low_breakpoint_at>: Declare.
1588
1589 Update the callers below:
1590
1591 * linux-low.cc (linux_process_target::save_stop_reason)
1592 (linux_process_target::thread_still_has_status_pending)
1593 (linux_process_target::wait_1)
1594
1595 * linux-x86-low.cc (class x86_target)
1596 <low_breakpoint_at>: Declare.
1597 (x86_breakpoint_at): Turn into...
1598 (x86_target::low_breakpoint_at): ...this.
1599 (the_low_target): Remove the op field.
1600 * linux-aarch64-low.cc (class aarch64_target)
1601 <low_breakpoint_at>: Declare.
1602 (aarch64_breakpoint_at): Turn into...
1603 (aarch64_target::low_breakpoint_at): ...this.
1604 (the_low_target): Remove the op field.
1605 * linux-arm-low.cc (class arm_target)
1606 <low_breakpoint_at>: Declare.
1607 (arm_target::low_breakpoint_at): Define.
1608 (the_low_target): Remove the op field.
1609 * linux-bfin-low.cc (class bfin_target)
1610 <low_breakpoint_at>: Declare.
1611 (bfin_breakpoint_at): Turn into...
1612 (bfin_target::low_breakpoint_at): ...this.
1613 (the_low_target): Remove the op field.
1614 * linux-cris-low.cc (class cris_target)
1615 <low_breakpoint_at>: Declare.
1616 (cris_breakpoint_at): Turn into...
1617 (cris_target::low_breakpoint_at): ...this.
1618 (the_low_target): Remove the op field.
1619 * linux-crisv32-low.cc (class crisv32_target)
1620 <low_breakpoint_at>: Declare.
1621 (crisv32_breakpoint_at): Turn into...
1622 (crisv32_target::low_breakpoint_at): ...this.
1623 (the_low_target): Remove the op field.
1624 * linux-ia64-low.cc (class ia64_target)
1625 <low_breakpoint_at>: Declare.
1626 (ia64_target::low_breakpoint_at): Define.
1627 * linux-m32r-low.cc (class m32r_target)
1628 <low_breakpoint_at>: Declare.
1629 (m32r_breakpoint_at): Turn into...
1630 (m32r_target::low_breakpoint_at): ...this.
1631 (the_low_target): Remove the op field.
1632 * linux-m68k-low.cc (class m68k_target)
1633 <low_breakpoint_at>: Declare.
1634 (m68k_breakpoint_at): Turn into...
1635 (m68k_target::low_breakpoint_at): ...this.
1636 (the_low_target): Remove the op field.
1637 * linux-mips-low.cc (class mips_target)
1638 <low_breakpoint_at>: Declare.
1639 (mips_breakpoint_at): Turn into...
1640 (mips_target::low_breakpoint_at): ...this.
1641 (the_low_target): Remove the op field.
1642 * linux-nios2-low.cc (class nios2_target)
1643 <low_breakpoint_at>: Declare.
1644 (nios2_breakpoint_at): Turn into...
1645 (nios2_target::low_breakpoint_at): ...this.
1646 (the_low_target): Remove the op field.
1647 * linux-ppc-low.cc (class ppc_target)
1648 <low_breakpoint_at>: Declare.
1649 (ppc_breakpoint_at): Turn into...
1650 (ppc_target::low_breakpoint_at): ...this.
1651 (the_low_target): Remove the op field.
1652 * linux-riscv-low.cc (class riscv_target)
1653 <low_breakpoint_at>: Declare.
1654 (riscv_breakpoint_at): Turn into...
1655 (riscv_target::low_breakpoint_at): ...this.
1656 (the_low_target): Remove the op field.
1657 * linux-s390-low.cc (class s390_target)
1658 <low_breakpoint_at>: Declare.
1659 (s390_breakpoint_at): Turn into...
1660 (s390_target::low_breakpoint_at): ...this.
1661 (the_low_target): Remove the op field.
1662 * linux-sh-low.cc (class sh_target)
1663 <low_breakpoint_at>: Declare.
1664 (sh_breakpoint_at): Turn into...
1665 (sh_target::low_breakpoint_at): ...this.
1666 (the_low_target): Remove the op field.
1667 * linux-sparc-low.cc (class sparc_target)
1668 <low_breakpoint_at>: Declare.
1669 (sparc_breakpoint_at): Turn into...
1670 (sparc_target::low_breakpoint_at): ...this.
1671 (the_low_target): Remove the op field.
1672 * linux-tic6x-low.cc (class tic6x_target)
1673 <low_breakpoint_at>: Declare.
1674 (tic6x_breakpoint_at): Turn into...
1675 (tic6x_target::low_breakpoint_at): ...this.
1676 (the_low_target): Remove the op field.
1677 * linux-tile-low.cc (class tile_target)
1678 <low_breakpoint_at>: Declare.
1679 (tile_breakpoint_at): Turn into...
1680 (tile_target::low_breakpoint_at): ...this.
1681 (the_low_target): Remove the op field.
1682 * linux-xtensa-low.cc (class xtensa_target)
1683 <low_breakpoint_at>: Declare.
1684 (xtensa_breakpoint_at): Turn into...
1685 (xtensa_target::low_breakpoint_at): ...this.
1686 (the_low_target): Remove the op field.
1687
1688 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1689
1690 Turn the 'decr_pc_after_break' linux_target_ops field into
1691 a method of linux_process_target.
1692
1693 * linux-low.h (struct linux_target_ops)
1694 <decr_pc_after_break>: Remove.
1695 (class linux_process_target) <low_decr_pc_after_break>: New method
1696 declaration.
1697 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1698 New method implementation.
1699
1700 Update the users below.
1701
1702 (linux_process_target::save_stop_reason)
1703 (linux_process_target::wait_1)
1704 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1705 New declaration.
1706 (x86_target::low_decr_pc_after_break): New method implementation.
1707 (the_low_target): Remove the field.
1708 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1709 New declaration.
1710 (bfin_target::low_decr_pc_after_break): New method implementation.
1711 (the_low_target): Remove the field.
1712 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1713 New declaration.
1714 (m68k_target::low_decr_pc_after_break): New method implementation.
1715 (the_low_target): Remove the field.
1716 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1717 New declaration.
1718 (s390_target::low_decr_pc_after_break): New method implementation.
1719 (the_low_target): Remove the field.
1720 * linux-aarch64-low.cc (the_low_target): Remove the field.
1721 * linux-arm-low.cc (the_low_target): Remove the field.
1722 * linux-cris-low.cc (the_low_target): Remove the field.
1723 * linux-crisv32-low.cc (the_low_target): Remove the field.
1724 * linux-m32r-low.cc (the_low_target): Remove the field.
1725 * linux-mips-low.cc (the_low_target): Remove the field.
1726 * linux-nios2-low.cc (the_low_target): Remove the field.
1727 * linux-ppc-low.cc (the_low_target): Remove the field.
1728 * linux-riscv-low.cc (the_low_target): Remove the field.
1729 * linux-sh-low.cc (the_low_target): Remove the field.
1730 * linux-sparc-low.cc (the_low_target): Remove the field.
1731 * linux-tic6x-low.cc (the_low_target): Remove the field.
1732 * linux-tile-low.cc (the_low_target): Remove the field.
1733 * linux-xtensa-low.cc (the_low_target): Remove the field.
1734
1735 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1736
1737 Remove the 'supports_software_single_step' linux target op and let
1738 the concrete linux target define it by overriding the op in
1739 process_stratum_target.
1740 Turn the 'get_next_pcs' linux target op into a method of
1741 linux_process_target.
1742
1743 * linux-low.h (struct linux_target_ops): Remove the ops.
1744 (class linux_process_target) <supports_software_single_step>:
1745 Remove.
1746 <low_get_next_pcs>: Declare.
1747 * linux-low.cc (can_software_single_step): Remove.
1748 (linux_process_target::low_get_next_pcs): Define.
1749 (linux_process_target::supports_software_single_step): Remove.
1750
1751 Update the callers below.
1752
1753 (linux_process_target::handle_extended_wait)
1754 (linux_process_target::wait_1)
1755 (linux_process_target::install_software_single_step_breakpoints)
1756 (linux_process_target::single_step)
1757 (linux_process_target::thread_needs_step_over)
1758 (linux_process_target::proceed_one_lwp)
1759 (linux_process_target::supports_range_stepping)
1760
1761 * linux-x86-low.cc (the_low_target): Remove the op field.
1762 * linux-aarch64-low.cc (the_low_target): Ditto.
1763 * linux-bfin-low.cc (the_low_target): Ditto.
1764 * linux-cris-low.cc (the_low_target): Ditto.
1765 * linux-crisv32-low.cc (the_low_target): Ditto.
1766 * linux-m32r-low.cc (the_low_target): Ditto.
1767 * linux-m68k-low.cc (the_low_target): Ditto.
1768 * linux-mips-low.cc (the_low_target): Ditto.
1769 * linux-nios2-low.cc (the_low_target): Ditto.
1770 * linux-ppc-low.cc (the_low_target): Ditto.
1771 * linux-riscv-low.cc (the_low_target): Ditto.
1772 * linux-s390-low.cc (the_low_target): Ditto.
1773 * linux-sh-low.cc (the_low_target): Ditto.
1774 * linux-sparc-low.cc (the_low_target): Ditto.
1775 * linux-tic6x-low.cc (the_low_target): Ditto.
1776 * linux-tile-low.cc (the_low_target): Ditto.
1777 * linux-xtensa-low.cc (the_low_target): Ditto.
1778 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1779 <supports_software_single_step>: Declare.
1780 (arm_target::supports_software_single_step): Define.
1781 (arm_gdbserver_get_next_pcs): Turn into...
1782 (arm_target::low_get_next_pcs): ...this.
1783 (the_low_target): Remove the op field.
1784
1785 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1786
1787 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1788 the concrete linux target define it by overriding the op
1789 in process_stratum_target.
1790
1791 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1792 Remove.
1793 * linux-low.h (struct linux_target_ops): Remove the op.
1794 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1795 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1796 Declare.
1797 (x86_sw_breakpoint_from_kind): Turn into...
1798 (x86_target::sw_breakpoint_from_kind): ...this.
1799 (the_low_target): Remove the op field.
1800 * linux-aarch64-low.cc (class aarch64_target)
1801 <sw_breakpoint_from_kind>: Declare.
1802 (aarch64_sw_breakpoint_from_kind): Turn into...
1803 (aarch64_target::sw_breakpoint_from_kind): ...this.
1804 (the_low_target): Remove the op field.
1805 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1806 Declare.
1807 (arm_target::sw_breakpoint_from_kind): Define.
1808 (the_low_target): Remove the op field.
1809 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1810 Declare.
1811 (bfin_sw_breakpoint_from_kind): Turn into...
1812 (bfin_target::sw_breakpoint_from_kind): ...this.
1813 (the_low_target): Remove the op field.
1814 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1815 Declare.
1816 (cris_sw_breakpoint_from_kind): Turn into...
1817 (cris_target::sw_breakpoint_from_kind): ...this.
1818 (the_low_target): Remove the op field.
1819 * linux-crisv32-low.cc (class crisv32_target)
1820 <sw_breakpoint_from_kind>: Declare.
1821 (cris_sw_breakpoint_from_kind): Turn into...
1822 (crisv32_target::sw_breakpoint_from_kind): ...this.
1823 (the_low_target): Remove the op field.
1824 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1825 Declare.
1826 (ia64_target::sw_breakpoint_from_kind): Define.
1827 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1828 Declare.
1829 (m32r_sw_breakpoint_from_kind): Turn into...
1830 (m32r_target::sw_breakpoint_from_kind): ...this.
1831 (the_low_target): Remove the op field.
1832 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1833 Declare.
1834 (m68k_sw_breakpoint_from_kind): Turn into...
1835 (m68k_target::sw_breakpoint_from_kind): ...this.
1836 (the_low_target): Remove the op field.
1837 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1838 Declare.
1839 (mips_sw_breakpoint_from_kind): Turn into...
1840 (mips_target::sw_breakpoint_from_kind): ...this.
1841 (the_low_target): Remove the op field.
1842 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1843 Declare.
1844 (nios2_sw_breakpoint_from_kind): Turn into...
1845 (nios2_target::sw_breakpoint_from_kind): ...this.
1846 (the_low_target): Remove the op field.
1847 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1848 Declare.
1849 (ppc_sw_breakpoint_from_kind): Turn into...
1850 (ppc_target::sw_breakpoint_from_kind): ...this.
1851 (the_low_target): Remove the op field.
1852 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1853 Declare.
1854 (riscv_sw_breakpoint_from_kind): Turn into...
1855 (riscv_target::sw_breakpoint_from_kind): ...this.
1856 (the_low_target): Remove the op field.
1857 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1858 Declare.
1859 (s390_sw_breakpoint_from_kind): Turn into...
1860 (s390_target::sw_breakpoint_from_kind): ...this.
1861 (the_low_target): Remove the op field.
1862 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1863 Declare.
1864 (sh_sw_breakpoint_from_kind): Turn into...
1865 (sh_target::sw_breakpoint_from_kind): ...this.
1866 (the_low_target): Remove the op field.
1867 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1868 Declare.
1869 (sparc_sw_breakpoint_from_kind): Turn into...
1870 (sparc_target::sw_breakpoint_from_kind): ...this.
1871 (the_low_target): Remove the op field.
1872 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1873 Declare.
1874 (tic6x_sw_breakpoint_from_kind): Turn into...
1875 (tic6x_target::sw_breakpoint_from_kind): ...this.
1876 (the_low_target): Remove the op field.
1877 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1878 Declare.
1879 (tile_sw_breakpoint_from_kind): Turn into...
1880 (tile_target::sw_breakpoint_from_kind): ...this.
1881 (the_low_target): Remove the op field.
1882 * linux-xtensa-low.cc (class xtensa_target)
1883 <sw_breakpoint_from_kind>: Declare.
1884 (xtensa_sw_breakpoint_from_kind): Turn into...
1885 (xtensa_target::sw_breakpoint_from_kind): ...this.
1886 (the_low_target): Remove the op field.
1887
1888 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1889
1890 Remove the 'breakpoint_kind_from_pc' and
1891 'breakpoint_kind_from_current_state' linux target ops, and let the
1892 concrete linux target define them by overriding the ops of
1893 process_stratum_target.
1894
1895 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1896 Remove.
1897 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1898 * linux-low.h (struct linux_target_ops): Remove ops.
1899 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1900 <breakpoint_kind_from_current_state>: Remove.
1901 * linux-x86-low.cc (the_low_target): Remove the op fields.
1902 * linux-bfin-low.cc (the_low_target): Ditto.
1903 * linux-cris-low.cc (the_low_target): Ditto.
1904 * linux-crisv32-low.cc (the_low_target): Ditto.
1905 * linux-m32r-low.cc (the_low_target): Ditto.
1906 * linux-m68k-low.cc (the_low_target): Ditto.
1907 * linux-mips-low.cc (the_low_target): Ditto.
1908 * linux-nios2-low.cc (the_low_target): Ditto.
1909 * linux-ppc-low.cc (the_low_target): Ditto.
1910 * linux-s390-low.cc (the_low_target): Ditto.
1911 * linux-sh-low.cc (the_low_target): Ditto.
1912 * linux-sparc-low.cc (the_low_target): Ditto.
1913 * linux-tic6x-low.cc (the_low_target): Ditto.
1914 * linux-tile-low.cc (the_low_target): Ditto.
1915 * linux-xtensa-low.cc (the_low_target): Ditto.
1916 * linux-aarch64-low.cc (class aarch64_target)
1917 <breakpoint_kind_from_pc>
1918 <breakpoint_kind_from_current_state>: Declare.
1919 (aarch64_breakpoint_kind_from_pc): Turn into...
1920 (aarch64_target::breakpoint_kind_from_pc): ...this.
1921 (aarch64_breakpoint_kind_from_current_state): Turn into...
1922 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1923 (the_low_target): Remove the op fields.
1924 * linux-arm-low.cc (class arm_target):
1925 <breakpoint_kind_from_pc>
1926 <breakpoint_kind_from_current_state>: Declare.
1927 (arm_target::breakpoint_kind_from_pc): Define.
1928 (arm_target::breakpoint_kind_from_current_state): Define.
1929 (the_low_target): Remove the op fields.
1930 * linux-riscv-low.cc (class riscv_target):
1931 <breakpoint_kind_from_pc>: Declare.
1932 (riscv_breakpoint_kind_from_pc): Turn into...
1933 (riscv_target::breakpoint_kind_from_pc): ...this.
1934 (the_low_target): Remove the op fields.
1935
1936 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1937
1938 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1939 of linux_process_target.
1940
1941 * linux-low.h (struct linux_target_ops): Remove the ops.
1942 (class linux_process_target) <low_supports_breakpoints>
1943 <low_get_pc>
1944 <low_set_pc>: Declare.
1945 * linux-low.cc (supports_breakpoints): Turn into...
1946 (linux_process_target::low_supports_breakpoints): ...this.
1947 (linux_process_target::low_get_pc): Define.
1948 (linux_process_target::low_set_pc): Define.
1949
1950 Update the callers below.
1951
1952 (linux_process_target::get_pc)
1953 (linux_process_target::save_stop_reason)
1954 (linux_process_target::maybe_move_out_of_jump_pad)
1955 (linux_process_target::wait_1)
1956 (linux_process_target::resume_one_lwp_throw)
1957 (linux_process_target::resume)
1958 (linux_process_target::proceed_all_lwps)
1959 (linux_process_target::read_pc)
1960 (linux_process_target::write_pc)
1961
1962 * linux-x86-low.cc (class linux_process_target)
1963 <low_supports_breakpoints>
1964 <low_get_pc>
1965 <low_set_pc>: Declare.
1966 (x86_target::low_supports_breakpoints): Define.
1967 (x86_get_pc): Turn into...
1968 (x86_target::low_get_pc): ...this.
1969 (x86_set_pc): Turn into...
1970 (x86_target::low_set_pc): ...this.
1971 (the_low_target): Remove the op fields.
1972 * linux-arm-low.cc (class arm_target)
1973 <low_supports_breakpoints>
1974 <low_get_pc>
1975 <low_set_pc>: Declare.
1976 (arm_target::low_supports_breakpoints)
1977 (arm_target::low_get_pc)
1978 (arm_target::low_set_pc): Define.
1979 (the_low_target): Remove the op fields.
1980 * linux-bfin-low.cc (class bfin_target)
1981 <low_supports_breakpoints>
1982 <low_get_pc>
1983 <low_set_pc>: Declare.
1984 (bfin_target::low_supports_breakpoints)
1985 (bfin_target::low_get_pc)
1986 (bfin_target::low_set_pc): Define.
1987 (the_low_target): Remove the op fields.
1988 * linux-cris-low.cc (class cris_target)
1989 <low_supports_breakpoints>
1990 <low_get_pc>
1991 <low_set_pc>: Declare.
1992 (cris_target::low_supports_breakpoints)
1993 (cris_target::low_get_pc)
1994 (cris_target::low_set_pc): Define.
1995 (the_low_target): Remove the op fields.
1996 * linux-crisv32-low.cc (class crisv32_target)
1997 <low_supports_breakpoints>
1998 <low_get_pc>
1999 <low_set_pc>: Declare.
2000 (crisv32_target::low_supports_breakpoints)
2001 (crisv32_target::low_get_pc)
2002 (crisv32_target::low_set_pc): Define.
2003 (the_low_target): Remove the op fields.
2004 * linux-m32r-low.cc (class m32r_target)
2005 <low_supports_breakpoints>
2006 <low_get_pc>
2007 <low_set_pc>: Declare.
2008 (m32r_target::low_supports_breakpoints)
2009 (m32r_target::low_get_pc)
2010 (m32r_target::low_set_pc): Define.
2011 (the_low_target): Remove the op fields.
2012 * linux-m68k-low.cc (class m68k_target)
2013 <low_supports_breakpoints>
2014 <low_get_pc>
2015 <low_set_pc>: Declare.
2016 (m68k_target::low_supports_breakpoints)
2017 (m68k_target::low_get_pc)
2018 (m68k_target::low_set_pc): Define.
2019 (the_low_target): Remove the op fields.
2020 * linux-nios2-low.cc (class nios2_target)
2021 <low_supports_breakpoints>
2022 <low_get_pc>
2023 <low_set_pc>: Declare.
2024 (nios2_target::low_supports_breakpoints)
2025 (nios2_target::low_get_pc)
2026 (nios2_target::low_set_pc): Define.
2027 (the_low_target): Remove the op fields.
2028 * linux-sh-low.cc (class sh_target)
2029 <low_supports_breakpoints>
2030 <low_get_pc>
2031 <low_set_pc>: Declare.
2032 (sh_target::low_supports_breakpoints)
2033 (sh_target::low_get_pc)
2034 (sh_target::low_set_pc): Define.
2035 (the_low_target): Remove the op fields.
2036 * linux-xtensa-low.cc (class xtensa_target)
2037 <low_supports_breakpoints>
2038 <low_get_pc>
2039 <low_set_pc>: Declare.
2040 (xtensa_target::low_supports_breakpoints)
2041 (xtensa_target::low_get_pc)
2042 (xtensa_target::low_set_pc): Define.
2043 (the_low_target): Remove the op fields.
2044 * linux-sparc-low.cc (class sparc_target)
2045 <low_supports_breakpoints>
2046 <low_get_pc>: Declare.
2047 (sparc_target::low_supports_breakpoints)
2048 (sparc_target::low_get_pc): Define.
2049 (the_low_target): Remove the op fields.
2050 * linux-tile-low.cc (class tile_target)
2051 <low_supports_breakpoints>
2052 <low_get_pc>
2053 <low_set_pc>: Declare.
2054 (tile_target::low_supports_breakpoints)
2055 (tile_target::low_get_pc)
2056 (tile_target::low_set_pc): Define.
2057 (the_low_target): Remove the op fields.
2058 * linux-aarch64-low.cc (class aarch64_target)
2059 <low_supports_breakpoints>
2060 <low_get_pc>
2061 <low_set_pc>: Declare.
2062 (aarch64_target::low_supports_breakpoints): Define.
2063 (aarch64_get_pc): Turn into...
2064 (aarch64_target::low_get_pc): ...this.
2065 (aarch64_set_pc): Turn into...
2066 (aarch64_target::low_set_pc): ...this.
2067 (the_low_target): Remove the op fields.
2068 * linux-mips-low.cc (class mips_target)
2069 <low_supports_breakpoints>
2070 <low_get_pc>
2071 <low_set_pc>: Declare.
2072 (mips_target::low_supports_breakpoints): Define.
2073 (mips_get_pc): Turn into...
2074 (mips_target::low_get_pc): ...this.
2075 (mips_set_pc): Turn into...
2076 (mips_target::low_set_pc): ...this.
2077 (the_low_target): Remove the op fields.
2078 * linux-ppc-low.cc (class ppc_target)
2079 <low_supports_breakpoints>
2080 <low_get_pc>
2081 <low_set_pc>: Declare.
2082 (ppc_target::low_supports_breakpoints): Define.
2083 (ppc_get_pc): Turn into...
2084 (ppc_target::low_get_pc): ...this.
2085 (ppc_set_pc): Turn into...
2086 (ppc_target::low_set_pc): ...this.
2087 (the_low_target): Remove the op fields.
2088 * linux-riscv-low.cc (class riscv_target)
2089 <low_supports_breakpoints>
2090 <low_get_pc>
2091 <low_set_pc>: Declare.
2092 (riscv_target::low_supports_breakpoints): Define.
2093 (riscv_get_pc): Turn into...
2094 (riscv_target::low_get_pc): ...this.
2095 (riscv_set_pc): Turn into...
2096 (riscv_target::low_set_pc): ...this.
2097 (the_low_target): Remove the op fields.
2098 * linux-s390-low.cc (class s390_target)
2099 <low_supports_breakpoints>
2100 <low_get_pc>
2101 <low_set_pc>: Declare.
2102 (s390_target::low_supports_breakpoints): Define.
2103 (s390_get_pc): Turn into...
2104 (s390_target::low_get_pc): ...this.
2105 (s390_set_pc): Turn into...
2106 (s390_target::low_set_pc): ...this.
2107 (the_low_target): Remove the op fields.
2108 * linux-tic6x-low.cc (class tic6x_target)
2109 <low_supports_breakpoints>
2110 <low_get_pc>
2111 <low_set_pc>: Declare.
2112 (tic6x_target::low_supports_breakpoints): Define.
2113 (tic6x_get_pc): Turn into...
2114 (tic6x_target::low_get_pc): ...this.
2115 (tic6x_set_pc): Turn into...
2116 (tic6x_target::low_set_pc): ...this.
2117 (the_low_target): Remove the op fields.
2118
2119 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2120
2121 Turn some more static methods in linux-low into private methods
2122 of linux_process_target.
2123
2124 * linux-low.cc (get_pc): Turn into...
2125 (linux_process_target::get_pc): ...this.
2126 (save_stop_reason): Turn into...
2127 (linux_process_target::save_stop_reason): ...this.
2128 (thread_still_has_status_pending_p): Turn into...
2129 (linux_process_target::thread_still_has_status_pending): ...this.
2130 (status_pending_p_callback): Turn into...
2131 (linux_process_target::status_pending_p_callback): ...this.
2132 (resume_stopped_resumed_lwps): Turn into...
2133 (linux_process_target::resume_stopped_resumed_lwps): ...this.
2134 (install_software_single_step_breakpoints): Turn into...
2135 (linux_process_target::install_software_single_step_breakpoints):
2136 ...this.
2137 (single_step): Turn into...
2138 (linux_process_target::single_step): ...this.
2139 (linux_resume_one_lwp_throw): Turn into...
2140 (linux_process_target::resume_one_lwp_throw): ...this.
2141 (linux_resume_one_lwp): Turn into...
2142 (linux_process_target::resume_one_lwp): ...this.
2143 (resume_status_pending_p): Turn into...
2144 (linux_process_target::resume_status_pending): ...this.
2145 (need_step_over_p): Turn into...
2146 (linux_process_target::thread_needs_step_over): ...this.
2147 (linux_resume_one_thread): Turn into...
2148 (linux_process_target::resume_one_thread): ...this.
2149 (proceed_one_lwp): Turn into...
2150 (linux_process_target::proceed_one_lwp): ...this.
2151 (unsuspend_and_proceed_one_lwp): Turn into...
2152 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
2153
2154 Update the calls/references to the above functions below.
2155
2156 (linux_process_target::handle_extended_wait)
2157 (linux_process_target::filter_event)
2158 (linux_process_target::wait_for_event_filtered)
2159 (linux_process_target::wait_1)
2160 (linux_process_target::move_out_of_jump_pad)
2161 (linux_process_target::start_step_over)
2162 (linux_process_target::resume)
2163 (linux_process_target::proceed_all_lwps)
2164 (regsets_store_inferior_registers)
2165 (linux_process_target::store_register)
2166
2167 * linux-low.h (class linux_process_target)
2168 <get_pc>
2169 <save_stop_reason>
2170 <thread_still_has_status_pending>
2171 <status_pending_p_callback>
2172 <resume_stopped_resumed_lwps>
2173 <install_software_single_step_breakpoints>
2174 <single_step>
2175 <resume_one_lwp_throw>
2176 <resume_one_lwp>
2177 <resume_status_pending>
2178 <thread_needs_step_over>
2179 <resume_one_thread>
2180 <proceed_one_lwp>
2181 <unsuspend_and_proceed_one_lwp>: Declare.
2182
2183 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2184
2185 Turn the 'fetch_register' linux target op into a method of
2186 linux_process_target.
2187
2188 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
2189 (class linux_process_target) <low_fetch_register>: Declare.
2190 * linux-x86-low.cc (the_low_target)
2191 * linux-aarch64-low.cc (the_low_target)
2192 * linux-arm-low.cc (the_low_target)
2193 * linux-bfin-low.cc (the_low_target)
2194 * linux-cris-low.cc (the_low_target)
2195 * linux-crisv32-low.cc (the_low_target)
2196 * linux-m32r-low.cc (the_low_target)
2197 * linux-m68k-low.cc (the_low_target)
2198 * linux-nios2-low.cc (the_low_target)
2199 * linux-ppc-low.cc (the_low_target)
2200 * linux-s390-low.cc (the_low_target)
2201 * linux-sh-low.cc (the_low_target)
2202 * linux-sparc-low.cc (the_low_target)
2203 * linux-tic6x-low.cc (the_low_target)
2204 * linux-tile-low.cc (the_low_target)
2205 * linux-xtensa-low.cc (the_low_target): Remove the op field.
2206 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
2207 Declare.
2208 (ia64_fetch_register): Turn into...
2209 (ia64_target::low_fetch_register): ...this.
2210 (the_low_target): Remove the op field.
2211 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
2212 Declare.
2213 (mips_fetch_register): Turn into...
2214 (mips_target::low_fetch_register): ...this.
2215 (the_low_target): Remove the op field.
2216 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
2217 Declare.
2218 (riscv_fetch_register): Turn into...
2219 (riscv_target::low_fetch_register): ...this.
2220 (the_low_target): Remove the op field.
2221
2222 Update the callers below.
2223
2224 * linux-low.cc (linux_process_target::fetch_registers)
2225 (linux_process_target::low_fetch_register)
2226
2227 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2228
2229 Turn the 'cannot_fetch_register' and 'cannot_store_register'
2230 linux target ops into methods of linux_process_target.
2231
2232 * linux-low.h (struct linux_target_ops): Remove the low target ops.
2233 (class linux_process_target) <fetch_register>
2234 <store_register>
2235 <usr_fetch_inferior_registers>
2236 <usr_store_inferior_registers>
2237 <low_cannot_fetch_register>
2238 <low_cannot_fetch_register> Declare.
2239 * linux-low.cc (fetch_register): Turn into...
2240 (linux_process_target::fetch_register): ...this.
2241 (store_register): Turn into ...
2242 (linux_process_target::store_register): ...this.
2243 (usr_fetch_inferior_registers): Turn into...
2244 (linux_process_target::usr_fetch_inferior_registers): ...this.
2245 (usr_store_inferior_registers): Turn into...
2246 (linux_process_target::usr_store_inferior_registers): ...this.
2247 * linux-x86-low.cc (class x86_target)
2248 <low_cannot_fetch_register>
2249 <low_cannot_store_register>: Declare.
2250 (x86_cannot_store_register): Turn into...
2251 (x86_target::low_cannot_store_register): ...this.
2252 (x86_cannot_fetch_register): Turn into...
2253 (x86_target::low_cannot_fetch_register): ...this.
2254 (the_low_target): Remove the target op fields.
2255 * linux-aarch64-low.cc (class aarch64_target)
2256 <low_cannot_fetch_register>
2257 <low_cannot_store_register>: Declare.
2258 (aarch64_target::low_cannot_fetch_register)
2259 (aarch64_target::low_cannot_store_register): Define.
2260 (the_low_target): Remove the op fields.
2261 * linux-arm-low.cc (class arm_target)
2262 <low_cannot_fetch_register>
2263 <low_cannot_store_register>: Declare.
2264 (arm_cannot_fetch_register): Turn into...
2265 (arm_target::low_cannot_fetch_register): ...this.
2266 (arm_cannot_store_register): Turn into...
2267 (arm_target::low_cannot_store_register): ...this.
2268 (the_low_target): Remove the op fields.
2269 * linux-bfin-low.cc (class bfin_target)
2270 <low_cannot_fetch_register>
2271 <low_cannot_store_register>: Declare.
2272 (bfin_cannot_fetch_register): Turn into...
2273 (bfin_target::low_cannot_fetch_register): ...this.
2274 (bfin_cannot_store_register): Turn into...
2275 (bfin_target::low_cannot_store_register): ...this.
2276 (the_low_target): Remove the op fields.
2277 * linux-cris-low.cc (class cris_target)
2278 <low_cannot_fetch_register>
2279 <low_cannot_store_register>: Declare.
2280 (cris_cannot_fetch_register): Turn into...
2281 (cris_target::low_cannot_fetch_register): ...this.
2282 (cris_cannot_store_register): Turn into...
2283 (cris_target::low_cannot_store_register): ...this.
2284 (the_low_target): Remove the op fields.
2285 * linux-crisv32-low.cc (class crisv32_target)
2286 <low_cannot_fetch_register>
2287 <low_cannot_store_register>: Declare.
2288 (crisv32_target::low_cannot_fetch_register)
2289 (crisv32_target::low_cannot_store_register): Define.
2290 (the_low_target): Remove the op fields.
2291 * linux-ia64-low.cc (class ia64_target)
2292 <low_cannot_fetch_register>
2293 <low_cannot_store_register>: Declare.
2294 (ia64_cannot_fetch_register): Turn into...
2295 (ia64_target::low_cannot_fetch_register): ...this.
2296 (ia64_cannot_store_register): Turn into...
2297 (ia64_target::low_cannot_store_register): ...this.
2298 (the_low_target): Remove the op fields.
2299 * linux-m32r-low.cc (class m32r_target)
2300 <low_cannot_fetch_register>
2301 <low_cannot_store_register>: Declare.
2302 (m32r_cannot_fetch_register): Turn into...
2303 (m32r_target::low_cannot_fetch_register): ...this.
2304 (m32r_cannot_store_register): Turn into...
2305 (m32r_target::low_cannot_store_register): ...this.
2306 (the_low_target): Remove the op fields.
2307 * linux-m68k-low.cc (class m68k_target)
2308 <low_cannot_fetch_register>
2309 <low_cannot_store_register>: Declare.
2310 (m68k_cannot_fetch_register): Turn into...
2311 (m68k_target::low_cannot_fetch_register): ...this.
2312 (m68k_cannot_store_register): Turn into...
2313 (m68k_target::low_cannot_store_register): ...this.
2314 (the_low_target): Remove the op fields.
2315 * linux-mips-low.cc (class mips_target)
2316 <low_cannot_fetch_register>
2317 <low_cannot_store_register>: Declare.
2318 (mips_cannot_fetch_register): Turn into...
2319 (mips_target::low_cannot_fetch_register): ...this.
2320 (mips_cannot_store_register): Turn into...
2321 (mips_target::low_cannot_store_register): ...this.
2322 (get_usrregs_info): Inline at the call sites in
2323 low_cannot_fetch_register and low_cannot_store_register,
2324 and remove.
2325 (the_low_target): Remove the op fields.
2326 * linux-nios2-low.cc (class nios2_target)
2327 <low_cannot_fetch_register>
2328 <low_cannot_store_register>: Declare.
2329 (nios2_cannot_fetch_register): Turn into...
2330 (nios2_target::low_cannot_fetch_register): ...this.
2331 (nios2_cannot_store_register): Turn into...
2332 (nios2_target::low_cannot_store_register): ...this.
2333 (the_low_target): Remove the op fields.
2334 * linux-ppc-low.cc (class ppc_target)
2335 <low_cannot_fetch_register>
2336 <low_cannot_store_register>: Declare.
2337 (ppc_cannot_fetch_register): Turn into...
2338 (ppc_target::low_cannot_fetch_register): ...this.
2339 (ppc_cannot_store_register): Turn into...
2340 (ppc_target::low_cannot_store_register): ...this.
2341 (the_low_target): Remove the op fields.
2342 * linux-riscv-low.cc (class riscv_target)
2343 <low_cannot_fetch_register>
2344 <low_cannot_store_register>: Declare.
2345 (riscv_target::low_cannot_fetch_register)
2346 (riscv_target::low_cannot_store_register): Define.
2347 (the_low_target): Remove the op fields.
2348 * linux-s390-low.cc (class s390_target)
2349 <low_cannot_fetch_register>
2350 <low_cannot_store_register>: Declare.
2351 (s390_cannot_fetch_register): Turn into...
2352 (s390_target::low_cannot_fetch_register): ...this.
2353 (s390_cannot_store_register): Turn into...
2354 (s390_target::low_cannot_store_register): ...this.
2355 (the_low_target): Remove the op fields.
2356 * linux-sh-low.cc (class sh_target)
2357 <low_cannot_fetch_register>
2358 <low_cannot_store_register>: Declare.
2359 (sh_cannot_fetch_register): Turn into...
2360 (sh_target::low_cannot_fetch_register): ...this.
2361 (sh_cannot_store_register): Turn into...
2362 (sh_target::low_cannot_store_register): ...this.
2363 (the_low_target): Remove the op fields.
2364 * linux-sparc-low.cc (class sparc_target)
2365 <low_cannot_fetch_register>
2366 <low_cannot_store_register>: Declare.
2367 (sparc_cannot_fetch_register): Turn into...
2368 (sparc_target::low_cannot_fetch_register): ...this.
2369 (sparc_cannot_store_register): Turn into...
2370 (sparc_target::low_cannot_store_register): ...this.
2371 (the_low_target): Remove the op fields.
2372 * linux-tic6x-low.cc (class tic6x_target)
2373 <low_cannot_fetch_register>
2374 <low_cannot_store_register>: Declare.
2375 (tic6x_cannot_fetch_register): Turn into...
2376 (tic6x_target::low_cannot_fetch_register): ...this.
2377 (tic6x_cannot_store_register): Turn into...
2378 (tic6x_target::low_cannot_store_register): ...this.
2379 (the_low_target): Remove the op fields.
2380 * linux-tile-low.cc (class tile_target)
2381 <low_cannot_fetch_register>
2382 <low_cannot_store_register>: Declare.
2383 (tile_cannot_fetch_register): Turn into...
2384 (tile_target::low_cannot_fetch_register): ...this.
2385 (tile_cannot_store_register): Turn into...
2386 (tile_target::low_cannot_store_register): ...this.
2387 (the_low_target): Remove the op fields.
2388 * linux-xtensa-low.cc (class xtensa_target)
2389 <low_cannot_fetch_register>
2390 <low_cannot_store_register>: Declare.
2391 (xtensa_target::low_cannot_fetch_register)
2392 (xtensa_target::low_cannot_store_register): Define.
2393 (the_low_target): Remove the op fields.
2394
2395 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2396
2397 Turn the 'regs_info' linux target op into a method of
2398 linux_process_target.
2399
2400 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2401 (class linux_process_target) <get_regs_info>: Define.
2402
2403 Update the callers below.
2404
2405 * linux-low.cc (linux_process_target::fetch_registers)
2406 (linux_process_target::store_registers)
2407 * proc-service.cc (gregset_info)
2408
2409 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2410 (x86_linux_regs_info): Turn into ...
2411 (x86_target::get_regs_info): ...this.
2412 (the_low_target): Remove the op field.
2413 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2414 Declare.
2415 (aarch64_regs_info): Turn into ...
2416 (aarch64_target::get_regs_info): ...this.
2417 (the_low_target): Remove the op field.
2418 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2419 (arm_regs_info): Turn into ...
2420 (arm_target::get_regs_info): ...this.
2421 (the_low_target): Remove the op field.
2422 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2423 (bfin_regs_info): Turn into ...
2424 (bfin_target::get_regs_info): ...this.
2425 (the_low_target): Remove the op field.
2426 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2427 (cris_regs_info): Turn into ...
2428 (cris_target::get_regs_info): ...this.
2429 (the_low_target): Remove the op field.
2430 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2431 Declare.
2432 (crisv32_regs_info): Turn into ...
2433 (crisv32_target::get_regs_info): ...this.
2434 (the_low_target): Remove the op field.
2435 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2436 (ia64_regs_info): Turn into ...
2437 (ia64_target::get_regs_info): ...this.
2438 (the_low_target): Remove the op field.
2439 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2440 (m32r_regs_info): Turn into ...
2441 (m32r_target::get_regs_info): ...this.
2442 (the_low_target): Remove the op field.
2443 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2444 (m68k_regs_info): Turn into ...
2445 (m68k_target::get_regs_info): ...this.
2446 (the_low_target): Remove the op field.
2447 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2448 (mips_regs_info): Turn into ...
2449 (mips_target::get_regs_info): ...this.
2450 (the_low_target): Remove the op field.
2451 (get_usrregs_info): Update the call to the op.
2452 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2453 (nios2_regs_info): Turn into ...
2454 (nios2_target::get_regs_info): ...this.
2455 (the_low_target): Remove the op field.
2456 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2457 (ppc_regs_info): Turn into ...
2458 (ppc_target::get_regs_info): ...this.
2459 (the_low_target): Remove the op field.
2460 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2461 (riscv_regs_info): Turn into ...
2462 (riscv_target::get_regs_info): ...this.
2463 (the_low_target): Remove the op field.
2464 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2465 (s390_regs_info): Turn into ...
2466 (s390_target::get_regs_info): ...this.
2467 (the_low_target): Remove the op field.
2468 (s390_collect_ptrace_register)
2469 (s390_supply_ptrace_register)
2470 (s390_fill_gregset): Update the call to the op.
2471 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2472 (sh_regs_info): Turn into ...
2473 (sh_target::get_regs_info): ...this.
2474 (the_low_target): Remove the op field.
2475 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2476 (sparc_regs_info): Turn into ...
2477 (sparc_target::get_regs_info): ...this.
2478 (the_low_target): Remove the op field.
2479 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2480 (tic6x_regs_info): Turn into ...
2481 (tic6x_target::get_regs_info): ...this.
2482 (the_low_target): Remove the op field.
2483 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2484 (tile_regs_info): Turn into ...
2485 (tile_target::get_regs_info): ...this.
2486 (the_low_target): Remove the op field.
2487 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2488 Declare.
2489 (xtensa_regs_info): Turn into ...
2490 (xtensa_target::get_regs_info): ...this.
2491 (the_low_target): Remove the op field.
2492
2493 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2494
2495 Turn the 'arch_setup' linux target op into a method of
2496 linux_process_target.
2497
2498 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2499 (class linux_process_target) <arch_setup_thread>
2500 <low_arch_setup>: New declarations.
2501 * linux-low.cc (linux_arch_setup): Delete.
2502 (linux_arch_setup_thread): Turn into...
2503 (linux_process_target::arch_setup_thread): ... this.
2504
2505 Update the callers below.
2506
2507 (linux_process_target::handle_extended_wait)
2508 (linux_process_target::post_create_inferior)
2509 (linux_process_target::filter_event)
2510
2511 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2512 declaration.
2513 (x86_linux_update_xmltarget): Turn into...
2514 (x86_target::update_xmltarget): ...this.
2515 (x86_linux_process_qsupported): Update the call to
2516 x86_linux_update_xmltarget.
2517 (x86_arch_setup): Turn into ...
2518 (x86_target::low_arch_setup): ...this.
2519 (the_low_target): Remove the op field.
2520 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2521 declaration.
2522 (aarch64_arch_setup): Turn into ...
2523 (aarch64_target::low_arch_setup): ...this.
2524 (the_low_target): Remove the op field.
2525 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2526 declaration.
2527 (arm_arch_setup): Turn into ...
2528 (arm_target::low_arch_setup): ...this.
2529 (the_low_target): Remove the op field.
2530 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2531 declaration.
2532 (bfin_arch_setup): Turn into ...
2533 (bfin_target::low_arch_setup): ...this.
2534 (the_low_target): Remove the op field.
2535 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2536 declaration.
2537 (cris_arch_setup): Turn into ...
2538 (cris_target::low_arch_setup): ...this.
2539 (the_low_target): Remove the op field.
2540 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2541 declaration.
2542 (crisv32_arch_setup): Turn into ...
2543 (crisv32_target::low_arch_setup): ...this.
2544 (the_low_target): Remove the op field.
2545 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2546 declaration.
2547 (ia64_arch_setup): Turn into ...
2548 (ia64_target::low_arch_setup): ...this.
2549 (the_low_target): Remove the op field.
2550 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2551 declaration.
2552 (m32r_arch_setup): Turn into ...
2553 (m32r_target::low_arch_setup): ...this.
2554 (the_low_target): Remove the op field.
2555 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2556 declaration.
2557 (m68k_arch_setup): Turn into ...
2558 (m68k_target::low_arch_setup): ...this.
2559 (the_low_target): Remove the op field.
2560 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2561 declaration.
2562 (mips_arch_setup): Turn into ...
2563 (mips_target::low_arch_setup): ...this.
2564 (the_low_target): Remove the op field.
2565 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2566 declaration.
2567 (nios2_arch_setup): Turn into ...
2568 (nios2_target::low_arch_setup): ...this.
2569 (the_low_target): Remove the op field.
2570 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2571 declaration.
2572 (ppc_arch_setup): Turn into ...
2573 (ppc_target::low_arch_setup): ...this.
2574 (the_low_target): Remove the op field.
2575 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2576 declaration.
2577 (riscv_arch_setup): Turn into ...
2578 (riscv_target::low_arch_setup): ...this.
2579 (the_low_target): Remove the op field.
2580 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2581 declaration.
2582 (s390_arch_setup): Turn into ...
2583 (s390_target::low_arch_setup): ...this.
2584 (the_low_target): Remove the op field.
2585 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2586 declaration.
2587 (sh_arch_setup): Turn into ...
2588 (sh_target::low_arch_setup): ...this.
2589 (the_low_target): Remove the op field.
2590 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2591 declaration.
2592 (sparc_arch_setup): Turn into ...
2593 (sparc_target::low_arch_setup): ...this.
2594 (the_low_target): Remove the op field.
2595 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2596 declaration.
2597 (tic6x_arch_setup): Turn into ...
2598 (tic6x_target::low_arch_setup): ...this.
2599 (the_low_target): Remove the op field.
2600 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2601 declaration.
2602 (tile_arch_setup): Turn into ...
2603 (tile_target::low_arch_setup): ...this.
2604 (the_low_target): Remove the op field.
2605 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2606 declaration.
2607 (xtensa_arch_setup): Turn into ...
2608 (xtensa_target::low_arch_setup): ...this.
2609 (the_low_target): Remove the op field.
2610
2611 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2612
2613 * linux-low.h (the_linux_target): New extern declaration.
2614 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2615 'the_target'.
2616 (the_linux_target): Remove.
2617 * linux-x86-low.cc (class x86_target): New class.
2618 (the_x86_target): New static object.
2619 (the_linux_target): Define as pointer to the_x86_target.
2620 * linux-aarch64-low.cc (class aarch64_target): New class.
2621 (the_aarch64_target): New static object.
2622 (the_linux_target): Define as pointer to the_aarch64_target.
2623 * linux-arm-low.cc (class arm_target): New class.
2624 (the_arm_target): New static object.
2625 (the_linux_target): Define as pointer to the_arm_target.
2626 * linux-bfin-low.cc (class bfin_target): New class.
2627 (the_bfin_target): New static object.
2628 (the_linux_target): Define as pointer to the_bfin_target.
2629 * linux-cris-low.cc (class cris_target): New class.
2630 (the_cris_target): New static object.
2631 (the_linux_target): Define as pointer to the_cris_target.
2632 * linux-crisv32-low.cc (class crisv32_target): New class.
2633 (the_crisv32_target): New static object.
2634 (the_linux_target): Define as pointer to the_crisv32_target.
2635 * linux-ia64-low.cc (class ia64_target): New class.
2636 (the_ia64_target): New static object.
2637 (the_linux_target): Define as pointer to the_ia64_target.
2638 * linux-m32r-low.cc (class m32r_target): New class.
2639 (the_m32r_target): New static object.
2640 (the_linux_target): Define as pointer to the_m32r_target.
2641 * linux-m68k-low.cc (class m68k_target): New class.
2642 (the_m68k_target): New static object.
2643 (the_linux_target): Define as pointer to the_m68k_target.
2644 * linux-mips-low.cc (class mips_target): New class.
2645 (the_mips_target): New static object.
2646 (the_linux_target): Define as pointer to the_mips_target.
2647 * linux-nios2-low.cc (class nios2_target): New class.
2648 (the_nios2_target): New static object.
2649 (the_linux_target): Define as pointer to the_nios2_target.
2650 * linux-ppc-low.cc (class ppc_target): New class.
2651 (the_ppc_target): New static object.
2652 (the_linux_target): Define as pointer to the_ppc_target.
2653 * linux-riscv-low.cc (class riscv_target): New class.
2654 (the_riscv_target): New static object.
2655 (the_linux_target): Define as pointer to the_riscv_target.
2656 * linux-s390-low.cc (class s390_target): New class.
2657 (the_s390_target): New static object.
2658 (the_linux_target): Define as pointer to the_s390_target.
2659 * linux-sh-low.cc (class sh_target): New class.
2660 (the_sh_target): New static object.
2661 (the_linux_target): Define as pointer to the_sh_target.
2662 * linux-sparc-low.cc (class sparc_target): New class.
2663 (the_sparc_target): New static object.
2664 (the_linux_target): Define as pointer to the_sparc_target.
2665 * linux-tic6x-low.cc (class tic6x_target): New class.
2666 (the_tic6x_target): New static object.
2667 (the_linux_target): Define as pointer to the_tic6x_target.
2668 * linux-tile-low.cc (class tile_target): New class.
2669 (the_tile_target): New static object.
2670 (the_linux_target): Define as pointer to the_tile_target.
2671 * linux-xtensa-low.cc (class xtensa_target): New class.
2672 (the_xtensa_target): New static object.
2673 (the_linux_target): Define as pointer to the_xtensa_target.
2674
2675 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2676
2677 Turn some static functions in linux-low.cc into private methods of
2678 linux_process_target.
2679
2680 * linux-low.cc (handle_extended_wait): Turn into ...
2681 (linux_process_target::handle_extended_wait): ...this. Call
2682 'mourn' on 'this' object instead of 'the_target'.
2683 (maybe_move_out_of_jump_pad): Turn into...
2684 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2685 (linux_low_filter_event): Turn into...
2686 (linux_process_target::filter_event): ...this.
2687 (linux_wait_for_event_filtered): Turn into...
2688 (linux_process_target::wait_for_event_filtered): ...this.
2689 (linux_wait_for_event): Turn into...
2690 (linux_process_target::wait_for_event): ...this.
2691 (linux_wait_1): Turn into...
2692 (linux_process_target::wait_1): ...this.
2693 (wait_for_sigstop): Turn into...
2694 (linux_process_target::wait_for_sigstop): ...this.
2695 (move_out_of_jump_pad_callback): Turn into...
2696 (linux_process_target::move_out_of_jump_pad): ...this.
2697 (stop_all_lwps): Turn into...
2698 (linux_process_target::stop_all_lwps): ...this.
2699 (start_step_over): Turn into...
2700 (linux_process_target::start_step_over): ...this.
2701 (complete_ongoing_step_over): Turn into...
2702 (linux_process_target::complete_ongoing_step_over): ...this.
2703 (proceed_all_lwps): Turn into...
2704 (linux_process_target::proceed_all_lwps): ...this.
2705 (unstop_all_lwps): Turn into...
2706 (linux_process_target::unstop_all_lwps): ...this.
2707
2708 * linux-low.h (class linux_process_target)
2709 <handle_extended_wait>
2710 <maybe_move_out_of_jump_pad>
2711 filter_event>
2712 <wait_for_event_filtered>
2713 <wait_for_event>
2714 <wait_1>
2715 <wait_for_sigstop>
2716 <move_out_of_jump_pad>
2717 <stop_all_lwps>
2718 <start_step_over>
2719 <complete_ongoing_step_over>
2720 <proceed_all_lwps>
2721 <unstop_all_lwps>: Declare.
2722
2723 Update the callers below.
2724
2725 * linux-low.cc (linux_process_target::attach): Update.
2726 (linux_process_target::stabilize_threads): Ditto.
2727 (linux_process_target::wait): Ditto.
2728
2729 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2730
2731 * linux-low.h (struct linux_target_ops): Update the comment for
2732 'cannot_store_register' to return 0 or 1.
2733 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2734 of 2.
2735
2736 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2737
2738 * config.in: Re-generate.
2739 * configure: Re-generate.
2740
2741 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2742
2743 * regcache.cc (find_register_by_number): Update.
2744 * tdesc.cc (init_target_desc): Likewise.
2745 * tdesc.h (target_desc::reg_defs): Likewise.
2746
2747 2020-03-12 Tom Tromey <tom@tromey.com>
2748
2749 * configure: Rebuild.
2750 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2751 (WIN32APILIBS): New subst.
2752 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2753 gdbsupport files.
2754 (gdbsupport/%.o): Remove target.
2755 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2756 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2757 (WIN32APILIBS): New variable.
2758 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2759 (gdbreplay$(EXEEXT)): Likewise.
2760
2761 2020-03-12 Tom Tromey <tom@tromey.com>
2762
2763 * config.in, configure: Rebuild.
2764 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2765 * acinclude.m4: Include gettext-sister.m4.
2766 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2767 variables.
2768 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2769 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2770
2771 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2772
2773 * acinclude.m4: Update path to selftest.m4.
2774
2775 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2776
2777 * configure.ac: Don't source bfd/development.sh, move
2778 GDB_AC_COMMON higher.
2779 * configure: Re-generate.
2780
2781 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2782
2783 * configure: Re-generate.
2784
2785 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2786
2787 * configure: Re-generate.
2788
2789 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2790
2791 * .dir-locals.el: New file.
2792
2793 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2794
2795 * .gitattributes: New file.
2796
2797 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2798
2799 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2800 reply into an S reply.
2801 * server.cc (disable_packet_T): New global.
2802 (captured_main): Set new global when appropriate.
2803 * server.h (disable_packet_T): Declare.
2804
2805 2020-02-21 Tom Tromey <tom@tromey.com>
2806
2807 * Makefile.in (mostlyclean): New target.
2808
2809 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2810
2811 * target.h (struct process_stratum_target): Remove.
2812 (class process_target): Rename to ...
2813 (class process_stratum_target): ... this.
2814 * linux-low.h (class linux_process_target): Derive from
2815 'process_stratum_target'.
2816 * linux-low.cc (linux_target_ops): Remove.
2817 (initialize_low): Set the_target to the singleton instance of
2818 linux_process_target.
2819 * lynx-low.h (class lynx_process_target): Derive from
2820 'process_stratum_target'.
2821 * lynx-low.cc (lynx_target_ops): Remove.
2822 (initialize_low): Set the_target to the singleton instance of
2823 lynx_process_target.
2824 * nto-low.h (class nto_process_target): Derive from
2825 'process_stratum_target'.
2826 * nto-low.cc (nto_target_ops): Remove.
2827 (initialize_low): Set the_target to the singleton instance of
2828 nto_process_target.
2829 * win32-low.h (class win32_process_target): Derive from
2830 'process_stratum_target'.
2831 * win32-low.cc (win32_target_ops): Remove.
2832 (initialize_low): Set the_target to the singleton instance of
2833 win32_process_target.
2834
2835 Replace 'the_target->pt' with 'the_target' in the uses below.
2836
2837 * hostio.cc (hostio_error)
2838 (handle_setfs)
2839 (handle_open)
2840 (handle_unlink)
2841 (handle_readlink)
2842 * linux-aarch32-low.cc (arm_breakpoint_at)
2843 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2844 * linux-arm-low.cc (arm_sigreturn_next_pc)
2845 (arm_get_hwcap)
2846 (arm_get_syscall_trapinfo)
2847 * linux-cris-low.cc (cris_breakpoint_at)
2848 * linux-crisv32-low.cc (cris_breakpoint_at)
2849 * linux-low.cc (handle_extended_wait)
2850 (linux_wait_1)
2851 (linux_read_memory)
2852 (linux_process_target::breakpoint_kind_from_pc)
2853 (linux_get_auxv)
2854 * linux-m32r-low.cc (m32r_breakpoint_at)
2855 * linux-mips-low.cc (mips_breakpoint_at)
2856 * linux-nios2-low.cc (nios2_breakpoint_at)
2857 * linux-ppc-low.cc (ppc_breakpoint_at)
2858 * linux-s390-low.cc (s390_get_hwcap)
2859 * linux-sh-low.cc (sh_breakpoint_at)
2860 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2861 (sparc_store_gregset_from_stack)
2862 (sparc_breakpoint_at)
2863 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2864 * linux-tile-low.cc (tile_breakpoint_at)
2865 * linux-x86-low.cc (x86_breakpoint_at)
2866 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2867 * mem-break.cc (bp_size)
2868 (bp_opcode)
2869 (insert_memory_breakpoint)
2870 (set_raw_breakpoint_at)
2871 (delete_raw_breakpoint)
2872 (z_type_supported)
2873 (uninsert_raw_breakpoint)
2874 (reinsert_raw_breakpoint)
2875 (validate_inserted_breakpoint)
2876 * regcache.cc (regcache_read_pc)
2877 (regcache_write_pc)
2878 * remote-utils.cc (putpkt_binary_1)
2879 (input_interrupt)
2880 (getpkt)
2881 (prepare_resume_reply)
2882 * server.cc (handle_general_set)
2883 (handle_detach)
2884 (handle_qxfer_auxv)
2885 (handle_qxfer_exec_file)
2886 (handle_qxfer_libraries_svr4)
2887 (handle_qxfer_osdata)
2888 (handle_qxfer_siginfo)
2889 (handle_qxfer_fdpic)
2890 (handle_query)
2891 (resume)
2892 (handle_v_requests)
2893 (queue_stop_reply_callback)
2894 (captured_main)
2895 * target.cc (prepare_to_access_memory)
2896 (done_accessing_memory)
2897 (read_inferior_memory)
2898 (target_write_memory)
2899 (target_stop_and_wait)
2900 (target_wait)
2901 (target_mourn_inferior)
2902 (target_continue_no_signal)
2903 (target_continue)
2904 (target_supports_multi_process)
2905 (kill_inferior)
2906 * target.h
2907 (target_create_inferior)
2908 (target_post_create_inferior)
2909 (myattach)
2910 (target_supports_fork_events)
2911 (target_supports_vfork_events)
2912 (target_supports_exec_events)
2913 (target_handle_new_gdb_connection)
2914 (detach_inferior)
2915 (mythread_alive)
2916 (fetch_inferior_registers)
2917 (store_inferior_registers)
2918 (join_inferior)
2919 (target_supports_non_stop)
2920 (target_async)
2921 (target_process_qsupported)
2922 (target_supports_catch_syscall)
2923 (target_get_ipa_tdesc_idx)
2924 (target_supports_tracepoints)
2925 (target_supports_fast_tracepoints)
2926 (target_get_min_fast_tracepoint_insn_len)
2927 (target_thread_stopped)
2928 (target_pause_all)
2929 (target_unpause_all)
2930 (target_stabilize_threads)
2931 (target_install_fast_tracepoint_jump_pad)
2932 (target_emit_ops)
2933 (target_supports_disable_randomization)
2934 (target_supports_agent)
2935 (target_enable_btrace)
2936 (target_disable_btrace)
2937 (target_read_btrace)
2938 (target_read_btrace_conf)
2939 (target_supports_range_stepping)
2940 (target_supports_stopped_by_sw_breakpoint)
2941 (target_stopped_by_sw_breakpoint)
2942 (target_supports_stopped_by_hw_breakpoint)
2943 (target_supports_hardware_single_step)
2944 (target_stopped_by_hw_breakpoint)
2945 (target_breakpoint_kind_from_pc)
2946 (target_breakpoint_kind_from_current_state)
2947 (target_supports_software_single_step)
2948 (target_core_of_thread)
2949 (target_thread_name)
2950 (target_thread_handle)
2951 * win32-low.cc (do_initial_child_stuff)
2952
2953 Rename target op default definitions listed below.
2954
2955 * target.cc (process_target::post_create_inferior): Rename as ...
2956 (process_stratum_target::post_create_inferior): ... this.
2957 (process_target::prepare_to_access_memory): Rename as ...
2958 (process_stratum_target::prepare_to_access_memory): ... this.
2959 (process_target::done_accessing_memory): Rename as ...
2960 (process_stratum_target::done_accessing_memory): ... this.
2961 (process_target::look_up_symbols): Rename as ...
2962 (process_stratum_target::look_up_symbols): ... this.
2963 (process_target::supports_read_auxv): Rename as ...
2964 (process_stratum_target::supports_read_auxv): ... this.
2965 (process_target::read_auxv): Rename as ...
2966 (process_stratum_target::read_auxv): ... this.
2967 (process_target::supports_z_point_type): Rename as ...
2968 (process_stratum_target::supports_z_point_type): ... this.
2969 (process_target::insert_point): Rename as ...
2970 (process_stratum_target::insert_point): ... this.
2971 (process_target::remove_point): Rename as ...
2972 (process_stratum_target::remove_point): ... this.
2973 (process_target::stopped_by_sw_breakpoint): Rename as ...
2974 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2975 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2976 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2977 (process_target::stopped_by_hw_breakpoint): Rename as ...
2978 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2979 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2980 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2981 (process_target::supports_hardware_single_step): Rename as ...
2982 (process_stratum_target::supports_hardware_single_step): ... this.
2983 (process_target::stopped_by_watchpoint): Rename as ...
2984 (process_stratum_target::stopped_by_watchpoint): ... this.
2985 (process_target::stopped_data_address): Rename as ...
2986 (process_stratum_target::stopped_data_address): ... this.
2987 (process_target::supports_read_offsets): Rename as ...
2988 (process_stratum_target::supports_read_offsets): ... this.
2989 (process_target::read_offsets): Rename as ...
2990 (process_stratum_target::read_offsets): ... this.
2991 (process_target::supports_get_tls_address): Rename as ...
2992 (process_stratum_target::supports_get_tls_address): ... this.
2993 (process_target::get_tls_address): Rename as ...
2994 (process_stratum_target::get_tls_address): ... this.
2995 (process_target::hostio_last_error): Rename as ...
2996 (process_stratum_target::hostio_last_error): ... this.
2997 (process_target::supports_qxfer_osdata): Rename as ...
2998 (process_stratum_target::supports_qxfer_osdata): ... this.
2999 (process_target::qxfer_osdata): Rename as ...
3000 (process_stratum_target::qxfer_osdata): ... this.
3001 (process_target::supports_qxfer_siginfo): Rename as ...
3002 (process_stratum_target::supports_qxfer_siginfo): ... this.
3003 (process_target::qxfer_siginfo): Rename as ...
3004 (process_stratum_target::qxfer_siginfo): ... this.
3005 (process_target::supports_non_stop): Rename as ...
3006 (process_stratum_target::supports_non_stop): ... this.
3007 (process_target::async): Rename as ...
3008 (process_stratum_target::async): ... this.
3009 (process_target::start_non_stop): Rename as ...
3010 (process_stratum_target::start_non_stop): ... this.
3011 (process_target::supports_multi_process): Rename as ...
3012 (process_stratum_target::supports_multi_process): ... this.
3013 (process_target::supports_fork_events): Rename as ...
3014 (process_stratum_target::supports_fork_events): ... this.
3015 (process_target::supports_vfork_events): Rename as ...
3016 (process_stratum_target::supports_vfork_events): ... this.
3017 (process_target::supports_exec_events): Rename as ...
3018 (process_stratum_target::supports_exec_events): ... this.
3019 (process_target::handle_new_gdb_connection): Rename as ...
3020 (process_stratum_target::handle_new_gdb_connection): ... this.
3021 (process_target::handle_monitor_command): Rename as ...
3022 (process_stratum_target::handle_monitor_command): ... this.
3023 (process_target::core_of_thread): Rename as ...
3024 (process_stratum_target::core_of_thread): ... this.
3025 (process_target::supports_read_loadmap): Rename as ...
3026 (process_stratum_target::supports_read_loadmap): ... this.
3027 (process_target::read_loadmap): Rename as ...
3028 (process_stratum_target::read_loadmap): ... this.
3029 (process_target::process_qsupported): Rename as ...
3030 (process_stratum_target::process_qsupported): ... this.
3031 (process_target::supports_tracepoints): Rename as ...
3032 (process_stratum_target::supports_tracepoints): ... this.
3033 (process_target::read_pc): Rename as ...
3034 (process_stratum_target::read_pc): ... this.
3035 (process_target::write_pc): Rename as ...
3036 (process_stratum_target::write_pc): ... this.
3037 (process_target::supports_thread_stopped): Rename as ...
3038 (process_stratum_target::supports_thread_stopped): ... this.
3039 (process_target::thread_stopped): Rename as ...
3040 (process_stratum_target::thread_stopped): ... this.
3041 (process_target::supports_get_tib_address): Rename as ...
3042 (process_stratum_target::supports_get_tib_address): ... this.
3043 (process_target::get_tib_address): Rename as ...
3044 (process_stratum_target::get_tib_address): ... this.
3045 (process_target::pause_all): Rename as ...
3046 (process_stratum_target::pause_all): ... this.
3047 (process_target::unpause_all): Rename as ...
3048 (process_stratum_target::unpause_all): ... this.
3049 (process_target::stabilize_threads): Rename as ...
3050 (process_stratum_target::stabilize_threads): ... this.
3051 (process_target::supports_fast_tracepoints): Rename as ...
3052 (process_stratum_target::supports_fast_tracepoints): ... this.
3053 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
3054 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
3055 (process_target::emit_ops): Rename as ...
3056 (process_stratum_target::emit_ops): ... this.
3057 (process_target::supports_disable_randomization): Rename as ...
3058 (process_stratum_target::supports_disable_randomization): ... this.
3059 (process_target::supports_qxfer_libraries_svr4): Rename as ...
3060 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
3061 (process_target::qxfer_libraries_svr4): Rename as ...
3062 (process_stratum_target::qxfer_libraries_svr4): ... this.
3063 (process_target::supports_agent): Rename as ...
3064 (process_stratum_target::supports_agent): ... this.
3065 (process_target::enable_btrace): Rename as ...
3066 (process_stratum_target::enable_btrace): ... this.
3067 (process_target::disable_btrace): Rename as ...
3068 (process_stratum_target::disable_btrace): ... this.
3069 (process_target::read_btrace): Rename as ...
3070 (process_stratum_target::read_btrace): ... this.
3071 (process_target::read_btrace_conf): Rename as ...
3072 (process_stratum_target::read_btrace_conf): ... this.
3073 (process_target::supports_range_stepping): Rename as ...
3074 (process_stratum_target::supports_range_stepping): ... this.
3075 (process_target::supports_pid_to_exec_file): Rename as ...
3076 (process_stratum_target::supports_pid_to_exec_file): ... this.
3077 (process_target::pid_to_exec_file): Rename as ...
3078 (process_stratum_target::pid_to_exec_file): ... this.
3079 (process_target::supports_multifs): Rename as ...
3080 (process_stratum_target::supports_multifs): ... this.
3081 (process_target::multifs_open): Rename as ...
3082 (process_stratum_target::multifs_open): ... this.
3083 (process_target::multifs_unlink): Rename as ...
3084 (process_stratum_target::multifs_unlink): ... this.
3085 (process_target::multifs_readlink): Rename as ...
3086 (process_stratum_target::multifs_readlink): ... this.
3087 (process_target::breakpoint_kind_from_pc): Rename as ...
3088 (process_stratum_target::breakpoint_kind_from_pc): ... this.
3089 (process_target::breakpoint_kind_from_current_state): Rename as ...
3090 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
3091 (process_target::thread_name): Rename as ...
3092 (process_stratum_target::thread_name): ... this.
3093 (process_target::thread_handle): Rename as ...
3094 (process_stratum_target::thread_handle): ... this.
3095 (process_target::supports_software_single_step): Rename as ...
3096 (process_stratum_target::supports_software_single_step): ... this.
3097 (process_target::supports_catch_syscall): Rename as ...
3098 (process_stratum_target::supports_catch_syscall): ... this.
3099 (process_target::get_ipa_tdesc_idx): Rename as ...
3100 (process_stratum_target::get_ipa_tdesc_idx): ... this.
3101
3102 2020-02-20 Pedro Alves <palves@redhat.com>
3103
3104 * target.cc (set_target_ops): Simply copy the given target pointer
3105 instead of creating a copy of the pointed object.
3106
3107 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3108
3109 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
3110 of process_target.
3111
3112 * target.h (struct process_stratum_target): Remove the target op.
3113 (class process_target): Add the target op.
3114 (target_get_ipa_tdesc_idx): Update the macro.
3115 * target.cc (process_target::get_ipa_tdesc_idx): Define.
3116
3117 Update the derived classes and callers below.
3118
3119 * linux-low.cc (linux_target_ops): Update.
3120 (linux_get_ipa_tdesc_idx): Turn into ...
3121 (linux_process_target::get_ipa_tdesc_idx): ... this.
3122 * linux-low.h (class linux_process_target): Update.
3123 * lynx-low.cc (lynx_target_ops): Update.
3124 * nto-low.cc (nto_target_ops): Update.
3125 * win32-low.cc (win32_target_ops): Update.
3126
3127 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3128
3129 Turn process_stratum_target's supports_catch_syscall op into a
3130 method of process_target.
3131
3132 * target.h (struct process_stratum_target): Remove the target op.
3133 (class process_target): Add the target op.
3134 (target_supports_catch_syscall): Update the macro.
3135 * target.cc (process_target::supports_catch_syscall): Define.
3136
3137 Update the derived classes and callers below.
3138
3139 * linux-low.cc (linux_target_ops): Update.
3140 (linux_supports_catch_syscall): Turn into ...
3141 (linux_process_target::supports_catch_syscall): ... this.
3142 * linux-low.h (class linux_process_target): Update.
3143 * lynx-low.cc (lynx_target_ops): Update.
3144 * nto-low.cc (nto_target_ops): Update.
3145 * win32-low.cc (win32_target_ops): Update.
3146
3147 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3148
3149 Turn process_stratum_target's supports_software_single_step op
3150 into a method of process_target.
3151
3152 * target.h (struct process_stratum_target): Remove the target op.
3153 (class process_target): Add the target op.
3154 (target_supports_software_single_step): Update the macro.
3155 * target.cc (process_target::supports_software_single_step): Define.
3156
3157 Update the derived classes and callers below.
3158
3159 * linux-low.cc (linux_target_ops): Update.
3160 (linux_supports_software_single_step): Turn into ...
3161 (linux_process_target::supports_software_single_step): ... this.
3162 * linux-low.h (class linux_process_target): Update.
3163 * lynx-low.cc (lynx_target_ops): Update.
3164 * nto-low.cc (nto_target_ops): Update.
3165 * win32-low.cc (win32_target_ops): Update.
3166
3167 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3168
3169 Turn process_stratum_target's thread_name and thread_handle ops
3170 into methods of process_target.
3171
3172 * target.h (struct process_stratum_target): Remove the target ops.
3173 (class process_target): Add the target ops.
3174 (target_thread_name): Update the macro.
3175 (target_thread_handle): Update the macro.
3176 * target.cc (process_target::thread_name): Define.
3177 (process_target::thread_handle): Define.
3178
3179 Update the derived classes and callers below.
3180
3181 * linux-low.cc (linux_target_ops): Update.
3182 (linux_process_target::thread_name): Define.
3183 (linux_process_target::thread_handle): Define.
3184 * linux-low.h (class linux_process_target): Update.
3185 * lynx-low.cc (lynx_target_ops): Update.
3186 * nto-low.cc (nto_target_ops): Update.
3187 * win32-low.cc (win32_target_ops): Update.
3188
3189 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3190
3191 Turn process_stratum_target's breakpoint_kind_from_pc,
3192 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
3193 ops into methods of process_target.
3194
3195 * target.h (struct process_stratum_target): Remove the target op.
3196 (class process_target): Add the target op.
3197 (target_breakpoint_kind_from_pc): Update the macro.
3198 (target_breakpoint_kind_from_current_state): Update the macro.
3199 (default_breakpoint_kind_from_pc): Remove declaration.
3200 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
3201 (process_target::breakpoint_kind_from_pc): ... this.
3202 (process_target::breakpoint_kind_from_current_state): Define.
3203
3204 Update the derived classes and callers below.
3205
3206 * mem-break.cc (bp_size): Update.
3207 (bp_opcode): Update.
3208 * linux-low.cc (linux_target_ops): Update.
3209 (linux_wait_1): Update.
3210 (linux_breakpoint_kind_from_pc): Turn into ...
3211 (linux_process_target::breakpoint_kind_from_pc): ... this.
3212 (linux_sw_breakpoint_from_kind): Turn into ...
3213 (linux_process_target::sw_breakpoint_from_kind): ... this.
3214 (linux_breakpoint_kind_from_current_state): Turn into ...
3215 (linux_process_target::breakpoint_kind_from_current_state): ... this.
3216 * linux-low.h (class linux_process_target): Update.
3217 * lynx-low.cc (lynx_target_ops): Update.
3218 (lynx_process_target::sw_breakpoint_from_kind): Define.
3219 * lynx-low.h (class lynx_process_target): Update.
3220 * nto-low.cc (nto_target_ops): Update.
3221 (nto_sw_breakpoint_from_kind): Turn into ...
3222 (nto_process_target::sw_breakpoint_from_kind): ... this.
3223 * nto-low.h (class nto_process_target): Update.
3224 * win32-low.cc (win32_target_ops): Update.
3225 (win32_sw_breakpoint_from_kind): Turn into ...
3226 (win32_process_target::sw_breakpoint_from_kind): ... this.
3227 * win32-low.h (class win32_process_target): Update.
3228
3229 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3230
3231 Turn process_stratum_target's multifs_open, multifs_readlink,
3232 multifs_unlink ops into methods of process_target.
3233
3234 * target.h (struct process_stratum_target): Remove the target ops.
3235 (class process_target): Add the target ops. Also add
3236 'supports_multifs'.
3237 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
3238 "sys/stat.h".
3239 (process_target::supports_multifs): Define.
3240 (process_target::multifs_open): Define.
3241 (process_target::multifs_readlink): Define.
3242 (process_target::multifs_unlink): Define.
3243
3244 Update the derived classes and callers below.
3245
3246 * hostio.cc (handle_setfs): Update.
3247 (handle_open): Update.
3248 (handle_unlink): Update.
3249 (handle_readlink): Update.
3250 * linux-low.cc (linux_target_ops): Update.
3251 (linux_process_target::supports_multifs): Define.
3252 (linux_process_target::multifs_open): Define.
3253 (linux_process_target::multifs_readlink): Define.
3254 (linux_process_target::multifs_unlink): Define.
3255 * linux-low.h (class linux_process_target): Update.
3256 * lynx-low.cc (lynx_target_ops): Update.
3257 * nto-low.cc (nto_target_ops): Update.
3258 * win32-low.cc (win32_target_ops): Update.
3259
3260 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3261
3262 Turn process_stratum_target's pid_to_exec_file op into a method
3263 of process_target.
3264
3265 * target.h (struct process_stratum_target): Remove the target op.
3266 (class process_target): Add the target op. Also add
3267 'supports_pid_to_exec_file'.
3268 * target.cc (process_target::pid_to_exec_file): Define.
3269 (process_target::supports_pid_to_exec_file): Define.
3270
3271 Update the derived classes and callers below.
3272
3273 * server.cc (handle_qxfer_exec_file): Update.
3274 (handle_query): Update.
3275 * linux-low.cc (linux_target_ops): Update.
3276 (linux_process_target::supports_pid_to_exec_file): Define.
3277 (linux_process_target::pid_to_exec_file): Define.
3278 * linux-low.h (class linux_process_target): Update.
3279 * lynx-low.cc (lynx_target_ops): Update.
3280 * nto-low.cc (nto_target_ops): Update.
3281 * win32-low.cc (win32_target_ops): Update.
3282
3283 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3284
3285 Turn process_stratum_target's supports_range_stepping op into a
3286 method of process_target.
3287
3288 * target.h (struct process_stratum_target): Remove the target op.
3289 (class process_target): Add the target op.
3290 (target_supports_range_stepping): Update the macro.
3291 * target.cc (process_target::supports_range_stepping): Define.
3292
3293 Update the derived classes and callers below.
3294
3295 * linux-low.cc (linux_target_ops): Update.
3296 (linux_supports_range_stepping): Turn into ...
3297 (linux_process_target::supports_range_stepping): ... this.
3298 * linux-low.h (class linux_process_target): Update.
3299 * lynx-low.cc (lynx_target_ops): Update.
3300 * nto-low.cc (nto_target_ops): Update.
3301 * win32-low.cc (win32_target_ops): Update.
3302
3303 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3304
3305 Turn process_stratum_target's btrace-related ops (enable_btrace,
3306 disable_btrace, read_btrace, read_btrace_conf) into methods of
3307 process_target.
3308
3309 * target.h (struct process_stratum_target): Remove the target ops.
3310 (class process_target): Add the target ops.
3311 (target_enable_btrace): Update.
3312 (target_disable_btrace): Update.
3313 (target_read_btrace): Update.
3314 (target_read_btrace_conf): Update.
3315 * target.cc (process_target::enable_btrace): Define.
3316 (process_target::disable_btrace): Define.
3317 (process_target::read_btrace): Define.
3318 (process_target::read_btrace_conf): Define.
3319
3320 Update the derived classes and callers below.
3321
3322 * linux-low.cc (linux_target_ops): Update.
3323 (linux_process_target:enable_btrace): Define as a wrapper around
3324 linux_enable_btrace.
3325 (linux_low_disable_btrace): Turn into ...
3326 (linux_process_target::disable_btrace): ... this.
3327 (linux_low_read_btrace): Turn into ...
3328 (linux_process_target::read_btrace): ... this.
3329 (linux_low_btrace_conf): Turn into ...
3330 (linux_process_target::read_btrace_conf): ... this.
3331 * linux-low.h (class linux_process_target): Update.
3332 * lynx-low.cc (lynx_target_ops): Update.
3333 * nto-low.cc (nto_target_ops): Update.
3334 * win32-low.cc (win32_target_ops): Update.
3335
3336 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3337
3338 Turn process_stratum_target's supports_agent op into a method of
3339 process_target.
3340
3341 * target.h (struct process_stratum_target): Remove the target op.
3342 (class process_target): Add the target op.
3343 (target_supports_agent): Update the macro.
3344 * target.cc (process_target::supports_agent): Define.
3345
3346 Update the derived classes and callers below.
3347
3348 * linux-low.cc (linux_target_ops): Update.
3349 (linux_supports_agent): Turn into ...
3350 (linux_process_target::supports_agent): ... this.
3351 * linux-low.h (class linux_process_target): Update.
3352 * lynx-low.cc (lynx_target_ops): Update.
3353 * nto-low.cc (nto_target_ops): Update.
3354 * win32-low.cc (win32_target_ops): Update.
3355
3356 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3357
3358 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3359 method of process_target.
3360
3361 * target.h (struct process_stratum_target): Remove the target op.
3362 (class process_target): Add the target op. Also add
3363 'supports_qxfer_libraries_svr4'.
3364 * target.cc (process_target::qxfer_libraries_svr4): Define.
3365 (process_target::supports_qxfer_libraries_svr4): Define.
3366
3367 Update the derived classes and callers below.
3368
3369 * server.cc (handle_qxfer_libraries_svr4): Update.
3370 (handle_query): Update.
3371 * linux-low.cc (linux_target_ops): Update.
3372 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3373 (linux_qxfer_libraries_svr4): Turn into ...
3374 (linux_process_target::qxfer_libraries_svr4): ... this.
3375 * linux-low.h (class linux_process_target): Update.
3376 * lynx-low.cc (lynx_target_ops): Update.
3377 * nto-low.cc (nto_target_ops): Update.
3378 * win32-low.cc (win32_target_ops): Update.
3379
3380 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3381
3382 Turn process_stratum_target's supports_disable_randomization op
3383 into a method of process_target.
3384
3385 * target.h (struct process_stratum_target): Remove the target op.
3386 (class process_target): Add the target op.
3387 (target_supports_disable_randomization): Update the macro.
3388 * target.cc (process_target::supports_disable_randomization): Define.
3389
3390 Update the derived classes and callers below.
3391
3392 * linux-low.cc (linux_target_ops): Update.
3393 (linux_supports_disable_randomization): Turn into ...
3394 (linux_process_target::supports_disable_randomization): ... this.
3395 * linux-low.h (class linux_process_target): Update.
3396 * lynx-low.cc (lynx_target_ops): Update.
3397 * nto-low.cc (nto_target_ops): Update.
3398 * win32-low.cc (win32_target_ops): Update.
3399
3400 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3401
3402 Turn process_stratum_target's emit_ops op into a method of
3403 process_target.
3404
3405 * target.h (struct process_stratum_target): Remove the target op.
3406 (class process_target): Add the target op.
3407 (target_emit_ops): Update the macro.
3408 * target.cc (process_target::emit_ops): Define.
3409
3410 Update the derived classes and callers below.
3411
3412 * linux-low.cc (linux_target_ops): Update.
3413 (linux_emit_ops): Turn into ...
3414 (linux_process_target::emit_ops): ... this.
3415 * linux-low.h (class linux_process_target): Update.
3416 * lynx-low.cc (lynx_target_ops): Update.
3417 * nto-low.cc (nto_target_ops): Update.
3418 * win32-low.cc (win32_target_ops): Update.
3419
3420 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3421
3422 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3423 and get_min_fast_tracepoint_insn_len ops into methods of
3424 process_target.
3425
3426 * target.h (struct process_stratum_target): Remove the target ops.
3427 (class process_target): Add the target ops. Also add
3428 'supports_fast_tracepoints'.
3429 (target_supports_fast_tracepoints): Update the macro.
3430 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3431 (install_fast_tracepoint_jump_pad): Update and rename the macro
3432 to ...
3433 (target_install_fast_tracepoint_jump_pad): ... this.
3434 * target.cc (process_target::supports_fast_tracepoints): Define.
3435 (process_target::install_fast_tracepoint_jump_pad): Define.
3436 (process_target::get_min_fast_tracepoint_insn_len): Define.
3437
3438 Update the derived classes and callers below.
3439
3440 * tracepoint.cc (install_fast_tracepoint): Update.
3441 * linux-low.cc (linux_target_ops): Update.
3442 (linux_process_target::supports_fast_tracepoints): Define.
3443 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3444 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3445 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3446 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3447 * linux-low.h (class linux_process_target): Update.
3448 * lynx-low.cc (lynx_target_ops): Update.
3449 * nto-low.cc (nto_target_ops): Update.
3450 * win32-low.cc (win32_target_ops): Update.
3451
3452 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3453
3454 Turn process_stratum_target's stabilize_threads op into a
3455 method of process_target.
3456
3457 * target.h (struct process_stratum_target): Remove the target op.
3458 (class process_target): Add the target op.
3459 (target_stabilize_threads): Update the macro.
3460 * target.cc (process_target::stabilize_threads): Define.
3461
3462 Update the derived classes and callers below.
3463
3464 * server.cc (handle_status): Update.
3465 * tracepoint.cc (cmd_qtdp): Update.
3466 (cmd_qtstart): Update.
3467 * linux-low.cc (linux_target_ops): Update.
3468 (linux_stabilize_threads): Turn into ...
3469 (linux_process_target::stabilize_threads): ... this.
3470 (linux_wait_1): Update.
3471 * linux-low.h (class linux_process_target): Update.
3472 * lynx-low.cc (lynx_target_ops): Update.
3473 * nto-low.cc (nto_target_ops): Update.
3474 * win32-low.cc (win32_target_ops): Update.
3475
3476 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3477
3478 Turn process_stratum_target's pause_all and unpause_all ops
3479 into methods of process_target.
3480
3481 * target.h (struct process_stratum_target): Remove the target ops.
3482 (class process_target): Add the target ops.
3483 (pause_all): Update the macro and rename to...
3484 (target_pause_all): ... this.
3485 (unpause_all): Update the macro and rename to...
3486 (target_unpause_all): ... this.
3487 * target.cc (process_target::pause_all): Define.
3488 (process_target::unpause_all): Define.
3489
3490 Update the derived classes and callers below.
3491
3492 * server.cc (handle_status): Update.
3493 * tracepoint.cc (clear_installed_tracepoints): Update.
3494 (cmd_qtdp): Update.
3495 (cmd_qtstart): Update.
3496 (stop_tracing): Update.
3497 (cmd_qtstatus): Update.
3498 (upload_fast_traceframes): Update.
3499 (run_inferior_command): Update.
3500 * linux-low.cc (linux_target_ops): Update.
3501 (linux_pause_all): Turn into ...
3502 (linux_process_target::pause_all): ... this.
3503 (linux_unpause_all): Turn into ...
3504 (linux_process_target::unpause_all): ... this.
3505 (linux_process_target::prepare_to_access_memory): Update.
3506 (linux_process_target::done_accessing_memory): Update.
3507 * linux-low.h (class linux_process_target): Update.
3508 * lynx-low.cc (lynx_target_ops): Update.
3509 * nto-low.cc (nto_target_ops): Update.
3510 * win32-low.cc (win32_target_ops): Update.
3511
3512 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3513
3514 Turn process_stratum_target's get_tib_address op into a method of
3515 process_target.
3516
3517 * target.h (struct process_stratum_target): Remove the target op.
3518 (class process_target): Add the target op. Also add
3519 'supports_get_tib_address'.
3520 * target.cc (process_target::get_tib_address): Define.
3521 (process_target::supports_get_tib_address): Define.
3522
3523 Update the derived classes and callers below.
3524
3525 * server.cc (handle_query): Update.
3526 * linux-low.cc (win32_target_ops): Update.
3527 * lynx-low.cc (lynx_target_ops): Update.
3528 * nto-low.cc (nto_target_ops): Update.
3529 * win32-low.cc (win32_target_ops): Update.
3530 (win32_process_target::supports_get_tib_address): Define.
3531 (win32_get_tib_address): Turn into ...
3532 (win32_process_target::get_tib_address): ... this.
3533 * win32-low.h (class win32_process_target): Update.
3534
3535 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3536
3537 Turn process_stratum_target's thread_stopped op into a method of
3538 process_target.
3539
3540 * target.h (struct process_stratum_target): Remove the target op.
3541 (class process_target): Add the target op. Also add
3542 'supports_thread_stopped'.
3543 (target_thread_stopped): Update the macro.
3544 * target.cc (process_target::thread_stopped): Define.
3545 (process_target::supports_thread_stopped): Define.
3546 (prepare_to_access_memory): Update.
3547
3548 Update the derived classes and callers below.
3549
3550 * server.cc (queue_stop_reply_callback): Update.
3551 * linux-low.cc (linux_target_ops): Update.
3552 (linux_process_target::supports_thread_stopped): Define.
3553 (linux_thread_stopped): Turn into ...
3554 (linux_process_target::thread_stopped): ... this.
3555 * linux-low.h (class linux_process_target): Update.
3556 * lynx-low.cc (lynx_target_ops): Update.
3557 * nto-low.cc (nto_target_ops): Update.
3558 * win32-low.cc (win32_target_ops): Update.
3559
3560 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3561
3562 Turn process_stratum_target's read_pc and write_pc ops into
3563 methods of process_target.
3564
3565 * target.h (struct process_stratum_target): Remove the target ops.
3566 (class process_target): Add the target ops.
3567 * target.cc (process_target::read_pc): Define.
3568 (process_target::write_pc): Define.
3569
3570 Update the derived classes and callers below.
3571
3572 * regcache.cc (regcache_read_pc): Update.
3573 (regcache_write_pc): Update.
3574 * linux-low.cc (linux_target_ops): Update.
3575 (linux_read_pc): Turn into ...
3576 (linux_process_target::read_pc): ... this.
3577 (linux_write_pc): Turn into ...
3578 (linux_process_target::write_pc): ... this.
3579 * linux-low.h (class linux_process_target): Update.
3580 * lynx-low.cc (lynx_target_ops): Update.
3581 * nto-low.cc (nto_target_ops): Update.
3582 * win32-low.cc (win32_target_ops): Update.
3583
3584 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3585
3586 Turn process_stratum_target's supports_tracepoints op into a
3587 method of process_target.
3588
3589 * target.h (struct process_stratum_target): Remove the target op.
3590 (class process_target): Add the target op.
3591 (target_supports_tracepoints): Update the macro.
3592 * target.cc (process_target::supports_tracepoints): Define.
3593
3594 Update the derived classes and callers below.
3595
3596 * linux-low.cc (linux_target_ops): Update.
3597 (linux_supports_tracepoints): Turn into ...
3598 (linux_process_target::supports_tracepoints): ... this.
3599 * linux-low.h (class linux_process_target): Update.
3600 * lynx-low.cc (lynx_target_ops): Update.
3601 * nto-low.cc (nto_target_ops): Update.
3602 * win32-low.cc (win32_target_ops): Update.
3603
3604 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3605
3606 Turn process_stratum_target's process_qsupported op into a method
3607 of process_target.
3608
3609 * target.h (struct process_stratum_target): Remove the target op.
3610 (class process_target): Add the target op.
3611 (target_process_qsupported): Update the macro.
3612 * target.cc (process_target::process_qsupported): Define.
3613
3614 Update the derived classes and callers below.
3615
3616 * linux-low.cc (linux_target_ops): Update.
3617 (linux_process_qsupported): Turn into ...
3618 (linux_process_target::process_qsupported): ... this.
3619 * linux-low.h (class linux_process_target): Update.
3620 * lynx-low.cc (lynx_target_ops): Update.
3621 * nto-low.cc (nto_target_ops): Update.
3622 * win32-low.cc (win32_target_ops): Update.
3623
3624 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3625
3626 Turn process_stratum_target's read_loadmap op into a method of
3627 process_target.
3628
3629 * target.h (struct process_stratum_target): Remove the target op.
3630 (class process_target): Add the target op. Also add
3631 'supports_read_loadmap'.
3632 * target.cc (process_target::read_loadmap): Define.
3633 (process_target::supports_read_loadmap): Define.
3634
3635 Update the derived classes and callers below.
3636
3637 * server.cc (handle_qxfer_fdpic): Update.
3638 (handle_query): Update.
3639 * linux-low.cc (linux_target_ops): Update.
3640 (linux_process_target::supports_read_loadmap): Define.
3641 (linux_read_loadmap): Turn into ...
3642 (linux_process_target::read_loadmap): ... this.
3643 * linux-low.h (class linux_process_target): Update.
3644 * lynx-low.cc (lynx_target_ops): Update.
3645 * nto-low.cc (nto_target_ops): Update.
3646 * win32-low.cc (win32_target_ops): Update.
3647
3648 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3649
3650 Turn process_stratum_target's core_of_thread op into a method of
3651 process_target.
3652
3653 * target.h (struct process_stratum_target): Remove the target op.
3654 (class process_target): Add the target op.
3655 (target_core_of_thread): Update the macro.
3656 * target.cc (process_target::core_of_thread): Define.
3657
3658 Update the derived classes and callers below.
3659
3660 * linux-low.cc (linux_target_ops): Update.
3661 (linux_process_target::core_of_thread): Define.
3662 * linux-low.h (class linux_process_target): Update.
3663 * lynx-low.cc (lynx_target_ops): Update.
3664 * nto-low.cc (nto_target_ops): Update.
3665 * win32-low.cc (win32_target_ops): Update.
3666
3667 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3668
3669 Turn process_stratum_target's handle_monitor_command op into a
3670 method of process_target.
3671
3672 * target.h (struct process_stratum_target): Remove the target op.
3673 (class process_target): Add the target op.
3674 (target_handle_monitor_command): Update the macro.
3675 * target.cc (process_target::handle_monitor_command): Define.
3676
3677 Update the derived classes and callers below.
3678
3679 * server.cc (handle_query): Update.
3680 * linux-low.cc (linux_target_ops): Update.
3681 (linux_process_target::handle_monitor_command): Define.
3682 * linux-low.h (class linux_process_target): Update.
3683 * lynx-low.cc (lynx_target_ops): Update.
3684 * nto-low.cc (nto_target_ops): Update.
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 handle_new_gdb_connection op into a
3690 method of process_target.
3691
3692 * target.h (struct process_stratum_target): Remove the target op.
3693 (class process_target): Add the target op.
3694 (target_handle_new_gdb_connection): Update the macro.
3695 * target.cc (process_target::handle_new_gdb_connection): Define.
3696
3697 Update the derived classes and callers below.
3698
3699 * linux-low.cc (linux_target_ops): Update.
3700 (linux_handle_new_gdb_connection): Turn into ...
3701 (linux_process_target::handle_new_gdb_connection): ... this.
3702 * linux-low.h (class linux_process_target): Update.
3703 * lynx-low.cc (lynx_target_ops): Update.
3704 * nto-low.cc (nto_target_ops): Update.
3705 * win32-low.cc (win32_target_ops): Update.
3706
3707 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3708
3709 Turn process_stratum_target's supports_fork_events,
3710 supports_vfork_events, and supports_exec_events ops into methods
3711 of process_target.
3712
3713 * target.h (struct process_stratum_target): Remove the target ops.
3714 (class process_target): Add the target ops.
3715 (target_supports_fork_events): Update the macro.
3716 (target_supports_vfork_events): Update the macro.
3717 (target_supports_exec_events): Update the macro.
3718 * target.cc (process_target::supports_fork_events): Define.
3719 (process_target::supports_vfork_events): Define.
3720 (process_target::supports_exec_events): Define.
3721
3722 Update the derived classes and callers below.
3723
3724 * linux-low.cc (linux_target_ops): Update.
3725 (linux_supports_fork_events): Turn into ...
3726 (linux_process_target::supports_fork_events): ... this.
3727 (linux_supports_vfork_events): Turn into ...
3728 (linux_process_target::supports_vfork_events): ... this.
3729 (linux_supports_exec_events): Turn into ...
3730 (linux_process_target::supports_exec_events): ... this.
3731 * linux-low.h (class linux_process_target): Update.
3732 * lynx-low.cc (lynx_target_ops): Update.
3733 * nto-low.cc (nto_target_ops): Update.
3734 * win32-low.cc (win32_target_ops): Update.
3735
3736 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3737
3738 Turn process_stratum_target's supports_multi_process op into a
3739 method of process_target.
3740
3741 * target.h (struct process_stratum_target): Remove the target op.
3742 (class process_target): Add the target op.
3743 * target.cc (process_target::supports_multi_process): Define.
3744 (target_supports_multi_process): Update.
3745
3746 Update the derived classes and callers below.
3747
3748 * linux-low.cc (linux_target_ops): Update.
3749 (linux_supports_multi_process): Turn into ...
3750 (linux_process_target::supports_multi_process): ... this.
3751 * linux-low.h (class linux_process_target): Update.
3752 * lynx-low.cc (lynx_target_ops): Update.
3753 * nto-low.cc (nto_target_ops): Update.
3754 * win32-low.cc (win32_target_ops): Update.
3755
3756 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3757
3758 Turn process_stratum_target's supports_non_stop, async, and
3759 start_non_stop ops into methods of process_target.
3760
3761 * target.h (struct process_stratum_target): Remove the target ops.
3762 (class process_target): Add the target ops.
3763 (target_supports_non_stop): Update the macro.
3764 (target_async): Update the macro.
3765 (start_non_stop): Remove declaration.
3766 * target.cc (process_target::supports_non_stop): Define.
3767 (process_target::async): Define.
3768 (process_target::start_non_stop): Define.
3769 (start_non_stop): Remove.
3770
3771 Update the derived classes and callers below.
3772
3773 * server.cc (handle_qxfer_siginfo): Update.
3774 (handle_query): Update.
3775 * linux-low.cc (linux_target_ops): Update.
3776 (linux_supports_non_stop): Turn into ...
3777 (linux_process_target::supports_non_stop): ... this.
3778 (linux_async): Turn into ...
3779 (linux_process_target::async): ... this.
3780 (linux_start_non_stop): Turn into ...
3781 (linux_process_target::start_non_stop): ... this.
3782 * linux-low.h (class linux_process_target): Update.
3783 * lynx-low.cc (lynx_target_ops): Update.
3784 * nto-low.cc (nto_target_ops): Update.
3785 (nto_supports_non_stop): Remove; rely on the default behavior
3786 instead.
3787 * win32-low.cc (win32_target_ops): Update.
3788
3789 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3790
3791 Turn process_stratum_target's qxfer_siginfo op into a method of
3792 process_target.
3793
3794 * target.h (struct process_stratum_target): Remove the target op.
3795 (class process_target): Add the target op. Also add
3796 'supports_qxfer_siginfo'.
3797 * target.cc (process_target::qxfer_siginfo): Define.
3798 (process_target::supports_qxfer_siginfo): Define.
3799
3800 Update the derived classes and callers below.
3801
3802 * server.cc (handle_qxfer_siginfo): Update.
3803 (handle_query): Update.
3804 * linux-low.cc (linux_target_ops): Update.
3805 (linux_process_target::supports_qxfer_siginfo): Define.
3806 (linux_xfer_siginfo): Turn into ...
3807 (linux_process_target::qxfer_siginfo): ... this.
3808 * linux-low.h (class linux_process_target): Update.
3809 * lynx-low.cc (lynx_target_ops): Update.
3810 * nto-low.cc (nto_target_ops): Update.
3811 * win32-low.cc (win32_target_ops): Update.
3812
3813 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3814
3815 Turn process_stratum_target's qxfer_osdata op into a method of
3816 process_target.
3817
3818 * target.h (struct process_stratum_target): Remove the target op.
3819 (class process_target): Add the target op. Also add
3820 'supports_qxfer_osdata'.
3821 * target.cc (process_target::qxfer_osdata): Define.
3822 (process_target::supports_qxfer_osdata): Define.
3823
3824 Update the derived classes and callers below.
3825
3826 * server.cc (handle_qxfer_osdata): Update.
3827 (handle_query): Update.
3828 * linux-low.cc (linux_target_ops): Update.
3829 (linux_process_target::supports_qxfer_osdata): Define.
3830 (linux_qxfer_osdata): Turn into ...
3831 (linux_process_target::qxfer_osdata): ... this.
3832 * linux-low.h (class linux_process_target): Update.
3833 * lynx-low.cc (lynx_target_ops): Update.
3834 * nto-low.cc (nto_target_ops): Update.
3835 * win32-low.cc (win32_target_ops): Update.
3836
3837 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3838
3839 Turn process_stratum_target's hostio_last_error op into a
3840 method of process_target.
3841
3842 * target.h (struct process_stratum_target): Remove the target op.
3843 (class process_target): Add the target op.
3844 * target.cc: Add "hostio.h" to includes.
3845 (process_target::hostio_last_error): Define.
3846
3847 Update the derived classes and callers below.
3848
3849 * hostio.cc (hostio_error): Update.
3850 * linux-low.cc: Remove "hostio.h" from includes.
3851 (linux_target_ops): Update.
3852 * lynx-low.cc (lynx_target_ops): Update.
3853 * nto-low.cc (nto_target_ops): Update.
3854 * win32-low.h (class win32_process_target): Update.
3855 * win32-low.cc (win32_target_ops): Update.
3856 (wince_hostio_last_error): Turn into ...
3857 (win32_process_target::hostio_last_error): ... this.
3858
3859 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3860
3861 Turn process_stratum_target's get_tls_address op into a method of
3862 process_target.
3863
3864 * target.h (struct process_stratum_target): Remove the target op.
3865 (class process_target): Add the target op. Also add
3866 'supports_get_tls_address'.
3867 * target.cc (process_target::get_tls_address): Define.
3868 (process_target::supports_get_tls_address): Define.
3869
3870 Update the derived classes and callers below.
3871
3872 * server.cc (handle_query): Update.
3873 * linux-low.cc (linux_target_ops): Update.
3874 (linux_process_target::supports_get_tls_address): Define.
3875 (linux_process_target::get_tls_address): Define.
3876 * linux-low.h (class linux_process_target): Update.
3877 * lynx-low.cc (lynx_target_ops): Update.
3878 * nto-low.cc (nto_target_ops): Update.
3879 * win32-low.cc (win32_target_ops): Update.
3880
3881 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3882
3883 Turn process_stratum_target's read_offsets op into a method of
3884 process_target.
3885
3886 * target.h (struct process_stratum_target): Remove the target op.
3887 (class process_target): Add the target op. Also add
3888 'supports_read_offsets'.
3889 * target.cc (process_target::read_offsets): Define.
3890 (process_target::supports_read_offsets): Define.
3891
3892 Update the derived classes and callers below.
3893
3894 * server.cc (handle_query): Update.
3895 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3896 (linux_target_ops): Update.
3897 (linux_process_target::supports_read_offsets): Define.
3898 (linux_read_offsets): Turn into ...
3899 (linux_process_target::read_offsets): ... this.
3900 * linux-low.h (class linux_process_target): Update.
3901 * lynx-low.cc (lynx_target_ops): Update.
3902 * nto-low.cc (nto_target_ops): Update.
3903 * win32-low.cc (win32_target_ops): Update.
3904
3905 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3906
3907 Turn process_stratum_target's stopped_by_watchpoint and
3908 stopped_data_address ops into methods of process_target.
3909
3910 * target.h (struct process_stratum_target): Remove the target ops.
3911 (class process_target): Add the target ops.
3912 * target.cc (process_target::stopped_by_watchpoint): Define.
3913 (process_target::stopped_data_address): Define.
3914
3915 Update the derived classes and callers below.
3916
3917 * remote-utils.cc (prepare_resume_reply): Update.
3918 * linux-low.cc (linux_target_ops): Update.
3919 (linux_stopped_by_watchpoint): Turn into ...
3920 (linux_process_target::stopped_by_watchpoint): ... this.
3921 (linux_stopped_data_address): Turn into ...
3922 (linux_process_target::stopped_data_address): ... this.
3923 * linux-low.h (class linux_process_target): Update.
3924 * lynx-low.cc (lynx_target_ops): Update.
3925 * nto-low.cc (nto_target_ops): Update.
3926 (nto_stopped_by_watchpoint): Turn into ...
3927 (nto_process_target::stopped_by_watchpoint): ... this.
3928 (nto_stopped_data_address): Turn into ...
3929 (nto_process_target::stopped_data_address): ... this.
3930 * nto-low.h (class nto_process_target): Update.
3931 * win32-low.cc (win32_target_ops): Update.
3932 (win32_stopped_by_watchpoint): Turn into ...
3933 (win32_process_target::stopped_by_watchpoint): ... this.
3934 (win32_stopped_data_address): Turn into ...
3935 (win32_process_target::stopped_data_address): ... this.
3936 * win32-low.h (class win32_process_target): Update.
3937
3938 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3939
3940 Turn process_stratum_target's supports_hardware_single_step op into
3941 a method of process_target.
3942
3943 * target.h (struct process_stratum_target): Remove the target op.
3944 (class process_target): Add the target op.
3945 (target_supports_hardware_single_step): Update the macro.
3946 (target_can_do_hardware_single_step): Remove declaration.
3947 * target.cc (process_target::supports_hardware_single_step): Define.
3948 (target_can_do_hardware_single_step): Remove.
3949
3950 Update the derived classes and callers below.
3951
3952 * linux-low.h (class linux_process_target): Update.
3953 * linux-low.cc (linux_target_ops): Update.
3954 (linux_supports_hardware_single_step): Turn into ...
3955 (linux_process_target::supports_hardware_single_step): ... this.
3956 * lynx-low.h (class lynx_process_target): Update.
3957 * lynx-low.cc (lynx_target_ops): Update.
3958 (lynx_process_target::supports_hardware_single_step): Define.
3959 * nto-low.h (class nto_process_target): Update.
3960 * nto-low.cc (nto_target_ops): Update.
3961 (nto_process_target::supports_hardware_single_step): Define.
3962 * win32-low.h (class win32_process_target): Update.
3963 * win32-low.cc (win32_target_ops): Update.
3964 (win32_process_target::supports_hardware_single_step): Define.
3965
3966 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3967
3968 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3969 ops into methods of process_target.
3970
3971 * target.h (struct process_stratum_target): Remove the target ops.
3972 (class process_target): Add the target ops.
3973 (target_stopped_by_hw_breakpoint): Update the macro.
3974 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3975 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3976 (process_target::supports_stopped_by_hw_breakpoint): Define.
3977
3978 Update the derived classes and callers below.
3979
3980 * linux-low.cc (linux_target_ops): Update.
3981 (linux_stopped_by_hw_breakpoint): Turn into ...
3982 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3983 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3984 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3985 * linux-low.h (class linux_process_target): Update.
3986 * lynx-low.cc (lynx_target_ops): Update.
3987 * nto-low.cc (nto_target_ops): Update.
3988 * win32-low.cc (win32_target_ops): Update.
3989
3990 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3991
3992 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3993 ops into methods of process_target.
3994
3995 * target.h (struct process_stratum_target): Remove the target ops.
3996 (class process_target): Add the target ops.
3997 (target_stopped_by_sw_breakpoint): Update the macro.
3998 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3999 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
4000 (process_target::supports_stopped_by_sw_breakpoint): Define.
4001
4002 Update the derived classes and callers below.
4003
4004 * linux-low.cc (linux_target_ops): Update.
4005 (linux_stopped_by_sw_breakpoint): Turn into ...
4006 (linux_process_target::stopped_by_sw_breakpoint): ... this.
4007 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
4008 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
4009 * linux-low.h (class linux_process_target): Update.
4010 * lynx-low.cc (lynx_target_ops): Update.
4011 * nto-low.cc (nto_target_ops): Update.
4012 * win32-low.cc (win32_target_ops): Update.
4013
4014 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4015
4016 Turn process_stratum_target's insert_point and remove_point ops
4017 into methods of process_target.
4018
4019 * target.h (struct process_stratum_target): Remove the target ops.
4020 (class process_target): Add the target ops.
4021 * target.cc (process_target::insert_point): Define.
4022 (process_target::remove_point): Define.
4023
4024 Update the derived classes and callers below.
4025
4026 * mem-break.cc (set_raw_breakpoint_at): Update.
4027 (delete_raw_breakpoint): Update.
4028 (uninsert_raw_breakpoint): Update.
4029 (reinsert_raw_breakpoint): Update.
4030 * linux-low.cc (linux_target_ops): Update.
4031 (linux_insert_point): Turn into ...
4032 (linux_process_target::insert_point): ... this.
4033 (linux_remove_point): Turn into ...
4034 (linux_process_target::remove_point): ... this.
4035 * linux-low.h (class linux_process_target): Update.
4036 * lynx-low.cc (lynx_target_ops): Update.
4037 * nto-low.cc (nto_target_ops): Update.
4038 (nto_insert_point): Turn into ...
4039 (nto_process_target::insert_point): ... this.
4040 (nto_remove_point): Turn into ...
4041 (nto_process_target::remove_point): ... this.
4042 * nto-low.h (class nto_process_target): Update.
4043 * win32-low.cc (win32_target_ops): Update.
4044 (win32_insert_point): Turn into ...
4045 (win32_process_target::insert_point): ... this.
4046 (win32_remove_point): Turn into ...
4047 (win32_process_target::remove_point): ... this.
4048 * win32-low.h (class win32_process_target): Update.
4049
4050 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4051
4052 Turn process_stratum_target's supports_z_point_type op into a
4053 method of process_target.
4054
4055 * target.h (struct process_stratum_target): Remove the target op.
4056 (class process_target): Add the target op.
4057 * target.cc (process_target::supports_z_point_type): Define.
4058
4059 Update the derived classes and callers below.
4060
4061 * mem-break.cc (z_type_supported): Update.
4062 * linux-low.cc (linux_target_ops): Update.
4063 (linux_supports_z_point_type): Turn into ...
4064 (linux_process_target::supports_z_point_type): ... this.
4065 * linux-low.h (class linux_process_target): Update.
4066 * lynx-low.cc (lynx_target_ops): Update.
4067 * nto-low.cc (nto_target_ops): Update.
4068 (nto_supports_z_point_type): Turn into ...
4069 (nto_process_target::supports_z_point_type): ... this.
4070 * nto-low.h (class nto_process_target): Update.
4071 * win32-low.cc (win32_target_ops): Update.
4072 (win32_supports_z_point_type): Turn into ...
4073 (win32_process_target::supports_z_point_type): ... this.
4074 * win32-low.h (class win32_process_target): Update.
4075
4076 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4077
4078 Turn process_stratum_target's read_auxv op into a method of
4079 process_target.
4080
4081 * target.h (class process_stratum_target): Remove the target op.
4082 (struct process_target): Add the target op. Also add
4083 'supports_read_auxv'.
4084 * target.cc (process_target::read_auxv): Define.
4085 (process_target::supports_read_auxv): Define.
4086
4087 Update the derived classes and callers below.
4088
4089 * server.cc (handle_qxfer_auxv): Update.
4090 (handle_query): Update.
4091 * linux-low.cc (linux_target_ops): Update.
4092 (linux_process_target::supports_read_auxv): Define.
4093 (linux_read_auxv): Turn into ...
4094 (linux_process_target::read_auxv): ... this.
4095 * linux-low.h (class linux_process_target): Update.
4096 * lynx-low.cc (lynx_target_ops): Update.
4097 * nto-low.cc (nto_target_ops): Update.
4098 (nto_process_target::supports_read_auxv): Define.
4099 (nto_read_auxv): Turn into ...
4100 (nto_process_target::read_auxv): ... this.
4101 * nto-low.h (class nto_process_target): Update.
4102 * win32-low.cc (win32_target_ops): Update.
4103
4104 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4105
4106 Turn process_stratum_target's request_interrupt op into a method of
4107 process_target.
4108
4109 * target.h (struct process_stratum_target): Remove the target op.
4110 (class process_target): Add the target op.
4111
4112 Update the derived classes and callers below.
4113
4114 * remote-utils.cc (putpkt_binary_1): Update.
4115 (input_interrupt): Update.
4116 (getpkt): Update.
4117 * server.cc (handle_v_requests): Update.
4118 * linux-low.cc (linux_target_ops): Update.
4119 (linux_request_interrupt): Turn into ...
4120 (linux_process_target::request_interrupt): ... this.
4121 * linux-low.h (class linux_process_target): Update.
4122 * lynx-low.cc (lynx_target_ops): Update.
4123 (lynx_request_interrupt): Turn into ...
4124 (lynx_process_target::request_interrupt): ... this.
4125 * lynx-low.h (class lynx_process_target): Update.
4126 * nto-low.cc (nto_target_ops): Update.
4127 (nto_request_interrupt): Turn into ...
4128 (nto_process_target::request_interrupt): ... this.
4129 * nto-low.h (class nto_process_target): Update.
4130 * win32-low.cc (win32_target_ops): Update.
4131 (win32_request_interrupt): Turn into ...
4132 (win32_process_target::request_interrupt): ... this.
4133 * win32-low.h (class win32_process_target): Update.
4134
4135 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4136
4137 Turn process_stratum_target's look_up_symbols op into a method of
4138 process_target.
4139
4140 * target.h (struct process_stratum_target): Remove the target op.
4141 (class process_target): Add the target op.
4142 * target.cc (process_target::look_up_symbols): Define.
4143
4144 Update the derived classes and callers below.
4145
4146 * server.cc (handle_query): Update.
4147 * linux-low.cc (linux_target_ops): Update.
4148 (linux_look_up_symbols): Turn into ...
4149 (linux_process_target::look_up_symbols): ... this.
4150 * linux-low.h (class linux_process_target): Update.
4151 * lynx-low.cc (lynx_target_ops): Update.
4152 * nto-low.cc (nto_target_ops): Update.
4153 * win32-low.cc (win32_target_ops): Update.
4154
4155 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4156
4157 Turn process_stratum_target's read_memory and write_memory
4158 ops into methods of process_target.
4159
4160 * target.h (struct process_stratum_target): Remove the target ops.
4161 (class process_target): Add the target ops.
4162
4163 Update the derived classes and callers below.
4164
4165 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
4166 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
4167 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
4168 (arm_get_syscall_trapinfo): Update.
4169 * linux-cris-low.cc (cris_breakpoint_at): Update.
4170 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
4171 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
4172 * linux-mips-low.cc (mips_breakpoint_at): Update.
4173 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
4174 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
4175 * linux-sh-low.cc (sh_breakpoint_at): Update.
4176 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
4177 (sparc_store_gregset_from_stack): Update.
4178 (sparc_breakpoint_at): Update.
4179 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
4180 * linux-tile-low.cc (tile_breakpoint_at): Update.
4181 * linux-x86-low.cc (x86_breakpoint_at): Update.
4182 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
4183 * mem-brea.cc (insert_memory_breakpoint): Update.
4184 (validate_inserted_breakpoint): Update.
4185 * target.cc (read_inferior_memory): Update.
4186 (target_write_memory): Update.
4187 * linux-low.cc (linux_target_ops): Update.
4188 (linux_read_memory): Make a wrapper around the read_memory target
4189 op call.
4190 (linux_process_target::read_memory): Rename from linux_read_memory.
4191 (linux_write_memory): Turn into ...
4192 (linux_process_target::write_memory): ... this.
4193 * linux-low.h (class linux_process_target): Update.
4194 * lynx-low.cc (lynx_target_ops): Update.
4195 (lynx_read_memory): Turn into ...
4196 (lynx_process_target::read_memory): ... this.
4197 (lynx_write_memory): Turn into ...
4198 (lynx_process_target::write_memory): ... this.
4199 * lynx-low.h (class lynx_process_target): Update.
4200 * nto-low.cc (nto_target_ops): Update.
4201 (nto_read_memory): Turn into ...
4202 (nto_process_target::read_memory): ... this.
4203 (nto_write_memory): Turn into ...
4204 (nto_process_target::write_memory): ... this.
4205 * nto-low.h (class nto_process_target): Update.
4206 * win32-low.cc (win32_target_ops): Update.
4207 (win32_read_inferior_memory): Turn into ...
4208 (win32_process_target::read_memory): ... this.
4209 (win32_write_inferior_memory): Turn into ...
4210 (win32_process_target::write_memory): ... this.
4211 * win32-low.h (class win32_process_target): Update.
4212
4213 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4214
4215 Turn process_stratum_target's prepare_to_access_memory and
4216 done_accessing_memory ops into methods of process_target.
4217
4218 * target.h (struct process_stratum_target): Remove the target ops.
4219 (class process_target): Add the target ops.
4220 * target.cc (process_target::prepare_to_access_memory): Define.
4221 (process_target::done_accessing_memory): Define.
4222 (prepare_to_access_memory): Update.
4223 (done_accessing_memory): Update.
4224
4225 Update the derived classes and callers below.
4226
4227 * linux-low.cc (linux_target_ops): Update.
4228 (linux_prepare_to_access_memory): Turn into ...
4229 (linux_process_target::prepare_to_access_memory): ... this.
4230 (linux_done_accessing_memory): Turn into ...
4231 (linux_process_target::done_accessing_memory): ... this.
4232 * linux-low.h (class linux_process_target): Update.
4233 * lynx-low.cc (lynx_target_ops): Update.
4234 * nto-low.cc (nto_target_ops): Update.
4235 * win32-low.cc (win32_target_ops): Update.
4236
4237 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4238
4239 Turn process_stratum_target's fetch_registers and store_registers
4240 ops into methods of process_target.
4241
4242 * target.h (struct process_stratum_target): Remove the target ops.
4243 (class process_target): Add the target ops.
4244 (fetch_inferior_registers): Update the macro.
4245 (store_inferior_registers): Update the macro.
4246
4247 Update the derived classes and callers below.
4248
4249 * linux-low.cc (linux_target_ops): Update.
4250 (linux_fetch_registers): Turn into ...
4251 (linux_process_target::fetch_registers): ... this.
4252 (linux_store_registers): Turn into ...
4253 (linux_process_target::store_registers): ... this.
4254 * linux-low.h (class linux_process_target): Update.
4255 * lynx-low.cc (lynx_target_ops): Update.
4256 (lynx_fetch_registers): Turn into ...
4257 (lynx_process_target::fetch_registers): ... this.
4258 (lynx_store_registers): Turn into ...
4259 (lynx_process_target::store_registers): ... this.
4260 * lynx-low.h (class lynx_process_target): Update.
4261 * nto-low.cc (nto_target_ops): Update.
4262 (nto_fetch_registers): Turn into ...
4263 (nto_process_target::fetch_registers): ... this.
4264 (nto_store_registers): Turn into ...
4265 (nto_process_target::store_registers): ... this.
4266 * nto-low.h (class nto_process_target): Update.
4267 * win32-low.cc (win32_target_ops): Update.
4268 (win32_fetch_inferior_registers): Turn into ...
4269 (win32_process_target::fetch_registers): ... this.
4270 (win32_store_inferior_registers): Turn into ...
4271 (win32_process_target::store_registers): ... this.
4272 * win32-low.h (class win32_process_target): Update.
4273
4274 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4275
4276 Turn process_stratum_target's wait op into a method of
4277 process_target.
4278
4279 * target.h (struct process_stratum_target): Remove the target op.
4280 (class process_target): Add the target op.
4281
4282 Update the derived classes and callers below.
4283
4284 * target.cc (target_wait): Update.
4285 * linux-low.cc (linux_target_ops): Update.
4286 (linux_wait): Turn into ...
4287 (linux_process_target::wait): ... this.
4288 * linux-low.h (class linux_process_target): Update.
4289 * lynx-low.cc (lynx_target_ops): Update.
4290 (lynx_wait): Turn into ...
4291 (lynx_process_target::wait): ... this.
4292 * lynx-low.h (class lynx_process_target): Update.
4293 * nto-low.cc (nto_target_ops): Update.
4294 (nto_wait): Turn into ...
4295 (nto_process_target::wait): ... this.
4296 * nto-low.h (class nto_process_target): Update.
4297 * win32-low.cc (win32_target_ops): Update.
4298 (win32_wait): Turn into ...
4299 (win32_process_target::wait): ... this.
4300 (do_initial_child_stuff): Update.
4301 * win32-low.h (class win32_process_target): Update.
4302
4303 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4304
4305 Turn process_stratum_target's resume op into a method of
4306 process_target.
4307
4308 * target.h (struct process_stratum_target): Remove the target op.
4309 (class process_target): Add the target op.
4310
4311 Update the derived classes and callers below.
4312
4313 * server.cc (resume): Update.
4314 * target.cc (target_stop_and_wait): Update.
4315 (target_continue_no_signal): Update.
4316 (target_continue): Update.
4317 * linux-low.cc (linux_target_ops): Update.
4318 (linux_resume): Turn into ...
4319 (linux_process_target::resume): ... this.
4320 * linux-low.h (class linux_process_target): Update.
4321 * lynx-low.cc (lynx_target_ops): Update.
4322 (lynx_resume): Turn into ...
4323 (lynx_process_target::resume): ... this.
4324 * lynx-low.h (class lynx_process_target): Update.
4325 * nto-low.cc (nto_target_ops): Update.
4326 (nto_resume): Turn into ...
4327 (nto_process_target::resume): ... this.
4328 * nto-low.h (class nto_process_target): Update.
4329 * win32-low.cc (win32_target_ops): Update.
4330 (win32_resume): Turn into ...
4331 (win32_process_target::resume): ... this.
4332 (win32_process_target::detach): Update.
4333 (do_initial_child_stuff): Update.
4334 * win32-low.h (class win32_process_target): Update.
4335
4336 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4337
4338 Turn process_stratum_target's thread_alive op into a method of
4339 process_target.
4340
4341 * target.h (struct process_stratum_target): Remove the target op.
4342 (class process_target): Add the target op.
4343 (mythread_alive): Update the macro.
4344
4345 Update the derived classes and callers below.
4346
4347 * linux-low.cc (linux_target_ops): Update.
4348 (linux_thread_alive): Turn into ...
4349 (linux_process_target::thread_alive): ... this.
4350 (wait_for_sigstop): Update.
4351 * linux-low.h (class linux_process_target): Update.
4352 * lynx-low.cc (lynx_target_ops): Update.
4353 (lynx_thread_alive): Turn into ...
4354 (lynx_process_target::thread_alive): ... this.
4355 * lynx-low.h (class lynx_process_target): Update.
4356 * nto-low.cc (nto_target_ops): Update.
4357 (nto_thread_alive): Turn into ...
4358 (nto_process_target::thread_alive): ... this.
4359 * nto-low.h (class nto_process_target): Update.
4360 * win32-low.cc (win32_target_ops): Update.
4361 (win32_thread_alive): Turn into ...
4362 (win32_process_target::thread_alive): ... this.
4363 * win32-low.h (class win32_process_target): Update.
4364
4365 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4366
4367 Turn process_stratum_target's join op into a method of
4368 process_target.
4369
4370 * target.h (struct process_stratum_target): Remove the target op.
4371 (class process_target): Add the target op.
4372 (join_inferior): Update the macro.
4373
4374 Update the derived classes and callers below.
4375
4376 * linux-low.cc (linux_target_ops): Update.
4377 (linux_join): Turn into ...
4378 (linux_process_target::join): ... this.
4379 * linux-low.h (class linux_process_target): Update.
4380 * lynx-low.cc (lynx_target_ops): Update.
4381 (lynx_join): Turn into ...
4382 (lynx_process_target::join): ... this.
4383 * lynx-low.h (class lynx_process_target): Update.
4384 * nto-low.cc (nto_target_ops): Update.
4385 (nto_process_target::join): Define.
4386 * nto-low.h (class nto_process_target): Update.
4387 * win32-low.cc (win32_target_ops): Update.
4388 (win32_join): Turn into ...
4389 (win32_process_target::join): ... this.
4390 * win32-low.h (class win32_process_target): Update.
4391
4392 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4393
4394 Turn process_stratum_target's mourn op into a method of
4395 process_target.
4396
4397 * target.h (struct process_stratum_target): Remove the target op.
4398 (class process_target): Add the target op.
4399
4400 Update the derived classes and callers below.
4401
4402 * target.cc (target_mourn_inferior): Update.
4403 * linux-low.cc (linux_target_ops): Update.
4404 (linux_mourn): Turn into ...
4405 (linux_process_target::mourn): ... this.
4406 (handle_extended_wait): Update.
4407 (linux_process_target::kill): Update.
4408 (linux_process_target::detach): Update.
4409 * linux-low.h (class linux_process_target): Update.
4410 * lynx-low.cc (lynx_target_ops): Update.
4411 (lynx_mourn): Turn into ...
4412 (lynx_process_target::mourn): ... this.
4413 * lynx-low.h (class lynx_process_target): Update.
4414 * nto-low.cc (nto_target_ops): Update.
4415 (nto_mourn): Turn into ...
4416 (nto_process_target::mourn): ... this.
4417 * nto-low.h (class nto_process_target): Update.
4418 * win32-low.cc (win32_target_ops): Update.
4419 (win32_mourn): Turn into ...
4420 (win32_process_target::mourn): ... this.
4421 * win32-low.h (class win32_process_target): Update.
4422
4423 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4424
4425 Turn process_stratum_target's detach op into a method of
4426 process_target.
4427
4428 * target.h (struct process_stratum_target): Remove the target op.
4429 (class process_target): Add the target op.
4430 (detach_inferior): Update the macro.
4431
4432 Update the derived classes and callers below.
4433
4434 * linux-low.cc (linux_target_ops): Update.
4435 (linux_detach): Turn into ...
4436 (linux_process_target::detach): ... this.
4437 * linux-low.h (class linux_process_target): Update.
4438 * lynx-low.cc (lynx_target_ops): Update.
4439 (lynx_detach): Turn into ...
4440 (lynx_process_target::detach): ... this.
4441 * lynx-low.h (class lynx_process_target): Update.
4442 * nto-low.cc (nto_target_ops): Update.
4443 (nto_detach): Turn into ...
4444 (nto_process_target::detach): ... this.
4445 * nto-low.h (class nto_process_target): Update.
4446 * win32-low.cc (win32_target_ops): Update.
4447 (win32_detach): Turn into ...
4448 (win32_process_target::detach): ... this.
4449 * win32-low.h (class win32_process_target): Update.
4450
4451 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4452
4453 Turn process_stratum_target's kill op into a method of
4454 process_target.
4455
4456 * target.h (struct process_stratum_target): Remove the target op.
4457 (class process_target): Add the target op.
4458
4459 Update the derived classes and callers below.
4460
4461 * target.cc (kill_inferior): Update.
4462 * linux-low.cc (linux_target_ops): Update.
4463 (linux_kill): Turn into ...
4464 (linux_process_target::kill): ... this.
4465 * linux-low.h (class linux_process_target): Update.
4466 * lynx-low.cc (lynx_target_ops): Update.
4467 (lynx_kill): Turn into ...
4468 (lynx_process_target::kill): ... this.
4469 * lynx-low.h (class lynx_process_target): Update.
4470 * nto-low.cc (nto_target_ops): Update.
4471 (nto_kill): Turn into ...
4472 (nto_process_target::kill): ... this.
4473 * nto-low.h (class nto_process_target): Update.
4474 * win32-low.cc (win32_target_ops): Update.
4475 (win32_kill): Turn into ...
4476 (win32_process_target::kill): ... this.
4477 * win32-low.h (class win32_process_target): Update.
4478
4479 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4480
4481 Turn process_stratum_target's attach op into a method of
4482 process_target.
4483
4484 * target.h (struct process_stratum_target): Remove the target op.
4485 (class process_target): Add the target op.
4486 (myattach): Update the macro.
4487
4488 Update the derived classes and callers below.
4489
4490 * linux-low.cc (linux_target_ops): Update.
4491 (linux_attach): Turn into ...
4492 (linux_process_target::attach): ... this.
4493 * linux-low.h (class linux_process_target): Update.
4494 * lynx-low.cc (lynx_target_ops): Update.
4495 (lynx_attach): Turn into ...
4496 (lynx_process_target::attach): ... this.
4497 * lynx-low.h (class lynx_process_target): Update.
4498 * nto-low.cc (nto_target_ops): Update.
4499 (nto_attach): Turn into ...
4500 (nto_process_target::attach): ... this.
4501 * nto-low.h (class nto_process_target): Update.
4502 * win32-low.cc (win32_target_ops): Update.
4503 (win32_attach): Turn into ...
4504 (win32_process_target::attach): ... this.
4505 * win32-low.h (class win32_process_target): Update.
4506
4507 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4508
4509 Turn process_stratum_target's post_create_inferior op into a method
4510 of process_target.
4511
4512 * target.h (struct process_stratum_target): Remove the target op.
4513 (class process_target): Add the target op.
4514 (target_post_create_inferior): Update the macro.
4515 * target.cc (process_target::post_create_inferior): Define.
4516
4517 Update the derived classes and callers below.
4518
4519 * linux-low.cc (linux_target_ops): Update.
4520 (linux_post_create_inferior): Turn into ...
4521 (linux_process_target::post_create_inferior): ... this.
4522 * linux-low.h (class linux_process_target): Update.
4523 * lynx-low.cc (lynx_target_ops): Update.
4524 * nto-low.cc (nto_target_ops): Update.
4525 * win32-low.cc (win32_target_ops): Update.
4526
4527 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4528
4529 Turn process_stratum_target's create_inferior op into a method of
4530 process_target.
4531
4532 * target.h (struct process_stratum_target): Remove the target op.
4533 (class process_target): Add the target op.
4534 (create_inferior): Rename the macro to ...
4535 (target_create_inferior): ... this.
4536
4537 Update the derived classes and callers below.
4538
4539 * server.cc (handle_v_run): Update.
4540 (captured_main): Update.
4541 (process_serial_event): Update.
4542 * linux-low.cc (linux_target_ops): Update.
4543 (linux_create_inferior): Turn into ...
4544 (linux_process_target::create_inferior): ... this.
4545 * linux-low.h (class linux_process_target): Update.
4546 * lynx-low.cc (lynx_target_ops): Update.
4547 (lynx_create_inferior): Turn into ...
4548 (lynx_process_target::create_inferior): ... this.
4549 * lynx-low.h (class lynx_process_target): Update.
4550 * nto-low.cc (nto_target_ops): Update.
4551 (nto_create_inferior): Turn into ...
4552 (nto_process_target::create_inferior): ... this.
4553 * nto-low.h (class nto_process_target): Update.
4554 * win32-low.cc (win32_target_ops): Update.
4555 (win32_create_inferior): Turn into ...
4556 (win32_process_target::create_inferior): ... this.
4557 * win32-low.h (class win32_process_target): Update.
4558
4559 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4560
4561 * target.h (class process_target): New class definition.
4562 (struct process_stratum_target) <pt>: New field with type
4563 'process_target*'.
4564 * linux-low.h (class linux_process_target): Define as a derived
4565 class of 'process_target'.
4566 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4567 as the 'pt' field.
4568 * lynx-low.h (class lynx_process_target): Define as a derived
4569 class of 'process_target'.
4570 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4571 as the 'pt' field.
4572 * nto-low.h (class nto_process_target): Define as a derived
4573 class of 'process_target'.
4574 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4575 as the 'pt' field.
4576 * win32-low.h (class win32_process_target): Define as a derived
4577 class of 'process_target'.
4578 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4579 as the 'pt' field.
4580
4581 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4582
4583 * configure: Regenerate.
4584
4585 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4586 Andrew Burgess <andrew.burgess@embecosm.com>
4587
4588 * linux-riscv-low.cc: New file.
4589 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4590 and nat/riscv-linux-tdesc.c.
4591 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4592 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4593 Define.
4594
4595 2020-02-14 Tom Tromey <tom@tromey.com>
4596
4597 * acinclude.m4: Don't include acx_configure_dir.m4.
4598 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4599 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4600 (all, install-only, uninstall, clean-info, clean)
4601 (maintainer-clean): Don't recurse.
4602 (subdir_do, all-lib): Remove.
4603 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4604 (GNULIB_H): Remove.
4605 (generated_files): Update.
4606 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4607 * configure: Rebuild.
4608 * configure.ac: Don't configure gnulib or libiberty.
4609 (GNULIB): Update.
4610
4611 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4612
4613 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4614 preparing the command line for CreateProcess.
4615 (win32_create_inferior): Reflect the program name in debugging
4616 output that shows the process and its command line.
4617
4618 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4619
4620 * Makefile.in: Rename source files from .c to .cc.
4621 * %.c: Rename to %.cc.
4622 * configure.ac: Rename server.c to server.cc.
4623 * configure: Re-generate.
4624
4625 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4626
4627 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4628
4629 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4630
4631 * win32-low.c (win32_create_inferior): Set signal_pid.
4632
4633 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4634 Pedro Alves <palves@redhat.com>
4635
4636 Skip building gdbserver in a cross-configuration.
4637 * configure.srv: Set $gdbserver_host depending on whether $target
4638 is $host. Use $gdbserver_host instead of $host.
4639
4640 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4641
4642 * configure: Re-generate.
4643
4644 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4645
4646 * configure: Re-generate.
4647
4648 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4649
4650 * acinclude.m4: Update warning.m4 path.
4651
4652 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4653
4654 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4655 (handle_exception): Set siginfo_er.
4656 (win32_xfer_siginfo): New function.
4657
4658 2020-02-07 Tom Tromey <tom@tromey.com>
4659 Pedro Alves <palves@redhat.com>
4660
4661 * README: Update build documentation.
4662 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4663 host, not target.
4664 * configure.ac: Update paths.
4665 * configure: Rebuild.
4666 * acinclude.m4: Update paths.
4667 * Makefile.in: Update include paths.
4668 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4669 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4670 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4671 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4672 (%-generated.c): Update paths.
4673 * Move entire directory from ../gdb/gdbserver.
4674
4675 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4676
4677 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4678
4679 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4680
4681 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4682 assignment instead of srv_linux_obj.
4683
4684 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4685
4686 * server.c (handle_qxfer_libraries): Write segment-address with
4687 paddress.
4688
4689 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4690
4691 * Makefile.in (install-strip): New target.
4692 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4693 * aclocal.m4: Regenerate.
4694 * configure: Regenerate.
4695 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4696
4697 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4698
4699 * Makefile.in (SFILES): Adjust paths to point to real files.
4700 (OBS): Move waitstatus.o to target/waitstatus.o.
4701 (TAGS): Transform paths appropriately.
4702 (%.o): Rename to...
4703 (nat/%.o): ... this pattern rule.
4704 (%.o): Rename to...
4705 (target/%.o): ... this pattern rule.
4706 * configure.srv: Adjust paths throughout to include nat/ prefix
4707 with the revant files.
4708 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4709 * configure: Regenerate.
4710
4711 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4712
4713 * Makefile.in (TAGS): Remove config files from the recipe.
4714
4715 2020-01-14 Tom Tromey <tom@tromey.com>
4716
4717 * configure: Rebuild.
4718 * configure.ac: Remove any checks that were added to common.m4.
4719 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4720 lib-link.m4.
4721
4722 2020-01-14 Tom Tromey <tom@tromey.com>
4723
4724 * server.h: Include config.h.
4725 * gdbreplay.c: Include config.h.
4726 * configure: Rebuild.
4727 * configure.ac: Don't source common.host.
4728 * acinclude.m4: Update path.
4729 * Makefile.in (INCSUPPORT): New variable.
4730 (INCLUDE_CFLAGS): Add INCSUPPORT.
4731 (SFILES): Update paths.
4732 (version-generated.c): Update path to create-version.sh.
4733 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4734
4735 2020-01-14 Tom Tromey <tom@tromey.com>
4736
4737 * configure.ac (LIBS): Use WIN32APILIBS.
4738 (USE_WIN32API): Don't define.
4739 * configure: Rebuild.
4740
4741 2020-01-14 Tom Tromey <tom@tromey.com>
4742
4743 * configure: Rebuild.
4744
4745 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4746
4747 * Makefile.in (%-generated.c): Remove rule for files from
4748 regformats/i386.
4749
4750 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4751
4752 * configure: Re-generate.
4753
4754 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4755
4756 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4757 Define to static.
4758 * tracepoint.c (stop_tracing, flush_trace_buffer,
4759 about_to_request_buffer_space, get_trace_state_variable_value,
4760 set_trace_state_variable_value, gdb_collect): Add declaration.
4761
4762 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4763
4764 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4765 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4766 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4767 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4768 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4769 static.
4770
4771 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4772
4773 * inferiors.c: Include gdbsupport/common-inferior.h.
4774
4775 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4776
4777 * hostio-errno.c: Include hostio.h.
4778
4779 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4780
4781 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4782 prerequisite.
4783
4784 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4785
4786 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4787 * linux-arm-tdesc.h: Include arch/arm.h.
4788
4789 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4790
4791 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4792
4793 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4794
4795 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4796 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4797
4798 2020-01-10 Pedro Alves <palves@redhat.com>
4799
4800 * fork-child.c (post_fork_inferior): Pass target down to
4801 startup_inferior.
4802 * inferiors.c (switch_to_thread): Add process_stratum_target
4803 parameter.
4804 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4805 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4806 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4807 * remote-utils.c (prepare_resume_reply): Pass the target to
4808 switch_to_thread.
4809 * target.c (the_target): Now a process_stratum_target.
4810 (done_accessing_memory): Pass the target to switch_to_thread.
4811 (set_target_ops): Ajust to use process_stratum_target.
4812 * target.h (struct target_ops): Rename to ...
4813 (struct process_stratum_target): ... this.
4814 (the_target, set_target_ops): Adjust.
4815 (prepare_to_access_memory): Adjust comment.
4816 * win32-low.c (child_xfer_memory): Adjust to use
4817 process_stratum_target.
4818 (win32_target_ops): Now a process_stratum_target.
4819
4820 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4821 Pedro Alves <palves@redhat.com>
4822
4823 * win32-low.c (get_child_debug_event): Extract the fatal exception
4824 from the exit status and convert to the equivalent Posix signal
4825 number.
4826 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4827 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4828
4829 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4830
4831 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4832
4833 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4834
4835 * server.c (gdbserver_version): Change copyright year to 2020.
4836 * gdbreplay.c (gdbreplay_version): Likewise.
4837
4838 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4839
4840 * configure: Regenerate.
4841 * configure.ac: Quote variable arguments of test.
4842
4843 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4844
4845 * Makefile.in: Fix build with GNU Make 3.81
4846
4847 2019-12-16 Tom Tromey <tromey@adacore.com>
4848
4849 * server.c (get_exec_file): Constify result.
4850
4851 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4852
4853 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4854 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4855 * config.in: Regenerate.
4856 * configure: Regenerate.
4857 * configure.ac: Don't check for strerror.
4858 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4859 Call safe_strerror instead of strerror.
4860 * server.h (strerror): Remove this now-unnecessary declaration.
4861 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4862 strerror.
4863 (gdb_agent_helper_thread): Likewise.
4864 * utils.c (perror_with_name): Likewise.
4865
4866 2019-11-26 Tom Tromey <tom@tromey.com>
4867
4868 * configure, config.in: Rebuild.
4869
4870 2019-11-26 Tom Tromey <tom@tromey.com>
4871
4872 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4873 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4874 gdb_sigmask.
4875 * configure, config.in: Rebuild.
4876
4877 2019-11-26 Tom Tromey <tom@tromey.com>
4878
4879 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4880 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4881 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4882 * acinclude.m4: Include ax_pthread.m4.
4883 * config.in, configure: Rebuild.
4884
4885 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4886
4887 * debug.c (debug_set_output): Call safe_strerror instead of
4888 strerror.
4889 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4890 (linux_kill_one_lwp): Likewise.
4891 (linux_detach_one_lwp): Likewise.
4892 (linux_wait_for_event_filtered): Likewise.
4893 (store_register): Likewise.
4894 * lynx-low.c (lynx_attach): Likewise.
4895 * mem-break.c (insert_memory_breakpoint): Likewise.
4896 (remove_memory_breakpoint): Likewise.
4897 (delete_fast_tracepoint_jump): Likewise.
4898 (set_fast_tracepoint_jump): Likewise.
4899 (uninsert_fast_tracepoint_jumps_at): Likewise.
4900 (reinsert_fast_tracepoint_jumps_at): Likewise.
4901 * nto-low.c (nto_xfer_memory): Likewise.
4902 (nto_resume): Likewise.
4903
4904 2019-11-20 Luis Machado <luis.machado@linaro.org>
4905
4906 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4907 instead of register count.
4908 * tdesc.c (tdesc_contains_feature): New function.
4909 * tdesc.h (tdesc_contains_feature): New prototype.
4910
4911 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4912
4913 * Makefile.in: Add safe-strerror.c.
4914 * configure: Regenerate.
4915 * configure.ac: Don't source common.host.
4916
4917 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4918
4919 * config.in: Regenerate.
4920 * configure: Regenerate.
4921
4922 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4923
4924 * ax.c (ax_printf): Handle size_t_arg.
4925
4926 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4927
4928 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4929 * mi/mi-main.c (output_cores): Likewise.
4930 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4931 (linux_xfer_osdata_modules): Likewise.
4932 * remote.c (register_remote_support_xml): Likewise.
4933 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4934 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4935
4936 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4937
4938 * configure: Regenerate.
4939 * configure.ac: Remove check for strerror_r.
4940
4941 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4942
4943 * config.in: Regenerate.
4944 * configure: Regenerate.
4945 * configure.ac: Also check for strerror_r.
4946
4947 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4948
4949 * ax.h (debug_agent): Remove duplicate declaration.
4950
4951 2019-10-26 Tom de Vries <tdevries@suse.de>
4952
4953 * linux-aarch64-low.c: Fix typos in comments.
4954 * linux-arm-low.c: Same.
4955 * linux-low.c: Same.
4956 * linux-ppc-low.c: Same.
4957 * proc-service.c: Same.
4958 * regcache.h: Same.
4959 * server.c: Same.
4960 * tracepoint.c: Same.
4961 * win32-low.c: Same.
4962
4963 2019-10-25 Tom Tromey <tromey@adacore.com>
4964
4965 * utils.c (xstrdup): Remove.
4966
4967 2019-10-23 Tom Tromey <tom@tromey.com>
4968
4969 * configure, config.in: Rebuild.
4970
4971 2019-10-23 Tom Tromey <tom@tromey.com>
4972
4973 * configure: Rebuild.
4974 * acinclude.m4: Use m4_include, not sinclude.
4975
4976 2019-10-17 Tom Tromey <tromey@adacore.com>
4977
4978 * configure: Rebuild.
4979 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4980 in AC_CONFIG_FILES invocation.
4981 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4982 invocation.
4983
4984 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4985
4986 * server.c: Include xml-builtin.h.
4987 (get_xml_features): Don't declare xml_builtins here.
4988
4989 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4990
4991 * Makefile.in: Remove references to vec-ipa.o.
4992
4993 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4994
4995 * Makefile.in: Remove references to vec.c.
4996
4997 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4998
4999 * server.c (server_waiting): Change to bool.
5000 (extended_protocol): Likewise.
5001 (response_needed): Likewise.
5002 (exit_requested): Likewise.
5003 (run_once): Likewise.
5004 (report_no_resumed): Likewise.
5005 (non_stop): Likewise.
5006 (disable_packet_vCont): Likewise.
5007 (disable_packet_Tthread): Likewise.
5008 (disable_packet_qC): Likewise.
5009 (disable_packet_qfThreadInfo): Likewise.
5010 (handle_general_set): Update.
5011 (handle_detach): Update.
5012 (handle_monitor_command): Update.
5013 (handle_query): Update.
5014 (captured_main): Update.
5015 (process_serial_event): Update.
5016 * server.h (server_waiting): Change to bool.
5017 (disable_packet_vCont): Likewise.
5018 (disable_packet_Tthread): Likewise.
5019 (disable_packet_qC): Likewise.
5020 (disable_packet_qfThreadInfo): Likewise.
5021 (run_once): Likewise.
5022 (non_stop): Likewise.
5023 * target.c (target_stop_and_wait): Update.
5024
5025 2019-10-02 Tom Tromey <tromey@adacore.com>
5026
5027 * Makefile.in (SFILES): Add common-inferior.c.
5028 (OBS): Add common-inferior.o.
5029 * server.c (startup_with_shell): Don't define.
5030
5031 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
5032
5033 * linux-low.c (linux_low_read_btrace): Update for change to
5034 std::vector.
5035
5036 2019-09-20 Christian Biesinger <cbiesinger@google.com>
5037
5038 * debug.c (debug_threads): Remove comment in favor of the header.
5039 * debug.h (using_threads): Add declaration.
5040 (debug_threads): Add comment.
5041 * linux-aarch64-low.c: Include debug.h and remove declaration of
5042 debug_threads.
5043 * nto-low.c: Likewise.
5044 * remote-utils.c: Likewise.
5045 * thread-db.c: Likewise.
5046
5047 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
5048
5049 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
5050 and powerpc-cell64l-ipa.o.
5051 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
5052 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
5053 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
5054 (spu*-*-*): Remove.
5055
5056 * spu-low.c: Remove file.
5057
5058 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
5059 (parse_spufs_run): Remove.
5060 (ppc_get_pc): Remove Cell/B.E. support.
5061 (ppc_set_pc): Likewise.
5062 (ppc_breakpoint_at): Likewise.
5063 (ppc_arch_setup): Likewise.
5064 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
5065 tdesc_powerpc_cell32l.
5066 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
5067 or init_registers_powerpc_cell32l.
5068 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
5069 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
5070 or init_registers_powerpc_cell32l.
5071 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
5072 (init_registers_powerpc_cell32l): Remove prototype.
5073 (init_registers_powerpc_cell64l): Likewise.
5074
5075 * target.h (struct target_ops): Remove qxfer_spu member.
5076 * server.c (handle_qxfer_spu): Remove.
5077 (qxfer_packets): Remove entry for "spu".
5078 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
5079 * linux-low.c (SPUFS_MAGIC): Remove.
5080 (spu_enumerate_spu_ids): Remove.
5081 (linux_qxfer_spu): Remove.
5082 (linux_target_ops): Remove qxfer_spu member.
5083 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
5084 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
5085 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
5086
5087 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
5088
5089 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
5090 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
5091 * config.in: Regenerate.
5092 * configure: Regenerate.
5093
5094 2019-08-15 Tom Tromey <tromey@adacore.com>
5095
5096 * target.c (target_write_memory): Use gdb::byte_vector.
5097
5098 2019-08-15 Tom Tromey <tromey@adacore.com>
5099
5100 * tracepoint.c (write_inferior_data_pointer)
5101 (write_inferior_integer, write_inferior_int8)
5102 (write_inferior_uinteger, m_tracepoint_action_download)
5103 (r_tracepoint_action_download, x_tracepoint_action_download)
5104 (l_tracepoint_action_download, clear_inferior_trace_buffer)
5105 (download_agent_expr, download_tracepoint_1)
5106 (download_trace_state_variables, upload_fast_traceframes): Update.
5107 * server.c (gdb_write_memory): Update.
5108 * remote-utils.c (relocate_instruction): Update.
5109 * proc-service.c (ps_pdwrite): Update.
5110 * mem-break.c (remove_memory_breakpoint)
5111 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
5112 (uninsert_fast_tracepoint_jumps_at)
5113 (reinsert_fast_tracepoint_jumps_at): Update.
5114 * linux-x86-low.c (append_insns)
5115 (i386_install_fast_tracepoint_jump_pad)
5116 (amd64_write_goto_address, i386_write_goto_address): Update.
5117 * linux-s390-low.c (append_insns, s390_write_goto_address):
5118 Update.
5119 * linux-ppc-low.c (ppc_relocate_instruction)
5120 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
5121 (ppc_write_goto_address): Update.
5122 * linux-aarch64-low.c (append_insns): Update.
5123 * target.h (struct target_ops): Update.
5124 (write_inferior_memory): Don't declare.
5125 * target.c (target_write_memory): Rename from
5126 write_inferior_memory. Remove old target_write_memory.
5127
5128 2019-08-15 Tom Tromey <tromey@adacore.com>
5129
5130 * target.c (write_inferior_memory): Use std::vector.
5131
5132 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
5133
5134 PR build/24886
5135 * configure.ac: Drop enable-libmcheck support.
5136 * configure, config.in: Rebuild.
5137 * acinclude.m4: Don't include it.
5138
5139 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5140
5141 * configure.srv: Remove Arm xml files.
5142
5143 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5144
5145 * configure.srv: Add new files. Remove xml generated files.
5146 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
5147 registers.
5148 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
5149 * linux-aarch32-tdesc.c: New file.
5150 * linux-aarch32-tdesc.h: New file.
5151 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
5152 * linux-arm-low.c (init_registers_arm, tdesc_arm)
5153 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
5154 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
5155 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
5156 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5157 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
5158 (arm_read_description): Call arm_linux_read_description.
5159 (initialize_low_arch): Don't init registers.
5160 * linux-arm-tdesc.c: New file.
5161 * linux-arm-tdesc.h: New file.
5162
5163 2019-07-10 Alan Hayward <alan.hayward@arm.com>
5164
5165 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
5166 Move counter inside for.
5167 (arm_read_description): Check ptrace earlier.
5168 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
5169
5170 2019-07-09 Tom Tromey <tom@tromey.com>
5171
5172 * configure: Rebuild.
5173 * configure.ac: Change common to gdbsupport.
5174 * acinclude.m4: Change common to gdbsupport.
5175 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
5176 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
5177 common to gdbsupport.
5178 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
5179 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
5180 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
5181 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
5182 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
5183 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
5184 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
5185 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
5186 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
5187 common to gdbsupport.
5188
5189 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5190
5191 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
5192 defines.
5193 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
5194
5195 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5196
5197 * configure.srv: Remove legacy xml.
5198 * linux-aarch64-low.c (initialize_low_arch): Remove
5199 initialize_low_tdesc call.
5200 * linux-aarch64-tdesc-selftest.c: Remove file.
5201 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
5202 * linux-x86-low.c (initialize_low_arch): Remove
5203 initialize_low_tdesc call.
5204 * linux-x86-tdesc-selftest.c: Remove file.
5205 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
5206
5207 2019-06-20 Tom de Vries <tdevries@suse.de>
5208
5209 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
5210 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
5211
5212 2019-06-19 Tom de Vries <tdevries@suse.de>
5213
5214 * debug.h (debug_write): Change return type to ssize_t.
5215 * debug.c (debug_write): Same.
5216
5217 2019-06-14 Tom Tromey <tom@tromey.com>
5218
5219 * configure.ac: Use new path to gnulib.
5220 * configure: Rebuild.
5221 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
5222 to gnulib.
5223
5224 2019-06-11 Tom Tromey <tom@tromey.com>
5225
5226 * Makefile.in (SFILES): Add alloc.c.
5227 (OBS): Add alloc.o.
5228 (IPA_OBJS): Add alloc-ipa.o.
5229 (alloc-ipa.o): New target.
5230 (%.o: ../%.c): New pattern rule.
5231
5232 2019-06-10 Tom Tromey <tromey@adacore.com>
5233
5234 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
5235 end warning with a newline.
5236 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
5237 newline.
5238 * thread-db.c (attach_thread): Don't end warning with a newline.
5239 (thread_db_notice_clone): Likewise.
5240 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
5241 newline.
5242 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
5243 end warning with a newline.
5244
5245 2019-06-04 Pedro Alves <palves@redhat.com>
5246
5247 * server.c (captured_main): Use make_unique_xstrdup.
5248
5249 2019-06-02 Tom Tromey <tom@tromey.com>
5250
5251 * gdbreplay.c (fromhex): Remove.
5252 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5253
5254 2019-05-29 Tom Tromey <tromey@adacore.com>
5255
5256 * configure: Rebuild.
5257
5258 2019-05-06 Kevin Buettner <kevinb@redhat.com>
5259
5260 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
5261 sign extension code on 32-bit builds.
5262
5263 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5264
5265 * remote-utils.c:
5266 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5267
5268 2019-04-19 Tom Tromey <tom@tromey.com>
5269
5270 * server.c (struct vstop_notif): Derive from notif_event.
5271 <base>: Remove.
5272 (queue_stop_reply): Update.
5273 (remove_all_on_match_ptid): Change type. Rewrite.
5274 (discard_queued_stop_replies): Rewrite.
5275 (in_queued_stop_replies_ptid): Change type.
5276 (in_queued_stop_replies): Rewrite.
5277 (notif_stop): Update.
5278 (queue_stop_reply_callback): Update.
5279 (captured_main): Don't call initialize_notif.
5280 (push_stop_notification): Update.
5281 * notif.c (notif_write_event, handle_notif_ack)
5282 (notif_event_enque, notif_push): Update.
5283 (notif_event_xfree, initialize_notif): Remove.
5284 * notif.h (struct notif_event): Include <list>, not
5285 "common/queue.h".
5286 (struct notif_server) <queue>: Now a std::list.
5287 (notif_event_p): Remove typedef.
5288 (initialize_notif): Don't declare.
5289 (struct notif_event): Add virtual destructor.
5290
5291 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5292
5293 * ax.c (ax_vdebug): Call debug_printf.
5294 * debug.c (debug_write): New function.
5295 * debug.h (debug_write): New declaration.
5296 * linux-low.c (sigchld_handler): Call debug_write.
5297
5298 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5299
5300 * debug.c (debug_set_output): New function.
5301 (debug_vprintf): Send output to debug_file.
5302 (debug_flush): Likewise.
5303 * debug.h (debug_set_output): New declaration.
5304 * server.c (handle_monitor_command): Add debug-file option.
5305 (captured_main): Likewise.
5306
5307 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5308
5309 * debug.c (remote_debug): Add definition.
5310 * debug.h (remote_debug): Add declaration.
5311 * hostio.c (remote_debug): Remove declaration.
5312 * remote-utils.c (struct ui_file): Likewise.
5313 (remote_debug): Likewise.
5314 * remote-utils.h (remote_debug): Likewise,
5315 * server.c (remote_debug): Remove definition.
5316
5317 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5318
5319 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5320 when using a 64-bit gdbserver.
5321
5322 2019-04-09 Tom Tromey <tromey@adacore.com>
5323
5324 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5325
5326 2019-04-08 Tom Tromey <tom@tromey.com>
5327
5328 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5329 throw.
5330 (linux_resume_one_lwp): Likewise.
5331
5332 2019-04-08 Tom Tromey <tom@tromey.com>
5333
5334 * gdbreplay.c: Update.
5335 * linux-low.c: Update.
5336 * server.c: Update.
5337
5338 2019-04-08 Tom Tromey <tom@tromey.com>
5339
5340 * server.c: Use C++ exception handling.
5341 * linux-low.c: Use C++ exception handling.
5342 * gdbreplay.c: Use C++ exception handling.
5343
5344 2019-04-08 Tom Tromey <tom@tromey.com>
5345
5346 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5347 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5348 (captured_main, main): Update.
5349 * gdbreplay.c (main): Update.
5350
5351 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5352
5353 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5354 value in argument pointer, return 1 if the entry is found and 0
5355 otherwise. Move comment.
5356 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5357 * linux-low.h (linux_get_auxv): Declare.
5358 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5359
5360 2019-04-05 Tom Tromey <tromey@adacore.com>
5361
5362 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5363 variables.
5364
5365 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5366
5367 * linux-low.c (AT_HWCAP2): Add define if not already included.
5368
5369 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5370
5371 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5372 (aarch64_arch_setup): Call linux_get_hwcap.
5373 * linux-arm-low.c (arm_get_hwcap): Remove function.
5374 (arm_read_description): Call linux_get_hwcap.
5375 * linux-low.c (linux_get_auxv): New function.
5376 (linux_get_hwcap): Likewise.
5377 (linux_get_hwcap2): Likewise.
5378 * linux-low.h (linux_get_hwcap): New declaration.
5379 (linux_get_hwcap2): Likewise.
5380 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5381 (ppc_arch_setup): Call linux_get_hwcap.
5382 * linux-s390-low.c (s390_get_hwcap): Remove function.
5383 (s390_arch_setup): Call linux_get_hwcap.
5384
5385 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5386 Jiong Wang <jiong.wang@arm.com>
5387
5388 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5389 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5390 to fail.
5391 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5392
5393 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5394 Jiong Wang <jiong.wang@arm.com>
5395
5396 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5397 (aarch64_get_hwcap): New function.
5398 (aarch64_arch_setup): Read APIA hwcap.
5399
5400 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5401 Jiong Wang <jiong.wang@arm.com>
5402
5403 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5404 (initialize_low_tracepoint): Likewise.
5405 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5406 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5407 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5408 (aarch64_linux_read_description): Likewise.
5409 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5410
5411 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5412
5413 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5414 i386_create_target_description for 'segments' parameter.
5415 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5416 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5417 * win32-i386-low.c (i386_arch_setup): Likewise.
5418
5419 2019-03-12 Tom Tromey <tromey@adacore.com>
5420
5421 * linux-low.c (iterate_over_lwps): Update.
5422
5423 2019-03-06 Tom Tromey <tom@tromey.com>
5424
5425 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5426 (captured_main): Use SCOPE_EXIT.
5427
5428 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5429
5430 * configure.srv: Use '$enable_unittest' instead of '$development'
5431 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5432 case.
5433
5434 2019-02-27 Tom Tromey <tromey@adacore.com>
5435
5436 * gdbreplay.c (logchar): Handle \r\n.
5437
5438 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5439
5440 * linux-low.c (linux_attach): Add process before lwp.
5441 * server.c (attach_inferior): Check if already attached.
5442
5443 2019-02-07 Tom Tromey <tom@tromey.com>
5444
5445 * x86-tdesc.h: Rename include guard.
5446 * x86-low.h: Add include guard.
5447 * wincecompat.h: Rename include guard.
5448 * win32-low.h: Add include guard.
5449 * utils.h: Rename include guard.
5450 * tracepoint.h: Rename include guard.
5451 * tdesc.h: Rename include guard.
5452 * target.h: Rename include guard.
5453 * server.h: Rename include guard.
5454 * remote-utils.h: Rename include guard.
5455 * regcache.h: Rename include guard.
5456 * nto-low.h: Rename include guard.
5457 * notif.h: Add include guard.
5458 * mem-break.h: Rename include guard.
5459 * lynx-low.h: Add include guard.
5460 * linux-x86-tdesc.h: Add include guard.
5461 * linux-s390-tdesc.h: Add include guard.
5462 * linux-ppc-tdesc-init.h: Add include guard.
5463 * linux-low.h: Add include guard.
5464 * linux-aarch64-tdesc.h: Add include guard.
5465 * linux-aarch32-low.h: Add include guard.
5466 * inferiors.h: Rename include guard.
5467 * i387-fp.h: Rename include guard.
5468 * hostio.h: Rename include guard.
5469 * gdbthread.h: Rename include guard.
5470 * gdb_proc_service.h: Rename include guard.
5471 * event-loop.h: Rename include guard.
5472 * dll.h: Rename include guard.
5473 * debug.h: Rename include guard.
5474 * ax.h: Rename include guard.
5475
5476 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5477
5478 PR gdb/23985
5479 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5480 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5481
5482 2019-01-25 Tom Tromey <tom@tromey.com>
5483
5484 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5485
5486 2019-01-25 Tom Tromey <tom@tromey.com>
5487
5488 * win32-low.c: Fix common/ includes.
5489 * win32-i386-low.c: Fix common/ includes.
5490 * tracepoint.c: Fix common/ includes.
5491 * thread-db.c: Fix common/ includes.
5492 * target.h: Fix common/ includes.
5493 * symbol.c: Fix common/ includes.
5494 * spu-low.c: Fix common/ includes.
5495 * server.h: Fix common/ includes.
5496 * server.c: Fix common/ includes.
5497 * remote-utils.c: Fix common/ includes.
5498 * regcache.h: Fix common/ includes.
5499 * regcache.c: Fix common/ includes.
5500 * nto-x86-low.c: Fix common/ includes.
5501 * notif.h: Fix common/ includes.
5502 * mem-break.h: Fix common/ includes.
5503 * lynx-low.c: Fix common/ includes.
5504 * lynx-i386-low.c: Fix common/ includes.
5505 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5506 * linux-x86-low.c: Fix common/ includes.
5507 * linux-low.c: Fix common/ includes.
5508 * inferiors.h: Fix common/ includes.
5509 * i387-fp.c: Fix common/ includes.
5510 * hostio.c: Fix common/ includes.
5511 * hostio-errno.c: Fix common/ includes.
5512 * gdbthread.h: Fix common/ includes.
5513 * gdbreplay.c: Fix common/ includes.
5514 * fork-child.c: Fix common/ includes.
5515 * event-loop.c: Fix common/ includes.
5516 * ax.c:
5517 (enum gdb_agent_op): Fix common/ includes.
5518
5519 2019-01-21 Tom Tromey <tom@tromey.com>
5520
5521 * tracepoint.c: Fix includes.
5522 * remote-utils.c: Fix includes.
5523 * linux-x86-low.c: Fix includes.
5524
5525 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5526
5527 * gdbreplay.c (gdbreplay_version): Update copyright year in
5528 version message.
5529 * server.c (gdbserver_version): Likewise.
5530
5531 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5532
5533 * linux-low.c (add_lwp): Switch ordering.
5534
5535 2018-11-29 Tom Tromey <tom@tromey.com>
5536
5537 * win32-low.c (win32_join): Take pid, not process.
5538 * target.h (struct target_ops) <join>: Change argument type.
5539 (join_inferior): Change argument name.
5540 * spu-low.c (spu_join): Take pid, not process.
5541 * server.c (handle_detach): Preserve pid before destroying
5542 process.
5543 * lynx-low.c (lynx_join): Take pid, not process.
5544 * linux-low.c (linux_join): Take pid, not process.
5545
5546 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5547
5548 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5549 (aarch64_cannot_fetch_register): Likewise.
5550 (struct linux_target_ops): Update references.
5551
5552 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5553
5554 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5555
5556 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5557
5558 * configure.srv (ipa_ppc_linux_regobj): Add
5559 powerpc-isa207-htm-vsx32l-ipa.o and
5560 powerpc-isa207-htm-vsx64l-ipa.o.
5561 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5562 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5563 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5564 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5565 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5566 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5567 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5568 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5569 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5570 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5571 (init_registers_powerpc_isa207_htm_vsx32l)
5572 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5573 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5574 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5575 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5576 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5577 (ppc_store_tm_ctarregset): New functions.
5578 (ppc_regsets): Add entries for HTM regsets.
5579 (ppc_arch_setup): Set htm in features struct when needed. Set
5580 sizes for the HTM regsets.
5581 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5582 (initialize_low_arch): Call
5583 init_registers_powerpc_isa207_htm_vsx32l and
5584 init_registers_powerpc_isa207_htm_vsx64l.
5585 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5586 PPC_TDESC_ISA207_HTM_VSX.
5587 (initialize_low_tracepoint): Call
5588 init_registers_powerpc_isa207_htm_vsx32l and
5589 init_registers_powerpc_isa207_htm_vsx64l.
5590
5591 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5592
5593 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5594 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5595 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5596 (ppc_store_pmuregset): New functions.
5597 (ppc_regsets): Add entries for ebb and pmu regsets.
5598 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5599 pmu regsets are available. Set sizes for these regsets.
5600
5601 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5602
5603 * configure.srv (ipa_ppc_linux_regobj): Add
5604 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5605 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5606 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5607 rs6000/powerpc-isa207-vsx32l.xml, and
5608 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5609 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5610 <PPC_TDESC_ISA207_VSX>: New enum value.
5611 (init_registers_powerpc_isa207_vsx32l): Declare.
5612 (init_registers_powerpc_isa207_vsx64l): Declare.
5613 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5614 (ppc_store_tarregset): New function.
5615 (ppc_regsets): Add entry for the TAR regset.
5616 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5617 size for the TAR regsets.
5618 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5619 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5620 and init_registers_powerpc_isa207_vsx64l.
5621 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5622 (initialize_low_tracepoint): Call
5623 init_registers_powerpc_isa207_vsx32l and
5624 init_registers_powerpc_isa207_vsx64l.
5625
5626 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5627 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5628
5629 * configure.srv (ipa_ppc_linux_regobj): Add
5630 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5631 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5632 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5633 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5634 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5635 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5636 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5637 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5638 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5639 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5640 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5641 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5642 (ppc_hwcap): Add comment.
5643 (ppc_hwcap2): New global.
5644 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5645 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5646 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5647 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5648 when needed. Set sizes for the the DSCR and PPR regsets.
5649 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5650 (initialize_low_arch): Call
5651 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5652 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5653 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5654 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5655 (initialize_low_tracepoint): Call
5656 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5657 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5658
5659 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5660
5661 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5662
5663 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5664 Simon Marchi <simark@simark.ca>
5665
5666 * acinclude.m4: Include "../selftest.m4".
5667 * configure: Regenerate.
5668 * configure.ac: Use "GDB_AC_SELFTEST".
5669 * configure.srv: Use "$enable_unittests" instead of
5670 "$development" when checking whether unit tests have been
5671 enabled.
5672 * server.c (captured_main): Update message informing that
5673 selftests have been disabled.
5674
5675 2018-10-04 Tom Tromey <tom@tromey.com>
5676
5677 * configure: Rebuild.
5678
5679 2018-10-04 Tom Tromey <tom@tromey.com>
5680
5681 * server.c (handle_status): Rename inner "thread".
5682 (process_serial_event): Declare "res" in 'm' case.
5683 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5684 (iterate_over_lwps): Rename inner "thread".
5685 (linux_qxfer_libraries_svr4): Rename inner "len".
5686 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5687
5688 2018-10-01 Gary Benson <gbenson@redhat.com>
5689
5690 * gdb_proc_service.h: Moved common code to
5691 common/gdb_proc_service.h.
5692
5693 2018-10-01 Gary Benson <gbenson@redhat.com>
5694
5695 * gdb_proc_service.h: Synchronize comments and whitespace with
5696 GDB's version of this file.
5697
5698 2018-09-25 Tom Tromey <tom@tromey.com>
5699
5700 * configure: Rebuild.
5701 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5702
5703 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5704
5705 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5706 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5707 ($(IPA_LIB)): Sort IPA_OBJS.
5708
5709 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5710
5711 * Makefile.in: Remove references to $(ADD_DEPS).
5712
5713 2018-09-16 Tom Tromey <tom@tromey.com>
5714
5715 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5716 variables.
5717 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5718 variables.
5719
5720 2018-09-05 Tom Tromey <tom@tromey.com>
5721
5722 * configure: Rebuild.
5723
5724 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5725
5726 PR build/23399
5727 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5728
5729 2018-08-27 Tom Tromey <tom@tromey.com>
5730
5731 PR build/23087:
5732 * configure: Rebuild.
5733
5734 2018-08-27 Tom Tromey <tom@tromey.com>
5735
5736 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5737 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5738 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5739 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5740 (s390x_emit_stack_adjust): Add casts to unsigned char.
5741
5742 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5743
5744 PR gdb/23374
5745 PR gdb/23375
5746 * server.h (struct client_state) <disable_randomization>:
5747 Initialize to 1.
5748
5749 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5750
5751 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5752 variable.
5753 (mips_supply_ptrace_register): Likewise.
5754
5755 2018-07-22 Tom Tromey <tom@tromey.com>
5756
5757 * configure: Rebuild.
5758
5759 2018-07-22 Tom Tromey <tom@tromey.com>
5760
5761 * win32-low.c (win32_create_inferior): Remove unused variables.
5762 * gdbreplay.c (remote_open): Remove unused variable.
5763 * remote-utils.c (remote_prepare): Remove unused variable.
5764 * x86-tdesc.h (X86_TDESC_H): Define.
5765 (amd64_expedite_regs): Define conditionally.
5766 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5767 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5768 * remote-utils.c (readchar): Remove unused variable.
5769
5770 2018-07-13 Pedro Alves <palves@redhat.com>
5771
5772 * linux-low.c (linux_kill): Change parameter to process_info
5773 pointer instead of pid. Adjust.
5774 * lynx-low.c (lynx_kill): Likewise.
5775 * nto-low.c (nto_kill): Likewise.
5776 * spu-low.c (spu_kill): Likewise.
5777 * win32-low.c (win32_kill): Likewise.
5778 * server.c (handle_v_kill, kill_inferior_callback)
5779 (detach_or_kill_for_exit): Adjust.
5780 * target.c (kill_inferior): Change parameter to process_info
5781 pointer instead of pid. Adjust.
5782 * target.h (struct target_ops) <kill>: Change parameter to
5783 process_info pointer instead of pid. Adjust all implementations
5784 and callers.
5785 (kill_inferior): Likewise.
5786
5787 2018-07-13 Pedro Alves <palves@redhat.com>
5788
5789 * linux-low.c (linux_detach, linux_join): Change parameter to
5790 process_info pointer instead of pid. Adjust.
5791 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5792 * nto-low.c (nto_detach): Likewise.
5793 * spu-low.c (spu_detach, spu_join): Likewise.
5794 * win32-low.c (win32_detach, win32_join): Likewise.
5795 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5796 * target.h (struct target_ops) <detach, join>: Change parameter to
5797 process_info pointer instead of pid. Adjust all implementations
5798 and callers.
5799 (detach_inferior, join_inferior): Rename 'pid' parameter to
5800 'proc'.
5801
5802 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5803 Jan Kratochvil <jan.kratochvil@redhat.com>
5804 Paul Fertser <fercerpav@gmail.com>
5805 Tsutomu Seki <sekiriki@gmail.com>
5806
5807 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5808 (OBS): Add 'common/netstuff.o'.
5809 (GDBREPLAY_OBS): Likewise.
5810 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5811 (remote_open): Implement support for IPv6
5812 connections.
5813 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5814 and 'wspiapi.h'.
5815 (handle_accept_event): Accept connections from IPv6 sources.
5816 (remote_prepare): Handle IPv6-style hostnames; implement
5817 support for IPv6 connections.
5818 (remote_open): Implement support for printing connections from
5819 IPv6 sources.
5820
5821 2018-07-11 Pedro Alves <palves@redhat.com>
5822
5823 PR gdb/23377
5824 * mem-break.c (any_persistent_commands): Add process_info
5825 parameter and use it instead of relying on the current process.
5826 Change return type to bool.
5827 * mem-break.h (any_persistent_commands): Add process_info
5828 parameter and change return type to bool.
5829 * server.c (handle_detach): Remove require_running_or_return call.
5830 Look up the process_info for the process we're about to detach.
5831 If not found, return back error to GDB. Adjust
5832 any_persistent_commands call to pass down a process pointer.
5833
5834 2018-07-11 Pedro Alves <palves@redhat.com>
5835
5836 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5837 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5838 instead of collect_register_by_name.
5839 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5840 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5841
5842 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5843 Pedro Alves <palves@redhat.com>
5844
5845 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5846
5847 2018-07-03 Tom Tromey <tom@tromey.com>
5848
5849 * linux-low.c: Update.
5850 * lynx-low.c: Update.
5851 * mem-break.c: Update.
5852 * nto-low.c: Update.
5853 * remote-utils.c: Update.
5854 * server.c: Update.
5855 * spu-low.c: Update.
5856 * target.c: Update.
5857 * win32-low.c: Update.
5858
5859 2018-07-03 Tom Tromey <tom@tromey.com>
5860
5861 * server.c: Update.
5862
5863 2018-07-03 Tom Tromey <tom@tromey.com>
5864
5865 * linux-low.c: Update.
5866
5867 2018-07-03 Tom Tromey <tom@tromey.com>
5868
5869 * target.c: Update.
5870
5871 2018-07-03 Tom Tromey <tom@tromey.com>
5872
5873 * linux-low.c: Update.
5874 * linux-mips-low.c: Update.
5875 * lynx-low.c: Update.
5876 * nto-low.c: Update.
5877 * remote-utils.c: Update.
5878 * server.c: Update.
5879 * spu-low.c: Update.
5880 * target.c: Update.
5881 * thread-db.c: Update.
5882
5883 2018-07-03 Tom Tromey <tom@tromey.com>
5884
5885 * linux-low.c: Update.
5886 * linux-mips-low.c: Update.
5887 * lynx-low.c: Update.
5888 * mem-break.c: Update.
5889 * nto-low.c: Update.
5890 * remote-utils.c: Update.
5891 * server.c: Update.
5892 * spu-low.c: Update.
5893 * target.c: Update.
5894 * tracepoint.c: Update.
5895
5896 2018-07-03 Tom Tromey <tom@tromey.com>
5897
5898 * linux-low.c: Update.
5899 * linux-ppc-low.c: Update.
5900 * linux-x86-low.c: Update.
5901 * proc-service.c: Update.
5902 * server.c: Update.
5903 * spu-low.c: Update.
5904 * thread-db.c: Update.
5905 * win32-low.c: Update.
5906
5907 2018-07-03 Tom Tromey <tom@tromey.com>
5908
5909 * linux-low.c: Update.
5910 * lynx-low.c: Update.
5911 * nto-low.c: Update.
5912 * remote-utils.c: Update.
5913 * spu-low.c: Update.
5914 * thread-db.c: Update.
5915 * win32-low.c: Update.
5916
5917 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5918
5919 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5920 parameter in call to 'amd64_create_target_description'.
5921
5922 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5923
5924 * x86-tdesc.h: Remove executable permission flag.
5925
5926 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5927
5928 * configure.ac: Remove AC_PREREQ, add missing quoting.
5929 * configure: Re-generate.
5930 * config.in: Re-generate.
5931 * aclocal.m4: Re-generate.
5932
5933 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5934
5935 * tracepoint.h (current_traceframe): Remove declaration.
5936
5937 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5938
5939 * linux-aarch64-low.c (is_sve_tdesc): New function.
5940 (aarch64_sve_regs_copy_to_regcache): Likewise.
5941 (aarch64_sve_regs_copy_from_regcache): Likewise.
5942 (aarch64_regs_info): Add SVE checks.
5943 (initialize_low_arch): Initialize SVE.
5944
5945 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5946
5947 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5948
5949 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5950
5951 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5952 (initialize_low_tracepoint): Likewise
5953 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5954 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5955 param.
5956 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5957 checks.
5958 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5959
5960 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5961
5962 * server.h (PBUFSIZ): Increase size
5963
5964 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5965
5966 * regcache.c (regcache::raw_compare): New function.
5967 * regcache.h (regcache::raw_compare): New declaration.
5968
5969 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5970
5971 * regcache.c (new_register_cache): Use new.
5972 (free_register_cache): Use delete.
5973 (register_data): Use const.
5974 (supply_register): Move body inside regcache.
5975 (regcache::raw_supply): New override function.
5976 (collect_register): Move body inside regcache.
5977 (regcache::raw_collect): New override function.
5978 (regcache::get_register_status): New override function.
5979 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5980
5981 2018-06-09 Tom Tromey <tom@tromey.com>
5982
5983 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5984 declare queue.
5985 (event_queue): Use std::queue.
5986 (gdb_event_xfree): Remove.
5987 (initialize_event_loop, process_event, wait_for_event): Update.
5988
5989 2018-06-08 Stan Cox <scox@redhat.com>
5990
5991 * win32-low.c (win32_create_inferior): last_ptid and last_status
5992 moved to client_state.
5993
5994 2018-06-08 Pedro Alves <palves@redhat.com>
5995
5996 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5997 common/common-exceptions.o, common/common-utils.o,
5998 common/errors.o, common/print-utils.o and utils.o.
5999 * gdbreplay.c: Include "common-defs.h" instead of the two
6000 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
6001 string.h or alloca.h.
6002 (perror_with_name): Delete.
6003 (remote_open): Use xstrdup instead of strdup.
6004 (main): Rename to ...
6005 (captured_main): ... this.
6006 (main): New.
6007
6008 2018-06-08 Tom Tromey <tom@tromey.com>
6009
6010 * linux-low.c (linux_low_read_btrace): Update.
6011
6012 2018-06-04 Stan Cox <scox@redhat.com>
6013
6014 * server.h (struct client_state): New.
6015 * server.c (cont_thread, general_thread, multi_process)
6016 (report_fork_events, report_vfork_events, report_exec_events)
6017 (report_thread_events, swbreak_feature, hwbreak_feature)
6018 (vCont_supported, disable_randomization, pass_signals)
6019 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
6020 Moved to client_state.
6021 * remote-utils.c (remote_debug, noack_mode)
6022 (transport_is_reliable): Moved to client_state.
6023 * tracepoint.c (current_traceframe): Moved to client_state.
6024
6025 Update all callers.
6026 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
6027 linux-low.c, remote-utils.h, target.c: Use client_state.
6028
6029 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6030
6031 * configure.srv: Add new c/h file.
6032
6033 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6034
6035 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
6036 null VQ.
6037
6038 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6039
6040 * gdb.arch/mips-fpregset-core.exp: New test.
6041 * gdb.arch/mips-fpregset-core.c: New test source.
6042
6043 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
6044
6045 PR server/23198
6046 * hostio.c (require_int): Do not report overflow for integers
6047 between 0xfffffff and 0x7fffffff.
6048
6049 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6050
6051 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
6052 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
6053 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
6054 functions.
6055 (the_low_target): Wire them.
6056
6057 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6058
6059 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
6060 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
6061 mode. Call collect_register_by_name with vscr using
6062 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
6063 (ppc_store_vrregset): Add and set vscr_offset variable as in
6064 ppc_fill_vrregset. Call supply_register_by_name with vscr using
6065 vscr_offset.
6066
6067 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6068
6069 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6070 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
6071 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
6072
6073 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6074
6075 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
6076 (ppc_store_vsxregset): Likewise.
6077 (ppc_fill_vrregset): Likewise.
6078 (ppc_store_vrregset): Likewise.
6079 (ppc_fill_evrregset): Likewise.
6080 (ppc_store_evrregset): Likewise.
6081 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
6082 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
6083 needed.
6084
6085 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6086
6087 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
6088 wordsize of the inferior. Call ppc_linux_target_wordsize.
6089
6090 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6091
6092 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
6093 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
6094 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
6095 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6096 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6097 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6098 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6099 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6100 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6101 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6102 (tdesc_powerpc_e500l): Remove.
6103 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
6104 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
6105 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
6106 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
6107 linux-ppc-tdesc.h.
6108 (ppc_arch_setup): Remove target description matching code. Fill a
6109 ppc_linux_features struct and call ppc_linux_match_description
6110 with it.
6111
6112 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6113
6114 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
6115 width of the requested register exceeds the width of the
6116 `ptrace' data type.
6117 (mips_cannot_store_register): Likewise.
6118
6119 2018-05-21 Maciej W. Rozycki <macro@mips.com>
6120
6121 * linux-mips-low.c (mips_fetch_register): New function. Update
6122 preceding comment.
6123 (mips_store_gregset): Supply 0 rather than $restart for $zero.
6124 (the_low_target): Wire `mips_fetch_register'.
6125
6126 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6127
6128 * lynx-i386-low.c (LYNXOS_178): New macro.
6129 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
6130 the layout on LynxOS-178.
6131 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
6132 handle floating point registers that are not supported by
6133 LynxOS-178.
6134
6135 2018-05-10 Tom Tromey <tom@tromey.com>
6136
6137 * configure: Rebuild.
6138
6139 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6140
6141 PR server/23158:
6142 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
6143 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
6144 Use it to set the expedite_regs field in the given tdesc.
6145 * x86-tdesc.h: New file.
6146 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
6147 Adjust following the addition of the new expedite_regs parameter
6148 to init_target_desc.
6149 * linux-tic6x-low.c (tic6x_read_description): Likewise.
6150 * linux-x86-tdesc.c: #include "x86-tdesc.h".
6151 (i386_linux_read_description, amd64_linux_read_description):
6152 Adjust following the addition of the new expedite_regs parameter
6153 to init_target_desc.
6154 * lynx-i386-low.c: #include "x86-tdesc.h".
6155 (lynx_i386_arch_setup): Adjust following the addition of the new
6156 expedite_regs parameter to init_target_desc.
6157 * nto-x86-low.c: #include "x86-tdesc.h".
6158 (nto_x86_arch_setup): Adjust following the addition of the new
6159 expedite_regs parameter to init_target_desc.
6160 * win32-i386-low.c: #include "x86-tdesc.h".
6161 (i386_arch_setup): Adjust following the addition of the new
6162 expedite_regs parameter to init_target_desc.
6163
6164 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6165
6166 PR server/23158:
6167 * win32-low.c (win32_create_inferior): Add call to my_wait
6168 setting last_status global.
6169
6170 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6171
6172 PR server/23158:
6173 * win32-low.c (create_process): Only call gdb_tilde_expand if
6174 inferior_cwd is not NULL.
6175
6176 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6177
6178 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
6179 registers to the cache if their values have changed.
6180 (i387_xsave_to_cache): Provide default values for x87 control
6181 registers when these features are available, but disabled.
6182 * regcache.c (supply_register_by_name_zeroed): New function.
6183 * regcache.h (supply_register_by_name_zeroed): Declare new
6184 function.
6185
6186 2018-05-07 Tom Tromey <tom@tromey.com>
6187
6188 * configure: Rebuild.
6189
6190 2018-05-04 Tom Tromey <tom@tromey.com>
6191
6192 * configure: Rebuild.
6193
6194 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6195 Pedro Alves <palves@redhat.com>
6196
6197 * linux-aarch64-low.c (aarch64_stopped_data_address):
6198 Likewise.
6199
6200 2018-04-27 Tom Tromey <tom@tromey.com>
6201
6202 * configure: Rebuild.
6203
6204 2018-04-23 Tom Tromey <tom@tromey.com>
6205
6206 * configure: Rebuild.
6207
6208 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
6209
6210 * Makefile.in (depcomp): Add "..".
6211 (all_deps_files): New and use it.
6212
6213 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6214
6215 * configure.srv (aarch64*-*-linux*): Don't include xml.
6216 (i[34567]86-*-cygwin*): Likewise.
6217 (i[34567]86-*-linux*): Likewise.
6218 (i[34567]86-*-lynxos*): Likewise.
6219 (i[34567]86-*-mingw32ce*): Likewise.
6220 (i[34567]86-*-mingw*): Likewise.
6221 (i[34567]86-*-nto*): Likewise.
6222 (tic6x-*-uclinux): Likewise.
6223 (x86_64-*-linux*): Likewise.
6224 (x86_64-*-mingw*): Likewise.
6225 (x86_64-*-cygwin*): Likewise.
6226
6227 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6228
6229 * tdesc.c: Remove xml parameter.
6230
6231 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6232
6233 * server.c (get_features_xml): Remove cast.
6234 * tdesc.c (void target_desc::accept): Fill in function.
6235 (tdesc_get_features_xml): Remove old xml creation.
6236 (print_xml_feature::visit_pre): Add xml vistor.
6237 * tdesc.h (struct target_desc): Make xmltarget mutable.
6238 (tdesc_get_features_xml): Remove declaration.
6239
6240 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6241
6242 * tdesc.c (tdesc_architecture_name): Add new function.
6243 (tdesc_osabi_name): Likewise.
6244 (tdesc_get_features_xml): Use new functions.
6245
6246 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6247
6248 * tdesc.c (tdesc_create_flags): Remove.
6249 (tdesc_add_flag): Likewise.
6250 (tdesc_named_type): Likewise.
6251 (tdesc_create_union): Likewise.
6252 (tdesc_create_struct): Likewise.
6253 (tdesc_create_vector): Likewise.
6254 (tdesc_add_bitfield): Likewise.
6255 (tdesc_add_field): Likewise.
6256 (tdesc_set_struct_size): Likewise.
6257
6258 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6259
6260 * tdesc.c (~target_desc): Remove implictly deleted items.
6261 (init_target_desc): Iterate all features.
6262 (tdesc_get_features_xml): Use vector.
6263 (tdesc_create_feature): Create feature.
6264 * tdesc.h (tdesc_feature) Remove
6265 (target_desc): Add features.
6266
6267 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6268
6269 * Makefile.in: Add common/tdesc.c
6270 * tdesc.c (init_target_desc): init all reg_defs from register
6271 vector.
6272 (tdesc_create_reg): Create tdesc_reg.
6273 * tdesc.h (tdesc_feature): Add register vector.
6274
6275 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6276
6277 * tdesc.h (struct target_desc) <features>: Change type to
6278 std::vector<std::string>.
6279 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6280 changes.
6281 (tdesc_get_features_xml): Likewise.
6282 (tdesc_create_feature): Likewise.
6283
6284 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6285
6286 * regcache.c (find_register_by_number): Return a ref.
6287 (find_regno): Use references.
6288 (register_size): Likewise.
6289 (register_data): Likewise.
6290 * tdesc.c (target_desc::~target_desc): Remove free calls.
6291 (target_desc::operator==): Use std::vector compare.
6292 (init_target_desc): Use reference.
6293 (tdesc_create_reg): Use reg constructors.
6294 * tdesc.h (struct target_desc): Replace pointer with object.
6295
6296 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6297
6298 * regcache.c (find_register_by_number): Make static.
6299 (find_regno): Use find_register_by_number
6300 * regcache.h (struct reg): Remove declaration.
6301
6302 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6303
6304 * tdesc.c (target_desc::~target_desc): Move to here.
6305 (target_desc::operator==): Likewise.
6306 * tdesc.h (target_desc::~target_desc): Move from here.
6307 (target_desc::operator==): Likewise.
6308
6309 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6310
6311 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6312
6313 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6314
6315 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6316 S390_TDESC_GS.
6317 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6318 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6319 and init_registers_s390_gs_linux64.
6320
6321 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6322
6323 * linux-s390-low.c (s390_fill_gs): Remove function.
6324 (s390_fill_gsbc): Remove function.
6325 (s390_regsets): Set fill functions for the guarded storage regsets
6326 to NULL.
6327
6328 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6329
6330 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6331 the word size. Add comment.
6332 (s390_get_wordsize): New function.
6333 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6334 pswm with it. Instead, use s390_get_wordsize to determine the
6335 word size first and derive the correct tdesc from that directly.
6336
6337 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6338
6339 * Makefile.in: Include silent-rules.mk.
6340 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6341 (COMPILE): Add ECHO_CXX.
6342 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6343 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6344 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6345 (version-generated.c): Add ECHO_GEN.
6346 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6347 (IPAGENT_COMPILE): Add ECHO_CXX.
6348 (%-generated.c): Add ECHO_REGDAT.
6349
6350 2018-03-14 Tom Tromey <tom@tromey.com>
6351
6352 PR cli/14977:
6353 * ax.c (ax_printf): Special case for NULL.
6354
6355 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6356
6357 * linux-low.c (linux_qxfer_libraries_svr4): Use
6358 xml_escape_text_append.
6359
6360 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6361
6362 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6363
6364 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6365
6366 * server.c (handle_general_set): Remove unnecessary xstrdup.
6367
6368 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6369
6370 * server.c (parse_debug_format_options): Adjust to
6371 delim_string_to_char_ptr_vec changes.
6372 * thread-db.c (thread_db_load_search): Adjust to
6373 dirnames_to_char_ptr_vec changes.
6374
6375 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6376
6377 * target.h (target_enable_btrace, target_disable_btrace)
6378 (target_read_btrace, target_read_btrace_conf): Turn macro into
6379 inline function. Throw error if target method is not defined.
6380 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6381 check for btrace target method. Be prepared to handle exceptions
6382 from btrace target methods.
6383
6384 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6385
6386 * server.c (captured_main): Change order of error message printed
6387 when the current working directory cannot be found.
6388
6389 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6390
6391 * server.c: Include "filenames.h" and "pathstuff.h".
6392 (program_name): Delete variable.
6393 (program_path): New anonymous class.
6394 (get_exec_wrapper): Use "program_path" instead of
6395 "program_name".
6396 (handle_v_run): Likewise.
6397 (captured_main): Likewise.
6398 (process_serial_event): Likewise.
6399
6400 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6401
6402 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6403 (OBJS): Add "pathstuff.o".
6404 * server.c (current_directory): New global variable.
6405 (captured_main): Initialize "current_directory".
6406
6407 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6408
6409 * tdesc.c: Use common/tdesc.h.
6410 * tdesc.h: Likewise.
6411
6412 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6413 Simon Marchi <simon.marchi@ericsson.com>
6414
6415 * Makefile.in: Switch order of make rules.
6416
6417 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6418
6419 * Makefile.in: Add common directory in build.
6420 * configure.ac: Add common reference.
6421 * configure: Regenerate.
6422
6423 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6424
6425 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6426 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6427 * spu-low.c (spu_target_ops): Likewise.
6428 * win32-low.c (win32_target_ops): Likewise.
6429 * server.c (supported_btrace_packets): Report packets unconditionally.
6430 * target.h (target_ops) <supports_btrace>: Remove.
6431 (target_supports_btrace): Remove.
6432
6433 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6434
6435 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6436 (handle_btrace_disable): Change return type to void. Use exceptions
6437 to report errors.
6438 (handle_btrace_general_set): Catch exception and copy message to
6439 return message.
6440
6441 2018-02-08 Tom Tromey <tom@tromey.com>
6442
6443 * linux-low.c (install_software_single_step_breakpoints): Use
6444 make_scoped_restore.
6445 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6446 (do_restore_current_thread_cleanup): Remove.
6447 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6448 declare.
6449
6450 2018-02-08 Tom Tromey <tom@tromey.com>
6451
6452 * mem-break.c (set_raw_breakpoint_at): Use
6453 gdb::unique_xmalloc_ptr.
6454
6455 2018-01-30 Pedro Alves <palves@redhat.com>
6456
6457 PR gdb/13211
6458 * target.c (target_terminal::terminal_state): Rename to ...
6459 (target_terminal::m_terminal_state): ... this.
6460
6461 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6462
6463 * linux-low.c (handle_extended_wait): Surround call to
6464 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6465
6466 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6467
6468 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6469 linux_ptrace_attach_fail_reason_string now returning an
6470 std::string.
6471 (linux_attach): Likewise.
6472 * thread-db.c (attach_thread): Likewise.
6473
6474 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6475
6476 PR gdb/21559
6477 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6478 checking for fs_base/gs_base fields in struct user_regs_struct.
6479 * configure: Regenerate.
6480
6481 2018-01-16 Yao Qi <yao.qi@linaro.org>
6482
6483 PR gdb/18749
6484 * linux-low.c (fetch_register): Call supply_register instead of
6485 error.
6486
6487 2018-01-08 Yao Qi <yao.qi@linaro.org>
6488 Simon Marchi <simon.marchi@ericsson.com>
6489
6490 * Makefile.in (OBS): Remove selftest.o.
6491 * configure.ac: Set srv_selftest_objs if $development is true.
6492 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6493 * configure: Re-generated.
6494 * server.c (captured_main): Wrap variable selftest_filter with
6495 GDB_SELF_TEST.
6496
6497 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6498
6499 * server.c (parse_debug_format_options): Return std::string.
6500 (handle_monitor_command, captured_main): Adjust.
6501
6502 2018-01-05 Pedro Alves <palves@redhat.com>
6503
6504 PR gdb/18653
6505 * server.c (captured_main): Pass quiet=false to
6506 save_original_signals_state.
6507
6508 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6509
6510 * gdbreplay.c (gdbreplay_version): Update copyright year in
6511 version message.
6512 * server.c (gdbserver_version): Likewise.
6513
6514 2017-12-08 Tom Tromey <tom@tromey.com>
6515
6516 * ax.c (ax_printf): Update.
6517
6518 2017-12-07 Yao Qi <yao.qi@linaro.org>
6519
6520 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6521 aarch64_linux_read_description.
6522 * linux-amd64-ipa.c (idx2mask): New array.
6523 (get_ipa_tdesc): Move idx2mask out.
6524 (initialize_low_tracepoint): Initialize target descriptions.
6525 * linux-i386-ipa.c (idx2mask): New array.
6526 (get_ipa_tdesc): Move idx2mask out.
6527 (initialize_low_tracepoint): Initialize target descriptions.
6528
6529 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6530
6531 * tdesc.c (struct tdesc_type): Change return type.
6532 (tdesc_add_flag): Change parameter type.
6533 (tdesc_add_bitfield): Likewise.
6534 (tdesc_add_field): Likewise.
6535 (tdesc_set_struct_size): Likewise.
6536
6537 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6538
6539 * regcache.c (registers_to_string): Remove unused variable.
6540
6541 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6542
6543 * inferiors.c (for_each_inferior_with_data): Remove.
6544 * inferiors.h (for_each_inferior_with_data): Remove.
6545 * server.c (handle_qxfer_threads_worker): Change parameter type.
6546 (handle_qxfer_threads_proper): Use for_each_thread.
6547
6548 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6549
6550 * inferiors.c (for_each_inferior): Remove.
6551 (clear_inferiors): Use for_each_thread.
6552 * inferiors.h (for_each_inferior): Remove.
6553 * linux-low.c (linux_wait_for_event_filtered): Use
6554 for_each_thread.
6555 (linux_stabilize_threads): Likewise.
6556 * regcache.c (regcache_release): Likewise.
6557 * server.c (gdb_wants_all_threads_stopped): Likewise.
6558 (clear_pending_status_callback): Remove.
6559 (handle_status): Use for_each_thread.
6560 (captured_main): Likewise.
6561 * win32-low.c (child_init_thread_list): Likewise.
6562 (win32_clear_inferiors): Likewise.
6563 (fake_breakpoint_event): Likewise.
6564
6565 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6566
6567 * inferiors.h (find_inferior): Remove.
6568 * inferiors.c (find_inferior): Remove.
6569
6570 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6571
6572 * linux-low.c (resume_status_pending_p): Update comment.
6573 (need_step_over_p): Update comment.
6574
6575 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6576
6577 * linux-low.c (proceed_one_lwp): Return void, change parameter
6578 type.
6579 (unsuspend_and_proceed_one_lwp): Likewise.
6580 (proceed_all_lwps): Use for_each_thread.
6581 (unstop_all_lwps): Likewise.
6582
6583 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6584
6585 * linux-low.c (linux_resume_one_thread): Return void, take
6586 parameter directly.
6587 (linux_resume): Use for_each_thread.
6588
6589 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6590
6591 * linux-low.c (send_sigstop_callback): Return void, change
6592 parameter type. Rename to...
6593 (send_sigstop): ... this.
6594 (suspend_and_send_sigstop_callback): Return void, change parameter
6595 type. Rename to...
6596 (suspend_and_send_sigstop): ... this.
6597 (stop_all_lwps): Use for_each_thread.
6598
6599 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6600
6601 * linux-low.c (lwp_running): Return bool, remove unused
6602 argument.
6603 (linux_stabilize_threads): Use find_thread.
6604
6605 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6606
6607 * linux-low.c (select_singlestep_lwp_callback): Remove.
6608 (count_events_callback): Remove.
6609 (select_event_lwp_callback): Remove.
6610 (select_event_lwp): Use find_thread/for_each_thread.
6611
6612 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6613
6614 * linux-low.c (not_stopped_callback): Return bool, take filter
6615 argument directly.
6616 (linux_wait_for_event_filtered): Use find_thread.
6617 (linux_wait_1): Likewise.
6618
6619 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6620
6621 * linux-low.c (same_lwp): Remove.
6622 (find_lwp_pid): Use find_thread.
6623
6624 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6625
6626 * linux-low.c (delete_lwp_callback): Remove.
6627 (linux_mourn): Use for_each_thread.
6628
6629 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6630
6631 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6632 args parameter, don't check for pid.
6633 (linux_detach): Use for_each_thread.
6634
6635 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6636
6637 * linux-low.c (struct counter): Remove.
6638 (second_thread_of_pid_p): Remove.
6639 (last_thread_of_process_p): Use find_thread.
6640
6641 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6642
6643 * inferiors.c (find_inferior_in_random): Remove.
6644 * inferiors.h (find_inferior_in_random): Remove.
6645 * linux-low.c (status_pending_p_callback): Return bool, accept
6646 parameter ptid directly.
6647 (linux_wait_for_event_filtered): Use find_thread_in_random.
6648 (linux_wait_1): Likewise.
6649
6650 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6651
6652 * inferiors.c (find_inferior_id): Remove.
6653 (find_thread_ptid): Move implemention from find_inferior_id to
6654 here.
6655 * inferiors.h (find_inferior_id): Remove.
6656 * server.c (handle_status): Use find_thread_ptid.
6657 (process_serial_event): Likewise.
6658 * thread-db.c (find_one_thread): Likewise.
6659 (thread_db_thread_handle): Likewise.
6660 * win32-low.c (thread_rec): Likewise.
6661 (child_delete_thread): Likewise.
6662 (win32_thread_alive): Likewise.
6663 (get_child_debug_event): Likewise.
6664
6665 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6666
6667 * linux-mips-low.c (update_watch_registers_callback): Return
6668 void, remove pid_p parameter, don't check for pid.
6669 (mips_insert_point, mips_remove_point): Use for_each_thread.
6670
6671 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6672
6673 * lynx.low (lynx_delete_thread_callback): Remove.
6674 (lynx_mourn): Use for_each_thread.
6675
6676 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6677
6678 * regcache.c (regcache_invalidate_one): Remove.
6679 (regcache_invalidate_pid): use for_each_thread.
6680
6681 2017-11-26 Tom Tromey <tom@tromey.com>
6682
6683 * linux-low.c (linux_create_inferior): Update.
6684
6685 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6686
6687 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6688
6689 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6690
6691 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6692 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6693 * linux-aarch64-tdesc-selftest.c: New file.
6694 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6695
6696 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6697
6698 * configure.srv: Add new file.
6699 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6700 * linux-aarch64-tdesc-selftest.c: New file.
6701 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6702
6703 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6704
6705 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6706 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6707 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6708
6709 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6710
6711 * configure.srv: Add new files.
6712 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6713 aarch64_linux_read_description.
6714 * linux-aarch64-low.c (aarch64_linux_read_description):
6715 Merge with aarch64_arch_setup.
6716 (aarch64_arch_setup): Call aarch64_linux_read_description.
6717 * linux-aarch64-tdesc.c: New file.
6718 * linux-aarch64-tdesc.h: New file.
6719
6720 2017-11-24 Yao Qi <yao.qi@linaro.org>
6721
6722 * configure.srv: Set $srv_regobj for tic6x-linux.
6723 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6724 (tic6x_read_description): Move some code to tic6x_arch_setup.
6725 (tic6x_tdesc_test): New function.
6726 (initialize_low_arch): Call selftests::register_test.
6727
6728 2017-11-22 Yao Qi <yao.qi@linaro.org>
6729
6730 * remote-utils.c (prepare_resume_reply): Use memcpy.
6731
6732 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6733
6734 * linux-low.c (kill_one_lwp_callback): Return void, take
6735 argument directly, don't filter on pid.
6736 (linux_kill): Use for_each_thread.
6737
6738 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6739
6740 * linux-low.c (need_step_over_p): Return bool, remove dummy
6741 argument.
6742 (linux_resume, proceed_all_lwps): Use find_thread.
6743
6744 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6745
6746 * linux-low.c (resume_status_pending_p): Return bool, remove
6747 flag_p argument.
6748 (linux_resume): Use find_thread.
6749
6750 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6751
6752 * linux-low.c (struct thread_resume_array): Remove.
6753 (linux_set_resume_request): Return void, take arguments
6754 directly.
6755 (linux_resume): Use for_each_thread.
6756
6757 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6758
6759 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6760 return bool, remove data argument.
6761 (linux_stabilize_threads): Use find_thread.
6762
6763 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6764
6765 * linux-low.c (unsuspend_one_lwp): Remove.
6766 (unsuspend_all_lwps): Use for_each_thread, inline code from
6767 unsuspend_one_lwp.
6768
6769 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6770
6771 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6772 * linux-low.c (struct iterate_over_lwps_args): Remove.
6773 (iterate_over_lwps_filter): Remove.
6774 (iterate_over_lwps): Use find_thread.
6775
6776 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6777
6778 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6779 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6780 code from reset_lwp_ptrace_options_callback.
6781
6782 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6783
6784 * linux-arm-low.c (struct update_registers_data): Remove.
6785 (update_registers_callback): Return void, take arguments
6786 directly, don't check thread's pid.
6787 (arm_insert_point, arm_remove_point): Use for_each_thread.
6788
6789 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6790
6791 * win32-low.c (continue_one_thread): Return void, take argument
6792 directly.
6793 (child_continue): Use for_each_thread.
6794
6795 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6796
6797 * win32-i386-low.c (update_debug_registers_callback): Rename
6798 to ...
6799 (update_debug_registers): ... this, return void, remove pid_p arg.
6800 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6801
6802 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6803
6804 * inferiors.h (struct process_info): Add constructor, initialize
6805 fields..
6806 <syscalls_to_catch>: Change type to std::vector<int>.
6807 * inferiors.c (add_process): Allocate process_info with new.
6808 (remove_process): Free process_info with delete.
6809 * linux-low.c (handle_extended_wait): Adjust.
6810 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6811 * server.c (handle_general_set): Adjust.
6812
6813 2017-11-16 Pedro Alves <palves@redhat.com>
6814
6815 * remote-utils.c (remote_close): Block SIGIO signals instead of
6816 uninstalling the SIGIO handler.
6817
6818 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6819
6820 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6821
6822 2017-11-16 Yao Qi <yao.qi@linaro.org>
6823
6824 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6825 (tic6x_store_gregset): Likewise.
6826 (tic6x_usrregs_info): Move it up.
6827
6828 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6829
6830 * Makefile.in: Update arch rules.
6831 * configure.srv: Explicitly mark arch/ files.
6832
6833 2017-11-13 Andreas Schwab <schwab@suse.de>
6834
6835 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6836 function.
6837 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6838
6839 2017-11-06 Pedro Alves <palves@redhat.com>
6840
6841 * config.in, configure: Regenerate.
6842
6843 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6844
6845 * target.c (struct thread_search): Remove.
6846 (thread_search_callback): Remove.
6847 (prepare_to_access_memory): Use for_each_thread instead of
6848 find_inferior. Inline code from thread_search_callback.
6849
6850 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6851
6852 * server.c (struct visit_actioned_threads_data): Remove.
6853 (visit_actioned_threads): Change prototype to take arguments
6854 directly.
6855 (resume): Use find_thread instead of find_inferior.
6856
6857 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6858
6859 * server.c (queue_stop_reply_callback): Change prototype, return
6860 void.
6861 (find_status_pending_thread_callback): Remove.
6862 (handle_status): Replace find_inferior with find_thread and
6863 for_each_thread.
6864
6865 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6866
6867 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6868 with REGNO.
6869 (aarch64_store_gregset): Likewise.
6870 (aarch64_fill_fpregset): Likewise.
6871 (aarch64_store_fpregset): Likewise.
6872
6873 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6874
6875 * gdbthread.h (find_thread, for_each_thread): New functions.
6876 * inferiors.c (thread_of_pid): Remove.
6877 (find_any_thread_of_pid): Use find_thread.
6878 * linux-low.c (num_lwps): Use for_each_thread.
6879
6880 2017-10-17 Yao Qi <yao.qi@linaro.org>
6881
6882 * Makefile.in: Remove one rule.
6883 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6884
6885 2017-10-17 Yao Qi <yao.qi@linaro.org>
6886
6887 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6888 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6889
6890 2017-10-17 Yao Qi <yao.qi@linaro.org>
6891
6892 * configure.srv: Rename arm.o with arch/arm.o.
6893
6894 2017-10-17 Yao Qi <yao.qi@linaro.org>
6895
6896 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6897 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6898 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6899 (arch-i386.o, arch-amd64.o): Remove rules.
6900 (arch/%.o): New rule.
6901 Update POSTCOMPILE and COMPILE.pre.
6902 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6903 * configure: Re-generated.
6904 * configure.srv: Replace arch-i386.o with arch/i386.o.
6905 Replace arch-amd64.o with arch/amd64.o.
6906
6907 2017-10-16 Yao Qi <yao.qi@linaro.org>
6908
6909 * configure: Regenerated.
6910
6911 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6912
6913 * inferiors.h: (struct inferior_list): Remove.
6914 (struct inferior_list_entry); Remove.
6915 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6916 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6917 get_first_inferior): Remove.
6918 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6919 find_inferior_id, find_inferior_in_random): Change signature.
6920 * inferiors.c (all_threads): Change type to
6921 std::list<thread_info *>.
6922 (get_thread): Remove macro.
6923 (find_inferior, find_inferior_id): Change signature, implement
6924 using find_thread.
6925 (find_inferior_in_random): Change signature, implement using
6926 find_thread_in_random.
6927 (for_each_inferior, for_each_inferior_with_data): Change
6928 signature, implement using for_each_thread.
6929 (add_inferior_to_list, remove_inferior): Remove.
6930 (add_thread, get_first_thread, thread_of_pid,
6931 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6932 (get_first_inferior, one_inferior_p, clear_inferior_list):
6933 Remove.
6934 (clear_inferiors, get_thread_process): Update.
6935 * gdbthread.h: Include <list>.
6936 (struct thread_info) <entry>: Remove field.
6937 <id>: New field.
6938 (all_threads): Change type to std::list<thread_info *>.
6939 (get_first_inferior): Add doc.
6940 (find_thread, for_each_thread, find_thread_in_random): New
6941 functions.
6942 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6943 * linux-arm-low.c (update_registers_callback): Update.
6944 * linux-low.c (second_thread_of_pid_p): Update.
6945 (kill_one_lwp_callback, linux_detach_lwp_callback,
6946 delete_lwp_callback, status_pending_p_callback, same_lwp,
6947 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6948 iterate_over_lwps, not_stopped_callback,
6949 resume_stopped_resumed_lwps, count_events_callback,
6950 select_singlestep_lwp_callback, select_event_lwp_callback,
6951 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6952 suspend_and_send_sigstop_callback, wait_for_sigstop,
6953 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6954 lwp_running, linux_set_resume_request, resume_status_pending_p,
6955 need_step_over_p, start_step_over, linux_resume_one_thread,
6956 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6957 reset_lwp_ptrace_options_callback): Update.
6958 * linux-mips-low.c (update_watch_registers_callback): Update.
6959 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6960 Update.
6961 (free_register_cache_thread_one): Remove.
6962 (regcache_release): Update.
6963 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6964 handle_qxfer_threads_worker): Update.
6965 (handle_query): Update, use list iterator.
6966 (visit_actioned_threads, handle_pending_status,
6967 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6968 clear_pending_status_callback, set_pending_status_callback,
6969 find_status_pending_thread_callback, handle_status,
6970 process_serial_event): Update.
6971 * target.c (thread_search_callback): Update.
6972 * thread-db.c (thread_db_get_tls_address): Update.
6973 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6974 Update.
6975 * win32-i386-low.c (update_debug_registers_callback): Update.
6976 * win32-low.c (delete_thread_info, child_delete_thread,
6977 continue_one_thread, suspend_one_thread,
6978 get_child_debug_event): Adjust.
6979
6980 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6981
6982 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6983 * inferiors.h: Include <list>.
6984 (struct process_info) <entry>: Remove field.
6985 <pid>: New field.
6986 (pid_of): Change macro to function.
6987 (ptid_of, lwpid_of): Remove macro.
6988 (all_processes): Change type to std::list<process_info *>.
6989 (ALL_PROCESSES): Remove macro.
6990 (for_each_process, find_process): New function.
6991 * inferiors.c (all_processes): Change type to
6992 std::list<process_info *>.
6993 (find_thread_process): Adjust.
6994 (add_process): Likewise.
6995 (remove_process): Likewise.
6996 (find_process_pid): Likewise.
6997 (get_first_process): Likewise.
6998 (started_inferior_callback): Remove.
6999 (have_started_inferiors_p): Adjust.
7000 (attached_inferior_callback): Remove.
7001 (have_attached_inferiors_p): Adjust.
7002 * linux-low.c (check_zombie_leaders): Likewise.
7003 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
7004 (x86_linux_update_xmltarget): Adjust.
7005 * server.c (handle_query): Likewise.
7006 (gdb_reattached_process): Remove.
7007 (handle_status): Adjust.
7008 (kill_inferior_callback): Likewise.
7009 (detach_or_kill_inferior): Remove.
7010 (print_started_pid): Likewise.
7011 (print_attached_pid): Likewise.
7012 (detach_or_kill_for_exit): Update.
7013 (process_serial_event): Likewise.
7014 * linux-arm-low.c (arm_new_fork): Likewise.
7015
7016 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
7017
7018 * dll.h: Include <list>.
7019 (struct dll_info): Add constructor.
7020 <entry>: Remove field.
7021 (all_dlls): Change type to std::list<dll_info>.
7022 * dll.c: Include <algorithm>.
7023 (get_dll): Remove macro.
7024 (all_dlls): Change type to std::list<dll_info *>.
7025 (free_one_dll): Remove.
7026 (match_dll): Likewise.
7027 (loaded_dll): Adjust.
7028 (unloaded_dll): Adjust to all_dlls type change, use
7029 std::find_if. Inline code from match_dll.
7030 (clear_dlls): Adjust to all_dlls type change.
7031 * server.c (emit_dll_description): Remove.
7032 (handle_qxfer_libraries): Adjust to all_dlls type change,
7033 integrate emit_dll_description's functionality.
7034
7035 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
7036
7037 * linux-low.h (struct linux_target_ops) <delete_process>: New
7038 field.
7039 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
7040 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
7041 (struct linux_target_ops): Add delete_process callback.
7042 * linux-arm-low.c (arm_delete_process): New.
7043 (struct linux_target_ops): Add delete_process callback.
7044 * linux-bfin-low.c (struct linux_target_ops): Likewise.
7045 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
7046 * linux-m32r-low.c (struct linux_target_ops): Likewise.
7047 * linux-mips-low.c (mips_linux_delete_process): New.
7048 (struct linux_target_ops): Add delete_process callback.
7049 * linux-ppc-low.c (struct linux_target_ops): Likewise.
7050 * linux-s390-low.c (struct linux_target_ops): Likewise.
7051 * linux-sh-low.c (struct linux_target_ops): Likewise.
7052 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
7053 * linux-tile-low.c (struct linux_target_ops): Likewise.
7054 * linux-x86-low.c (x86_linux_delete_process): New.
7055 (struct linux_target_ops): Add delete_process callback.
7056 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
7057
7058 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
7059
7060 * linux-aarch64-low.c (the_low_target): Add thread delete
7061 callback.
7062 * linux-arm-low.c (arm_delete_thread): New function.
7063 (the_low_target): Add thread delete callback.
7064 * linux-bfin-low.c (the_low_target): Likewise.
7065 * linux-crisv32-low.c (the_low_target): Likewise.
7066 * linux-low.c (delete_lwp): Invoke delete_thread callback if
7067 set.
7068 * linux-low.h (struct linux_target_ops) <delete_thread>: New
7069 field.
7070 * linux-m32r-low.c (the_low_target): Add thread delete callback.
7071 * linux-mips-low.c (mips_linux_delete_thread): New function.
7072 (the_low_target): Add thread delete callback.
7073 * linux-ppc-low.c (the_low_target): Likewise.
7074 * linux-s390-low.c (the_low_target): Likewise.
7075 * linux-sh-low.c (the_low_target): Likewise.
7076 * linux-tic6x-low.c (the_low_target): Likewise.
7077 * linux-tile-low.c (the_low_target): Likewise.
7078 * linux-x86-low.c (the_low_target): Likewise.
7079 * linux-xtensa-low.c (the_low_target): Likewise.
7080
7081 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
7082
7083 * win32-low.c: Include "common-inferior.h".
7084
7085 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7086
7087 * inferiors.c (set_inferior_cwd): New function.
7088 * server.c (handle_general_set): Handle QSetWorkingDir packet.
7089 (handle_query): Inform that QSetWorkingDir is supported.
7090 * win32-low.c (create_process): Pass the inferior's cwd to
7091 CreateProcess.
7092
7093 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7094
7095 * inferiors.c (current_inferior_cwd): New global variable.
7096 (get_inferior_cwd): New function.
7097 * inferiors.h (struct process_info) <cwd>: New field.
7098
7099 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7100
7101 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
7102 (OBS): Add gdb_tilde_expand.o.
7103
7104 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
7105
7106 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
7107 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
7108
7109 2017-09-29 Pedro Alves <palves@redhat.com>
7110
7111 * ax.c (gdb_parse_agent_expr): Constify.
7112 * ax.h (gdb_parse_agent_expr): Constify.
7113 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7114 Constify.
7115 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
7116 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
7117 * remote-utils.h (read_ptid): Constify.
7118 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
7119 (process_point_options, process_serial_event): Constify.
7120 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
7121 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
7122 (cmd_qtbuffer): Constify.
7123
7124 2017-09-29 Pedro Alves <palves@redhat.com>
7125
7126 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
7127 fails.
7128
7129 2017-09-29 Pedro Alves <palves@redhat.com>
7130
7131 * linux-low.c (handle_extended_wait): Pass parent thread instead
7132 of process to thread_db_notice_clone.
7133 * linux-low.h (thread_db_notice_clone): Replace parent process
7134 parameter with parent thread parameter.
7135 * thread-db.c (find_one_thread): Add comment.
7136 (thread_db_notice_clone): Replace parent process parameter with
7137 parent thread parameter. Temporarily switch to the parent thread.
7138
7139 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
7140
7141 * gdbthread.h: Include "common-gdbthread.h".
7142 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
7143 "if" when validating the ptid.
7144 * remote-utils.c: Include "gdbthread.h".
7145 (prepare_resume_reply): Use "switch_to_thread".
7146 * target.c (done_accessing_memory): Likewise.
7147
7148 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7149
7150 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
7151 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
7152 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
7153 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
7154 s390x-gs-linux64-ipa.o to ipa_obj.
7155 * linux-s390-low.c (HWCAP_S390_GS): New define.
7156 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
7157 New functions.
7158 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
7159 (s390_arch_setup): Check for guarded-storage support and choose
7160 appropriate tdesc.
7161 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
7162 init_registers_s390x_gs_linux64.
7163 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
7164 enum value.
7165 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
7166 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
7167
7168 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
7169
7170 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
7171
7172 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7173
7174 * linux-low.h (struct lwp_info): Add new field, thread_handle.
7175 (thread_db_thread_handle): Declare.
7176 * linux-low.c (linux_target_ops): Initialize thread_handle.
7177 * server.c (handle_qxfer_threads_worker): Add support for
7178 "handle" attribute.
7179 * target.h (struct target_ops): Add new function pointer,
7180 thread_handle.
7181 (target_thread_handle): Define.
7182 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
7183 field in lwp.
7184 (thread_db_thread_handle): New function.
7185
7186 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7187
7188 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
7189 * linux-low.h (thread_db_notice_clone): Declare.
7190 * thread-db.c (thread_db_notice_clone): New function.
7191
7192 2017-09-21 Pedro Alves <palves@redhat.com>
7193
7194 * server.c (gdb_read_memory, handle_status, process_serial_event)
7195 (handle_serial_event, handle_target_event): Adjust to
7196 set_desired_thread prototype change.
7197 * target.c (set_desired_thread): Remove 'use_general' parameter
7198 and adjust.
7199 * target.h (set_desired_thread): Remove 'use_general' parameter.
7200
7201 2017-09-20 Tom Tromey <tom@tromey.com>
7202
7203 * target.c (target_terminal::terminal_state): Define.
7204 (target_terminal::init): Rename from target_terminal_init.
7205 (target_terminal::inferior): Rename from
7206 target_terminal_inferior.
7207 (target_terminal::ours): Rename from target_terminal_ours.
7208 (target_terminal::ours_for_output, target_terminal::info): New.
7209
7210 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7211
7212 * server.c (accumulate_file_name_length): Remove.
7213 (emit_dll_description): Adjust to std::string change.
7214 (handle_qxfer_libraries): Use std::string to hold document.
7215
7216 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7217
7218 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
7219 return type of xml_escape_text.
7220 * server.c (emit_dll_description): Likewise.
7221
7222 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7223
7224 * server.c (captured_main): Accept argument for --selftest.
7225 Update run_tests call.
7226 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
7227 when registering selftests.
7228
7229 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
7230
7231 * regcache.c (get_thread_regcache): Update code to use "std::vector"
7232 instead of "VEC" for "target_desc.reg_defs".
7233 (regcache_cpy): Likewise.
7234 (registers_to_string): Likewise.
7235 (registers_from_string): Likewise.
7236 (find_regno): Likewise.
7237 (supply_regblock): Likewise.
7238 (regcache_raw_read_unsigned): Likewise.
7239 * tdesc.c (init_target_desc): Likewise.
7240 (tdesc_create_reg): Likewise.
7241 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
7242 (struct target_desc) <reg_defs>: Convert to "std::vector".
7243 (target_desc): Do not initialize "reg_defs".
7244 (~target_desc): Update code to use "std::vector" instead of "VEC"
7245 for "target_desc.reg_defs".
7246 (operator==): Likewise.
7247
7248 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7249
7250 * inferiors.h (thread_to_gdb_id): Remove.
7251 * inferiors.c (thread_to_gdb_id): Remove.
7252 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
7253 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7254 lynx_store_registers, lynx_read_memory, lynx_write_memory):
7255 Likewise.
7256 * nto-low.c (nto_fetch_registers, nto_store_registers,
7257 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
7258
7259 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7260
7261 * inferiors.h (gdb_id_to_thread_id): Remove.
7262 * inferiors.c (gdb_id_to_thread_id): Remove.
7263 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7264 removal. Move pid declaration closer to where it's used.
7265
7266 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7267
7268 * server.c (handle_detach): New function.
7269 (process_serial_event): Move code out, call handle_detach.
7270
7271 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7272
7273 * server.c (require_running): Rename to ...
7274 (require_running_or_return): ... this ...
7275 (require_running_or_break): ... and this.
7276 (handle_query, process_serial_event): Adjust.
7277
7278 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7279
7280 * linux-low.c (linux_set_resume_request): Remove unused
7281 variables.
7282
7283 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7284
7285 * server.c (first_thread_of): Remove.
7286 (process_serial_event): Replace usage of first_thread_of with
7287 find_any_thread_of_pid.
7288 * tracepoint.c (same_process_p): Remove.
7289 (gdb_agent_about_to_close): Replace usage of same_process_p with
7290 find_any_thread_of_pid.
7291 * linux-x86-low.c (same_process_callback): Remove.
7292 (x86_arch_setup_process_callback): Replace usage of
7293 same_process_callback with find_any_thread_of_pid.
7294 * thread-db.c (any_thread_of): Remove.
7295 (switch_to_process): Replace usage of any_thread_of with
7296 find_any_thread_of_pid.
7297 * inferiors.c (thread_pid_matches_callback): Remove.
7298 (find_thread_process): Adjust to use find_any_thread_of_pid.
7299
7300 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7301
7302 * regcache.c (get_thread_regcache): Guard calls to "memset"
7303 with "!VEC_empty".
7304
7305 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7306
7307 * linux-low.c (handle_extended_wait): Use
7308 "allocate_target_description" instead of "XNEW".
7309 * linux-x86-low.c (initialize_low_arch): Likewise.
7310
7311 2017-09-05 Yao Qi <yao.qi@linaro.org>
7312
7313 * configure.srv (srv_i386_regobj): Remove.
7314 (srv_amd64_regobj): Remove.
7315 (srv_regobj): Set it to "" for x86 non-linux targets.
7316 * linux-x86-tdesc.c (i386_linux_read_description):
7317 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7318 (init_registers_i386): Remove the declaration.
7319 (tdesc_i386): Remove the declaration.
7320 (lynx_i386_arch_setup): Call i386_create_target_description.
7321 * nto-x86-low.c: Likewise.
7322 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7323 [!__x86_64__]: include arch/i386.h.
7324 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7325
7326 2017-09-05 Yao Qi <yao.qi@linaro.org>
7327
7328 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7329 i386/amd64-XXX-linux from it.
7330
7331 2017-09-05 Yao Qi <yao.qi@linaro.org>
7332
7333 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7334 false.
7335 (ipa_amd64_linux_regobj): Remove.
7336 (ipa_x32_linux_regobj): Remove.
7337
7338 2017-09-05 Yao Qi <yao.qi@linaro.org>
7339
7340 * Makefile.in (arch-amd64.o): New rule.
7341 * configure.srv: Append arch-amd64.o.
7342 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7343 (get_ipa_tdesc): Call amd64_linux_read_description.
7344 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7345 and init_registers_amd64_XXX.
7346 * linux-x86-low.c (x86_linux_read_description): Call
7347 amd64_linux_read_description.
7348 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7349 (initialize_low_arch): Don't call init_registers_x32_XXX and
7350 init_registers_amd64_XXX.
7351 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7352 and tdesc_amd64_XXX.
7353 [__x86_64__] (amd64_tdesc_test): New function.
7354 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7355 and init_registers_amd64_XXX.
7356 * linux-x86-tdesc.c: Include arch/amd64.h.
7357 (xcr0_to_tdesc_idx): New function.
7358 (i386_linux_read_description): New function.
7359 (amd64_get_ipa_tdesc_idx): New function.
7360 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7361 (amd64_get_ipa_tdesc): Declare.
7362
7363 2017-09-05 Yao Qi <yao.qi@linaro.org>
7364
7365 * configure.srv (srv_i386_linux_xmlfiles): Remove
7366 i386/i386-XXX-linux.xml from it.
7367
7368 2017-09-05 Yao Qi <yao.qi@linaro.org>
7369
7370 * configure.srv: Set srv_i386_linux_regobj empty if $development
7371 is false.
7372 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7373 initialize_low_tdesc.
7374 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7375 with #if initialize_low_tdesc.
7376 * linux-x86-tdesc-selftest.c: New file.
7377 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7378
7379 2017-09-05 Yao Qi <yao.qi@linaro.org>
7380
7381 * Makefile.in (arch-i386.o): New rule.
7382 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7383 (x86_64-*-linux*): Likewise.
7384 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7385 include arch/i386.h.
7386 (i386_linux_read_description): Remove code and call
7387 i386_create_target_description.
7388 * tdesc.c (allocate_target_description): New function.
7389 * tdesc.h (set_tdesc_architecture): Remove declaration.
7390 (set_tdesc_osabi): Likewise.
7391
7392 2017-09-05 Yao Qi <yao.qi@linaro.org>
7393
7394 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7395 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7396 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7397 .xmltarget.
7398 * server.c (get_features_xml): Call tdesc_get_features_xml.
7399 * tdesc.c (set_tdesc_architecture): New function.
7400 (set_tdesc_osabi): New function.
7401 (tdesc_get_features_xml): New function.
7402 (tdesc_create_feature): Add an argument.
7403 * tdesc.h (struct target_desc) <features>: New field.
7404 <arch, osabi>: New field.
7405 (~target_desc): xfree features, arch, and osabi.
7406 (target_desc::oerator==): Don't compare .xmltarget.
7407 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7408 (set_tdesc_osabi): Likewise.
7409 (tdesc_get_features_xml): Likewise.
7410
7411 2017-09-05 Yao Qi <yao.qi@linaro.org>
7412
7413 * linux-x86-tdesc.c: Include selftest.h.
7414 (i386_tdesc_test): New function.
7415 (initialize_low_tdesc): Call selftests::register_test.
7416 * tdesc.h: Include regdef.h.
7417 (target_desc): Override operator == and !=.
7418
7419 2017-09-05 Yao Qi <yao.qi@linaro.org>
7420
7421 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7422 (ipa_obj): Likewise.
7423 * linux-i386-ipa.c: Include common/x86-xstate.h
7424 (get_ipa_tdesc): Call i386_linux_read_description.
7425 (initialize_low_tracepoint): Don't call init_registers_XXX
7426 functions, call initialize_low_tdesc instead.
7427 * linux-x86-low.c (x86_linux_read_description): Call
7428 i386_linux_read_description.
7429 (initialize_low_arch): Don't call init_registers_i386_XXX
7430 functions, call initialize_low_tdesc.
7431 * linux-x86-tdesc.c: New file.
7432 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7433 (i386_get_ipa_tdesc_idx): Declare.
7434 (i386_get_ipa_tdesc): Declare.
7435 (initialize_low_tdesc): Declare.
7436
7437 2017-09-05 Yao Qi <yao.qi@linaro.org>
7438
7439 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7440 instead of 0.
7441
7442 2017-09-05 Yao Qi <yao.qi@linaro.org>
7443
7444 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7445 * regcache.c (get_thread_regcache): Use VEC_length.
7446 (init_register_cache): Likewise.
7447 (regcache_cpy): Likewise.
7448 (registers_to_string): Iterate reg_defs via VEC_iterate.
7449 (find_regno): Likewise.
7450 (find_register_by_number): Use VEC_index.
7451 (register_size): Call find_register_by_number.
7452 (register_data): Call find_register_by_number.
7453 (supply_regblock): Use VEC_length.
7454 (regcache_raw_read_unsigned): Likewise.
7455 * tdesc.c (init_target_desc): Iterate reg_defs via
7456 VEC_iterate.
7457 (default_description): Update initializer.
7458 (copy_target_description): Don't update field num_registers.
7459 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7460 <num_registers>: Remove.
7461
7462 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7463
7464 * Makefile.in (.SECONDARY): Define target.
7465
7466 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7467
7468 * linux-low.c (linux_wait_1): Adjust.
7469 * server.c (queue_stop_reply_callback): Adjust.
7470
7471 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7472
7473 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7474 QEnvironmentUnset and QEnvironmentReset packets.
7475 (handle_query): Inform remote that QEnvironmentHexEncoded,
7476 QEnvironmentUnset and QEnvironmentReset are supported.
7477
7478 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7479
7480 * inferiors.h (inferior_target_data): Rename to ...
7481 (thread_target_data): ... this.
7482 (inferior_regcache_data): Rename to ...
7483 (thread_regcache_data): ... this.
7484 (set_inferior_regcache_data): Rename to ...
7485 (set_thread_regcache_data): ... this.
7486 * inferiors.c (inferior_target_data): Rename to ...
7487 (thread_target_data): ... this.
7488 (inferior_regcache_data): Rename to ...
7489 (thread_regcache_data): ... this.
7490 (set_inferior_regcache_data): Rename to ...
7491 (set_thread_regcache_data): ... this.
7492 (free_one_thread): Update.
7493 * linux-low.h (get_thread_lwp): Update.
7494 * regcache.c (get_thread_regcache): Update.
7495 (regcache_invalidate_thread): Update.
7496 (free_register_cache_thread): Update.
7497 * win32-i386-low.c (update_debug_registers_callback): Update.
7498 (win32_get_current_dr): Update.
7499 * win32-low.c (thread_rec): Update.
7500 (delete_thread_info): Update.
7501 (continue_one_thread): Update.
7502 (suspend_one_thread): Update.
7503
7504 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7505
7506 * inferiors.c (set_inferior_target_data): Remove.
7507 * inferiors.h (set_inferior_target_data): Remove.
7508
7509 2017-08-18 Yao Qi <yao.qi@linaro.org>
7510
7511 * Makefile.in (OBS): Add selftest.o.
7512 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7513 * configure, config.in: Re-generated.
7514 * server.c: Include common/sefltest.h.
7515 (captured_main): Handle option --selftest.
7516
7517 2017-08-09 Yao Qi <yao.qi@linaro.org>
7518
7519 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7520 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7521 i386-avx-mpx.o and i386-mmx.o.
7522 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7523 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7524 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7525 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7526 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7527 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7528 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7529 i386/amd64-avx-mpx.xml.
7530
7531 2017-08-09 Yao Qi <yao.qi@linaro.org>
7532
7533 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7534 and x32-avx-avx512.o.
7535 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7536 i386/x32-avx-avx512.xml.
7537
7538 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7539
7540 * tracepoint.h (enum class fast_tpoint_collect_result): New
7541 enumeration.
7542 (fast_tracepoint_collecting): Change return type to
7543 fast_tpoint_collect_result.
7544 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7545 * linux-low.h: Include tracepoint.h.
7546 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7547 fast_tpoint_collect_result.
7548 * linux-low.c (handle_tracepoints): Adjust.
7549 (linux_fast_tracepoint_collecting): Change return type to
7550 fast_tpoint_collect_result.
7551 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7552 linux_wait_1, stuck_in_jump_pad_callback,
7553 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7554 proceed_one_lwp): Adjust to type change.
7555
7556 2017-07-10 Yao Qi <yao.qi@linaro.org>
7557
7558 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7559
7560 2017-06-29 Yao Qi <yao.qi@linaro.org>
7561
7562 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7563 Remove.
7564 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7565
7566 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7567
7568 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7569
7570 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7571
7572 * linux-low.c (linux_create_inferior): Adjust code to access the
7573 environment information via 'gdb_environ' class.
7574 * lynx-low.c (lynx_create_inferior): Likewise.
7575 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7576 (get_environ): Return a pointer to 'our_environ'.
7577 (captured_main): Initialize 'our_environ'.
7578 * server.h (get_environ): Adjust prototype.
7579 * spu-low.c (spu_create_inferior): Adjust code to access the
7580 environment information via 'gdb_environ' class.
7581
7582 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7583
7584 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7585 usage of "register" keyword.
7586
7587 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7588
7589 * configure: Re-generate.
7590
7591 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7592
7593 * configure: Re-generate.
7594
7595 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7596
7597 * Makefile.in (COMPILE.pre): Add "-x c++".
7598
7599 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7600
7601 * fork-child.c: Conditionally include <signal.h>.
7602
7603 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7604
7605 * server.c (handle_general_set): Handle new packet
7606 "QStartupWithShell".
7607 (handle_query): Add "QStartupWithShell" to the list of supported
7608 packets.
7609 (gdbserver_usage): Add help text explaining the
7610 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7611 options.
7612 (captured_main): Recognize and act upon the presence of the new
7613 CLI options.
7614
7615 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7616 Pedro Alves <palves@redhat.com>
7617
7618 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7619 * configure: Regenerate.
7620 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7621 "fork-inferior.o".
7622 (i[34567]86-*-lynxos*): Likewise.
7623 (spu*-*-*): Likewise.
7624 * fork-child.c: New file.
7625 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7626 and "environ.h".
7627 (linux_ptrace_fun): New function.
7628 (linux_create_inferior): Adjust function prototype to reflect
7629 change on "target.h". Adjust function code to use
7630 "fork_inferior".
7631 (linux_request_interrupt): Delete "signal_pid".
7632 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7633 (lynx_ptrace_fun): New function.
7634 (lynx_create_inferior): Adjust function prototype to reflect
7635 change on "target.h". Adjust function code to use
7636 "fork_inferior".
7637 * nto-low.c (nto_create_inferior): Adjust function prototype and
7638 code to reflect change on "target.h". Update comments.
7639 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7640 "common-terminal.h" and "environ.h".
7641 (terminal_fd): Moved to fork-child.c.
7642 (old_foreground_pgrp): Likewise.
7643 (restore_old_foreground_pgrp): Likewise.
7644 (last_status): Make it global.
7645 (last_ptid): Likewise.
7646 (our_environ): New variable.
7647 (startup_with_shell): Likewise.
7648 (program_name): Likewise.
7649 (program_argv): Rename to...
7650 (program_args): ...this.
7651 (wrapper_argv): New variable.
7652 (start_inferior): Delete function.
7653 (get_exec_wrapper): New function.
7654 (get_exec_file): Likewise.
7655 (get_environ): Likewise.
7656 (prefork_hook): Likewise.
7657 (post_fork_inferior): Likewise.
7658 (postfork_hook): Likewise.
7659 (postfork_child_hook): Likewise.
7660 (handle_v_run): Update code to deal with arguments coming from the
7661 remote host. Update calls from "start_inferior" to
7662 "create_inferior".
7663 (captured_main): Likewise. Initialize environment variable. Call
7664 "have_job_control".
7665 * server.h (post_fork_inferior): New prototype.
7666 (get_environ): Likewise.
7667 (last_status): Declare.
7668 (last_ptid): Likewise.
7669 (signal_pid): Likewise.
7670 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7671 (spu_ptrace_fun): New function.
7672 (spu_create_inferior): Adjust function prototype to reflect change
7673 on "target.h". Adjust function code to use "fork_inferior".
7674 * target.c (target_terminal_init): New function.
7675 (target_terminal_inferior): Likewise.
7676 (target_terminal_ours): Likewise.
7677 * target.h: Include <vector>.
7678 (struct target_ops) <create_inferior>: Update prototype.
7679 (create_inferior): Update macro.
7680 * utils.c (gdb_flush_out_err): New function.
7681 * win32-low.c (win32_create_inferior): Adjust function prototype
7682 and code to reflect change on "target.h".
7683
7684 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7685
7686 * inferiors.c (switch_to_thread): New function.
7687
7688 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7689
7690 * Makefile.in (SFILE): Add "common/job-control.c".
7691 (OBS): Add "job-control.o".
7692
7693 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7694
7695 * Makefile: Remove "@host_makefile_frag@".
7696
7697 2017-05-05 Pedro Alves <palves@redhat.com>
7698
7699 * configure: Regenerate.
7700
7701 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7702
7703 * configure: Regenerate.
7704
7705 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7706
7707 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7708 software_single_step change of return type to
7709 std::vector<CORE_ADDR>.
7710 * linux-low.c (install_software_single_step_breakpoints):
7711 Likewise.
7712 * linux-low.h (install_software_single_step_breakpoints):
7713 Likewise.
7714
7715 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7716
7717 * remote-utils.c: Include "gdb_termios.h" instead of
7718 "terminal.h".
7719 * terminal.h: Delete file.
7720
7721 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7722
7723 * server.c: Include <vector>.
7724 <program_argv, wrapper_argv>: Convert to std::vector.
7725 (start_inferior): Rewrite function to use C++.
7726 (handle_v_run): Likewise. Update code that calculates the argv
7727 based on the vRun packet; use C++.
7728 (captured_main): Likewise.
7729
7730 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7731
7732 * server.c (handle_v_cont): Initialize thread_resume::thread
7733 with null_ptid.
7734
7735 2017-04-05 Pedro Alves <palves@redhat.com>
7736
7737 * configure: Regenerate.
7738
7739 2017-04-05 Pedro Alves <palves@redhat.com>
7740
7741 * gdbreplay.c (sync_error): Constify.
7742 * linux-x86-low.c (push_opcode): Constify.
7743
7744 2017-04-05 Pedro Alves <palves@redhat.com>
7745
7746 * win32-low.c (get_child_debug_event)
7747 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7748 Report TARGET_WAITKIND_SPURIOUS instead.
7749
7750 2017-04-05 Pedro Alves <palves@redhat.com>
7751
7752 * remote-utils.c (remote_prepare, remote_open): Constify.
7753 * remote-utils.h (remote_prepare, remote_open): Constify.
7754 * server.c (captured_main): Constify 'port' handling.
7755
7756 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7757
7758 * Makefile.in (clean): Clear .deps.
7759
7760 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7761
7762 * .gitignore: Remove generated files, replace with wildcard.
7763 * (clean): Replace removal of generated files with wildcard.
7764 (version.c): Replace with...
7765 (version-generated.c): ...this.
7766 (xml-builtin.c): Replace with...
7767 (xml-builtin-generated.c): ...this.
7768 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7769 (%.c: *regformats*): Replace with...
7770 (%-generated.c: *regformats*): ...this.
7771
7772 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7773
7774 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7775 (xtensa_fill_gregset): Call collect_register_by_name for
7776 threadptr register.
7777 (xtensa_store_gregset): Call supply_register_by_name for
7778 threadptr register.
7779
7780 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7781
7782 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7783 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7784 (xtensa_store_gregset): Call supply_register for all registers in
7785 a0_regnum..a0_regnum + C0_NREGS range.
7786
7787 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7788
7789 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7790 (ax-ipa.o: ax.c): Remove.
7791 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7792 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7793 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7794 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7795 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7796
7797 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7798
7799 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7800 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7801 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7802 (errors-ipa.o: ../common/errors.c): Remove.
7803 (format-ipa.o: ../common/format.c): Remove.
7804 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7805
7806 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7807
7808 * Makefile.in (%-ipa.o: %.c): New rule.
7809 (tracepoint-ipa.o: tracepoint.c): Remove.
7810 (utils-ipa.o: utils.c): Remove.
7811 (remote-utils-ipa.o: remote-utils.c): Remove.
7812 (regcache-ipa.o: regcache.c): Remove.
7813 (i386-linux-ipa.o: i386-linux.c): Remove.
7814 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7815 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7816 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7817 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7818 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7819 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7820 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7821 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7822 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7823 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7824 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7825 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7826 (aarch64-ipa.o: aarch64.c): Remove.
7827 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7828 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7829 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7830 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7831 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7832 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7833 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7834 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7835 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7836 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7837 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7838 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7839 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7840 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7841 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7842 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7843 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7844 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7845 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7846 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7847 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7848 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7849 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7850 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7851 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7852 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7853 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7854 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7855 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7856 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7857 (tdesc-ipa.o: tdesc.c): Remove.
7858 (x32-linux-ipa.o: x32-linux.c): Remove.
7859 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7860 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7861
7862 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7863
7864 * Makefile.in (%.o: ../arch/%.c): New rule.
7865 (arm.o: ../arch/arm.c): Remove.
7866 (arm-linux.o: ../arch/arm-linux.c): Remove.
7867 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7868 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7869
7870 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7871
7872 * Makefile.in (%.o: ../nat/%.c): New rule.
7873 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7874 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7875 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7876 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7877 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7878 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7879 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7880 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7881 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7882 (linux-personality.o: ../nat/linux-personality.c): Remove.
7883 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7884 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7885 (x86-linux.o: ../nat/x86-linux.c): Remove.
7886 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7887 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7888
7889 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7890
7891 * Makefile.in (%.o: ../common/%.c): New rule.
7892 (signals.o: ../common/signals.c): Remove.
7893 (print-utils.o: ../common/print-utils.c): Remove.
7894 (rsp-low.o: ../common/rsp-low.c): Remove.
7895 (common-utils.o: ../common/common-utils.c): Remove.
7896 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7897 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7898 (vec.o: ../common/vec.c): Remove.
7899 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7900 (xml-utils.o: ../common/xml-utils.c): Remove.
7901 (ptid.o: ../common/ptid.c): Remove.
7902 (buffer.o: ../common/buffer.c): Remove.
7903 (format.o: ../common/format.c): Remove.
7904 (filestuff.o: ../common/filestuff.c): Remove.
7905 (agent.o: ../common/agent.c): Remove.
7906 (errors.o: ../common/errors.c): Remove.
7907 (environ.o: ../common/environ.c): Remove.
7908 (common-debug.o: ../common/common-debug.c): Remove.
7909 (cleanups.o: ../common/cleanups.c): Remove.
7910 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7911 (fileio.o: ../common/fileio.c): Remove.
7912 (common-regcache.o: ../common/common-regcache.c): Remove.
7913 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7914 (new-op.o: ../common/new-op.c): Remove.
7915 (btrace-common.o: ../common/btrace-common.c): Remove.
7916
7917 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7918
7919 * Makefile.in (%.o: ../target/%.c): New rule.
7920 (waitstatus.o: ../target/waitstatus.c): Remove.
7921
7922 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7923
7924 * Makefile.in
7925 (%.c: ../regformats/%.dat,
7926 (%.c: ../regformats/arm/%.dat,
7927 (%.c: ../regformats/i386/%.dat,
7928 (%.c: ../regformats/rs6000/%.dat): New rules.
7929 (aarch64.c): Remove.
7930 (reg-arm.c): Remove.
7931 (arm-with-iwmmxt.c): Remove.
7932 (arm-with-vfpv2.c): Remove.
7933 (arm-with-vfpv3.c): Remove.
7934 (arm-with-neon.c): Remove.
7935 (reg-bfin.c): Remove.
7936 (reg-cris.c): Remove.
7937 (reg-crisv32.c): Remove.
7938 (i386.c): Remove.
7939 (i386-linux.c): Remove.
7940 (i386-avx.c): Remove.
7941 (i386-avx-linux.c): Remove.
7942 (i386-avx-avx512.c): Remove.
7943 (i386-avx-avx512-linux.c): Remove.
7944 (i386-mpx.c): Remove.
7945 (i386-mpx-linux.c): Remove.
7946 (i386-avx-mpx-avx512-pku.c): Remove.
7947 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7948 (i386-avx-mpx.c): Remove.
7949 (i386-avx-mpx-linux.c): Remove.
7950 (i386-mmx.c): Remove.
7951 (i386-mmx-linux.c): Remove.
7952 (reg-ia64.c): Remove.
7953 (reg-m32r.c): Remove.
7954 (reg-m68k.c): Remove.
7955 (reg-cf.c): Remove.
7956 (mips-linux.c): Remove.
7957 (mips-dsp-linux.c): Remove.
7958 (mips64-linux.c): Remove.
7959 (mips64-dsp-linux.c): Remove.
7960 (nios2-linux.c): Remove.
7961 (powerpc-32.c): Remove.
7962 (powerpc-32l.c): Remove.
7963 (powerpc-altivec32l.c): Remove.
7964 (powerpc-cell32l.c): Remove.
7965 (powerpc-vsx32l.c): Remove.
7966 (powerpc-isa205-32l.c): Remove.
7967 (powerpc-isa205-altivec32l.c): Remove.
7968 (powerpc-isa205-vsx32l.c): Remove.
7969 (powerpc-e500l.c): Remove.
7970 (powerpc-64l.c): Remove.
7971 (powerpc-altivec64l.c): Remove.
7972 (powerpc-cell64l.c): Remove.
7973 (powerpc-vsx64l.c): Remove.
7974 (powerpc-isa205-64l.c): Remove.
7975 (powerpc-isa205-altivec64l.c): Remove.
7976 (powerpc-isa205-vsx64l.c): Remove.
7977 (s390-linux32.c): Remove.
7978 (s390-linux32v1.c): Remove.
7979 (s390-linux32v2.c): Remove.
7980 (s390-linux64.c): Remove.
7981 (s390-linux64v1.c): Remove.
7982 (s390-linux64v2.c): Remove.
7983 (s390-te-linux64.c): Remove.
7984 (s390-vx-linux64.c): Remove.
7985 (s390-tevx-linux64.c): Remove.
7986 (s390x-linux64.c): Remove.
7987 (s390x-linux64v1.c): Remove.
7988 (s390x-linux64v2.c): Remove.
7989 (s390x-te-linux64.c): Remove.
7990 (s390x-vx-linux64.c): Remove.
7991 (s390x-tevx-linux64.c): Remove.
7992 (tic6x-c64xp-linux.c): Remove.
7993 (tic6x-c64x-linux.c): Remove.
7994 (tic6x-c62x-linux.c): Remove.
7995 (reg-sh.c): Remove.
7996 (reg-sparc64.c): Remove.
7997 (reg-spu.c): Remove.
7998 (amd64.c): Remove.
7999 (amd64-linux.c): Remove.
8000 (amd64-avx.c): Remove.
8001 (amd64-avx-linux.c): Remove.
8002 (amd64-avx-avx512.c): Remove.
8003 (amd64-avx-avx512-linux.c): Remove.
8004 (amd64-mpx.c): Remove.
8005 (amd64-mpx-linux.c): Remove.
8006 (amd64-avx-mpx-avx512-pku.c): Remove.
8007 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
8008 (amd64-avx-mpx.c): Remove.
8009 (amd64-avx-mpx-linux.c): Remove.
8010 (x32.c): Remove.
8011 (x32-linux.c): Remove.
8012 (x32-avx.c): Remove.
8013 (x32-avx-linux.c): Remove.
8014 (x32-avx-avx512.c): Remove.
8015 (x32-avx-avx512-linux.c): Remove.
8016 (reg-xtensa.c): Remove.
8017 (reg-tilegx.c): Remove.
8018 (reg-tilegx32.c): Remove.
8019
8020 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
8021
8022 * Makefile.in (SFILES): Add "common/environ.c".
8023 (OBJS): Add "common/environ.h".
8024
8025 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8026
8027 * configure.ac: Check if the fs_base and gs_base members of
8028 `struct user_regs_struct' exist.
8029 * config.in: Regenerated.
8030 * configure: Likewise.
8031
8032 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
8033
8034 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
8035 target_read_memory.
8036 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
8037 (get_next_pcs_syscall_next_pc): Likewise.
8038
8039 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
8040
8041 * win32-i386-low.c: Fix incorrect reference to a couple source files.
8042 * nto-x86-low.c: Likewise.
8043
8044 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
8045
8046 * Makefile.in: Include disable-implicit-rules.mk.
8047
8048 2016-11-23 Pedro Alves <palves@redhat.com>
8049
8050 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
8051 (debug_vprintf): Use std::chrono::steady_clock instead of
8052 gettimeofday. Use '.' instead of ':'.
8053 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
8054 (get_timestamp): Use std::chrono::steady_clock instead of
8055 gettimeofday.
8056
8057 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
8058
8059 * Makefile.in: Fix whitespace formatting.
8060
8061 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
8062
8063 * Makefile.in (SFILES, OBS): Flatten list and order
8064 alphabetically.
8065
8066 2016-11-23 Pedro Alves <palves@redhat.com>
8067
8068 * event-loop.c (handle_file_event): Use warning.
8069 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
8070 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8071 Use warning.
8072
8073 2016-11-23 Pedro Alves <palves@redhat.com>
8074
8075 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
8076 output.
8077 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
8078 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
8079 debug_printf and debug_flush for debug output.
8080 * server.c (handle_general_set): Likewise.
8081 * thread-db.c (try_thread_db_load): Use debug_printf for debug
8082 output.
8083
8084 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
8085
8086 * Makefile.in (.c.o): Replace rule with ...
8087 (%.o: %.c): ... this one.
8088
8089 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
8090
8091 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
8092 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
8093 make.
8094 * configure.ac: Remove checks for the make program.
8095 * configure: Re-generate.
8096
8097 2016-10-28 Pedro Alves <palves@redhat.com>
8098
8099 * Makefile.in (CXX_DIALECT): Get from configure.
8100 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
8101 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
8102 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
8103 * config.in: Regenerate.
8104 * configure: Regenerate.
8105
8106 2016-10-27 Yao Qi <yao.qi@linaro.org>
8107
8108 * linux-low.c (linux_supports_range_stepping): Return true if
8109 can_software_single_step return true.
8110
8111 2016-10-27 Yao Qi <yao.qi@linaro.org>
8112
8113 * inferiors.c (find_inferior_in_random): New function.
8114 * inferiors.h (find_inferior_in_random): Declare.
8115 * linux-low.c (linux_wait_for_event_filtered): Call
8116 find_inferior_in_random instead of find_inferior.
8117
8118 2016-10-27 Yao Qi <yao.qi@linaro.org>
8119
8120 * linux-low.c (linux_wait_1): If single-step breakpoints are
8121 inserted, remove them.
8122
8123 2016-10-26 Pedro Alves <palves@redhat.com>
8124
8125 * linux-low.c (handle_extended_wait): Link parent/child fork
8126 threads.
8127 (linux_wait_1): Unlink them.
8128 (linux_set_resume_request): Ignore resume requests for
8129 already-resumed and unhandled fork child threads.
8130 * linux-low.h (struct lwp_info) <fork_relative>: New field.
8131 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
8132 New functions.
8133 (handle_v_requests) <vCont>: Don't call require_running.
8134 * server.h (in_queued_stop_replies): New declaration.
8135
8136 2016-10-24 Yao Qi <yao.qi@linaro.org>
8137
8138 PR server/20733
8139 * linux-aarch64-low.c (append_insns): Cast the return value to
8140 'uint32_t *'.
8141
8142 2016-10-10 Yao Qi <yao.qi@linaro.org>
8143
8144 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
8145
8146 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
8147
8148 * target.c (target_supports_multi_process): New function, moved
8149 from...
8150 * target.h (target_supports_multi_process): ... here. Remove
8151 macro.
8152
8153 2016-10-05 Tom Tromey <tom@tromey.com>
8154
8155 PR remote/20655:
8156 * tracepoint.c (handle_tracepoint_bkpts): Check
8157 ipa_error_tracepoint, not ipa_stopping_tracepoint.
8158
8159 2016-10-05 Yao Qi <yao.qi@linaro.org>
8160
8161 * configure.srv: Update the path of arm-*.xml files.
8162
8163 2016-10-05 Terry Guo <terry.guo@arm.com>
8164 Yao Qi <yao.qi@linaro.org>
8165
8166 * Makefile.in: Adjust the path of rules.
8167 * configure.srv: Update the path of xml files.
8168 * regformats/arm-with-iwmmxt.dat: Regenerated.
8169 * regformats/arm-with-neon.dat: Likewise.
8170 * regformats/arm-with-vfpv2.dat: Likewise.
8171 * regformats/arm-with-vfpv3.dat Likewise.
8172
8173 2016-09-30 Yao Qi <yao.qi@linaro.org>
8174
8175 PR gdbserver/20627
8176 * target.c (target_stop_and_wait): Don't call
8177 target_continue_no_signal, use resume_stop instead.
8178
8179 2016-09-26 Yao Qi <yao.qi@linaro.org>
8180
8181 * linux-low.c (linux_wait_1): Call debug_exit.
8182
8183 2016-09-23 Pedro Alves <palves@redhat.com>
8184
8185 * Makefile.in (SFILES): Add common/new-op.c.
8186 (OBS): Add common/new-op.o.
8187 (new-op.o): New rule.
8188
8189 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
8190
8191 * .gitinore: Ignore more files.
8192
8193 2016-09-21 Yao Qi <yao.qi@linaro.org>
8194
8195 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
8196 23.
8197
8198 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
8199
8200 * server.c (start_inferior): Call target_mourn_inferior instead of
8201 mourn_inferior; pass ptid_t argument to it.
8202 (resume): Likewise.
8203 (handle_target_event): Likewise.
8204 * target.c (target_mourn_inferior): New function.
8205 * target.h (mourn_inferior): Delete macro.
8206
8207 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8208
8209 * linux-low.c (lwp_is_stepping): New function.
8210
8211 2016-09-06 Carl Love <cel@us.ibm.com>
8212
8213 * server.c (start_inferior): Fixed comment, requested comment change
8214 didn't get updated correctly. Removed reference to ptrace () call as
8215 it is only true on Linux systems.
8216
8217 2016-09-06 Carl Love <cel@us.ibm.com>
8218
8219 * server.c (start_inferior): Do not call
8220 function target_post_create_inferior () if the
8221 inferior process has already exited.
8222
8223 2016-09-05 Pedro Alves <palves@redhat.com>
8224
8225 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
8226 (COMPILE.pre, CC_LD): Use CXX directly.
8227 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
8228 * acinclude.m4: Don't include build-with-cxx.m4.
8229 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
8230 * configure: Regenerate.
8231
8232 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
8233
8234 PR gdb/19495
8235 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
8236 call writing data to own_buf.
8237
8238 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8239
8240 * target.c (mywait): Call target_wait instead of
8241 the_target->wait.
8242 (target_wait): New function.
8243
8244 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8245
8246 * server.c (start_inferior): New variable 'ptid'. Replace calls
8247 to the_target->resume by target_continue{,_no_signal}, depending
8248 on the case.
8249 * target.c (target_stop_and_wait): Call target_continue_no_signal
8250 instead of the_target->resume.
8251 (target_continue): New function.
8252
8253 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
8254
8255 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
8256
8257 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
8258
8259 PR server/20491
8260 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
8261 ps_prochandle.
8262 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8263 * linux-arm-low.c (ps_get_thread_area): Likewise.
8264 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8265 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8266 * linux-mips-low.c (ps_get_thread_area): Likewise.
8267 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8268 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8269 * linux-x86-low.c (ps_get_thread_area): Likewise.
8270 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8271
8272 2016-08-19 Pedro Alves <palves@redhat.com>
8273
8274 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8275
8276 2016-08-19 Pedro Alves <palves@redhat.com>
8277
8278 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8279 comment. Use memcpy instead of casting through unsigned long.
8280
8281 2016-08-19 Pedro Alves <palves@redhat.com>
8282
8283 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8284 allocating around 0x80000000.
8285
8286 2016-08-19 Pedro Alves <palves@redhat.com>
8287
8288 PR gdb/20415
8289 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8290 (x32-avx512-linux-ipa.o): New rules.
8291 * configure.ac (x86_64-*-linux*): New x32 check.
8292 * configure.srv (ipa_x32_linux_regobj): New.
8293 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8294 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8295 descriptions.
8296 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8297 descriptions.
8298 * configure: Regenerate.
8299
8300 2016-08-09 Pedro Alves <palves@redhat.com>
8301
8302 PR gdb/18653
8303 * Makefile.in (OBS): Add signals-state-save-restore.o.
8304 (signals-state-save-restore.o): New rule.
8305 * config.in: Regenerate.
8306 * configure: Regenerate.
8307 * linux-low.c: Include "signals-state-save-restore.h".
8308 (linux_create_inferior): Call
8309 restore_original_signals_state.
8310 * server.c: Include "dispositions-save-restore.h".
8311 (captured_main): Call save_original_signals_state.
8312
8313 2016-08-05 Pedro Alves <palves@redhat.com>
8314
8315 * configure: Regenerate.
8316
8317 2016-08-04 Yao Qi <yao.qi@linaro.org>
8318
8319 * linux-low.c (regsets_fetch_inferior_registers): Check
8320 errno is ESRCH or not.
8321
8322 2016-08-02 Yao Qi <yao.qi@linaro.org>
8323
8324 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8325 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8326 (thread_db_load_search): Update.
8327 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8328 td_ta_set_event and td_ta_event_getmsg.
8329
8330 2016-07-26 Pedro Alves <palves@redhat.com>
8331
8332 PR server/20414
8333 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8334 of unsigned long for 64-bit registers and use uint32_t instead of
8335 unsigned int for 32-bit registers.
8336
8337 2016-07-26 Pedro Alves <palves@redhat.com>
8338
8339 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8340 to 'ptrace'.
8341
8342 2016-07-21 Tom Tromey <tom@tromey.com>
8343
8344 * configure: Rebuild.
8345
8346 2016-07-21 Yao Qi <yao.qi@linaro.org>
8347
8348 * mem-break.c (find_gdb_breakpoint): Cast bp to
8349 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8350
8351 2016-07-21 Yao Qi <yao.qi@linaro.org>
8352
8353 * server.c (handle_v_requests): Support s and S actions
8354 if target_supports_software_single_step return true.
8355
8356 2016-07-21 Yao Qi <yao.qi@linaro.org>
8357
8358 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8359 is resume_step, call maybe_hw_step.
8360 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8361 and unstop them.
8362 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8363 breakpoints or not.
8364 (proceed_one_lwp): If resume request is resume_step, install
8365 reinsert breakpoints and call maybe_hw_step.
8366
8367 2016-07-21 Yao Qi <yao.qi@linaro.org>
8368
8369 * linux-low.c (proceed_one_lwp): Declare.
8370 (linux_resume_one_thread): Remove local variable 'step'.
8371 Lift code enqueue signal. Call proceed_one_lwp instead of
8372 linux_resume_one_lwp.
8373
8374 2016-07-21 Yao Qi <yao.qi@linaro.org>
8375
8376 * linux-low.c (linux_resume_one_thread): Call
8377 enqueue_pending_signal.
8378
8379 2016-07-21 Yao Qi <yao.qi@linaro.org>
8380
8381 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8382 * inferiors.c (do_restore_current_thread_cleanup): New function.
8383 (make_cleanup_restore_current_thread): Likewise.
8384 * linux-low.c (install_software_single_step_breakpoints): Call
8385 make_cleanup_restore_current_thread. Switch current_thread to
8386 thread.
8387
8388 2016-07-21 Yao Qi <yao.qi@linaro.org>
8389
8390 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8391 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8392 (clone_one_breakpoint): Likewise.
8393 (delete_reinsert_breakpoints): Change parameter to thread.
8394 Callers updated.
8395 (has_reinsert_breakpoints): Likewise.
8396 (uninsert_reinsert_breakpoints): Likewise.
8397 (reinsert_reinsert_breakpoints): Likewise.
8398 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8399 (delete_reinsert_breakpoints): Likewise.
8400 (reinsert_reinsert_breakpoints): Likewise.
8401 (uninsert_reinsert_breakpoints): Likewise.
8402 (has_reinsert_breakpoints): Likewise.
8403
8404 2016-07-21 Yao Qi <yao.qi@linaro.org>
8405
8406 * inferiors.c (get_thread_process): Make parameter const.
8407 * inferiors.h (get_thread_process): Update declaration.
8408 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8409 Add new parameters child_thread and parent_thread. Callers
8410 updated.
8411 * mem-break.h (clone_all_breakpoints): Update declaration.
8412
8413 2016-07-21 Yao Qi <yao.qi@linaro.org>
8414
8415 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8416 <command_list, handler>: Remove.
8417 (struct gdb_breakpoint): New.
8418 (struct other_breakpoint): New.
8419 (struct reinsert_breakpoint): New.
8420 (is_gdb_breakpoint): New function.
8421 (any_persistent_commands): Update command_list if
8422 is_gdb_breakpoint returns true.
8423 (set_breakpoint): Create breakpoints according to their types.
8424 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8425 (set_gdb_breakpoint_1): Likewise.
8426 (set_gdb_breakpoint): Likewise.
8427 (clear_breakpoint_conditions): Change parameter type to
8428 'struct gdb_breakpoint *'.
8429 (clear_breakpoint_commands): Likewise.
8430 (clear_breakpoint_conditions_and_commands): Likewise.
8431 (add_condition_to_breakpoint): Likewise.
8432 (add_breakpoint_condition): Likewise.
8433 (add_commands_to_breakpoint): Likewise.
8434 (check_breakpoints): Check other_breakpoint.
8435 (clone_one_breakpoint): Clone breakpopint according to its type.
8436 * mem-break.h (struct gdb_breakpoint): Declare.
8437 (set_gdb_breakpoint): Update declaration.
8438 (clear_breakpoint_conditions_and_commands): Likewise.
8439 (add_breakpoint_condition): Likewise.
8440 (add_breakpoint_commands): Likewise.
8441 * server.c (process_point_options): Change parameter type to
8442 'struct gdb_breakpoint *'.
8443
8444 2016-07-21 Yao Qi <yao.qi@linaro.org>
8445
8446 * mem-break.c (set_breakpoint_at): Rename it to ...
8447 (set_breakpoint_type_at): ... it.
8448 (set_breakpoint_at): Call set_breakpoint_type_at.
8449 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8450 * mem-break.h (set_breakpoint_at): Update comments.
8451
8452 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8453
8454 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8455 to buf parameter.
8456 (nios2_store_gregset): Likewise.
8457
8458 2016-07-01 Pedro Alves <palves@redhat.com>
8459 Antoine Tremblay <antoine.tremblay@ericsson.com>
8460
8461 * linux-low.c: Change interface to take the target lwp_info
8462 pointer directly and return void. Handle detaching from a zombie
8463 thread.
8464 (linux_detach_lwp_callback): New function.
8465 (linux_detach): Detach from the leader thread after detaching from
8466 the clone threads.
8467
8468 2016-06-28 Yao Qi <yao.qi@linaro.org>
8469
8470 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8471 for variable new_offset.
8472 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8473 (aarch64_ftrace_insn_reloc_cb): Likewise.
8474 (aarch64_ftrace_insn_reloc_tb): Likewise.
8475 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8476 PRIx64 instead of PRIx32.
8477
8478 2016-06-28 Yao Qi <yao.qi@linaro.org>
8479
8480 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8481 (the_low_target): Install arm_get_syscall_trapinfo.
8482
8483 2016-06-28 Yao Qi <yao.qi@linaro.org>
8484
8485 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8486 function.
8487 (the_low_target): Install aarch64_get_syscall_trapinfo.
8488
8489 2016-06-28 Yao Qi <yao.qi@linaro.org>
8490
8491 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8492 Callers updated.
8493 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8494 Remove parameter sysno.
8495 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8496 sysret.
8497
8498 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8499
8500 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8501 (s390_emit_ne_goto): Likewise.
8502 (s390_emit_lt_goto): Likewise.
8503 (s390_emit_le_goto): Likewise.
8504 (s390_emit_gt_goto): Likewise.
8505 (s390_emit_ge_goto): Likewise.
8506 (s390x_emit_eq_goto): Likewise.
8507 (s390x_emit_ne_goto): Likewise.
8508 (s390x_emit_lt_goto): Likewise.
8509 (s390x_emit_le_goto): Likewise.
8510 (s390x_emit_gt_goto): Likewise.
8511 (s390x_emit_ge_goto): Likewise.
8512 (s390_emit_ops_impl): Mark variable static.
8513 (s390x_emit_ops): Likewise.
8514
8515 2016-06-17 Yao Qi <yao.qi@linaro.org>
8516
8517 * linux-low.c (handle_extended_wait): Call
8518 uninsert_reinsert_breakpoints for the parent process. Remove
8519 reinsert breakpoints from the child process. Reinsert them to
8520 the parent process when vfork is done.
8521 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8522 (reinsert_reinsert_breakpoints): New function.
8523 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8524 (reinsert_reinsert_breakpoints): Declare.
8525
8526 2016-06-17 Yao Qi <yao.qi@linaro.org>
8527
8528 * linux-low.c (handle_extended_wait): If the parent is doing
8529 step-over, remove the reinsert breakpoints from the forked child.
8530
8531 2016-06-17 Yao Qi <yao.qi@linaro.org>
8532
8533 * linux-low.c (unsuspend_all_lwps): Declare.
8534 (linux_low_filter_event): If thread exited, call finish_step_over.
8535 If step-over is finished, unsuspend other threads.
8536
8537 2016-06-17 Yao Qi <yao.qi@linaro.org>
8538
8539 * linux-low.c (linux_resume_one_lwp_throw): Assert
8540 has_reinsert_breakpoints returns false.
8541 * mem-break.c (delete_disabled_breakpoints): Assert
8542 bp type isn't reinsert_breakpoint.
8543
8544 2016-06-17 Yao Qi <yao.qi@linaro.org>
8545
8546 * linux-low.c (maybe_hw_step): New function.
8547 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8548 (finish_step_over): Switch current_thread to lwp temporarily,
8549 and assert has_reinsert_breakpoints returns true.
8550 (proceed_one_lwp): Call maybe_hw_step.
8551 * mem-break.c (has_reinsert_breakpoints): New function.
8552 * mem-break.h (has_reinsert_breakpoints): Declare.
8553
8554 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8555
8556 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8557
8558 2016-05-17 Yao Qi <yao.qi@linaro.org>
8559
8560 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8561 instead of find_inferior.
8562
8563 2016-05-05 Yao Qi <yao.qi@linaro.org>
8564
8565 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8566 Initialize res to zero.
8567
8568 2016-05-05 Yao Qi <yao.qi@linaro.org>
8569
8570 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8571 to uint32_t.
8572
8573 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8574
8575 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8576 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8577 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8578
8579 2016-04-28 Par Olsson <par.olsson@windriver.com>
8580 Simon Marchi <simon.marchi@ericsson.com>
8581
8582 * tracepoint.c (write_inferior_int8): New function.
8583 (cmd_qtenable_disable): Write enable flag using
8584 write_inferior_int8.
8585
8586 2016-04-25 Yao Qi <yao.qi@linaro.org>
8587
8588 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8589 (need_step_over_p): Return zero if the LWP has pending signals
8590 can be delivered on software single step target.
8591
8592 2016-04-25 Yao Qi <yao.qi@linaro.org>
8593
8594 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8595 return instead of error.
8596
8597 2016-04-22 Yao Qi <yao.qi@linaro.org>
8598
8599 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8600 to 23.
8601
8602 2016-04-22 Yao Qi <yao.qi@linaro.org>
8603
8604 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8605 signal when stepping over breakpoint with software single
8606 step.
8607
8608 2016-04-21 Pedro Alves <palves@redhat.com>
8609
8610 * linux-s390-low.c (s390_collect_ptrace_register)
8611 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8612 add casts.
8613 (s390_check_regset): Use void * instead of gdb_byte *.
8614
8615 2016-04-20 Pedro Alves <palves@redhat.com>
8616
8617 * configure: Renegerate.
8618
8619 2016-04-20 Yao Qi <yao.qi@linaro.org>
8620
8621 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8622 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8623 number 16.
8624 (arm_store_gregset): Likewise.
8625
8626 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8627
8628 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8629 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8630 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8631 (amd64-avx-mpx-linux.c): New rules.
8632 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8633 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8634 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8635 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8636 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8637 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8638 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8639 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8640 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8641 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8642 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8643 * linux-x86-low.c (x86_linux_read_description): Add case for
8644 X86_XSTATE_AVX_MPX_MASK.
8645 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8646 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8647 init_registers_i386_avx_mpx_linux.
8648 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8649 (initialize_low_tracepoint): Call
8650 init_registers_i386_avx_mpx_linux.
8651 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8652 (initialize_low_tracepoint): Call
8653 init_registers_amd64_avx_mpx_linux.
8654 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8655 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8656 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8657 declarations.
8658
8659 2016-04-18 Pedro Alves <palves@redhat.com>
8660
8661 * configure: Regenerate.
8662
8663 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8664
8665 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8666 (aarch64_emit_sub): Likewise.
8667
8668 2016-04-12 Pedro Alves <palves@redhat.com>
8669
8670 * utils.c (prepare_to_throw_exception): Delete.
8671
8672 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8673
8674 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8675
8676 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8677
8678 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8679
8680 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8681
8682 * linux-aarch64-ipa.c: Add <elf.h> include.
8683 * linux-ppc-ipa.c: Add <elf.h> include.
8684 * linux-s390-ipa.c: Add <elf.h> include.
8685
8686 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8687
8688 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8689 (get_raw_reg_ptr): Likewise.
8690 (get_trace_state_variable_value_ptr): Likewise.
8691 (set_trace_state_variable_value_ptr): Likewise.
8692 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8693 char *.
8694
8695 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8696 Marcin Kościelnicki <koriakin@0x04.net>
8697
8698 PR/17221
8699 * linux-ppc-low.c (emit_insns): New function.
8700 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8701 (ppc_emit_prologue): New function.
8702 (ppc_emit_epilogue): New function.
8703 (ppc_emit_add): New function.
8704 (ppc_emit_sub): New function.
8705 (ppc_emit_mul): New function.
8706 (ppc_emit_lsh): New function.
8707 (ppc_emit_rsh_signed): New function.
8708 (ppc_emit_rsh_unsigned): New function.
8709 (ppc_emit_ext): New function.
8710 (ppc_emit_zero_ext): New function.
8711 (ppc_emit_log_not): New function.
8712 (ppc_emit_bit_and): New function.
8713 (ppc_emit_bit_or): New function.
8714 (ppc_emit_bit_xor): New function.
8715 (ppc_emit_bit_not): New function.
8716 (ppc_emit_equal): New function.
8717 (ppc_emit_less_signed): New function.
8718 (ppc_emit_less_unsigned): New function.
8719 (ppc_emit_ref): New function.
8720 (ppc_emit_const): New function.
8721 (ppc_emit_reg): New function.
8722 (ppc_emit_pop): New function.
8723 (ppc_emit_stack_flush): New function.
8724 (ppc_emit_swap): New function.
8725 (ppc_emit_stack_adjust): New function.
8726 (ppc_emit_call): New function.
8727 (ppc_emit_int_call_1): New function.
8728 (ppc_emit_void_call_2): New function.
8729 (ppc_emit_if_goto): New function.
8730 (ppc_emit_goto): New function.
8731 (ppc_emit_eq_goto): New function.
8732 (ppc_emit_ne_goto): New function.
8733 (ppc_emit_lt_goto): New function.
8734 (ppc_emit_le_goto): New function.
8735 (ppc_emit_gt_goto): New function.
8736 (ppc_emit_ge_goto): New function.
8737 (ppc_write_goto_address): New function.
8738 (ppc_emit_ops_impl): New static variable.
8739 (ppc64v1_emit_prologue): New function.
8740 (ppc64v2_emit_prologue): New function.
8741 (ppc64_emit_epilogue): New function.
8742 (ppc64_emit_add): New function.
8743 (ppc64_emit_sub): New function.
8744 (ppc64_emit_mul): New function.
8745 (ppc64_emit_lsh): New function.
8746 (ppc64_emit_rsh_signed): New function.
8747 (ppc64_emit_rsh_unsigned): New function.
8748 (ppc64_emit_ext): New function.
8749 (ppc64_emit_zero_ext): New function.
8750 (ppc64_emit_log_not): New function.
8751 (ppc64_emit_bit_and): New function.
8752 (ppc64_emit_bit_or): New function.
8753 (ppc64_emit_bit_xor): New function.
8754 (ppc64_emit_bit_not): New function.
8755 (ppc64_emit_equal): New function.
8756 (ppc64_emit_less_signed): New function.
8757 (ppc64_emit_less_unsigned): New function.
8758 (ppc64_emit_ref): New function.
8759 (ppc64_emit_const): New function.
8760 (ppc64v1_emit_reg): New function.
8761 (ppc64v2_emit_reg): New function.
8762 (ppc64_emit_pop): New function.
8763 (ppc64_emit_stack_flush): New function.
8764 (ppc64_emit_swap): New function.
8765 (ppc64v1_emit_call): New function.
8766 (ppc64v2_emit_call): New function.
8767 (ppc64v1_emit_int_call_1): New function.
8768 (ppc64v2_emit_int_call_1): New function.
8769 (ppc64v1_emit_void_call_2): New function.
8770 (ppc64v2_emit_void_call_2): New function.
8771 (ppc64_emit_if_goto): New function.
8772 (ppc64_emit_eq_goto): New function.
8773 (ppc64_emit_ne_goto): New function.
8774 (ppc64_emit_lt_goto): New function.
8775 (ppc64_emit_le_goto): New function.
8776 (ppc64_emit_gt_goto): New function.
8777 (ppc64_emit_ge_goto): New function.
8778 (ppc64v1_emit_ops_impl): New static variable.
8779 (ppc64v2_emit_ops_impl): New static variable.
8780 (ppc_emit_ops): New function.
8781 (linux_low_target): Wire in ppc_emit_ops.
8782
8783 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8784 Marcin Kościelnicki <koriakin@0x04.net>
8785
8786 PR/17221
8787 * Makefile.in: Add powerpc-*-ipa.o
8788 * configure.srv: Add ipa_obj for powerpc*-linux.
8789 * linux-ppc-ipa.c: New file.
8790 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8791 includes.
8792 (PPC_FIELD): New macro.
8793 (PPC_SEXT): New macro.
8794 (PPC_OP6): New macro.
8795 (PPC_BO): New macro.
8796 (PPC_LI): New macro.
8797 (PPC_BD): New macro.
8798 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8799 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8800 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8801 (ppc_get_thread_area): New function.
8802 (is_elfv2_inferior): New function.
8803 (gen_ds_form): New function.
8804 (GEN_STD): New macro.
8805 (GEN_STDU): New macro.
8806 (GEN_LD): New macro.
8807 (GEN_LDU): New macro.
8808 (gen_d_form): New function.
8809 (GEN_ADDI): New macro.
8810 (GEN_ADDIS): New macro.
8811 (GEN_LI): New macro.
8812 (GEN_LIS): New macro.
8813 (GEN_ORI): New macro.
8814 (GEN_ORIS): New macro.
8815 (GEN_LWZ): New macro.
8816 (GEN_STW): New macro.
8817 (GEN_STWU): New macro.
8818 (gen_xfx_form): New function.
8819 (GEN_MFSPR): New macro.
8820 (GEN_MTSPR): New macro.
8821 (GEN_MFCR): New macro.
8822 (GEN_MTCR): New macro.
8823 (GEN_SYNC): New macro.
8824 (GEN_LWSYNC): New macro.
8825 (gen_x_form): New function.
8826 (GEN_OR): New macro.
8827 (GEN_MR): New macro.
8828 (GEN_LWARX): New macro.
8829 (GEN_STWCX): New macro.
8830 (GEN_CMPW): New macro.
8831 (gen_md_form): New function.
8832 (GEN_RLDICL): New macro.
8833 (GEN_RLDICR): New macro.
8834 (gen_i_form): New function.
8835 (GEN_B): New macro.
8836 (GEN_BL): New macro.
8837 (gen_b_form): New function.
8838 (GEN_BNE): New macro.
8839 (GEN_LOAD): New macro.
8840 (GEN_STORE): New macro.
8841 (gen_limm): New function.
8842 (gen_atomic_xchg): New function.
8843 (gen_call): New function.
8844 (ppc_relocate_instruction): New function.
8845 (ppc_install_fast_tracepoint_jump_pad): New function.
8846 (ppc_get_min_fast_tracepoint_insn_len): New function.
8847 (ppc_get_ipa_tdesc_idx): New function.
8848 (the_low_target): Wire in the new functions.
8849 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8850 tdescs.
8851 * linux-ppc-tdesc.h: New file.
8852
8853 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8854
8855 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8856 (alloc_jump_pad_buffer): New function.
8857 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8858 (alloc_jump_pad_buffer): New function.
8859 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8860 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8861 (alloc_jump_pad_buffer): New function.
8862 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8863 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8864 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8865 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8866
8867 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8868
8869 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8870 * linux-amd64-ipa.c: Likewise.
8871 * linux-i386-ipa.c: Likewise.
8872 * linux-s390-ipa.c: Likewise.
8873 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8874 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8875 set_trace_state_variable_value_ptr.
8876 (struct ipa_sym_addresses): Likewise.
8877 (symbol_list): Likewise.
8878 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8879 accessing gdb_collect directly.
8880 (gdb_collect_ptr_type): New typedef.
8881 (get_raw_reg_ptr_type): New typedef.
8882 (get_trace_state_variable_value_ptr_type): New typedef.
8883 (set_trace_state_variable_value_ptr_type): New typedef.
8884 (gdb_collect_ptr): New global.
8885 (get_raw_reg_ptr): New global.
8886 (get_trace_state_variable_value_ptr): New global.
8887 (set_trace_state_variable_value_ptr): New global.
8888 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8889 accessing get_raw_reg directly.
8890 (get_get_tsv_func_addr): Likewise for
8891 get_trace_state_variable_value_ptr.
8892 (get_set_tsv_func_addr): Likewise for
8893 set_trace_state_variable_value_ptr.
8894 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8895
8896 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8897
8898 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8899
8900 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8901
8902 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8903 packets.
8904 (relocate_instruction): Remove own_buf.
8905 * server.c (own_buf): Make global.
8906 (handle_v_requests): Make global.
8907 * server.h (own_buf): New declaration.
8908 (handle_v_requests): New prototype.
8909
8910 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8911
8912 PR 18377
8913 * linux-s390-low.c (add_insns): New function.
8914 (s390_emit_prologue): New function.
8915 (s390_emit_epilogue): New function.
8916 (s390_emit_add): New function.
8917 (s390_emit_sub): New function.
8918 (s390_emit_mul): New function.
8919 (s390_emit_lsh): New function.
8920 (s390_emit_rsh_signed): New function.
8921 (s390_emit_rsh_unsigned): New function.
8922 (s390_emit_ext): New function.
8923 (s390_emit_log_not): New function.
8924 (s390_emit_bit_and): New function.
8925 (s390_emit_bit_or): New function.
8926 (s390_emit_bit_xor): New function.
8927 (s390_emit_bit_not): New function.
8928 (s390_emit_equal): New function.
8929 (s390_emit_less_signed): New function.
8930 (s390_emit_less_unsigned): New function.
8931 (s390_emit_ref): New function.
8932 (s390_emit_if_goto): New function.
8933 (s390_emit_goto): New function.
8934 (s390_write_goto_address): New function.
8935 (s390_emit_litpool): New function.
8936 (s390_emit_const): New function.
8937 (s390_emit_call): New function.
8938 (s390_emit_reg): New function.
8939 (s390_emit_pop): New function.
8940 (s390_emit_stack_flush): New function.
8941 (s390_emit_zero_ext): New function.
8942 (s390_emit_swap): New function.
8943 (s390_emit_stack_adjust): New function.
8944 (s390_emit_set_r2): New function.
8945 (s390_emit_int_call_1): New function.
8946 (s390_emit_void_call_2): New function.
8947 (s390_emit_eq_goto): New function.
8948 (s390_emit_ne_goto): New function.
8949 (s390_emit_lt_goto): New function.
8950 (s390_emit_le_goto): New function.
8951 (s390_emit_gt_goto): New function.
8952 (s390_emit_ge_goto): New function.
8953 (s390x_emit_prologue): New function.
8954 (s390x_emit_epilogue): New function.
8955 (s390x_emit_add): New function.
8956 (s390x_emit_sub): New function.
8957 (s390x_emit_mul): New function.
8958 (s390x_emit_lsh): New function.
8959 (s390x_emit_rsh_signed): New function.
8960 (s390x_emit_rsh_unsigned): New function.
8961 (s390x_emit_ext): New function.
8962 (s390x_emit_log_not): New function.
8963 (s390x_emit_bit_and): New function.
8964 (s390x_emit_bit_or): New function.
8965 (s390x_emit_bit_xor): New function.
8966 (s390x_emit_bit_not): New function.
8967 (s390x_emit_equal): New function.
8968 (s390x_emit_less_signed): New function.
8969 (s390x_emit_less_unsigned): New function.
8970 (s390x_emit_ref): New function.
8971 (s390x_emit_if_goto): New function.
8972 (s390x_emit_const): New function.
8973 (s390x_emit_call): New function.
8974 (s390x_emit_reg): New function.
8975 (s390x_emit_pop): New function.
8976 (s390x_emit_stack_flush): New function.
8977 (s390x_emit_zero_ext): New function.
8978 (s390x_emit_swap): New function.
8979 (s390x_emit_stack_adjust): New function.
8980 (s390x_emit_int_call_1): New function.
8981 (s390x_emit_void_call_2): New function.
8982 (s390x_emit_eq_goto): New function.
8983 (s390x_emit_ne_goto): New function.
8984 (s390x_emit_lt_goto): New function.
8985 (s390x_emit_le_goto): New function.
8986 (s390x_emit_gt_goto): New function.
8987 (s390x_emit_ge_goto): New function.
8988 (s390_emit_ops): New function.
8989 (struct linux_target_ops): Fill in emit_ops hook.
8990
8991 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8992
8993 PR 18377
8994 * Makefile.in: Add s390 IPA files.
8995 * configure.srv: Build IPA for s390.
8996 * linux-s390-ipa.c: New file.
8997 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8998 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8999 (tdesc_s390_linux32): Likewise.
9000 (init_registers_s390_linux32v1): Likewise.
9001 (tdesc_s390_linux32v1): Likewise.
9002 (init_registers_s390_linux32v2): Likewise.
9003 (tdesc_s390_linux32v2): Likewise.
9004 (init_registers_s390_linux64): Likewise.
9005 (tdesc_s390_linux64): Likewise.
9006 (init_registers_s390_linux64v1): Likewise.
9007 (tdesc_s390_linux64v1): Likewise.
9008 (init_registers_s390_linux64v2): Likewise.
9009 (tdesc_s390_linux64v2): Likewise.
9010 (init_registers_s390_te_linux64): Likewise.
9011 (tdesc_s390_te_linux64): Likewise.
9012 (init_registers_s390_vx_linux64): Likewise.
9013 (tdesc_s390_vx_linux64): Likewise.
9014 (init_registers_s390_tevx_linux64): Likewise.
9015 (tdesc_s390_tevx_linux64): Likewise.
9016 (init_registers_s390x_linux64): Likewise.
9017 (tdesc_s390x_linux64): Likewise.
9018 (init_registers_s390x_linux64v1): Likewise.
9019 (tdesc_s390x_linux64v1): Likewise.
9020 (init_registers_s390x_linux64v2): Likewise.
9021 (tdesc_s390x_linux64v2): Likewise.
9022 (init_registers_s390x_te_linux64): Likewise.
9023 (tdesc_s390x_te_linux64): Likewise.
9024 (init_registers_s390x_vx_linux64): Likewise.
9025 (tdesc_s390x_vx_linux64): Likewise.
9026 (init_registers_s390x_tevx_linux64): Likewise.
9027 (tdesc_s390x_tevx_linux64): Likewise.
9028 (have_hwcap_s390_vx): New static variable.
9029 (s390_arch_setup): Fill have_hwcap_s390_vx.
9030 (s390_get_thread_area): New function.
9031 (s390_ft_entry_gpr_esa): New const.
9032 (s390_ft_entry_gpr_zarch): New const.
9033 (s390_ft_entry_misc): New const.
9034 (s390_ft_entry_fr): New const.
9035 (s390_ft_entry_vr): New const.
9036 (s390_ft_main_31): New const.
9037 (s390_ft_main_64): New const.
9038 (s390_ft_exit_fr): New const.
9039 (s390_ft_exit_vr): New const.
9040 (s390_ft_exit_misc): New const.
9041 (s390_ft_exit_gpr_esa): New const.
9042 (s390_ft_exit_gpr_zarch): New const.
9043 (append_insns): New function.
9044 (s390_relocate_instruction): New function.
9045 (s390_install_fast_tracepoint_jump_pad): New function.
9046 (s390_get_min_fast_tracepoint_insn_len): New function.
9047 (s390_get_ipa_tdesc_idx): New function.
9048 (struct linux_target_ops): Wire in the above functions.
9049 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
9050 * linux-s390-tdesc.h: New file.
9051
9052 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
9053
9054 * linux-s390-low.c (s390_supports_tracepoints): New function.
9055 (struct linux_target_ops): Fill supports_tracepoints hook.
9056
9057 2016-03-18 Yao Qi <yao.qi@linaro.org>
9058
9059 * linux-low.c (lwp_signal_can_be_delivered): New function.
9060 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
9061
9062 2016-03-18 Yao Qi <yao.qi@linaro.org>
9063
9064 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
9065 0 if signal is enqueued. Remove 'signal' from one debugging
9066 message. Move one debugging message to some lines below.
9067 Remove code setting 'signal' to 0.
9068
9069 2016-03-18 Yao Qi <yao.qi@linaro.org>
9070
9071 * linux-low.c (linux_low_filter_event): Remove redundant
9072 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
9073
9074 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
9075
9076 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
9077 (struct linux_target_ops): Wire in the above.
9078
9079 2016-03-03 Yao Qi <yao.qi@linaro.org>
9080
9081 * linux-low.c: Update comments to start_step_over.
9082
9083 2016-03-03 Yao Qi <yao.qi@linaro.org>
9084
9085 PR server/19736
9086 * linux-low.c (handle_extended_wait): Set child suspended
9087 if event_lwp->bp_reinsert isn't zero.
9088
9089 2016-03-02 Yao Qi <yao.qi@linaro.org>
9090
9091 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
9092 enqueue_pending_signal.
9093
9094 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
9095
9096 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
9097 is actually loaded.
9098
9099 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9100
9101 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
9102 (s390_regmap_3264) [!__s390x__]: New global.
9103 (s390_collect_ptrace_register): Skip map entries containing -1.
9104 (s390_supply_ptrace_register): Ditto.
9105 (s390_fill_gprs_high): New function.
9106 (s390_store_gprs_high): New function.
9107 (s390_regsets): Add NT_S390_HIGH_GPRS.
9108 (s390_get_hwcap): Enable on 31-bit.
9109 (have_hwcap_s390_high_gprs): Enable on 31-bit.
9110 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
9111 Detect NT_S390_HIGH_GPRS.
9112 (s390_usrregs_info_3264): Enable on 31-bit.
9113 (s390_regs_info): Enable regs_info_3264 on 31-bit.
9114 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
9115
9116 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9117
9118 PR gdb/13808
9119 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
9120 * configure.srv: Ditto.
9121 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
9122 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
9123 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
9124 (init_registers_amd64_linux): Remove prototype.
9125 (tdesc_amd64_linux): Remove declaration.
9126 (get_ipa_tdesc): New function.
9127 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9128 initialize remaining tdescs.
9129 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
9130 (init_registers_i386_linux): Remove prototype.
9131 (tdesc_i386_linux): Remove declaration.
9132 (get_ipa_tdesc): New function.
9133 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9134 initialize remaining tdescs.
9135 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
9136 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
9137 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
9138 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
9139 (x86_get_ipa_tdesc_idx): New function.
9140 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
9141 * linux-x86-tdesc.h: New file.
9142 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
9143 (target_get_ipa_tdesc_idx): New macro.
9144 * tracepoint.c (ipa_tdesc_idx): New macro.
9145 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
9146 (symbol_list): Add ipa_tdesc_idx.
9147 (cmd_qtstart): Write ipa_tdesc_idx in the target.
9148 (ipa_tdesc): Remove.
9149 (ipa_tdesc_idx): New variable.
9150 (get_context_regcache): Use get_ipa_tdesc.
9151 (gdb_collect): Ditto.
9152 (gdb_probe): Ditto.
9153 * tracepoint.h (get_ipa_tdesc): New prototype.
9154 (ipa_tdesc): Remove.
9155
9156 2016-02-24 Pedro Alves <palves@redhat.com>
9157
9158 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
9159 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
9160 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
9161 Factor out common code between the USE_SIGTRAP_SIGINFO and
9162 !USE_SIGTRAP_SIGINFO blocks.
9163 (linux_low_filter_event): Call save_stop_reason instead of
9164 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
9165 Update comments.
9166 (linux_wait_1): Update comments.
9167
9168 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
9169
9170 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
9171 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
9172 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
9173 ppc_insert_point, ppc_remove_point.
9174
9175 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
9176
9177 * linux-s390-low.c (s390_supports_z_point_type): New function.
9178 (struct linux_target_ops): Wire s390_supports_z_point_type in.
9179
9180 2016-02-16 Yao Qi <yao.qi@linaro.org>
9181
9182 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9183 PC. Get pc from regcache_read_pc.
9184
9185 2016-02-12 Yao Qi <yao.qi@linaro.org>
9186
9187 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
9188 or linux_get_pc_32bit.
9189 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
9190
9191 2016-02-12 Yao Qi <yao.qi@linaro.org>
9192
9193 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
9194 arm_linux_get_next_pcs_fixup.
9195
9196 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
9197
9198 * tracepoint.c (x_tracepoint_action_download): Change
9199 write_inferior_data_ptr to write_inferior_data_pointer.
9200 (cmd_qtstart): Likewise.
9201 (write_inferior_data_ptr): Remove.
9202 (download_agent_expr): Change write_inferior_data_ptr to
9203 write_inferior_data_pointer.
9204 (download_tracepoint_1): Likewise.
9205 (download_tracepoint): Likewise.
9206 (download_trace_state_variables): Likewise.
9207
9208 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
9209 Marcin Kościelnicki <koriakin@0x04.net>
9210
9211 * tracepoint.c (struct tracepoint_action_ops): Remove.
9212 (struct tracepoint_action): Remove ops.
9213 (m_tracepoint_action_download, r_tracepoint_action_download)
9214 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
9215 size and offset accordingly.
9216 (m_tracepoint_action_ops, r_tracepoint_action_ops)
9217 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
9218 (tracepoint_action_send, tracepoint_action_download): New functions.
9219 Helpers for trace action handlers.
9220 (add_tracepoint_action): Remove setup actions ops.
9221 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
9222
9223 2016-02-10 Yao Qi <yao.qi@linaro.org>
9224
9225 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
9226
9227 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9228
9229 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
9230 to AC_OUTPUT.
9231 * configure: Regenerate.
9232
9233 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9234
9235 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
9236 void * to gdb_byte *.
9237 * linux-low.c (siginfo_fixup): Likewise.
9238 (linux_xfer_siginfo): Likewise.
9239 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
9240 Likewise.
9241 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9242
9243 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
9244
9245 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9246 to srv_tgtobj.
9247 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
9248 to srv_tgtobj.
9249 * linux-x86-low.c [__x86_64__]: Include
9250 "nat/amd64-linux-siginfo.h".
9251 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
9252 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
9253 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
9254 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
9255 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
9256 (cpt_si_fd, si_timerid, si_overrun): Move from
9257 nat/amd64-linux-siginfo.c.
9258 * Makefile.in (amd64-linux-siginfo.o:): New rule.
9259
9260 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
9261
9262 * server.c (skip_to_semicolon): Remove.
9263 (process_point_options): Use strchrnul instead of
9264 skip_to_semicolon.
9265
9266 2016-01-26 Yao Qi <yao.qi@linaro.org>
9267
9268 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9269 * linux-low.c (install_software_single_step_breakpoints): Don't
9270 call regcache_read_pc.
9271 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9272 argument pc.
9273
9274 2016-01-26 Yao Qi <yao.qi@linaro.org>
9275
9276 * linux-low.c (install_software_single_step_breakpoints): Call
9277 regcache_read_pc instead of get_pc.
9278
9279 2016-01-26 Yao Qi <yao.qi@linaro.org>
9280
9281 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9282 (unblock_async_io): Rename to ...
9283 (block_unblock_async_io): ... it. New function.
9284 (enable_async_io): Don't install SIGIO handler. Unblock it
9285 instead.
9286 (disable_async_io): Don't ignore SIGIO. Block it instead.
9287 (initialize_async_io): Install SIGIO handler. Don't call
9288 unblock_async_io.
9289
9290 2016-01-26 Yao Qi <yao.qi@linaro.org>
9291
9292 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9293 first character is '\003', call *the_target->request_interrupt.
9294
9295 2016-01-25 Yao Qi <yao.qi@linaro.org>
9296
9297 * remote-utils.c (new_thread_notify): Remove.
9298 (dead_thread_notify): Likewise.
9299 * remote-utils.h (new_thread_notify): Remove declaration.
9300 (dead_thread_notify): Likewise.
9301
9302 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9303
9304 * gdb.trace/pending.exp: Fix expected message on continue.
9305
9306 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9307
9308 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9309 it works properly on big-endian machines where sizeof (CORE_ADDR)
9310 != sizeof (void *).
9311
9312 2016-01-21 Pedro Alves <palves@redhat.com>
9313
9314 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9315 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9316 * configure: Regenerate.
9317
9318 2016-01-21 Yao Qi <yao.qi@linaro.org>
9319
9320 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9321 is_thumb and set it according to CPSR saved on the stack.
9322 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9323 arm_sigreturn_next_pc.
9324
9325 2016-01-18 Yao Qi <yao.qi@linaro.org>
9326
9327 * linux-low.c (linux_set_pc_64bit): New function.
9328 (linux_get_pc_64bit): New function.
9329 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9330 Declare.
9331 * linux-sparc-low.c (debug_threads): Remove declaration.
9332 (sparc_get_pc): Remove.
9333 (the_low_target): Use linux_get_pc_64bit instead of
9334 sparc_get_pc.
9335 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9336 (the_low_target): Use linux_get_pc_64bit and
9337 linux_set_pc_64bit.
9338
9339 2016-01-18 Yao Qi <yao.qi@linaro.org>
9340
9341 * linux-arm-low.c (debug_threads): Remove declaration.
9342 (arm_get_pc, arm_set_pc): Remove.
9343 (the_low_target): Use linux_get_pc_32bit and
9344 linux_set_pc_32bit.
9345 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9346 (the_low_target): Use linux_get_pc_32bit and
9347 linux_set_pc_32bit.
9348 * linux-cris-low.c (debug_threads): Remove declaration.
9349 (cris_get_pc, cris_set_pc,): Remove.
9350 (the_low_target): Use linux_get_pc_32bit and
9351 linux_set_pc_32bit.
9352 * linux-crisv32-low.c (debug_threads): Remove declaration.
9353 (cris_get_pc, cris_set_pc): Remove.
9354 (the_low_target): Use linux_get_pc_32bit and
9355 linux_set_pc_32bit.
9356 * linux-low.c: Include inttypes.h.
9357 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9358 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9359 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9360 (the_low_target): Use linux_get_pc_32bit and
9361 linux_set_pc_32bit.
9362 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9363 (the_low_target): Use linux_get_pc_32bit and
9364 linux_set_pc_32bit.
9365 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9366 (the_low_target): Use linux_get_pc_32bit and
9367 linux_set_pc_32bit.
9368 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9369 (the_low_target): Use linux_get_pc_32bit and
9370 linux_set_pc_32bit.
9371 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9372 (the_low_target): Use linux_get_pc_32bit and
9373 linux_set_pc_32bit.
9374
9375 2016-01-18 Gary Benson <gbenson@redhat.com>
9376
9377 * configure.ac (AC_FUNC_FORK): New check.
9378 * config.in: Regenerate.
9379 * configure: Likewise.
9380
9381 2016-01-14 Yao Qi <yao.qi@linaro.org>
9382
9383 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9384 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9385 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9386 arm_get_next_pcs_ctor.
9387
9388 2016-01-12 Josh Stone <jistone@redhat.com>
9389 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9390
9391 * inferiors.h: Include "gdb_vecs.h".
9392 (struct process_info): Add syscalls_to_catch.
9393 * inferiors.c (remove_process): Free syscalls_to_catch.
9394 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9395 syscall_return stops.
9396 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9397 * server.c (handle_general_set): Handle QCatchSyscalls.
9398 (handle_query): Report support for QCatchSyscalls.
9399 * target.h (struct target_ops): Add supports_catch_syscall.
9400 (target_supports_catch_syscall): New macro.
9401 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9402 (struct lwp_info): Add syscall_state.
9403 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9404 Maintain syscall_state and syscalls_to_catch across exec.
9405 (get_syscall_trapinfo): New function, proxy to the_low_target.
9406 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9407 (linux_low_filter_event): Toggle syscall_state entry/return for
9408 syscall traps, and set it ignored for all others.
9409 (gdb_catching_syscalls_p): New function.
9410 (gdb_catch_this_syscall_p): New function.
9411 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9412 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9413 (linux_supports_catch_syscall): New function.
9414 (linux_target_ops): Install it.
9415 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9416 (the_low_target): Install it.
9417
9418 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9419
9420 * acinclude.m4: Include new ../warning.m4 file.
9421 * configure: Regenerated.
9422 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9423
9424 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9425
9426 * ax.c (is_goto_target): Mark static.
9427 * linux-low.c (register_addr): Likewise.
9428 (linux_fetch_registers, linux_store_registers): Likewise.
9429 * mem-break.c (any_persistent_commands): Fix old prototype.
9430 (add_commands_to_breakpoint): Mark static.
9431 * regcache.c (find_register_by_name): Delete unused func.
9432 * remote-utils.c (hex_or_minus_one): Mark static.
9433 * server.c (monitor_show_help): Mark static.
9434 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9435 handle_v_requests): Likewise.
9436
9437 2016-01-12 Pedro Alves <palves@redhat.com>
9438
9439 Remove use of the registered trademark symbol throughout.
9440
9441 2016-01-08 Yao Qi <yao.qi@linaro.org>
9442
9443 * remote-utils.c (getpkt): If c is '\003', call target hook
9444 request_interrupt.
9445
9446 2016-01-06 Yao Qi <yao.qi@linaro.org>
9447
9448 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9449 linux-aarch32-low.c.
9450 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9451 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9452 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9453 (thumb2_breakpoint): Declare.
9454 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9455 linux-aarch32-low.h.
9456 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9457 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9458 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9459
9460 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9461
9462 * gdbreplay.c (gdbreplay_version): Change copyright year in
9463 version message.
9464 * server.c (gdbserver_version): Likewise.
9465
9466 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9467
9468 * server.c (crc32_table): Delete.
9469 (crc32): Use libiberty's xcrc32 function.
9470
9471 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9472
9473 * lynx-low.c (lynx_delete_thread_callback): New function.
9474 (lynx_mourn): Properly delete our process and all of its
9475 threads. Remove call to clear_inferiors.
9476
9477 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9478
9479 * target.c (thread_search_callback): Add check that
9480 the thread_stopped target callback is not NULL before
9481 calling it.
9482
9483 2015-12-21 Yao Qi <yao.qi@linaro.org>
9484
9485 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9486 arm breakpoint.
9487
9488 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9489
9490 * server.c (handle_query): Call target_supports_software_single_step.
9491
9492 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9493
9494 * linux-low.c (single_step): New function.
9495 (linux_resume_one_lwp_throw): Call single_step.
9496 (start_step_over): Likewise.
9497
9498 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9499
9500 * Makefile.in (SFILES): Append arch/arm-linux.c,
9501 arch/arm-get-next-pcs.c.
9502 (arm-linux.o): New rule.
9503 (arm-get-next-pcs.o): New rule.
9504 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9505 arm-linux.o.
9506 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9507 to linux-aarch32-low.c.
9508 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9509 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9510 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9511 (thumb2_breakpoint_len): Likewise.
9512 (arm_is_thumb_mode): Make non-static.
9513 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9514 from linux-aarch32-low.c.
9515 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9516 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9517 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9518 (thumb2_breakpoint_len): Likewise.
9519 (arm_is_thumb_mode): New declaration.
9520 * linux-arm-low.c: Include arch/arm-linux.h
9521 aarch/arm-get-next-pcs.h, sys/syscall.h.
9522 (get_next_pcs_ops): New struct.
9523 (get_next_pcs_addr_bits_remove): New function.
9524 (get_next_pcs_is_thumb): New function.
9525 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9526 (arm_sigreturn_next_pc): Likewise.
9527 (get_next_pcs_syscall_next_pc): Likewise.
9528 (arm_gdbserver_get_next_pcs): Likewise.
9529 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9530 Initialize.
9531 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9532 * server.h: Include gdb_vecs.h.
9533
9534 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9535
9536 * Makefile.in (SFILES): Append common/common-regcache.c.
9537 (OBS): Append common-regcache.o.
9538 (common-regcache.o): New rule.
9539 * regcache.c (init_register_cache): Initialize cache to
9540 REG_UNAVAILABLE.
9541 (regcache_raw_read_unsigned): New function.
9542 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9543 register_status enum.
9544
9545 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9546
9547 * linux-aarch64-low.c (the_low_targets): Rename
9548 breakpoint_reinsert_addr to get_next_pcs.
9549 * linux-arm-low.c (the_low_targets): Likewise.
9550 * linux-bfin-low.c (the_low_targets): Likewise.
9551 * linux-cris-low.c (the_low_targets): Likewise.
9552 * linux-crisv32-low.c (the_low_targets): Likewise.
9553 * linux-low.c (can_software_single_step): Likewise.
9554 (install_software_single_step_breakpoints): New function.
9555 (start_step_over): Use install_software_single_step_breakpoints.
9556 * linux-low.h: New CORE_ADDR vector.
9557 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9558 get_next_pcs.
9559 * linux-mips-low.c (the_low_targets): Likewise.
9560 * linux-nios2-low.c (the_low_targets): Likewise.
9561 * linux-sparc-low.c (the_low_targets): Likewise.
9562
9563 2015-12-17 Pedro Alves <palves@redhat.com>
9564
9565 * linux-low.c (linux_kill_one_lwp): Remove references to
9566 LinuxThreads.
9567 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9568 to 'kill'.
9569 (linux_init_signals): Delete.
9570 (initialize_low): Adjust.
9571 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9572
9573 2015-12-16 Pedro Alves <palves@redhat.com>
9574
9575 * configure.ac (compiler warning flags): When testing a
9576 -Wno-foo option, check whether -Wfoo works instead.
9577 * configure: Regenerate.
9578
9579 2015-12-11 Don Breazeal <donb@codesourcery.com>
9580
9581 * server.c (process_serial_event): Don't exit from gdbserver
9582 in remote mode if there are still active inferiors.
9583
9584 2015-12-11 Yao Qi <yao.qi@linaro.org>
9585
9586 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9587 arm_breakpoint_at if the process is 32-bit.
9588
9589 2015-12-11 Yao Qi <yao.qi@linaro.org>
9590
9591 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9592 arm breakpoint.
9593
9594 2015-12-07 Yao Qi <yao.qi@linaro.org>
9595
9596 * configure.srv: Append arm.o to srv_tgtobj for
9597 aarch64*-*-linux* target.
9598 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9599 from linux-arm-low.c.
9600 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9601 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9602 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9603 (thumb2_breakpoint_len): Likewise.
9604 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9605 (arm_breakpoint_kinds): Likewise.
9606 (arm_breakpoint_kind_from_pc): Likewise.
9607 (arm_sw_breakpoint_from_kind): Likewise.
9608 (arm_breakpoint_kind_from_current_state): Likewise.
9609 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9610 (arm_sw_breakpoint_from_kind): Declare.
9611 (arm_breakpoint_kind_from_current_state): Declare.
9612 (arm_breakpoint_at): Declare.
9613 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9614 arm_sw_breakpoint_from_kind if process is 32-bit.
9615 (aarch64_breakpoint_kind_from_pc): New function.
9616 (aarch64_breakpoint_kind_from_current_state): New function.
9617 (the_low_target): Initialize fields breakpoint_kind_from_pc
9618 and breakpoint_kind_from_current_state.
9619 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9620 linux-aarch32-low.c.
9621 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9622 (arm_breakpoint, arm_breakpoint_len): Likewise.
9623 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9624 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9625 (arm_is_thumb_mode): Likewise.
9626 (arm_breakpoint_at): Likewise.
9627 (arm_breakpoint_kind_from_pc): Likewise.
9628 (arm_sw_breakpoint_from_kind): Likewise.
9629 (arm_breakpoint_kind_from_current_state): Likewise.
9630
9631 Revert:
9632 2015-08-04 Yao Qi <yao.qi@linaro.org>
9633
9634 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9635 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9636 * server.c (extended_protocol): Remove "static".
9637 * server.h (extended_protocol): Declare it.
9638
9639 2015-12-04 Josh Stone <jistone@redhat.com>
9640
9641 * target.h (struct target_ops) <arch_setup>: Rename to ...
9642 (struct target_ops) <post_create_inferior>: ... this.
9643 (target_arch_setup): Rename to ...
9644 (target_post_create_inferior): ... this, calling post_create_inferior.
9645 * server.c (start_inferior): Update target_arch_setup calls to
9646 target_post_create_inferior.
9647 * linux-low.c (linux_low_ptrace_options): Forward declare.
9648 (linux_arch_setup): Update its comment for general use.
9649 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9650 (struct linux_target_ops): Use linux_post_create_inferior.
9651 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9652 to post_create_inferior.
9653 * nto-low.c (struct nto_target_ops): Likewise.
9654 * spu-low.c (struct spu_target_ops): Likewise.
9655 * win32-low.c (struct win32_target_ops): Likewise.
9656
9657 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9658
9659 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9660
9661 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9662
9663 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9664 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9665 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9666 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9667 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9668 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9669 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9670 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9671 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9672 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9673 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9674 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9675
9676 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9677
9678 * linux-low.c (linux_look_up_symbols): Don't call
9679 linux_supports_traceclone.
9680 * linux-low.h (thread_db_init): Remove use_events argument.
9681 * thread-db.c (thread_db_use_event): Remove global variable.
9682 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9683 (struct thread_db) <td_create_bp>: Remove field.
9684 (thread_db_create_event): Remove function.
9685 (thread_db_enable_reporting): Likewise.
9686 (find_one_thread): Don't check for thread_db_use_events.
9687 (attach_thread): Likewise.
9688 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9689 (try_thread_db_load_1): Don't check for thread_db_use_events.
9690 (thread_db_init): Remove use_events argument and thread events
9691 handling.
9692 (remove_thread_event_breakpoints): Remove function.
9693 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9694
9695 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9696
9697 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9698 New function.
9699 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9700 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9701 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9702 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9703 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9704 Initialize.
9705 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9706 New function.
9707 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9708 * linux-low.c (can_hardware_single_step): Use
9709 supports_hardware_single_step.
9710 (can_software_single_step): New function.
9711 (start_step_over): Call can_software_single_step.
9712 (linux_supports_hardware_single_step): New function.
9713 (struct target_ops) <supports_software_single_step>: Initialize.
9714 * linux-low.h (struct linux_target_ops)
9715 <supports_hardware_single_step>: Initialize.
9716 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9717 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9718 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9719 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9720 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9721 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9722 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9723 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9724 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9725 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9726 Initialize.
9727 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9728 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9729 Initialize.
9730 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9731 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9732 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9733 New function.
9734 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9735 * target.h (struct target_ops): <supports_software_single_step>:
9736 New field.
9737 (target_supports_software_single_step): New macro.
9738
9739 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9740
9741 * linux-low.c (linux_wait_1): Fix pc advance condition.
9742 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9743 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9744
9745 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9746
9747 * linux-arm-low.c (arm_is_thumb_mode): New function.
9748 (arm_breakpoint_at): Use arm_is_thumb_mode.
9749 (arm_breakpoint_kind_from_current_state): New function.
9750 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9751 Initialize.
9752 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9753 (linux_breakpoint_kind_from_current_state): New function.
9754 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9755 * linux-low.h (struct linux_target_ops)
9756 <breakpoint_kind_from_current_state>: New field.
9757 * target.h (struct target_ops): Likewise.
9758 (target_breakpoint_kind_from_current_state): New macro.
9759
9760 2015-11-30 Pedro Alves <palves@redhat.com>
9761
9762 * linux-low.c (linux_resume): Wake up the event loop before
9763 returning.
9764
9765 2015-11-30 Pedro Alves <palves@redhat.com>
9766
9767 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9768 check.
9769 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9770 to -1.
9771 * target.c (struct thread_search): New structure.
9772 (thread_search_callback): New function.
9773 (prev_general_thread): New global.
9774 (prepare_to_access_memory, done_accessing_memory): New functions.
9775 * target.h (prepare_to_access_memory, done_accessing_memory):
9776 Replace macros with function declarations.
9777
9778 2015-11-30 Pedro Alves <palves@redhat.com>
9779
9780 PR 14618
9781 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9782 report TARGET_WAITKIND_NO_RESUMED.
9783 * remote-utils.c (prepare_resume_reply): Handle
9784 TARGET_WAITKIND_NO_RESUMED.
9785 * server.c (report_no_resumed): New global.
9786 (handle_query) <qSupported>: Handle "no-resumed+". Report
9787 "no-resumed+" support.
9788 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9789 return error if the client doesn't support no-resumed events.
9790 (push_stop_notification): New function.
9791 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9792 events if the client supports them.
9793
9794 2015-11-30 Pedro Alves <palves@redhat.com>
9795
9796 * linux-low.c (thread_still_has_status_pending_p): Don't check
9797 vCont;t here.
9798 (lwp_resumed): New function.
9799 (status_pending_p_callback): Return early if the LWP is not
9800 supposed to be resumed.
9801
9802 2015-11-30 Pedro Alves <palves@redhat.com>
9803
9804 * linux-low.c (handle_extended_wait): Assert that the LWP's
9805 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9806 thread create events, leave the new child's status pending.
9807 (linux_low_filter_event): If GDB wants to hear about thread exit
9808 events, leave the LWP marked dead and don't delete it.
9809 (linux_wait_for_event_filtered): Don't check for thread exit.
9810 (filter_exit_event): New function.
9811 (linux_wait_1): Use it, when returning an exit event.
9812 (linux_resume_one_lwp_throw): Assert that the LWP's
9813 waitstatus is TARGET_WAITKIND_IGNORE.
9814 * remote-utils.c (prepare_resume_reply): Handle
9815 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9816 * server.c (report_thread_events): New global.
9817 (handle_general_set): Handle QThreadEvents.
9818 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9819 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9820 TARGET_WAITKIND_THREAD_EXITED.
9821 * server.h (report_thread_events): Declare.
9822
9823 2015-11-30 Pedro Alves <palves@redhat.com>
9824
9825 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9826 the thread's last_resume_kind was resume_stop.
9827
9828 2015-11-30 Pedro Alves <palves@redhat.com>
9829
9830 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9831 before returning.
9832
9833 2015-11-30 Pedro Alves <palves@redhat.com>
9834
9835 * server.c (handle_v_requests): Handle vCtrlC.
9836
9837 2015-11-30 Pedro Alves <palves@redhat.com>
9838
9839 * gdbthread.h (find_any_thread_of_pid): Declare.
9840 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9841 functions.
9842 * server.c (handle_query): If current_thread is NULL, look for
9843 another thread of the selected process.
9844
9845 2015-11-26 Daniel Colascione <dancol@dancol.org>
9846 Simon Marchi <simon.marchi@ericsson.com>
9847
9848 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9849 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9850 name in reply.
9851 * target.h (struct target_ops) <thread_name>: New field.
9852 (target_thread_name): New macro.
9853
9854 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9855
9856 * regcache.h (regcache_invalidate_pid): Add declaration.
9857 * regcache.c (regcache_invalidate_pid): New function, extracted
9858 from regcache_invalidate.
9859 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9860 Add trivial documentation comment.
9861 * lynx-low.c: Use regcache_invalidate_pid instead of
9862 regcache_invalidate.
9863
9864 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9865
9866 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9867 and Elf64_auxv_t if the target is Android.
9868
9869 2015-11-22 Doug Evans <xdje42@gmail.com>
9870
9871 * target.h: #include <sys/types.h>.
9872
9873 2015-11-19 Pedro Alves <palves@redhat.com>
9874
9875 * linux-low.c (linux_process_qsupported): Change prototype.
9876 Adjust.
9877 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9878 Change prototype.
9879 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9880 and adjust to loop over all features.
9881 * server.c (handle_query) <qSupported>: Adjust to call
9882 target_process_qsupported once, passing it a vector of unprocessed
9883 features.
9884 * target.h (struct target_ops) <process_qsupported>: Change
9885 prototype.
9886 (target_process_qsupported): Adjust.
9887
9888 2015-11-19 Pedro Alves <palves@redhat.com>
9889
9890 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9891 mode.
9892 * configure: Regenerate.
9893
9894 2015-11-19 Pedro Alves <palves@redhat.com>
9895
9896 * configure: Regenerate.
9897
9898 2015-11-19 Yao Qi <yao.qi@linaro.org>
9899
9900 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9901 type to uint32_t.
9902
9903 2015-11-19 Yao Qi <yao.qi@linaro.org>
9904
9905 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9906 (struct aarch64_operand): Move enum out.
9907
9908 2015-11-19 Yao Qi <yao.qi@linaro.org>
9909
9910 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9911 struct user_fpsimd_state *.
9912 (aarch64_store_fpregset): Likewise.
9913
9914 2015-11-19 Yao Qi <yao.qi@linaro.org>
9915
9916 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9917 struct user_pt_regs *.
9918 (aarch64_store_gregset): Likewise.
9919
9920 2015-11-18 Pedro Alves <palves@redhat.com>
9921
9922 * Makefile.in (all_object_files): Add $IPA_OBJS.
9923
9924 2015-11-17 Pedro Alves <palves@redhat.com>
9925
9926 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9927 GDB_SIGNAL_0 and gdb_signal_to_string.
9928
9929 2015-11-17 Pedro Alves <palves@redhat.com>
9930
9931 * win32-low.c (handle_output_debug_string): Remove parameter.
9932 (win32_kill): Remove our_status local and adjust call to
9933 handle_output_debug_string.
9934 (get_child_debug_event): Adjust call to
9935 handle_output_debug_string.
9936
9937 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9938
9939 * linux-mips-low.c (mips_fill_gregset): Add cast.
9940 (mips_store_gregset): Likewise.
9941 (mips_fill_fpregset): Likewise.
9942 (mips_store_fpregset): Likewise.
9943
9944 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9945
9946 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9947 priv.
9948
9949 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9950
9951 * linux-mips-low.c (mips_linux_new_thread): Change type of
9952 watch_type to enum target_hw_bp_type.
9953
9954 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9955
9956 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9957 Change return type to arm_hwbp_type.
9958
9959 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9960
9961 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9962 (arm_store_gregset): Likewise.
9963 * linux-arm-low.c (arm_get_hwcap): Likewise.
9964 (arm_read_description): Likewise.
9965
9966 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9967
9968 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9969
9970 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9971
9972 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9973 (ppc_fill_vsxregset): Likewise.
9974 (ppc_store_vsxregset): Likewise.
9975 (ppc_fill_vrregset): Likewise.
9976 (ppc_store_vrregset): Likewise.
9977 (ppc_fill_evrregset): Likewise.
9978 (ppc_store_evrregset): Likewise.
9979
9980 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9981
9982 * linux-ppc-low.c (ppc_usrregs_info): Remove
9983 forward-declaration.
9984 (ppc_arch_setup): Move lower in file.
9985
9986 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9987
9988 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9989 (ps_pdwrite): Likewise.
9990
9991 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9992
9993 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9994 to after assert checks.
9995
9996 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9997
9998 * proc-service.c (ps_pdread): Add/adjust casts.
9999 (ps_pdwrite): Add/adjust casts.
10000
10001 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
10002
10003 * server.c (handle_search_memory_1): Cast return value of
10004 memmem.
10005
10006 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
10007
10008 * server.c (write_qxfer_response): Change type of data to
10009 gdb_byte *.
10010
10011 2015-10-29 Pedro Alves <palves@redhat.com>
10012
10013 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
10014
10015 2015-10-29 Pedro Alves <palves@redhat.com>
10016
10017 * tracepoint.c (clear_installed_tracepoints): Add casts.
10018
10019 2015-10-29 Pedro Alves <palves@redhat.com>
10020
10021 * server.c (handle_v_cont, process_serial_event): Add enum
10022 gdb_signal casts to signal parsing code.
10023
10024 2015-10-29 Pedro Alves <palves@redhat.com>
10025
10026 * linux-low.h (NULL_REGSET): Define.
10027 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
10028 * linux-arm-low.c (arm_regsets): Likewise.
10029 * linux-crisv32-low.c (cris_regsets): Likewise.
10030 * linux-m68k-low.c (m68k_regsets): Likewise.
10031 * linux-mips-low.c (mips_regsets): Likewise.
10032 * linux-nios2-low.c (nios2_regsets): Likewise.
10033 * linux-ppc-low.c (ppc_regsets): Likewise.
10034 * linux-s390-low.c (s390_regsets): Likewise.
10035 * linux-sh-low.c (sh_regsets): Likewise.
10036 * linux-sparc-low.c (sparc_regsets): Likewise.
10037 * linux-tic6x-low.c (tic6x_regsets): Likewise.
10038 * linux-tile-low.c (tile_regsets): Likewise.
10039 * linux-x86-low.c (x86_regsets): Likewise.
10040 * linux-xtensa-low.c (xtensa_regsets): Likewise.
10041
10042 2015-10-29 Pedro Alves <palves@redhat.com>
10043
10044 * linux-low.h (NULL_REGSET): Define.
10045 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
10046 * linux-arm-low.c (arm_regsets): Likewise.
10047 * linux-crisv32-low.c (cris_regsets): Likewise.
10048 * linux-m68k-low.c (m68k_regsets): Likewise.
10049 * linux-mips-low.c (mips_regsets): Likewise.
10050 * linux-nios2-low.c (nios2_regsets): Likewise.
10051 * linux-ppc-low.c (ppc_regsets): Likewise.
10052 * linux-s390-low.c (s390_regsets): Likewise.
10053 * linux-sh-low.c (sh_regsets): Likewise.
10054 * linux-sparc-low.c (sparc_regsets): Likewise.
10055 * linux-tic6x-low.c (tic6x_regsets): Likewise.
10056 * linux-tile-low.c (tile_regsets): Likewise.
10057 * linux-x86-low.c (x86_regsets): Likewise.
10058 * linux-xtensa-low.c (xtensa_regsets): Likewise.
10059
10060 2015-10-26 Doug Evans <dje@google.com>
10061
10062 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
10063
10064 2015-10-26 Doug Evans <dje@google.com>
10065
10066 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
10067
10068 2015-10-26 Doug Evans <dje@google.com>
10069
10070 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
10071 for debug_printf.
10072 (attach_thread, find_new_threads_callback): Ditto.
10073
10074 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10075
10076 * mem-break.h (set_breakpoint_data): Remove.
10077
10078 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10079
10080 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
10081 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
10082 (initialize_low): Remove set_breakpoint_data call.
10083 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
10084 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
10085 (initialize_low): Remove set_breakpoint_data call.
10086 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
10087 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
10088 (initialize_low): Remove set_breakpoint_data call.
10089
10090 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10091
10092 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
10093 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
10094 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
10095 * target.h (target_breakpoint_kind_from_pc): New macro.
10096
10097 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
10098
10099 * linux-low.c (default_breakpoint_kind_from_pc): New function.
10100 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
10101 the default breakpoint kind.
10102
10103 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10104
10105 * linux-arm-low.c (arm_supports_z_point_type): Add software
10106 breakpoint support.
10107
10108 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10109
10110 * linux-arm-low.c: Refactor breakpoint definitions.
10111 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
10112 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
10113
10114 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10115
10116 * Makefile.in: Add arm.c/o.
10117 * configure.srv: Likewise.
10118 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
10119 (arm_breakpoint_kind_from_pc): New function.
10120 (arm_sw_breakpoint_from_kind): Return proper kind.
10121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
10122
10123 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10124
10125 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
10126 removal.
10127 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
10128 (struct raw_breakpoint) <size>: Remove.
10129 (struct raw_breakpoint) <kind>: Add.
10130 (bp_size): New function.
10131 (bp_opcode): Likewise.
10132 (find_raw_breakpoint_at): Adjust for kind.
10133 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
10134 (remove_memory_breakpoint): Adjust for kind call bp_size.
10135 (set_raw_breakpoint_at): Adjust for kind.
10136 (set_breakpoint): Likewise.
10137 (set_breakpoint_at): Call breakpoint_kind_from_pc.
10138 (delete_raw_breakpoint): Adjust for kind.
10139 (delete_breakpoint): Likewise.
10140 (find_gdb_breakpoint): Likewise.
10141 (set_gdb_breakpoint_1): Likewise.
10142 (set_gdb_breakpoint): Likewise.
10143 (delete_gdb_breakpoint_1): Likewise.
10144 (delete_gdb_breakpoint): Likewise.
10145 (uninsert_raw_breakpoint): Likewise.
10146 (reinsert_raw_breakpoint): Likewise.
10147 (set_breakpoint_data): Remove.
10148 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
10149 (check_mem_read): Adjust for kind call bp_size.
10150 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
10151 (clone_one_breakpoint): Adjust for kind.
10152 * mem-break.h (set_gdb_breakpoint): Likewise.
10153 (delete_gdb_breakpoint): Likewise.
10154 * server.c (process_serial_event): Likewise.
10155
10156 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10157
10158 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
10159 (struct linux_target_ops) <breakpoint>: Remove.
10160 (struct linux_target_ops) <breakpoint_len>: Remove.
10161 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10162 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10163 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
10164 (arm_sw_breakpoint_from_kind): New function.
10165 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
10166 (struct linux_target_ops) <breakpoint>: Remove.
10167 (struct linux_target_ops) <breakpoint_len>: Remove.
10168 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10169 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10170 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
10171 (struct linux_target_ops) <breakpoint>: Remove.
10172 (struct linux_target_ops) <breakpoint_len>: Remove.
10173 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10174 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10175 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
10176 (struct linux_target_ops) <breakpoint>: Remove.
10177 (struct linux_target_ops) <breakpoint_len>: Remove.
10178 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10179 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10180 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
10181 and sw_breakpoint_from_kind to increment the pc.
10182 (linux_breakpoint_kind_from_pc): New function.
10183 (linux_sw_breakpoint_from_kind): New function.
10184 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
10185 (initialize_low): Call breakpoint_kind_from_pc and
10186 sw_breakpoint_from_kind to replace breakpoint_data/len.
10187 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
10188 New field.
10189 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
10190 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
10191 (struct linux_target_ops) <breakpoint>: Remove.
10192 (struct linux_target_ops) <breakpoint_len>: Remove.
10193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10195 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
10196 (struct linux_target_ops) <breakpoint>: Remove.
10197 (struct linux_target_ops) <breakpoint_len>: Remove.
10198 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10199 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10200 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
10201 (struct linux_target_ops) <breakpoint>: Remove.
10202 (struct linux_target_ops) <breakpoint_len>: Remove.
10203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10205 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
10206 (struct linux_target_ops) <breakpoint>: Remove.
10207 (struct linux_target_ops) <breakpoint_len>: Remove.
10208 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10209 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10210 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
10211 (struct linux_target_ops) <breakpoint>: Remove.
10212 (struct linux_target_ops) <breakpoint_len>: Remove.
10213 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10214 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10215 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
10216 (struct linux_target_ops) <breakpoint>: Remove.
10217 (struct linux_target_ops) <breakpoint_len>: Remove.
10218 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10219 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10220 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
10221 (struct linux_target_ops) <breakpoint>: Remove.
10222 (struct linux_target_ops) <breakpoint_len>: Remove.
10223 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10224 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10225 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
10226 (struct linux_target_ops) <breakpoint>: Remove.
10227 (struct linux_target_ops) <breakpoint_len>: Remove.
10228 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10229 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10230 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
10231 (struct linux_target_ops) <breakpoint>: Remove.
10232 (struct linux_target_ops) <breakpoint_len>: Remove.
10233 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10234 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10235 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
10236 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
10237 (struct linux_target_ops) <breakpoint>: Remove.
10238 (struct linux_target_ops) <breakpoint_len>: Remove.
10239 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10240 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10241 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
10242 (struct linux_target_ops) <breakpoint>: Remove.
10243 (struct linux_target_ops) <breakpoint_len>: Remove.
10244 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10245 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10246
10247 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10248
10249 * linux-cris-low.c (cris_get_pc): Remove void arg.
10250
10251 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10252
10253 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
10254 variable name.
10255
10256 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10257
10258 * inferiors.c (thread_pid_matches_callback): New function.
10259 (find_thread_process): New function.
10260 (remove_thread): Reset current_thread.
10261 (remove_process): Assert threads have been removed first.
10262
10263 2015-10-15 Yao Qi <yao.qi@linaro.org>
10264
10265 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10266 if it is 3.
10267 (aarch64_remove_point): Likewise.
10268 * regcache.c (regcache_register_size): New function.
10269
10270 2015-10-12 Yao Qi <yao.qi@linaro.org>
10271
10272 * linux-aarch64-low.c: Update all callers as emit_load_store
10273 is renamed to aarch64_emit_load_store.
10274
10275 2015-10-12 Yao Qi <yao.qi@linaro.org>
10276
10277 * linux-aarch64-low.c: Update all callers of function renaming
10278 from emit_insn to aarch64_emit_insn.
10279
10280 2015-10-12 Yao Qi <yao.qi@linaro.org>
10281
10282 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10283 arch/aarch64-insn.h.
10284 (struct aarch64_memory_operand): Likewise.
10285 (ENCODE): Likewise.
10286 (emit_insn): Move to arch/aarch64-insn.c.
10287 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10288 (emit_load_store): Move to arch/aarch64-insn.c.
10289 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10290 (can_encode_int32): Remove.
10291
10292 2015-10-12 Yao Qi <yao.qi@linaro.org>
10293
10294 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10295 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10296 (aarch64_relocate_instruction): Likewise.
10297 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10298 (struct aarch64_insn_visitor): Likewise.
10299
10300 2015-10-12 Yao Qi <yao.qi@linaro.org>
10301
10302 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10303 (struct aarch64_insn_visitor): New.
10304 (struct aarch64_insn_relocation_data): New.
10305 (aarch64_ftrace_insn_reloc_b): New function.
10306 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10307 (aarch64_ftrace_insn_reloc_cb): Likewise.
10308 (aarch64_ftrace_insn_reloc_tb): Likewise.
10309 (aarch64_ftrace_insn_reloc_adr): Likewise.
10310 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10311 (aarch64_ftrace_insn_reloc_others): Likewise.
10312 (visitor): New.
10313 (aarch64_relocate_instruction): Use visitor.
10314
10315 2015-10-12 Yao Qi <yao.qi@linaro.org>
10316
10317 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10318 int. Add argument buf.
10319 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10320 aarch64_relocate_instruction.
10321
10322 2015-10-12 Yao Qi <yao.qi@linaro.org>
10323
10324 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10325 argument insn. Remove local variable insn. Don't call
10326 target_read_uint32.
10327 (aarch64_install_fast_tracepoint_jump_pad): Call
10328 target_read_uint32.
10329
10330 2015-09-30 Yao Qi <yao.qi@linaro.org>
10331
10332 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10333 (emit_load_store_pair): Likewise.
10334
10335 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10336
10337 * dll.c (match_dll): Add cast(s).
10338 (unloaded_dll): Likewise.
10339 * linux-low.c (second_thread_of_pid_p): Likewise.
10340 (delete_lwp_callback): Likewise.
10341 (count_events_callback): Likewise.
10342 (select_event_lwp_callback): Likewise.
10343 (linux_set_resume_request): Likewise.
10344 * server.c (accumulate_file_name_length): Likewise.
10345 (emit_dll_description): Likewise.
10346 (handle_qxfer_threads_worker): Likewise.
10347 (visit_actioned_threads): Likewise.
10348 * thread-db.c (any_thread_of): Likewise.
10349 * tracepoint.c (same_process_p): Likewise.
10350 (match_blocktype): Likewise.
10351 (build_traceframe_info_xml): Likewise.
10352
10353 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10354
10355 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10356 assignment.
10357 (gdb_unparse_agent_expr): Likewise.
10358 * hostio.c (require_data): Likewise.
10359 (handle_pread): Likewise.
10360 * linux-low.c (disable_regset): Likewise.
10361 (fetch_register): Likewise.
10362 (store_register): Likewise.
10363 (get_dynamic): Likewise.
10364 (linux_qxfer_libraries_svr4): Likewise.
10365 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10366 (set_fast_tracepoint_jump): Likewise.
10367 (uninsert_fast_tracepoint_jumps_at): Likewise.
10368 (reinsert_fast_tracepoint_jumps_at): Likewise.
10369 (validate_inserted_breakpoint): Likewise.
10370 (clone_agent_expr): Likewise.
10371 * regcache.c (init_register_cache): Likewise.
10372 * remote-utils.c (putpkt_binary_1): Likewise.
10373 (decode_M_packet): Likewise.
10374 (decode_X_packet): Likewise.
10375 (look_up_one_symbol): Likewise.
10376 (relocate_instruction): Likewise.
10377 (monitor_output): Likewise.
10378 * server.c (handle_search_memory): Likewise.
10379 (handle_qxfer_exec_file): Likewise.
10380 (handle_qxfer_libraries): Likewise.
10381 (handle_qxfer): Likewise.
10382 (handle_query): Likewise.
10383 (handle_v_cont): Likewise.
10384 (handle_v_run): Likewise.
10385 (captured_main): Likewise.
10386 * target.c (write_inferior_memory): Likewise.
10387 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10388 * tracepoint.c (init_trace_buffer): Likewise.
10389 (add_tracepoint_action): Likewise.
10390 (add_traceframe): Likewise.
10391 (add_traceframe_block): Likewise.
10392 (cmd_qtdpsrc): Likewise.
10393 (cmd_qtdv): Likewise.
10394 (cmd_qtstatus): Likewise.
10395 (response_source): Likewise.
10396 (response_tsv): Likewise.
10397 (cmd_qtnotes): Likewise.
10398 (gdb_collect): Likewise.
10399 (initialize_tracepoint): Likewise.
10400
10401 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10402
10403 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10404 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10405 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10406 <NOP>: New.
10407 (enum aarch64_condition_codes): New enum.
10408 (w0): New static global.
10409 (fp): Likewise.
10410 (lr): Likewise.
10411 (struct aarch64_memory_operand) <type>: New
10412 MEMORY_OPERAND_POSTINDEX type.
10413 (postindex_memory_operand): New helper function.
10414 (emit_ret): New function.
10415 (emit_load_store_pair): New function, factored out of emit_stp
10416 with support for MEMORY_OPERAND_POSTINDEX.
10417 (emit_stp): Rewrite using emit_load_store_pair.
10418 (emit_ldp): New function.
10419 (emit_load_store): Likewise.
10420 (emit_ldr): Mention post-index instruction in comment.
10421 (emit_ldrh): New function.
10422 (emit_ldrb): New function.
10423 (emit_ldrsw): Mention post-index instruction in comment.
10424 (emit_str): Likewise.
10425 (emit_subs): New function.
10426 (emit_cmp): Likewise.
10427 (emit_and): Likewise.
10428 (emit_orr): Likewise.
10429 (emit_orn): Likewise.
10430 (emit_eor): Likewise.
10431 (emit_mvn): Likewise.
10432 (emit_lslv): Likewise.
10433 (emit_lsrv): Likewise.
10434 (emit_asrv): Likewise.
10435 (emit_mul): Likewise.
10436 (emit_sbfm): Likewise.
10437 (emit_sbfx): Likewise.
10438 (emit_ubfm): Likewise.
10439 (emit_ubfx): Likewise.
10440 (emit_csinc): Likewise.
10441 (emit_cset): Likewise.
10442 (emit_nop): Likewise.
10443 (emit_ops_insns): New helper function.
10444 (emit_pop): Likewise.
10445 (emit_push): Likewise.
10446 (aarch64_emit_prologue): New function.
10447 (aarch64_emit_epilogue): Likewise.
10448 (aarch64_emit_add): Likewise.
10449 (aarch64_emit_sub): Likewise.
10450 (aarch64_emit_mul): Likewise.
10451 (aarch64_emit_lsh): Likewise.
10452 (aarch64_emit_rsh_signed): Likewise.
10453 (aarch64_emit_rsh_unsigned): Likewise.
10454 (aarch64_emit_ext): Likewise.
10455 (aarch64_emit_log_not): Likewise.
10456 (aarch64_emit_bit_and): Likewise.
10457 (aarch64_emit_bit_or): Likewise.
10458 (aarch64_emit_bit_xor): Likewise.
10459 (aarch64_emit_bit_not): Likewise.
10460 (aarch64_emit_equal): Likewise.
10461 (aarch64_emit_less_signed): Likewise.
10462 (aarch64_emit_less_unsigned): Likewise.
10463 (aarch64_emit_ref): Likewise.
10464 (aarch64_emit_if_goto): Likewise.
10465 (aarch64_emit_goto): Likewise.
10466 (aarch64_write_goto_address): Likewise.
10467 (aarch64_emit_const): Likewise.
10468 (aarch64_emit_call): Likewise.
10469 (aarch64_emit_reg): Likewise.
10470 (aarch64_emit_pop): Likewise.
10471 (aarch64_emit_stack_flush): Likewise.
10472 (aarch64_emit_zero_ext): Likewise.
10473 (aarch64_emit_swap): Likewise.
10474 (aarch64_emit_stack_adjust): Likewise.
10475 (aarch64_emit_int_call_1): Likewise.
10476 (aarch64_emit_void_call_2): Likewise.
10477 (aarch64_emit_eq_goto): Likewise.
10478 (aarch64_emit_ne_goto): Likewise.
10479 (aarch64_emit_lt_goto): Likewise.
10480 (aarch64_emit_le_goto): Likewise.
10481 (aarch64_emit_gt_goto): Likewise.
10482 (aarch64_emit_ge_got): Likewise.
10483 (aarch64_emit_ops_impl): New static global variable.
10484 (aarch64_emit_ops): New target function, return
10485 &aarch64_emit_ops_impl.
10486 (struct linux_target_ops): Install it.
10487
10488 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10489
10490 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10491 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10492 aarch64-ipa.o.
10493 * linux-aarch64-ipa.c: New file.
10494 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10495 and endian.h.
10496 (aarch64_get_thread_area): New target method.
10497 (extract_signed_bitfield): New helper function.
10498 (aarch64_decode_ldr_literal): New function.
10499 (enum aarch64_opcodes): New enum.
10500 (struct aarch64_register): New struct.
10501 (struct aarch64_operand): New struct.
10502 (x0): New static global.
10503 (x1): Likewise.
10504 (x2): Likewise.
10505 (x3): Likewise.
10506 (x4): Likewise.
10507 (w2): Likewise.
10508 (ip0): Likewise.
10509 (sp): Likewise.
10510 (xzr): Likewise.
10511 (aarch64_register): New helper function.
10512 (register_operand): Likewise.
10513 (immediate_operand): Likewise.
10514 (struct aarch64_memory_operand): New struct.
10515 (offset_memory_operand): New helper function.
10516 (preindex_memory_operand): Likewise.
10517 (enum aarch64_system_control_registers): New enum.
10518 (ENCODE): New macro.
10519 (emit_insn): New helper function.
10520 (emit_b): New function.
10521 (emit_bcond): Likewise.
10522 (emit_cb): Likewise.
10523 (emit_tb): Likewise.
10524 (emit_blr): Likewise.
10525 (emit_stp): Likewise.
10526 (emit_ldp_q_offset): Likewise.
10527 (emit_stp_q_offset): Likewise.
10528 (emit_load_store): Likewise.
10529 (emit_ldr): Likewise.
10530 (emit_ldrsw): Likewise.
10531 (emit_str): Likewise.
10532 (emit_ldaxr): Likewise.
10533 (emit_stxr): Likewise.
10534 (emit_stlr): Likewise.
10535 (emit_data_processing_reg): Likewise.
10536 (emit_data_processing): Likewise.
10537 (emit_add): Likewise.
10538 (emit_sub): Likewise.
10539 (emit_mov): Likewise.
10540 (emit_movk): Likewise.
10541 (emit_mov_addr): Likewise.
10542 (emit_mrs): Likewise.
10543 (emit_msr): Likewise.
10544 (emit_sevl): Likewise.
10545 (emit_wfe): Likewise.
10546 (append_insns): Likewise.
10547 (can_encode_int32_in): New helper function.
10548 (aarch64_relocate_instruction): New function.
10549 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10550 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10551 (struct linux_target_ops): Install aarch64_get_thread_area,
10552 aarch64_install_fast_tracepoint_jump_pad and
10553 aarch64_get_min_fast_tracepoint_insn_len.
10554
10555 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10556
10557 * Makefile.in (aarch64-insn.o): New rule.
10558 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10559
10560 2015-09-21 Yao Qi <yao.qi@linaro.org>
10561
10562 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10563
10564 2015-09-21 Yao Qi <yao.qi@linaro.org>
10565
10566 * tracepoint.c (max_jump_pad_size): Remove.
10567
10568 2015-09-18 Yao Qi <yao.qi@linaro.org>
10569
10570 * linux-aarch64-low.c: Don't include sys/uio.h.
10571 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10572
10573 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10574
10575 * tracepoint.c (eval_result_type): Change prototype.
10576 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10577
10578 2015-09-15 Pedro Alves <palves@redhat.com>
10579
10580 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10581 Check whether to report exec events instead of checking whether
10582 multiprocess is enabled.
10583
10584 2015-09-15 Pedro Alves <palves@redhat.com>
10585
10586 PR remote/18965
10587 * remote-utils.c (prepare_resume_reply): Merge
10588 TARGET_WAITKIND_VFORK_DONE switch case with the
10589 TARGET_WAITKIND_FORKED case.
10590
10591 2015-09-15 Yao Qi <yao.qi@linaro.org>
10592
10593 * server.c (handle_query): Check string comparison using
10594 "else if" instead of "if".
10595
10596 2015-09-15 Yao Qi <yao.qi@linaro.org>
10597
10598 * server.c (vCont_supported): New global variable.
10599 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10600 matches. Append ";vContSupported+" to own_buf.
10601 (handle_v_requests): Append ";s;S" to own_buf if target supports
10602 hardware single step or vCont_supported is false.
10603 (capture_main): Set vCont_supported to zero.
10604
10605 2015-09-15 Yao Qi <yao.qi@linaro.org>
10606
10607 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10608 it to ...
10609 (linux_supports_hardware_single_step): ... New function.
10610 (linux_target_ops): Update.
10611 * lynx-low.c (lynx_target_ops): Set field
10612 supports_hardware_single_step to target_can_do_hardware_single_step.
10613 * nto-low.c (nto_target_ops): Likewise.
10614 * spu-low.c (spu_target_ops): Likewise.
10615 * win32-low.c (win32_target_ops): Likewise.
10616 * target.c (target_can_do_hardware_single_step): New function.
10617 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10618 Remove. <supports_hardware_single_step>: New field.
10619 (target_supports_conditional_breakpoints): Remove.
10620 (target_supports_hardware_single_step): New macro.
10621 (target_can_do_hardware_single_step): Declare.
10622 * server.c (handle_query): Use target_supports_hardware_single_step
10623 instead of target_supports_conditional_breakpoints.
10624
10625 2015-09-15 Yao Qi <yao.qi@linaro.org>
10626
10627 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10628 function.
10629 (struct linux_target_ops the_low_target): Install
10630 aarch64_linux_siginfo_fixup.
10631
10632 2015-09-11 Don Breazeal <donb@codesourcery.com>
10633 Luis Machado <lgustavo@codesourcery.com>
10634
10635 * linux-low.c (linux_mourn): Static declaration.
10636 (linux_arch_setup): Move in front of
10637 handle_extended_wait.
10638 (linux_arch_setup_thread): New function.
10639 (handle_extended_wait): Handle exec events. Call
10640 linux_arch_setup_thread. Make event_lwp argument a
10641 pointer-to-a-pointer.
10642 (check_zombie_leaders): Do not check stopped threads.
10643 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10644 (linux_low_filter_event): Add lwp and thread for exec'ing
10645 non-leader thread if leader thread has been deleted.
10646 Refactor code into linux_arch_setup_thread and call it.
10647 Pass child lwp pointer by reference to handle_extended_wait.
10648 (linux_wait_for_event_filtered): Update comment.
10649 (linux_wait_1): Prevent clobbering exec event status.
10650 (linux_supports_exec_events): New function.
10651 (linux_target_ops) <supports_exec_events>: Initialize new member.
10652 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10653 new member.
10654 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10655 * server.c (report_exec_events): New global variable.
10656 (handle_query): Handle qSupported query for exec-events feature.
10657 (captured_main): Initialize report_exec_events.
10658 * server.h (report_exec_events): Declare new global variable.
10659 * target.h (struct target_ops) <supports_exec_events>: New
10660 member.
10661 (target_supports_exec_events): New macro.
10662 * win32-low.c (win32_target_ops) <supports_exec_events>:
10663 Initialize new member.
10664
10665 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10666
10667 * linux-low.c (linux_low_enable_btrace): Remove.
10668 (linux_target_ops): Replace linux_low_enable_btrace with
10669 linux_enable_btrace.
10670
10671 2015-09-03 Yao Qi <yao.qi@linaro.org>
10672
10673 * linux-aarch64-low.c (aarch64_insert_point): Call
10674 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10675 returns true.
10676
10677 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10678
10679 * linux-low.c (check_stopped_by_breakpoint): Use
10680 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10681
10682 2015-08-27 Pedro Alves <palves@redhat.com>
10683
10684 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10685
10686 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10687
10688 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10689 the XNEW-family equivalent.
10690 (compile_bytecodes): Likewise.
10691 * dll.c (loaded_dll): Likewise.
10692 * event-loop.c (append_callback_event): Likewise.
10693 (create_file_handler): Likewise.
10694 (create_file_event): Likewise.
10695 * hostio.c (handle_open): Likewise.
10696 * inferiors.c (add_thread): Likewise.
10697 (add_process): Likewise.
10698 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10699 * linux-arm-low.c (arm_new_process): Likewise.
10700 (arm_new_thread): Likewise.
10701 * linux-low.c (add_to_pid_list): Likewise.
10702 (linux_add_process): Likewise.
10703 (handle_extended_wait): Likewise.
10704 (add_lwp): Likewise.
10705 (enqueue_one_deferred_signal): Likewise.
10706 (enqueue_pending_signal): Likewise.
10707 (linux_resume_one_lwp_throw): Likewise.
10708 (linux_resume_one_thread): Likewise.
10709 (linux_read_memory): Likewise.
10710 (linux_write_memory): Likewise.
10711 * linux-mips-low.c (mips_linux_new_process): Likewise.
10712 (mips_linux_new_thread): Likewise.
10713 (mips_add_watchpoint): Likewise.
10714 * linux-x86-low.c (initialize_low_arch): Likewise.
10715 * lynx-low.c (lynx_add_process): Likewise.
10716 * mem-break.c (set_raw_breakpoint_at): Likewise.
10717 (set_breakpoint): Likewise.
10718 (add_condition_to_breakpoint): Likewise.
10719 (add_commands_to_breakpoint): Likewise.
10720 (clone_agent_expr): Likewise.
10721 (clone_one_breakpoint): Likewise.
10722 * regcache.c (new_register_cache): Likewise.
10723 * remote-utils.c (look_up_one_symbol): Likewise.
10724 * server.c (queue_stop_reply): Likewise.
10725 (start_inferior): Likewise.
10726 (queue_stop_reply_callback): Likewise.
10727 (handle_target_event): Likewise.
10728 * spu-low.c (fetch_ppc_memory): Likewise.
10729 (store_ppc_memory): Likewise.
10730 * target.c (set_target_ops): Likewise.
10731 * thread-db.c (thread_db_load_search): Likewise.
10732 (try_thread_db_load_1): Likewise.
10733 * tracepoint.c (add_tracepoint): Likewise.
10734 (add_tracepoint_action): Likewise.
10735 (create_trace_state_variable): Likewise.
10736 (cmd_qtdpsrc): Likewise.
10737 (cmd_qtro): Likewise.
10738 (add_while_stepping_state): Likewise.
10739 * win32-low.c (child_add_thread): Likewise.
10740 (get_image_name): Likewise.
10741
10742 2015-08-25 Yao Qi <yao.qi@linaro.org>
10743
10744 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10745
10746 2015-08-25 Yao Qi <yao.qi@linaro.org>
10747
10748 * Makefile.in (aarch64-linux.o): New rule.
10749 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10750 srv_tgtobj.
10751 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10752 (aarch64_init_debug_reg_state): Make it extern.
10753 (aarch64_linux_prepare_to_resume): Remove.
10754
10755 2015-08-25 Yao Qi <yao.qi@linaro.org>
10756
10757 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10758 lwp_arch_private_info and ptid_of_lwp.
10759
10760 2015-08-25 Yao Qi <yao.qi@linaro.org>
10761
10762 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10763 Find proc_info by find_process_pid. All callers updated.
10764
10765 2015-08-25 Yao Qi <yao.qi@linaro.org>
10766
10767 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10768 Remove.
10769 (debug_reg_change_callback): Remove.
10770 (aarch64_notify_debug_reg_change): Remove.
10771
10772 2015-08-25 Yao Qi <yao.qi@linaro.org>
10773
10774 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10775 Call current_lwp_ptid.
10776
10777 2015-08-25 Yao Qi <yao.qi@linaro.org>
10778
10779 * linux-aarch64-low.c (debug_reg_change_callback): Use
10780 debug_printf.
10781
10782 2015-08-25 Yao Qi <yao.qi@linaro.org>
10783
10784 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10785
10786 2015-08-25 Yao Qi <yao.qi@linaro.org>
10787
10788 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10789
10790 2015-08-25 Yao Qi <yao.qi@linaro.org>
10791
10792 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10793 the code.
10794
10795 2015-08-25 Yao Qi <yao.qi@linaro.org>
10796
10797 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10798 Remove.
10799 (debug_reg_change_callback): Remove argument entry and add argument
10800 lwp. Remove local variable thread. Don't print thread id in the
10801 debugging output. Don't check whether pid of thread equals to pid.
10802 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10803 iterate_over_lwps instead find_inferior.
10804
10805 2015-08-24 Pedro Alves <palves@redhat.com>
10806
10807 * inferiors.c (get_first_process): New function.
10808 * inferiors.h (get_first_process): New declaration.
10809 * remote-utils.c (read_ptid): Default to the first process in the
10810 list, instead of to the current thread's process.
10811
10812 2015-08-24 Pedro Alves <palves@redhat.com>
10813
10814 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10815 * event-loop.c: Likewise.
10816 * remote-utils.c: Likewise.
10817 * tracepoint.c: Likewise.
10818
10819 2015-08-24 Pedro Alves <palves@redhat.com>
10820
10821 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10822 ptid_get_lwp.
10823
10824 2015-08-21 Pedro Alves <palves@redhat.com>
10825
10826 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10827 instead of literal 1.
10828
10829 2015-08-21 Pedro Alves <palves@redhat.com>
10830
10831 * tdesc.c (default_description): Explicitly zero-initialize.
10832
10833 2015-08-21 Pedro Alves <palves@redhat.com>
10834
10835 PR gdb/18749
10836 * inferiors.c (remove_thread): Discard any pending stop reply for
10837 this thread.
10838 * server.c (remove_all_on_match_pid): Rename to ...
10839 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10840 instead of a pid.
10841 (discard_queued_stop_replies): Change parameter to a ptid. Now
10842 extern.
10843 (handle_v_kill, kill_inferior_callback, captured_main)
10844 (process_serial_event): Adjust.
10845 * server.h (discard_queued_stop_replies): Declare.
10846
10847 2015-08-21 Pedro Alves <palves@redhat.com>
10848
10849 * linux-low.c (wait_for_sigstop): Always switch to no thread
10850 selected if the previously current thread dies.
10851 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10852 process instead of the current thread's.
10853 * remote-utils.c (input_interrupt): Don't check if there's no
10854 current thread.
10855 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10856 current thread to the general thread fails, error out.
10857 (handle_qxfer_auxv, handle_qxfer_libraries)
10858 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10859 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10860 (handle_query): Check if there's a thread selected instead of
10861 checking whether there's any thread in the thread list.
10862 (handle_qxfer_threads, handle_qxfer_btrace)
10863 (handle_qxfer_btrace_conf): Don't error out early if there's no
10864 thread in the thread list.
10865 (handle_v_cont, myresume): Don't set the current thread to the
10866 continue thread.
10867 (process_serial_event) <Hg handling>: Also set thread_id if the
10868 previous general thread is still alive.
10869 (process_serial_event) <g/G handling>: If setting the current
10870 thread to the general thread fails, error out.
10871 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10872 thread's lwp instead of the current thread's.
10873 * target.c (set_desired_thread): If the desired thread was not
10874 found, leave the current thread pointing to NULL. Return an int
10875 (boolean) indicating success.
10876 * target.h (set_desired_thread): Change return type to int.
10877
10878 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10879
10880 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10881 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10882 #includes.
10883 (ps_get_thread_area): New function.
10884
10885 2015-08-19 Gary Benson <gbenson@redhat.com>
10886
10887 * hostio.c (handle_pread): Do not attempt to read more data
10888 than hostio_reply_with_data can fit in a packet.
10889
10890 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10891
10892 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10893
10894 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10895
10896 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10897
10898 2015-08-06 Pedro Alves <palves@redhat.com>
10899
10900 * tracepoint.c (expr_eval_result): Now an int.
10901
10902 2015-08-06 Pedro Alves <palves@redhat.com>
10903
10904 * gdbthread.h (struct regcache): Forward declare.
10905 (struct thread_info) <regcache_data>: Now a struct regcache
10906 pointer.
10907 * inferiors.c (inferior_regcache_data)
10908 (set_inferior_regcache_data): Now work with struct regcache
10909 pointers.
10910 * inferiors.h (struct regcache): Forward declare.
10911 (inferior_regcache_data, set_inferior_regcache_data): Now work
10912 with struct regcache pointers.
10913 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10914 (free_register_cache_thread): Remove struct regcache pointer
10915 casts.
10916
10917 2015-08-06 Pedro Alves <palves@redhat.com>
10918
10919 * server.c (captured_main): On error, print the exception message
10920 to stderr, and if run_once is set, throw a quit.
10921
10922 2015-08-06 Pedro Alves <palves@redhat.com>
10923
10924 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10925 the current thread.
10926
10927 2015-08-06 Pedro Alves <palves@redhat.com>
10928
10929 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10930 reading beyond the passed in buffer length.
10931
10932 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10933
10934 * tracepoint.c (symbol_list) <required>: Remove.
10935
10936 2015-08-06 Pedro Alves <palves@redhat.com>
10937
10938 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10939 count if stopping and suspending threads.
10940 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10941 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10942 (linux_detach): Complete an ongoing step-over.
10943 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10944 throughout.
10945 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10946 (linux_wait_1): If passing a signal to the inferior after
10947 finishing a step-over, unsuspend and re-resume all lwps. If we
10948 see a single-step event but the thread should be continuing, don't
10949 pass the trap to gdb.
10950 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10951 internal_error instead of gdb_assert.
10952 (enqueue_pending_signal): New function.
10953 (check_ptrace_stopped_lwp_gone): Add debug output.
10954 (start_step_over): Use internal_error instead of gdb_assert.
10955 (complete_ongoing_step_over): New function.
10956 (linux_resume_one_thread): Don't resume a suspended thread.
10957 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10958 it stepping.
10959
10960 2015-08-06 Pedro Alves <palves@redhat.com>
10961
10962 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10963 (linux_thread_alive): Use lwp_is_marked_dead.
10964 (extended_event_reported): Delete.
10965 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10966 instead of extended_event_reported.
10967 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10968 as well.
10969 (lwp_is_marked_dead): New function.
10970 (lwp_running): Use lwp_is_marked_dead.
10971 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10972 comment.
10973
10974 2015-08-06 Pedro Alves <palves@redhat.com>
10975
10976 * linux-low.c (linux_wait_1): Move fork event output out of the
10977 !report_to_gdb check. Pass event_child->waitstatus to
10978 target_waitstatus_to_string instead of ourstatus.
10979
10980 2015-08-04 Yao Qi <yao.qi@linaro.org>
10981
10982 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10983 if current_thread is 32 bit.
10984
10985 2015-08-04 Yao Qi <yao.qi@linaro.org>
10986
10987 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10988 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10989 * server.c (extended_protocol): Remove "static".
10990 * server.h (extended_protocol): Declare it.
10991
10992 2015-08-04 Yao Qi <yao.qi@linaro.org>
10993
10994 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10995 both aarch64 and aarch32.
10996 (aarch64_set_pc): Likewise.
10997
10998 2015-08-04 Yao Qi <yao.qi@linaro.org>
10999
11000 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
11001 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
11002 arm-with-neon.xml to srv_xmlfiles.
11003 * linux-aarch64-low.c: Include linux-aarch32-low.h.
11004 (is_64bit_tdesc): New function.
11005 (aarch64_linux_read_description): New function.
11006 (aarch64_arch_setup): Call aarch64_linux_read_description.
11007 (regs_info): Rename to regs_info_aarch64.
11008 (aarch64_regs_info): Return right regs_info.
11009 (initialize_low_arch): Call initialize_low_arch_aarch32.
11010
11011 2015-08-04 Yao Qi <yao.qi@linaro.org>
11012
11013 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
11014 * linux-aarch32-low.c: New file.
11015 * linux-aarch32-low.h: New file.
11016 * linux-arm-low.c (arm_fill_gregset): Move it to
11017 linux-aarch32-low.c.
11018 (arm_store_gregset): Likewise.
11019 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
11020 (arm_store_vfpregset): Call arm_store_vfpregset_num.
11021 (arm_arch_setup): Check if PTRACE_GETREGSET works.
11022 (regs_info): Rename to regs_info_arm.
11023 (arm_regs_info): Return regs_info_aarch32 if
11024 have_ptrace_getregset is 1 and target description is
11025 arm_with_neon or arm_with_vfpv3.
11026 (initialize_low_arch): Don't call init_registers_arm_with_neon.
11027 Call initialize_low_arch_aarch32 instead.
11028
11029 2015-08-04 Yao Qi <yao.qi@linaro.org>
11030
11031 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
11032 * linux-low.c: ... here.
11033 * linux-low.h (have_ptrace_getregset): Declare it.
11034
11035 2015-08-04 Pedro Alves <palves@redhat.com>
11036
11037 * thread-db.c (struct thread_db): Use new typedefs.
11038 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
11039 CHK calls.
11040 (disable_thread_event_reporting): Cast result of dlsym to
11041 destination function pointer type.
11042 (thread_db_mourn): Use td_ta_delete_ftype.
11043
11044 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
11045
11046 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
11047 arch variant.
11048 (CDX_BREAKPOINT): Define for R2.
11049 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
11050 (the_low_target): Add comments.
11051
11052 2015-07-30 Yao Qi <yao.qi@linaro.org>
11053
11054 * linux-arm-low.c (arm_hwcap): Remove it.
11055 (arm_read_description): New local variable arm_hwcap. Don't
11056 set arm_hwcap to zero.
11057
11058 2015-07-30 Yao Qi <yao.qi@linaro.org>
11059
11060 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
11061 Use regcache->tdesc instead.
11062 (arm_store_wmmxregset): Likewise.
11063 (arm_fill_vfpregset): Likewise.
11064 (arm_store_vfpregset): Likewise.
11065
11066 2015-07-30 Yao Qi <yao.qi@linaro.org>
11067
11068 * linux-arm-low.c: Include arch/arm.h.
11069 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
11070 (arm_store_gregset): Likewise.
11071
11072 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
11073
11074 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
11075 ptrace's 4th parameter.
11076
11077 2015-07-27 Yao Qi <yao.qi@linaro.org>
11078
11079 * configure.srv (case aarch64*-*-linux*): Don't set
11080 srv_linux_usrregs.
11081
11082 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
11083
11084 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
11085 sys/ptrace.h.
11086 * linux-arm-low.c: Likewise.
11087 * linux-cris-low.c: Likewise.
11088 * linux-crisv32-low.c: Likewise.
11089 * linux-low.c: Likewise.
11090 * linux-m68k-low.c: Likewise.
11091 * linux-mips-low.c: Likewise.
11092 * linux-nios2-low.c: Likewise.
11093 * linux-s390-low.c: Likewise.
11094 * linux-sparc-low.c: Likewise.
11095 * linux-tic6x-low.c: Likewise.
11096 * linux-tile-low.c: Likewise.
11097 * linux-x86-low.c: Likewise.
11098
11099 2015-07-24 Pedro Alves <palves@redhat.com>
11100
11101 * config.in: Regenerate.
11102 * configure: Regenerate.
11103
11104 2015-07-24 Pedro Alves <palves@redhat.com>
11105
11106 * acinclude.m4: Include ../ptrace.m4.
11107 * configure.ac: Call GDB_AC_PTRACE.
11108 * config.in, configure: Regenerate.
11109
11110 2015-07-24 Yao Qi <yao.qi@linaro.org>
11111
11112 * linux-low.c (linux_create_inferior): Remove setting to
11113 proc->priv->new_inferior.
11114 (linux_attach): Likewise.
11115 (linux_low_filter_event): Likewise.
11116 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
11117
11118 2015-07-24 Yao Qi <yao.qi@linaro.org>
11119
11120 * linux-low.c (linux_arch_setup): New function.
11121 (linux_low_filter_event): If proc->tdesc is NULL and
11122 proc->attached is true, call the_low_target.arch_setup.
11123 Otherwise, keep status pending, and return.
11124 (linux_resume_one_lwp_throw): Don't call get_pc if
11125 thread->while_stepping isn't NULL. Don't call
11126 get_thread_regcache if proc->tdesc is NULL.
11127 (need_step_over_p): Return 0 if proc->tdesc is NULL.
11128 (linux_target_ops): Install arch_setup.
11129 * server.c (start_inferior): Call the_target->arch_setup.
11130 * target.h (struct target_ops) <arch_setup>: New field.
11131 (target_arch_setup): New marco.
11132 * lynx-low.c (lynx_target_ops): Update.
11133 * nto-low.c (nto_target_ops): Update.
11134 * spu-low.c (spu_target_ops): Update.
11135 * win32-low.c (win32_target_ops): Update.
11136
11137 2015-07-24 Yao Qi <yao.qi@linaro.org>
11138
11139 * linux-low.c (linux_add_process): Don't set
11140 proc->priv->new_inferior.
11141 (linux_create_inferior): Set proc->priv->new_inferior to 1.
11142 (linux_attach): Likewise.
11143
11144 2015-07-24 Yao Qi <yao.qi@linaro.org>
11145
11146 * server.c (start_inferior): Code refactor.
11147
11148 2015-07-24 Yao Qi <yao.qi@linaro.org>
11149
11150 * server.c (process_serial_event): Set general_thread.
11151
11152 2015-07-21 Yao Qi <yao.qi@linaro.org>
11153
11154 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
11155 aarch64_linux_get_debug_reg_capacity.
11156
11157 2015-07-17 Yao Qi <yao.qi@linaro.org>
11158
11159 * Makefile.in (aarch64-linux-hw-point.o): New rule.
11160 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
11161 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
11162 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
11163 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
11164 (AARCH64_HWP_ALIGNMENT): Likewise.
11165 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
11166 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
11167 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
11168 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
11169 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
11170 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
11171 (struct aarch64_debug_reg_state): Likewise.
11172 (struct arch_lwp_info): Likewise.
11173 (aarch64_align_watchpoint): Likewise.
11174 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
11175 (aarch64_watchpoint_length): Likewise.
11176 (aarch64_point_encode_ctrl_reg): Likewise
11177 (aarch64_point_is_aligned): Likewise.
11178 (aarch64_align_watchpoint): Likewise.
11179 (aarch64_linux_set_debug_regs):
11180 (aarch64_dr_state_insert_one_point): Likewise.
11181 (aarch64_dr_state_remove_one_point): Likewise.
11182 (aarch64_handle_breakpoint): Likewise.
11183 (aarch64_handle_aligned_watchpoint): Likewise.
11184 (aarch64_handle_unaligned_watchpoint): Likewise.
11185 (aarch64_handle_watchpoint): Likewise.
11186
11187 2015-07-17 Yao Qi <yao.qi@linaro.org>
11188
11189 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
11190 and don't aarch64_get_debug_reg_state. All callers update.
11191 (aarch64_handle_aligned_watchpoint): Likewise.
11192 (aarch64_handle_unaligned_watchpoint): Likewise.
11193 (aarch64_handle_watchpoint): Likewise.
11194 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
11195 (aarch64_remove_point): Likewise.
11196
11197 2015-07-17 Yao Qi <yao.qi@linaro.org>
11198
11199 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
11200 debug_printf.
11201 (aarch64_handle_unaligned_watchpoint): Likewise.
11202
11203 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11204
11205 Revert the previous 3 commits:
11206 Move gdb_regex* to common/
11207 Move linux_find_memory_regions_full & co.
11208 gdbserver build-id attribute generator
11209
11210 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11211 Jan Kratochvil <jan.kratochvil@redhat.com>
11212
11213 gdbserver build-id attribute generator.
11214 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
11215 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
11216 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
11217 (find_phdr): New.
11218 (get_dynamic): Use find_pdhr to traverse program headers.
11219 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
11220 (compare_mapping_entry_range, struct find_memory_region_callback_data)
11221 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
11222 (get_hex_build_id): New.
11223 (linux_qxfer_libraries_svr4): Add optional build-id attribute
11224 to reply XML document.
11225
11226 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11227 Jan Kratochvil <jan.kratochvil@redhat.com>
11228
11229 * target.c: Include target/target-utils.h and fcntl.h.
11230 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
11231 (target_fileio_read_stralloc): New functions.
11232
11233 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11234
11235 * Makefile.in (OBS): Add gdb_regex.o.
11236 (gdb_regex.o): New.
11237 * config.in: Rebuilt.
11238 * configure: Rebuilt.
11239
11240 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11241 Jan Kratochvil <jan.kratochvil@redhat.com>
11242
11243 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
11244 * Makefile.in (OBS): Add target-utils.o.
11245 (linux-maps.o, target-utils.o): New.
11246 * configure.srv (srv_linux_obj): Add linux-maps.o.
11247
11248 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
11249
11250 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
11251 function, return 1.
11252 (the_low_target): Install it.
11253
11254 2015-07-14 Pedro Alves <palves@redhat.com>
11255
11256 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
11257 Instead, ignore ECHILD, and throw an error for other errnos.
11258
11259 2015-07-10 Pedro Alves <palves@redhat.com>
11260
11261 * event-loop.c (struct callback_event) <data>: Change type to
11262 gdb_client_data instance instead of gdb_client_data pointer.
11263 (append_callback_event): Adjust.
11264
11265 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11266
11267 * linux-aarch64-low.c: Add comments for each linux_target_ops
11268 method. Remove comments already covered in target_ops and
11269 linux_target_ops definitions.
11270 (the_low_target): Add comments for each unimplemented method.
11271
11272 2015-07-09 Yao Qi <yao.qi@linaro.org>
11273
11274 * linux-aarch64-low.c (aarch64_regmap): Remove.
11275 (aarch64_usrregs_info): Remove.
11276 (regs_info): Set field usrregs to NULL.
11277
11278 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11279
11280 * linux-low.c: Include "rsp-low.h"
11281 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11282 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11283 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11284 (handle_btrace_enable_pt): New.
11285 (handle_btrace_general_set): Support "pt".
11286 (handle_btrace_conf_general_set): Support "pt:size".
11287
11288 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11289
11290 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11291 Z_PACKET_SW_BP.
11292
11293 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11294
11295 * linux-aarch64-low.c: Remove comment about endianness.
11296 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11297 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11298 memcmp.
11299
11300 2015-06-24 Gary Benson <gbenson@redhat.com>
11301
11302 * linux-i386-ipa.c (stdint.h): Do not include.
11303 * lynx-i386-low.c (stdint.h): Likewise.
11304 * lynx-ppc-low.c (stdint.h): Likewise.
11305 * mem-break.c (stdint.h): Likewise.
11306 * thread-db.c (stdint.h): Likewise.
11307 * tracepoint.c (stdint.h): Likewise.
11308 * win32-low.c (stdint.h): Likewise.
11309
11310 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11311
11312 * server.c (write_qxfer_response): Update call to
11313 remote_escape_output.
11314
11315 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11316 Jan Kratochvil <jan.kratochvil@redhat.com>
11317
11318 Merge multiple hex conversions.
11319 * gdbreplay.c (tohex): Rename to 'fromhex'.
11320 (logchar): Use fromhex.
11321
11322 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11323
11324 * server.c (handle_qxfer_libraries): Set `version' attribute for
11325 <library-list>.
11326
11327 2015-06-10 Gary Benson <gbenson@redhat.com>
11328
11329 * target.h (struct target_ops) <multifs_open>: New field.
11330 <multifs_unlink>: Likewise.
11331 <multifs_readlink>: Likewise.
11332 * linux-low.c (nat/linux-namespaces.h): New include.
11333 (linux_target_ops): Initialize the_target->multifs_open,
11334 the_target->multifs_unlink and the_target->multifs_readlink.
11335 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11336 * hostio.c (hostio_fs_pid): New static variable.
11337 (hostio_handle_new_gdb_connection): New function.
11338 (handle_setfs): Likewise.
11339 (handle_open): Use the_target->multifs_open as appropriate.
11340 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11341 (handle_readlink): Use the_target->multifs_readlink as
11342 appropriate.
11343 (handle_vFile): Handle vFile:setfs packets.
11344 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11345 after target_handle_new_gdb_connection.
11346
11347 2015-06-10 Gary Benson <gbenson@redhat.com>
11348
11349 * configure.ac (AC_CHECK_FUNCS): Add setns.
11350 * config.in: Regenerate.
11351 * configure: Likewise.
11352 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11353 (linux-namespaces.o): New rule.
11354 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11355
11356 2015-06-09 Gary Benson <gbenson@redhat.com>
11357
11358 * hostio.c (handle_open): Process mode argument with
11359 fileio_to_host_mode.
11360
11361 2015-06-01 Yao Qi <yao.qi@linaro.org>
11362
11363 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11364 * linux-x86-low.c: Likewise.
11365
11366 2015-05-28 Don Breazeal <donb@codesourcery.com>
11367
11368 * linux-low.c (handle_extended_wait): Initialize
11369 thread_info.last_resume_kind for new fork children.
11370
11371 2015-05-15 Pedro Alves <palves@redhat.com>
11372
11373 * target.h (target_handle_new_gdb_connection): Rewrite using if
11374 wrapped in do/while.
11375
11376 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11377
11378 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11379 * configure, config.in: Regenerate.
11380 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11381 Declare typedef.
11382
11383 2015-05-12 Don Breazeal <donb@codesourcery.com>
11384
11385 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11386 PTRACE_EVENT_VFORK_DONE.
11387 (linux_low_ptrace_options, extended_event_reported): Add vfork
11388 events.
11389 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11390 and "vforkdone" for RSP 'T' Stop Reply Packet.
11391 * server.h (report_vfork_events): Declare
11392 global variable.
11393
11394 2015-05-12 Don Breazeal <donb@codesourcery.com>
11395
11396 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11397 (the_low_target) <new_fork>: Initialize new member.
11398 * linux-arm-low.c (arm_new_fork): New function.
11399 (the_low_target) <new_fork>: Initialize new member.
11400 * linux-low.c (handle_extended_wait): Call new target function
11401 new_fork.
11402 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11403 * linux-mips-low.c (mips_add_watchpoint): New function
11404 extracted from mips_insert_point.
11405 (the_low_target) <new_fork>: Initialize new member.
11406 (mips_linux_new_fork): New function.
11407 (mips_insert_point): Call mips_add_watchpoint.
11408 * linux-x86-low.c (x86_linux_new_fork): New function.
11409 (the_low_target) <new_fork>: Initialize new member.
11410
11411 2015-05-12 Don Breazeal <donb@codesourcery.com>
11412
11413 * linux-low.c (handle_extended_wait): Implement return value,
11414 rename argument 'event_child' to 'event_lwp', handle
11415 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11416 (linux_low_ptrace_options): New function.
11417 (linux_low_filter_event): Call linux_low_ptrace_options,
11418 use different argument fo linux_enable_event_reporting,
11419 use return value from handle_extended_wait.
11420 (extended_event_reported): New function.
11421 (linux_wait_1): Call extended_event_reported and set
11422 status to report fork events.
11423 (linux_write_memory): Add pid to debug message.
11424 (reset_lwp_ptrace_options_callback): New function.
11425 (linux_handle_new_gdb_connection): New function.
11426 (linux_target_ops): Initialize new structure member.
11427 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11428 * lynx-low.c: Initialize new structure member.
11429 * remote-utils.c (prepare_resume_reply): Implement stop reason
11430 "fork" for "T" stop message.
11431 * server.c (handle_query): Call handle_new_gdb_connection.
11432 * server.h (report_fork_events): Declare global flag.
11433 * target.h (struct target_ops) <handle_new_gdb_connection>:
11434 New member.
11435 (target_handle_new_gdb_connection): New macro.
11436 * win32-low.c: Initialize new structure member.
11437
11438 2015-05-12 Don Breazeal <donb@codesourcery.com>
11439
11440 * mem-break.c (APPEND_TO_LIST): Define macro.
11441 (clone_agent_expr): New function.
11442 (clone_one_breakpoint): New function.
11443 (clone_all_breakpoints): New function.
11444 * mem-break.h: Declare new functions.
11445
11446 2015-05-12 Don Breazeal <donb@codesourcery.com>
11447
11448 * linux-low.c (linux_supports_fork_events): New function.
11449 (linux_supports_vfork_events): New function.
11450 (linux_target_ops): Initialize new structure members.
11451 (initialize_low): Call linux_check_ptrace_features.
11452 * lynx-low.c (lynx_target_ops): Initialize new structure
11453 members.
11454 * server.c (report_fork_events, report_vfork_events):
11455 New global flags.
11456 (handle_query): Add new features to qSupported packet and
11457 response.
11458 (captured_main): Initialize new global variables.
11459 * target.h (struct target_ops) <supports_fork_events>:
11460 New member.
11461 <supports_vfork_events>: New member.
11462 (target_supports_fork_events): New macro.
11463 (target_supports_vfork_events): New macro.
11464 * win32-low.c (win32_target_ops): Initialize new structure
11465 members.
11466
11467 2015-05-12 Gary Benson <gbenson@redhat.com>
11468
11469 * server.c (handle_qxfer_exec_file): Use current process
11470 if annex is empty.
11471
11472 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11473
11474 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11475 Remove HAVE_PTRACE_GETREGS conditionals.
11476 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11477 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11478
11479 2015-05-08 Yao Qi <yao.qi@linaro.org>
11480
11481 * linux-low.c (linux_supports_conditional_breakpoints): New
11482 function.
11483 (linux_target_ops): Install new target method.
11484 * lynx-low.c (lynx_target_ops): Install NULL hook for
11485 supports_conditional_breakpoints.
11486 * nto-low.c (nto_target_ops): Likewise.
11487 * spu-low.c (spu_target_ops): Likewise.
11488 * win32-low.c (win32_target_ops): Likewise.
11489 * server.c (handle_query): Check
11490 target_supports_conditional_breakpoints.
11491 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11492 New field.
11493 (target_supports_conditional_breakpoints): New macro.
11494
11495 2015-05-06 Pedro Alves <palves@redhat.com>
11496
11497 PR server/18081
11498 * server.c (start_inferior): If the process exits, mourn it.
11499
11500 2015-04-21 Gary Benson <gbenson@redhat.com>
11501
11502 * hostio.c (fileio_open_flags_to_host): Factored out to
11503 fileio_to_host_openflags in common/fileio.c. Single use
11504 updated.
11505
11506 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11507
11508 * linux-xtensa-low.c (xtensa_fill_gregset)
11509 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11510 XCHAL_HAVE_LOOP.
11511
11512 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11513
11514 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11515 (regs_info): Replace usrregs pointer with NULL.
11516
11517 2015-04-17 Gary Benson <gbenson@redhat.com>
11518
11519 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11520 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11521 * server.c (handle_qxfer_exec_file): New function.
11522 (qxfer_packets): Add exec-file entry.
11523 (handle_query): Report qXfer:exec-file:read as supported packet.
11524
11525 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11526
11527 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11528
11529 2015-04-09 Gary Benson <gbenson@redhat.com>
11530
11531 * hostio-errno.c (errno_to_fileio_error): Remove function.
11532 Update caller to use remote_fileio_to_fio_error.
11533
11534 2015-04-09 Yao Qi <yao.qi@linaro.org>
11535
11536 * linux-low.c (linux_insert_point): Call
11537 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11538 (linux_remove_point): Call remove_memory_breakpoint if type is
11539 raw_bkpt_type_sw.
11540 * linux-x86-low.c (x86_insert_point): Don't call
11541 insert_memory_breakpoint.
11542 (x86_remove_point): Don't call remove_memory_breakpoint.
11543
11544 2015-04-01 Pedro Alves <palves@redhat.com>
11545 Cleber Rosa <crosa@redhat.com>
11546
11547 * server.c (gdbserver_usage): Reorganize and extend the usage
11548 message.
11549
11550 2015-03-24 Pedro Alves <palves@redhat.com>
11551
11552 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11553 output. Also dump TRAP_TRACE.
11554 (linux_low_filter_event): In debug output, distinguish a
11555 resume_stop SIGSTOP from a delayed SIGSTOP.
11556
11557 2015-03-24 Gary Benson <gbenson@redhat.com>
11558
11559 * linux-x86-low.c (x86_linux_new_thread): Moved to
11560 nat/x86-linux.c.
11561 (x86_linux_prepare_to_resume): Likewise.
11562
11563 2015-03-24 Gary Benson <gbenson@redhat.com>
11564
11565 * Makefile.in (x86-linux-dregs.o): New rule.
11566 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11567 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11568 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11569 (x86_linux_dr_get): Likewise.
11570 (x86_linux_dr_set): Likewise.
11571 (update_debug_registers_callback): Likewise.
11572 (x86_linux_dr_set_addr): Likewise.
11573 (x86_linux_dr_get_addr): Likewise.
11574 (x86_linux_dr_set_control): Likewise.
11575 (x86_linux_dr_get_control): Likewise.
11576 (x86_linux_dr_get_status): Likewise.
11577 (x86_linux_update_debug_registers): Likewise.
11578
11579 2015-03-24 Gary Benson <gbenson@redhat.com>
11580
11581 * linux-x86-low.c (x86_linux_update_debug_registers):
11582 New function, factored out from...
11583 (x86_linux_prepare_to_resume): ...this.
11584
11585 2015-03-24 Gary Benson <gbenson@redhat.com>
11586
11587 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11588 (x86_linux_dr_set): Likewise.
11589 (update_debug_registers_callback): Likewise.
11590 (x86_linux_dr_set_addr): Likewise.
11591 (x86_linux_dr_get_addr): Likewise.
11592 (x86_linux_dr_set_control): Likewise.
11593 (x86_linux_dr_get_control): Likewise.
11594 (x86_linux_dr_get_status): Likewise.
11595 (x86_linux_prepare_to_resume): Likewise.
11596
11597 2015-03-24 Gary Benson <gbenson@redhat.com>
11598
11599 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11600 Use perror_with_name. Pass string through gettext.
11601 (x86_linux_dr_set): Likewise.
11602
11603 2015-03-24 Gary Benson <gbenson@redhat.com>
11604
11605 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11606 (x86_linux_dr_set_addr): ...this.
11607 (x86_dr_low_get_addr): Rename to...
11608 (x86_linux_dr_get_addr): ...this.
11609 (x86_dr_low_set_control): Rename to...
11610 (x86_linux_dr_set_control): ...this.
11611 (x86_dr_low_get_control): Rename to...
11612 (x86_linux_dr_get_control): ...this.
11613 (x86_dr_low_get_status): Rename to...
11614 (x86_linux_dr_get_status): ...this.
11615 (x86_dr_low): Update with new function names.
11616
11617 2015-03-24 Gary Benson <gbenson@redhat.com>
11618
11619 * Makefile.in (x86-linux.o): New rule.
11620 * configure.srv: Add x86-linux.o to relevant targets.
11621 * linux-low.c (lwp_set_arch_private_info): New function.
11622 (lwp_arch_private_info): Likewise.
11623 * linux-x86-low.c: Include nat/x86-linux.h.
11624 (arch_lwp_info): Removed structure.
11625 (update_debug_registers_callback):
11626 Use lwp_set_debug_registers_changed.
11627 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11628 and lwp_set_debug_registers_changed.
11629 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11630
11631 2015-03-24 Gary Benson <gbenson@redhat.com>
11632
11633 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11634 * linux-arm-low.c (arm_new_thread): Likewise.
11635 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11636 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11637 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11638 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11639
11640 2015-03-24 Gary Benson <gbenson@redhat.com>
11641
11642 * linux-low.c (ptid_of_lwp): New function.
11643 (lwp_is_stopped): Likewise.
11644 (lwp_stop_reason): Likewise.
11645 * linux-x86-low.c (update_debug_registers_callback):
11646 Use lwp_is_stopped.
11647 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11648 lwp_stop_reason.
11649
11650 2015-03-24 Gary Benson <gbenson@redhat.com>
11651
11652 * linux-low.h (linux_stop_lwp): Remove declaration.
11653
11654 2015-03-24 Gary Benson <gbenson@redhat.com>
11655
11656 * linux-low.h: Include nat/linux-nat.h.
11657 * linux-low.c (iterate_over_lwps_args): New structure.
11658 (iterate_over_lwps_filter): New function.
11659 (iterate_over_lwps): Likewise.
11660 * linux-x86-low.c (update_debug_registers_callback):
11661 Update signature to what iterate_over_lwps expects.
11662 Remove PID check that iterate_over_lwps now performs.
11663 (x86_dr_low_set_addr): Use iterate_over_lwps.
11664 (x86_dr_low_set_control): Likewise.
11665
11666 2015-03-24 Gary Benson <gbenson@redhat.com>
11667
11668 * linux-x86-low.c (x86_debug_reg_state): New function.
11669 (x86_linux_prepare_to_resume): Use the above.
11670
11671 2015-03-24 Gary Benson <gbenson@redhat.com>
11672
11673 * linux-low.c (current_lwp_ptid): New function.
11674 * linux-x86-low.c: Include nat/linux-nat.h.
11675 (x86_dr_low_get_addr): Use current_lwp_ptid.
11676 (x86_dr_low_get_control): Likewise.
11677 (x86_dr_low_get_status): Likewise.
11678
11679 2015-03-20 Pedro Alves <palves@redhat.com>
11680
11681 * tracepoint.c (cmd_qtstatus): Make "str" const.
11682
11683 2015-03-20 Pedro Alves <palves@redhat.com>
11684
11685 * server.c (handle_general_set): Make "req_str" const.
11686
11687 2015-03-19 Pedro Alves <palves@redhat.com>
11688
11689 * linux-low.c (linux_resume_one_lwp): Rename to ...
11690 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11691 instead call perror_with_name.
11692 (check_ptrace_stopped_lwp_gone): New function.
11693 (linux_resume_one_lwp): Reimplement as wrapper around
11694 linux_resume_one_lwp_throw that swallows errors if the LWP is
11695 gone.
11696
11697 2015-03-19 Pedro Alves <palves@redhat.com>
11698
11699 * linux-low.c (count_events_callback, select_event_lwp_callback):
11700 No longer check whether the thread has resume_stop as last resume
11701 kind.
11702
11703 2015-03-19 Pedro Alves <palves@redhat.com>
11704
11705 * linux-low.c (count_events_callback, select_event_lwp_callback):
11706 Use the lwp's status_pending_p field, not the thread's.
11707
11708 2015-03-19 Pedro Alves <palves@redhat.com>
11709
11710 * linux-low.c (select_event_lwp_callback): Update comments to
11711 no longer mention SIGTRAP.
11712
11713 2015-03-18 Gary Benson <gbenson@redhat.com>
11714
11715 * server.c (handle_query): Do not report vFile:fstat as supported.
11716
11717 2015-03-11 Gary Benson <gbenson@redhat.com>
11718
11719 * hostio.c (sys/types.h): New include.
11720 (sys/stat.h): Likewise.
11721 (common-remote-fileio.h): Likewise.
11722 (handle_fstat): New function.
11723 (handle_vFile): Handle vFile:fstat packets.
11724
11725 2015-03-11 Gary Benson <gbenson@redhat.com>
11726
11727 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11728 struct stat.st_blocks and struct stat.st_blksize.
11729 * configure: Regenerate.
11730 * config.in: Likewise.
11731 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11732 (OBS): Add common-remote-fileio.o.
11733 (common-remote-fileio.o): New rule.
11734
11735 2015-03-09 Pedro Alves <palves@redhat.com>
11736
11737 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11738 'struct sockaddr' pointer in 'accept' call.
11739
11740 2015-03-09 Pedro Alves <palves@redhat.com>
11741
11742 Revert:
11743 2015-03-07 Pedro Alves <palves@redhat.com>
11744 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11745 or <winsock2.h> here. Instead include "gdb_socket.h".
11746 (remote_open): Use union gdb_sockaddr_u.
11747 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11748 or <winsock2.h> here. Instead include "gdb_socket.h".
11749 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11750 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11751 or <sys/un.h>.
11752 (init_named_socket, gdb_agent_helper_thread): Use union
11753 gdb_sockaddr_u.
11754
11755 2015-03-07 Pedro Alves <palves@redhat.com>
11756
11757 * configure.ac (build_warnings): Move
11758 -Wdeclaration-after-statement to the C-specific set.
11759 * configure: Regenerate.
11760
11761 2015-03-07 Pedro Alves <palves@redhat.com>
11762
11763 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11764 or <winsock2.h> here. Instead include "gdb_socket.h".
11765 (remote_open): Use union gdb_sockaddr_u.
11766 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11767 or <winsock2.h> here. Instead include "gdb_socket.h".
11768 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11769 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11770 or <sys/un.h>.
11771 (init_named_socket, gdb_agent_helper_thread): Use union
11772 gdb_sockaddr_u.
11773
11774 2015-03-07 Pedro Alves <palves@redhat.com>
11775
11776 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11777 instead.
11778
11779 2015-03-06 Yao Qi <yao.qi@linaro.org>
11780
11781 * linux-aarch64-low.c (aarch64_insert_point): Use
11782 show_debug_regs as a boolean.
11783 (aarch64_remove_point): Likewise.
11784
11785 2015-03-05 Pedro Alves <palves@redhat.com>
11786
11787 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11788 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11789 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11790 * nto-low.c (nto_target_ops): Likewise.
11791 * spu-low.c (spu_target_ops): Likewise.
11792 * win32-low.c (win32_target_ops): Likewise.
11793
11794 2015-03-04 Pedro Alves <palves@redhat.com>
11795
11796 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11797 Decide whether a breakpoint triggered based on the SIGTRAP's
11798 siginfo.si_code.
11799 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11800 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11801 (linux_low_filter_event): Check for breakpoints before checking
11802 watchpoints.
11803 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11804 siginfo.si_code.
11805 (linux_stopped_by_sw_breakpoint)
11806 (linux_supports_stopped_by_sw_breakpoint)
11807 (linux_stopped_by_hw_breakpoint)
11808 (linux_supports_stopped_by_hw_breakpoint): New functions.
11809 (linux_target_ops): Install new target methods.
11810
11811 2015-03-04 Pedro Alves <palves@redhat.com>
11812
11813 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11814 * server.c (swbreak_feature, hwbreak_feature): New globals.
11815 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11816 (captured_main): Clear swbreak_feature and hwbreak_feature.
11817 * server.h (swbreak_feature, hwbreak_feature): Declare.
11818 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11819 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11820 supports_stopped_by_hw_breakpoint>: New fields.
11821 (target_supports_stopped_by_sw_breakpoint)
11822 (target_stopped_by_sw_breakpoint)
11823 (target_supports_stopped_by_hw_breakpoint)
11824 (target_stopped_by_hw_breakpoint): Declare.
11825
11826 2015-03-04 Pedro Alves <palves@redhat.com>
11827
11828 enum lwp_stop_reason -> enum target_stop_reason
11829 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11830 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11831 (linux_wait_1, stuck_in_jump_pad_callback)
11832 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11833 (linux_stopped_by_watchpoint):
11834 * linux-low.h (enum lwp_stop_reason): Delete.
11835 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11836 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11837
11838 2015-03-04 Yao Qi <yao.qi@linaro.org>
11839
11840 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11841
11842 2015-03-03 Gary Benson <gbenson@redhat.com>
11843
11844 * hostio.c (handle_vFile): Fix prefix lengths.
11845
11846 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11847
11848 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11849 ptr_bits.
11850
11851 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11852
11853 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11854 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11855 (clean): Add "rm -f" for above C files.
11856 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11857 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11858 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11859 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11860 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11861 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11862 (init_registers_s390x_vx_linux64)
11863 (init_registers_s390x_tevx_linux64)
11864 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11865 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11866 declarations.
11867 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11868 (s390_store_vxrs_high): New functions.
11869 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11870 NT_S390_VXRS_HIGH.
11871 (s390_arch_setup): Add logic for selecting one of the new target
11872 descriptions. Activate the new vector regsets if applicable.
11873 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11874 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11875 and init_registers_s390x_tevx_linux64.
11876
11877 2015-03-01 Pedro Alves <palves@redhat.com>
11878
11879 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11880 parameter.
11881
11882 2015-02-27 Pedro Alves <palves@redhat.com>
11883
11884 * linux-x86-low.c (u_debugreg_offset): New function.
11885 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11886
11887 2015-02-27 Pedro Alves <palves@redhat.com>
11888
11889 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11890 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11891 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11892 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11893 (ps_lsetfpregs, ps_getpid)
11894 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11895 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11896 (ps_lsetxregs, ps_plog): Declare.
11897
11898 2015-02-27 Pedro Alves <palves@redhat.com>
11899
11900 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11901 IP_AGENT_EXPORT_FUNC.
11902 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11903 IP_AGENT_EXPORT_FUNC.
11904 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11905 (IP_AGENT_EXPORT): Delete.
11906 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11907 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11908 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11909 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11910 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11911 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11912 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11913 (traceframe_read_count, traceframe_write_count)
11914 (traceframes_created, trace_state_variables, get_raw_reg)
11915 (get_trace_state_variable_value, set_trace_state_variable_value)
11916 (ust_loaded, helper_thread_id, cmd_buf): Use
11917 IPA_SYM_EXPORTED_NAME.
11918 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11919 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11920 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11921 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11922 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11923 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11924 EXTERN_C_PUSH/EXTERN_C_POP.
11925 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11926 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11927 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11928 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11929 (traceframe_write_count, traceframe_read_count)
11930 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11931 (about_to_request_buffer_space, get_trace_state_variable_value)
11932 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11933 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11934 EXTERN_C_PUSH/EXTERN_C_POP.
11935 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11936 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11937 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11938 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11939 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11940 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11941 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11942 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11943 Define.
11944 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11945 (IP_AGENT_EXPORT_VAR_DECL): Define.
11946 (tracing): Declare.
11947 (gdb_agent_get_raw_reg): Declare.
11948
11949 2015-02-27 Tom Tromey <tromey@redhat.com>
11950 Pedro Alves <palves@redhat.com>
11951
11952 Rename symbols whose names are reserved C++ keywords throughout.
11953
11954 2015-02-27 Pedro Alves <palves@redhat.com>
11955
11956 * Makefile.in (COMPILER): New, get it from autoconf.
11957 (CXX): Get from autoconf instead.
11958 (COMPILE.pre): Use COMPILER.
11959 (CC-LD): Rename to ...
11960 (CC_LD): ... this. Use COMPILER.
11961 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11962 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11963 * acinclude.m4: Include build-with-cxx.m4.
11964 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11965 Disable -Werror by default if building in C++ mode.
11966 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11967 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11968 the C++ compiler. Save/restore CXXFLAGS too.
11969 * configure: Regenerate.
11970
11971 2015-02-27 Pedro Alves <palves@redhat.com>
11972
11973 * acinclude.m4: Include libiberty.m4.
11974 * configure.ac: Call libiberty_INIT.
11975 * config.in, configure: Regenerate.
11976
11977 2015-02-26 Pedro Alves <palves@redhat.com>
11978
11979 * linux-low.c (linux_wait_1): When incrementing the PC past a
11980 program breakpoint always use the_low_target.breakpoint_len as
11981 increment, rather than the maximum between that and
11982 the_low_target.decr_pc_after_break.
11983
11984 2015-02-23 Pedro Alves <palves@redhat.com>
11985
11986 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11987 thread was doing a step-over; always adjust the PC if
11988 we stepped over a permanent breakpoint.
11989 (linux_wait_1): If we stepped over breakpoint that was on top of a
11990 permanent breakpoint, manually advance the PC past it.
11991
11992 2015-02-23 Pedro Alves <palves@redhat.com>
11993
11994 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11995 modes.
11996 (x86_fill_gregset, x86_store_gregset): Use it when handling
11997 $orig_eax.
11998
11999 2015-02-20 Pedro Alves <palves@redhat.com>
12000
12001 * thread-db.c: Include "nat/linux-procfs.h".
12002 (thread_db_init): Skip listing new threads if the kernel supports
12003 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
12004
12005 2015-02-20 Pedro Alves <palves@redhat.com>
12006
12007 * linux-low.c (status_pending_p_callback): Use ptid_match.
12008
12009 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
12010
12011 PR breakpoints/16812
12012 * linux-low.c (wstatus_maybe_breakpoint): Remove.
12013 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
12014 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
12015
12016 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
12017
12018 PR breakpoints/15956
12019 * tracepoint.c (cmd_qtinit): Add check for current_thread.
12020
12021 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12022
12023 * linux-low.c (linux_low_btrace_conf): Print size.
12024 * server.c (handle_btrace_conf_general_set): New.
12025 (hanle_general_set): Call handle_btrace_conf_general_set.
12026 (handle_query): Report Qbtrace-conf:bts:size as supported.
12027
12028 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12029
12030 * linux-low.c (linux_low_enable_btrace): Update parameters.
12031 (linux_low_btrace_conf): New.
12032 (linux_target_ops)<to_btrace_conf>: Initialize.
12033 * server.c (current_btrace_conf): New.
12034 (handle_btrace_enable): Rename to ...
12035 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
12036 to target_enable_btrace. Update comment. Update users.
12037 (handle_qxfer_btrace_conf): New.
12038 (qxfer_packets): Add btrace-conf entry.
12039 (handle_query): Report qXfer:btrace-conf:read as supported packet.
12040 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
12041 (target_ops)<read_btrace_conf>: New.
12042 (target_enable_btrace): Update parameters.
12043 (target_read_btrace_conf): New.
12044
12045 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12046
12047 * server.c (handle_btrace_general_set): Remove call to
12048 target_supports_btrace.
12049 (supported_btrace_packets): New.
12050 (handle_query): Call supported_btrace_packets.
12051 * target.h: include btrace-common.h.
12052 (btrace_target_info): Removed.
12053 (supports_btrace, target_supports_btrace): Update parameters.
12054
12055 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12056
12057 * Makefile.in (SFILES): Add common/btrace-common.c.
12058 (OBS): Add common/btrace-common.o.
12059 (btrace-common.o): Add build rules.
12060 * linux-low: Include btrace-common.h.
12061 (linux_low_read_btrace): Use struct btrace_data. Call
12062 btrace_data_init and btrace_data_fini.
12063
12064 2015-02-06 Pedro Alves <palves@redhat.com>
12065
12066 * thread-db.c (find_new_threads_callback): Add debug output.
12067
12068 2015-02-04 Pedro Alves <palves@redhat.com>
12069
12070 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
12071 (resume_stopped_resumed_lwps): New function.
12072 (linux_wait_for_event_filtered): Use it.
12073
12074 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
12075
12076 * Makefile.in (SFILES): Add linux-personality.c.
12077 (linux-personality.o): New rule.
12078 * configure.srv (srv_linux_obj): Add linux-personality.o to the
12079 list of objects to be built.
12080 * linux-low.c: Include nat/linux-personality.h.
12081 (linux_create_inferior): Remove code to disable address space
12082 randomization (moved to ../nat/linux-personality.c). Create
12083 cleanup to disable address space randomization.
12084
12085 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
12086
12087 * Makefile.in (posix-strerror.o): New rule.
12088 (mingw-strerror.o): Likewise.
12089 * configure: Regenerated.
12090 * configure.ac: Source file ../common/common.host. Initialize new
12091 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
12092
12093 2015-01-14 Yao Qi <yao@codesourcery.com>
12094
12095 * Makefile.in (SFILES): Add nat/ppc-linux.c.
12096 (ppc-linux.o): New rule.
12097 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
12098 * configure.ac: AC_CHECK_FUNCS(getauxval).
12099 * config.in: Re-generated.
12100 * configure: Re-generated.
12101 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
12102 ppc64_64bit_inferior_p
12103
12104 2015-01-14 Yao Qi <yao@codesourcery.com>
12105
12106 * linux-ppc-low.c: Include "nat/ppc-linux.h".
12107 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
12108 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
12109 (PT_ORIG_R3, PT_TRAP): Likewise.
12110 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
12111 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
12112 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
12113
12114 2015-01-10 Joel Brobecker <brobecker@adacore.com>
12115
12116 * i387-fp.c (i387_cache_to_xsave): In look over
12117 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
12118 zmmh_low_space field by use of zmmh_high_space.
12119
12120 2015-01-09 Pedro Alves <palves@redhat.com>
12121
12122 * linux-low.c (step_over_bkpt): Move higher up in the file.
12123 (handle_extended_wait): Don't store the stop_pc here.
12124 (get_stop_pc): Adjust comments and rename to ...
12125 (check_stopped_by_breakpoint): ... this. Record whether the LWP
12126 stopped for a software breakpoint or hardware breakpoint.
12127 (thread_still_has_status_pending_p): New function.
12128 (status_pending_p_callback): Use
12129 thread_still_has_status_pending_p. If the event is no longer
12130 interesting, resume the LWP.
12131 (handle_tracepoints): Add assert.
12132 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
12133 (wstatus_maybe_breakpoint): New function.
12134 (cancel_breakpoint): Delete function.
12135 (check_stopped_by_watchpoint): New function, factored out from
12136 linux_low_filter_event.
12137 (lp_status_maybe_breakpoint): Delete function.
12138 (linux_low_filter_event): Remove filter_ptid argument.
12139 Leave thread group exits pending here. Store the LWP's stop PC.
12140 Always leave events pending.
12141 (linux_wait_for_event_filtered): Pull all events out of the
12142 kernel, and leave them all pending.
12143 (count_events_callback, select_event_lwp_callback): Consider all
12144 events.
12145 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
12146 (select_event_lwp): Only give preference to the stepping LWP in
12147 all-stop mode. Adjust comments.
12148 (ignore_event): New function.
12149 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
12150 references to cancel_breakpoints. Adjust to renames. Also give
12151 equal priority to all LWPs that have had events in non-stop mode.
12152 If reporting a software breakpoint event, unadjust the LWP's PC.
12153 (linux_wait): If linux_wait_1 returned an ignored event, retry.
12154 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
12155 Adjust.
12156 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
12157 (resume_status_pending_p): Use thread_still_has_status_pending_p.
12158 (linux_stopped_by_watchpoint): Adjust.
12159 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
12160 * linux-low.h (enum lwp_stop_reason): New.
12161 (struct lwp_info) <stop_pc>: Adjust comment.
12162 <stopped_by_watchpoint>: Delete field.
12163 <stop_reason>: New field.
12164 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
12165 * mem-break.c (software_breakpoint_inserted_here)
12166 (hardware_breakpoint_inserted_here): New function.
12167 * mem-break.h (software_breakpoint_inserted_here)
12168 (hardware_breakpoint_inserted_here): Declare.
12169 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
12170 (cancel_breakpoints): Delete.
12171 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
12172 (upload_fast_traceframes): Remove references to
12173 cancel_breakpoints.
12174
12175 2015-01-09 Pedro Alves <palves@redhat.com>
12176
12177 * thread-db.c (find_new_threads_callback): Ignore thread if the
12178 kernel thread ID is -1.
12179
12180 2015-01-09 Pedro Alves <palves@redhat.com>
12181
12182 * linux-low.c (linux_attach_fail_reason_string): Move to
12183 nat/linux-ptrace.c, and rename.
12184 (linux_attach_lwp): Update comment.
12185 (attach_proc_task_lwp_callback): New function.
12186 (linux_attach): Adjust to rename and use
12187 linux_proc_attach_tgid_threads.
12188 (linux_attach_fail_reason_string): Delete declaration.
12189
12190 2015-01-01 Joel Brobecker <brobecker@adacore.com>
12191
12192 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
12193 * server.c (gdbserver_version): Likewise.
12194
12195 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
12196
12197 * remote-utils.c: Include ctype.h.
12198 (input_interrupt): Explicitly handle the case when the char
12199 received is the NUL byte. Improve the printing of non-ASCII
12200 characters.
12201
12202 2014-12-16 Joel Brobecker <brobecker@adacore.com>
12203
12204 * linux-low.c (linux_low_filter_event): Update call to
12205 linux_enable_event_reporting following the addition of
12206 a new parameter to that function.
12207
12208 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
12209
12210 PR server/17457
12211 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
12212 (AARCH64_FPCR_REGNO): Likewise.
12213 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
12214 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
12215 (aarch64_store_fpregset): Likewise.
12216
12217 2014-12-15 Joel Brobecker <brobecker@adacore.com>
12218
12219 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
12220 Remove FIXME comment about assumption about N.
12221
12222 2014-12-13 Joel Brobecker <brobecker@adacore.com>
12223
12224 * configure.ac: If large-file support is disabled in GDBserver,
12225 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
12226 * configure: Regenerate.
12227
12228 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12229
12230 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
12231 warning upon ENODATA from ptrace.
12232 * linux-s390-low.c (s390_store_tdb): New.
12233 (s390_regsets): Add regset for NT_S390_TDB.
12234
12235 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12236
12237 * linux-low.c (regsets_store_inferior_registers): Skip regsets
12238 without a fill_function.
12239 * linux-s390-low.c (s390_fill_last_break): Remove.
12240 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
12241 (s390_arch_setup): Use regset's size instead of fill_function for
12242 loop end condition.
12243
12244 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12245
12246 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
12247 the regset's store function when ptrace returned an error.
12248 * regcache.c (get_thread_regcache): Invalidate register cache
12249 before fetching inferior's registers.
12250
12251 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12252
12253 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
12254 while-loop as for-loop.
12255 (regsets_store_inferior_registers): Likewise.
12256
12257 2014-11-28 Yao Qi <yao@codesourcery.com>
12258
12259 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
12260 * config.in, configure: Re-generate.
12261 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
12262 is defined.
12263
12264 2014-11-21 Yao Qi <yao@codesourcery.com>
12265
12266 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12267 (AC_CHECK_HEADERS): Remove malloc.h.
12268 * configure: Re-generated.
12269 * config.in: Re-generated.
12270 * server.h: Don't include alloca.h and malloc.h.
12271 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12272 Don't include malloc.h.
12273
12274 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12275
12276 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12277 corresponding ERRNO check in same block.
12278
12279 2014-11-12 Pedro Alves <palves@redhat.com>
12280
12281 * server.c (cont_thread): Update comment.
12282 (start_inferior, attach_inferior): No longer clear cont_thread.
12283 (handle_v_cont): No longer set cont_thread.
12284 (captured_main): Clear cont_thread each time a GDB connects.
12285
12286 2014-11-12 Pedro Alves <palves@redhat.com>
12287
12288 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12289 thread, and don't resume all threads if the Hc thread has exited.
12290
12291 2014-11-12 Pedro Alves <palves@redhat.com>
12292
12293 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12294 the process group instead of to a specific LWP.
12295
12296 2014-10-15 Pedro Alves <palves@redhat.com>
12297
12298 PR server/17487
12299 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12300 parameter.
12301 (arm_set_thread_context): Delete.
12302 (the_low_target): Adjust.
12303 * win32-i386-low.c (debug_registers_changed)
12304 (debug_registers_used): Delete.
12305 (update_debug_registers_callback): New function.
12306 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12307 needing to update their debug registers.
12308 (win32_get_current_dr): New function.
12309 (x86_dr_low_get_addr, x86_dr_low_get_control)
12310 (x86_dr_low_get_status): Fetch the debug register from the thread
12311 record's context.
12312 (i386_initial_stuff): Adjust.
12313 (i386_get_thread_context): Remove current_event parameter. Don't
12314 clear debug_registers_changed nor copy DR values to
12315 debug_reg_state.
12316 (i386_set_thread_context): Delete.
12317 (i386_prepare_to_resume): New function.
12318 (i386_thread_added): Mark the thread as needing to update irs
12319 debug registers.
12320 (the_low_target): Remove i386_set_thread_context and install
12321 i386_prepare_to_resume.
12322 * win32-low.c (win32_get_thread_context): Adjust.
12323 (win32_set_thread_context): Use SetThreadContext
12324 directly.
12325 (win32_prepare_to_resume): New function.
12326 (win32_require_context): New function, factored out from ...
12327 (thread_rec): ... this.
12328 (continue_one_thread): Call win32_prepare_to_resume on each thread
12329 we're about to continue.
12330 (win32_resume): Call win32_prepare_to_resume on the event thread.
12331 * win32-low.h (struct win32_thread_info)
12332 <debug_registers_changed>: New field.
12333 (struct win32_target_ops): Change prototype of set_thread_context,
12334 delete set_thread_context and add prepare_to_resume.
12335 (win32_require_context): New declaration.
12336
12337 2014-10-08 Gary Benson <gbenson@redhat.com>
12338
12339 * server.h: Do not include common-exceptions.h.
12340
12341 2014-10-08 Gary Benson <gbenson@redhat.com>
12342
12343 * server.h: Do not include cleanups.h.
12344
12345 2014-09-30 James Hogan <james.hogan@imgtec.com>
12346
12347 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12348 mips64-dsp-linux.c.
12349
12350 2014-09-23 Yao Qi <yao@codesourcery.com>
12351
12352 * linux-low.c (lp_status_maybe_breakpoint): New function.
12353 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12354 (count_events_callback): Likewise.
12355 (select_event_lwp_callback): Likewise.
12356 (cancel_breakpoints_callback): Likewise.
12357
12358 2014-09-19 Don Breazeal <donb@codesourcery.com>
12359
12360 * linux-low.c (handle_extended_wait): Call
12361 linux_ptrace_get_extended_event.
12362 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12363 linux_is_extended_waitstatus.
12364
12365 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12366
12367 * Makefile.in (CPPFLAGS): Define.
12368 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12369 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12370
12371 2014-09-16 Gary Benson <gbenson@redhat.com>
12372
12373 * inferiors.h (current_inferior): Renamed as...
12374 (current_thread): New variable. All uses updated.
12375 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12376 (maybe_move_out_of_jump_pad): Likewise.
12377 (cancel_breakpoint): Likewise.
12378 (linux_low_filter_event): Likewise.
12379 (wait_for_sigstop): Likewise.
12380 (linux_resume_one_lwp): Likewise.
12381 (need_step_over_p): Likewise.
12382 (start_step_over): Likewise.
12383 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12384 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12385 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12386 and save_inferior as saved_thread.
12387 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12388 saved_thread.
12389 (regcache_invalidate_thread): Likewise.
12390 * remote-utils.c (prepare_resume_reply): Likewise.
12391 * thread-db.c (thread_db_get_tls_address): Likewise.
12392 (disable_thread_event_reporting): Likewise.
12393 (remove_thread_event_breakpoints): Likewise.
12394 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12395 as saved_thread.
12396 * target.h (set_desired_inferior): Renamed as...
12397 (set_desired_thread): New declaration. All uses updated.
12398 * server.c (myresume): Updated comment to reference thread instead
12399 of inferior.
12400 (handle_serial_event): Likewise.
12401 (handle_target_event): Likewise.
12402
12403 2014-09-12 Tom Tromey <tromey@redhat.com>
12404 Gary Benson <gbenson@redhat.com>
12405
12406 * regcache.h: Include common-regcache.h.
12407 (regcache_read_pc): Don't declare.
12408 * regcache.c (get_thread_regcache_for_ptid): New function.
12409
12410 2014-09-11 Tom Tromey <tromey@redhat.com>
12411 Gary Benson <gbenson@redhat.com>
12412
12413 * symbol.c: New file.
12414 * Makefile.in (SFILES): Add symbol.c.
12415 (OBS): Add symbol.o.
12416
12417 2014-09-11 Gary Benson <gbenson@redhat.com>
12418
12419 * target.c (target_stop_ptid, target_continue_ptid): New
12420 functions.
12421
12422 2014-09-11 Tom Tromey <tromey@redhat.com>
12423 Gary Benson <gbenson@redhat.com>
12424
12425 * target.h: Include target/target.h.
12426 * target.c (target_read_memory, target_read_uint32)
12427 (target_write_memory): New functions.
12428
12429 2014-09-11 Gary Benson <gbenson@redhat.com>
12430
12431 * server.h (debug_hw_points): Don't declare.
12432 * server.c (debug_hw_points): Don't define. Replace all uses
12433 with show_debug_regs.
12434 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12435 all uses with show_debug_regs.
12436
12437 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12438
12439 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12440 endianness into account.
12441 (ppc_supply_ptrace_register): Likewise.
12442
12443 2014-09-03 James Hogan <james.hogan@imgtec.com>
12444
12445 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12446 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12447
12448 2014-09-03 Gary Benson <gbenson@redhat.com>
12449
12450 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12451 ALL_DEBUG_ADDRESS_REGISTERS.
12452
12453 2014-09-02 Gary Benson <gbenson@redhat.com>
12454
12455 * i386-low.h: Renamed as...
12456 * x86-low.h: New file. All type, function and variable name
12457 prefixes changed from "i386_" to "x86_". All references updated.
12458 * i386-low.c: Renamed as...
12459 * x86-low.c: New file. All type, function and variable name
12460 prefixes changed from "i386_" to "x86_". All references updated.
12461
12462 2014-09-02 Gary Benson <gbenson@redhat.com>
12463
12464 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12465 (x86_linux_new_thread): Likewise.
12466
12467 2014-08-29 Gary Benson <gbenson@redhat.com>
12468
12469 * server.h (setjmp.h): Do not include.
12470 (toplevel): Do not declare.
12471 (common-exceptions.h): Include.
12472 (cleanups.h): Likewise.
12473 * server.c (toplevel): Do not define.
12474 (exit_code): New static global.
12475 (detach_or_kill_for_exit_cleanup): New function.
12476 (main): New function. Original main renamed to...
12477 (captured_main): New function.
12478 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12479
12480 2014-08-29 Gary Benson <gbenson@redhat.com>
12481
12482 * Makefile.in (SFILES): Add common/common-exceptions.c.
12483 (OBS): Add common-exceptions.o.
12484 (common-exceptions.o): New rule.
12485 * utils.c (prepare_to_throw_exception): New function.
12486
12487 2014-08-29 Gary Benson <gbenson@redhat.com>
12488
12489 * config.in: Regenerate.
12490 * configure: Likewise.
12491
12492 2014-08-29 Gary Benson <gbenson@redhat.com>
12493
12494 * Makefile.in (SFILES): Add common/cleanups.c.
12495 (OBS): cleanups.o.
12496 (cleanups.o): New rule.
12497
12498 2014-08-29 Gary Benson <gbenson@redhat.com>
12499
12500 * utils.c (internal_vwarning): New function.
12501
12502 2014-08-28 Gary Benson <gbenson@redhat.com>
12503
12504 * utils.h (fatal): Remove declaration.
12505 * utils.c (fatal): Remove function.
12506
12507 2014-08-28 Gary Benson <gbenson@redhat.com>
12508
12509 * tracepoint.c (gdb_agent_init): Replace fatal with
12510 perror_with_name.
12511 (initialize_tracepoint): Likewise.
12512
12513 2014-08-28 Gary Benson <gbenson@redhat.com>
12514
12515 * remote-utils.c (remote_prepare): Replace fatal with error.
12516
12517 2014-08-28 Gary Benson <gbenson@redhat.com>
12518
12519 * linux-low.c (linux_async): Replace fatal with warning.
12520 Tidy up and return.
12521 (linux_start_non_stop): Return -1 if linux_async failed.
12522
12523 2014-08-28 Gary Benson <gbenson@redhat.com>
12524
12525 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12526 gdb_assert.
12527 (i386_dr_low_get_addr): Remove vague comment.
12528 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12529 gdb_assert.
12530
12531 2014-08-28 Gary Benson <gbenson@redhat.com>
12532
12533 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12534 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12535 internal_error.
12536 (linux_resume_one_lwp): Likewise.
12537 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12538 gdb_assert.
12539 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12540 with internal_error.
12541 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12542 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12543 (find_register_by_name): Replace fatal with internal_error.
12544 (find_regno): Likewise.
12545 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12546 * thread-db.c (thread_db_create_event): Likewise.
12547 (thread_db_load_search): Likewise.
12548 (try_thread_db_load_1): Likewise.
12549 * tracepoint.c (get_jump_space_head): Replace fatal with
12550 internal_error.
12551 (claim_trampoline_space): Likewise.
12552 (have_fast_tracepoint_trampoline_buffer): Likewise.
12553 (cmd_qtstart): Likewise.
12554 (stop_tracing): Likewise.
12555 (fast_tracepoint_collecting): Likewise.
12556 (target_malloc): Likewise.
12557 (download_tracepoint): Likewise.
12558 (download_trace_state_variables): Replace check with gdb_assert.
12559 (upload_fast_traceframes): Replace fatal with internal_error.
12560
12561 2014-08-19 Tom Tromey <tromey@redhat.com>
12562 Gary Benson <gbenson@redhat.com>
12563
12564 * Makefile.in (SFILES): Add common/common-debug.c.
12565 (OBS): Add common-debug.o.
12566 (common-debug.o): New rule.
12567 * debug.h (debug_printf): Don't declare.
12568 * debug.c (debug_printf): Renamed and rewritten as...
12569 (debug_vprintf): New function.
12570
12571 2014-08-19 Gary Benson <gbenson@redhat.com>
12572
12573 * utils.h: Do not include print-utils.h.
12574
12575 2014-08-19 Tom Tromey <tromey@redhat.com>
12576 Gary Benson <gbenson@redhat.com>
12577
12578 * server.h: Add static assertion.
12579 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12580
12581 2014-08-19 Tom Tromey <tromey@redhat.com>
12582 Gary Benson <gbenson@redhat.com>
12583
12584 * Makefile.in (SFILES): Add common/errors.c.
12585 (OBS): Add errors.o.
12586 (IPA_OBS): Add errors-ipa.o.
12587 (errors.o): New rule.
12588 (errors-ipa.o): Likewise.
12589 * utils.h (perror_with_name, error, warning): Don't declare.
12590 * utils.c (warning): Renamed and rewritten as...
12591 (vwarning): New function.
12592 (error): Renamed and rewritten as...
12593 (verror): New function.
12594 (internal_error): Renamed and rewritten as...
12595 (internal_verror): New function.
12596
12597 2014-08-07 Gary Benson <gbenson@redhat.com>
12598
12599 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12600 * configure: Regenerate.
12601 * config.in: Likewise.
12602 * server.h: Do not include errno.h.
12603 * event-loop.c: Likewise.
12604 * hostio-errno.c: Likewise.
12605 * linux-low.c: Likewise.
12606 * remote-utils.c: Likewise.
12607 * spu-low.c: Likewise.
12608 * utils.c: Likewise.
12609 * gdbreplay.c: Unconditionally include errno.h.
12610
12611 2014-08-07 Gary Benson <gbenson@redhat.com>
12612
12613 * server.h: Do not include string.h.
12614 * event-loop.c: Likewise.
12615 * linux-low.c: Likewise.
12616 * regcache.c: Likewise.
12617 * remote-utils.c: Likewise.
12618 * spu-low.c: Likewise.
12619 * utils.c: Likewise.
12620
12621 2014-08-07 Gary Benson <gbenson@redhat.com>
12622
12623 * server.h: Do not include gdb_assert.h.
12624
12625 2014-08-07 Gary Benson <gbenson@redhat.com>
12626
12627 * server.h: Do not include common-utils.h.
12628
12629 2014-08-07 Gary Benson <gbenson@redhat.com>
12630
12631 * server.h: Do not include ptid.h.
12632 * notif.h: Likewise.
12633
12634 2014-08-07 Gary Benson <gbenson@redhat.com>
12635
12636 * server.h: Do not include gdb_locale.h.
12637
12638 2014-08-07 Gary Benson <gbenson@redhat.com>
12639
12640 * server.h: Do not include gdb/signals.h.
12641 * win32-low.c: Likewise.
12642
12643 2014-08-07 Gary Benson <gbenson@redhat.com>
12644
12645 * server.h: Do not include pathmax.h.
12646
12647 2014-08-07 Gary Benson <gbenson@redhat.com>
12648
12649 * server.h: Do not include libiberty.h.
12650 * linux-bfin-low.c: Likewise.
12651
12652 2014-08-07 Gary Benson <gbenson@redhat.com>
12653
12654 * server.h: Do not include ansidecl.h.
12655
12656 2014-08-07 Gary Benson <gbenson@redhat.com>
12657
12658 * linux-x86-low.c: Do not include stddef.h.
12659 * lynx-ppc-low.c: Likewise.
12660 * tracepoint.c: Likewise.
12661
12662 2014-08-07 Gary Benson <gbenson@redhat.com>
12663
12664 * server.h: Do not include stdarg.h.
12665 * nto-low.c: Likewise.
12666
12667 2014-08-07 Gary Benson <gbenson@redhat.com>
12668
12669 * server.h: Do not include stdlib.h.
12670 * inferiors.c: Likewise.
12671 * linux-low.c: Likewise.
12672 * regcache.c: Likewise.
12673 * spu-low.c: Likewise.
12674 * tracepoint.c: Likewise.
12675 * utils.c: Likewise.
12676
12677 2014-08-07 Gary Benson <gbenson@redhat.com>
12678
12679 * server.h: Do not include stdio.h.
12680 * linux-low.c: Likewise.
12681 * remote-utils.c: Likewise.
12682 * spu-low.c: Likewise.
12683 * utils.c: Likewise.
12684 * wincecompat.c: Likewise.
12685
12686 2014-08-06 Gary Benson <gbenson@redhat.com>
12687
12688 * regcache.c (init_register_cache): Move conditionals inside if.
12689
12690 2014-08-06 Gary Benson <gbenson@redhat.com>
12691
12692 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12693
12694 2014-07-31 Gary Benson <gbenson@redhat.com>
12695
12696 * ax.h: Do not include server.h.
12697 * gdbthread.h: Likewise.
12698 * lynx-low.h: Likewise.
12699 * notif.h: Likewise.
12700
12701 2014-07-30 Gary Benson <gbenson@redhat.com>
12702
12703 * server.h: Include common-defs.h.
12704 Do not include config.h or build-gnulib-gdbserver/config.h.
12705
12706 2014-07-30 Gary Benson <gbenson@redhat.com>
12707
12708 * hostio-errno.c: Move server.h to top of includes list.
12709 * inferiors.c: Likewise.
12710 * linux-x86-low.c: Likewise.
12711 * notif.c: Include server.h.
12712
12713 2014-07-24 Tom Tromey <tromey@redhat.com>
12714 Gary Benson <gbenson@redhat.com>
12715
12716 * server.h (CORE_ADDR): Now unsigned.
12717
12718 2014-07-16 Pedro Alves <palves@redhat.com>
12719
12720 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12721
12722 2014-07-15 Pedro Alves <palves@redhat.com>
12723
12724 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12725 copy.
12726
12727 2014-07-11 Pedro Alves <palves@redhat.com>
12728
12729 * linux-low.c (kill_wait_lwp): New function, based on
12730 kill_one_lwp_callback, but use my_waitpid directly.
12731 (kill_one_lwp_callback, linux_kill): Use it.
12732
12733 2014-06-23 Pedro Alves <palves@redhat.com>
12734
12735 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12736 before setting DR0..DR3.
12737
12738 2014-06-20 Gary Benson <gbenson@redhat.com>
12739
12740 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12741 * configure: Regenerated.
12742 * config.in: Likewise.
12743
12744 2014-06-20 Gary Benson <gbenson@redhat.com>
12745
12746 * Makefile.in (SFILES): Update locations for files moved
12747 from common to nat.
12748 (object file files): Reordered.
12749
12750 2014-06-20 Gary Benson <gbenson@redhat.com>
12751
12752 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12753 (i386_dr_low_set_addr): Likewise.
12754 (i386_dr_low_get_addr): Likewise.
12755 (i386_dr_low_can_set_control): Likewise.
12756 (i386_dr_low_set_control): Likewise.
12757 (i386_dr_low_get_control): Likewise.
12758 (i386_dr_low_get_status): Likewise.
12759 (i386_get_debug_register_length): Likewise.
12760 * linux-x86-low.c (i386_dr_low_set_addr):
12761 Changed signature. Made static.
12762 (i386_dr_low_get_addr): Likewise.
12763 (i386_dr_low_set_control): Likewise.
12764 (i386_dr_low_get_control): Likewise.
12765 (i386_dr_low_get_status): Likewise.
12766 (i386_dr_low): New global variable.
12767 * win32-i386-low.c (i386_dr_low_set_addr):
12768 Changed signature. Made static.
12769 (i386_dr_low_get_addr): Likewise.
12770 (i386_dr_low_set_control): Likewise.
12771 (i386_dr_low_get_control): Likewise.
12772 (i386_dr_low_get_status): Likewise.
12773 (i386_dr_low): New global variable.
12774
12775 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12776
12777 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12778 * Makefile.in (AR, AR_FLAGS): Define.
12779 * configure: Regenerate.
12780
12781 2014-06-19 Gary Benson <gbenson@redhat.com>
12782
12783 * Makefile.in (i386-dregs.o): New rule.
12784 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12785 * i386-low.c (target.h): Remove include.
12786 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12787 (DR_CONTROL_SHIFT): Likewise.
12788 (DR_CONTROL_SIZE): Likewise.
12789 (DR_RW_EXECUTE): Likewise.
12790 (DR_RW_WRITE): Likewise.
12791 (DR_RW_READ): Likewise.
12792 (DR_RW_IORW): Likewise.
12793 (DR_LEN_1): Likewise.
12794 (DR_LEN_2): Likewise.
12795 (DR_LEN_4): Likewise.
12796 (DR_LEN_8): Likewise.
12797 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12798 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12799 (DR_ENABLE_SIZE): Likewise.
12800 (DR_LOCAL_SLOWDOWN): Likewise.
12801 (DR_GLOBAL_SLOWDOWN): Likewise.
12802 (DR_CONTROL_RESERVED): Likewise.
12803 (I386_DR_CONTROL_MASK): Likewise.
12804 (I386_DR_VACANT): Likewise.
12805 (I386_DR_LOCAL_ENABLE): Likewise.
12806 (I386_DR_GLOBAL_ENABLE): Likewise.
12807 (I386_DR_DISABLE): Likewise.
12808 (I386_DR_SET_RW_LEN): Likewise.
12809 (I386_DR_GET_RW_LEN): Likewise.
12810 (I386_DR_WATCH_HIT): Likewise.
12811 (i386_wp_op_t): Likewise.
12812 (i386_show_dr): Likewise.
12813 (i386_length_and_rw_bits): Likewise.
12814 (i386_insert_aligned_watchpoint): Likewise.
12815 (i386_remove_aligned_watchpoint): Likewise.
12816 (i386_handle_nonaligned_watchpoint): Likewise.
12817 i386_update_inferior_debug_regs(): Likewise.
12818 (i386_dr_insert_watchpoint): Likewise.
12819 (i386_dr_remove_watchpoint): Likewise.
12820 (i386_dr_region_ok_for_watchpoint): Likewise.
12821 (i386_dr_stopped_data_address): Likewise.
12822 (i386_dr_stopped_by_watchpoint): Likewise.
12823
12824 2014-06-19 Gary Benson <gbenson@redhat.com>
12825
12826 * i386-low.c (i386_dr_show): Renamed to
12827 i386_show_dr and made static. All uses updated.
12828 (i386_dr_length_and_rw_bits): Renamed to
12829 i386_length_and_rw_bits and made static.
12830 All uses updated.
12831 (i386_dr_insert_aligned_watchpoint): Renamed to
12832 i386_insert_aligned_watchpoint and made static.
12833 All uses updated.
12834 (i386_dr_remove_aligned_watchpoint): Renamed to
12835 i386_remove_aligned_watchpoint and made static.
12836 All uses updated.
12837 (i386_dr_update_inferior_debug_regs): Renamed to
12838 i386_update_inferior_debug_regs and made static.
12839 All uses updated.
12840
12841 2014-06-18 Gary Benson <gbenson@redhat.com>
12842
12843 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12844 (i386_dr_low_can_set_control): Likewise.
12845 (i386_get_debug_register_length): Likewise.
12846 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12847 (i386_dr_low_can_set_control): Likewise.
12848 (i386_get_debug_register_length): Likewise.
12849
12850 2014-06-17 Gary Benson <gbenson@redhat.com>
12851
12852 * i386-low.h (i386-dregs.h): New include.
12853 (DR_FIRSTADDR): Now in i386-dregs.h.
12854 (DR_LASTADDR): Likewise.
12855 (DR_NADDR): Likewise.
12856 (DR_STATUS): Likewise.
12857 (DR_CONTROL): Likewise.
12858 (i386_debug_reg_state): Likewise.
12859 (i386_dr_insert_watchpoint): Likewise.
12860 (i386_dr_remove_watchpoint): Likewise.
12861 (i386_dr_region_ok_for_watchpoint): Likewise.
12862 (i386_dr_stopped_data_address): Likewise.
12863 (i386_dr_stopped_by_watchpoint): Likewise.
12864 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12865
12866 2014-06-18 Gary Benson <gbenson@redhat.com>
12867
12868 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12869 i386_dr_insert_watchpoint.
12870 (i386_low_remove_watchpoint): Renamed to
12871 i386_dr_remove_watchpoint.
12872 (i386_low_region_ok_for_watchpoint): Renamed to
12873 i386_dr_region_ok_for_watchpoint.
12874 (i386_low_stopped_data_address): Renamed to
12875 i386_dr_stopped_data_address.
12876 (i386_low_stopped_by_watchpoint): Renamed to
12877 i386_dr_stopped_by_watchpoint.
12878 * i386-low.c (i386_show_dr): Renamed to
12879 i386_dr_show and made nonstatic. All uses updated.
12880 (i386_length_and_rw_bits): Renamed to
12881 i386_dr_length_and_rw_bits and made nonstatic.
12882 All uses updated.
12883 (i386_insert_aligned_watchpoint): Renamed to
12884 i386_dr_insert_aligned_watchpoint and made nonstatic.
12885 All uses updated.
12886 (i386_remove_aligned_watchpoint): Renamed to
12887 i386_dr_remove_aligned_watchpoint and made nonstatic.
12888 All uses updated.
12889 (i386_update_inferior_debug_regs): Renamed to
12890 i386_dr_update_inferior_debug_regs and made nonstatic.
12891 All uses updated.
12892 (i386_low_insert_watchpoint): Renamed to
12893 i386_dr_insert_watchpoint. All uses updated.
12894 (i386_low_remove_watchpoint): Renamed to
12895 i386_dr_remove_watchpoint. All uses updated.
12896 (i386_low_region_ok_for_watchpoint): Renamed to
12897 i386_dr_region_ok_for_watchpoint. All uses updated.
12898 (i386_low_stopped_data_address): Renamed to
12899 i386_dr_stopped_data_address. All uses updated.
12900 (i386_low_stopped_by_watchpoint): Renamed to
12901 i386_dr_stopped_by_watchpoint. All uses updated.
12902
12903 2014-06-18 Gary Benson <gbenson@redhat.com>
12904
12905 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12906 (i386_dr_low_can_set_control): Likewise.
12907 (i386_insert_aligned_watchpoint): New check.
12908
12909 2014-06-18 Gary Benson <gbenson@redhat.com>
12910
12911 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12912 Renamed to state.
12913
12914 2014-06-18 Gary Benson <gbenson@redhat.com>
12915
12916 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12917 instead of fatal and error.
12918 (i386_handle_nonaligned_watchpoint): Likewise.
12919
12920 2014-06-18 Gary Benson <gbenson@redhat.com>
12921
12922 * i386-low.c (i386_get_debug_register_length): New macro.
12923 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12924 (i386_show_dr): Use debug_printf instead of fprintf. Use
12925 phex to format values.
12926
12927 2014-06-18 Gary Benson <gbenson@redhat.com>
12928
12929 * i386-low.h: Comment changes.
12930 * i386-low.c: Likewise.
12931
12932 2014-06-18 Gary Benson <gbenson@redhat.com>
12933
12934 * i386-low.c: Whitespace changes.
12935
12936 2014-06-12 Tom Tromey <tromey@redhat.com>
12937
12938 * utils.c (freeargv): Remove.
12939
12940 2014-06-12 Tom Tromey <tromey@redhat.com>
12941
12942 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12943 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12944 (parse_debug_format_options): Likewise.
12945 (gdbserver_usage): Likewise.
12946 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12947 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12948 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12949 against libiberty.
12950 ($(LIBGNU)): Depend on libiberty.
12951 (all-lib): Recurse into all subdirs.
12952 (install-only): Invoke "install" target in subdirs.
12953 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12954 targets.
12955 * configure: Rebuild.
12956 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12957 for vasprintf, vsnprintf, or gettimeofday.
12958 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12959 srv_tgtobj.
12960
12961 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12962
12963 * development.sh: Delete.
12964 * Makefile.in (config.status): Adjust dependency on development.sh.
12965 * configure.ac: Adjust development.sh source call.
12966 * configure: Regenerate.
12967
12968 2014-06-02 Pedro Alves <palves@redhat.com>
12969
12970 * ax.c (gdb_free_agent_expr): New function.
12971 * ax.h (gdb_free_agent_expr): New declaration.
12972 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12973 list.
12974 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12975 static.
12976 (clear_breakpoint_conditions_and_commands): New function.
12977 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12978 (clear_breakpoint_conditions_and_commands): New declaration.
12979
12980 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12981
12982 * linux-aarch64-low.c (asm/ptrace.h): Include.
12983
12984 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12985
12986 Fix TLS access for -static -pthread.
12987 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12988 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12989 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12990
12991 2014-05-20 Pedro Alves <palves@redhat.com>
12992
12993 * linux-aarch64-low.c (aarch64_insert_point)
12994 (aarch64_remove_point): No longer check whether the type is
12995 supported here. Adjust to new interface.
12996 (the_low_target): Install aarch64_supports_z_point_type as
12997 supports_z_point_type method.
12998 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12999 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
13000 instead of a Z packet char. Adjust.
13001 (arm_supports_z_point_type): New function.
13002 (arm_insert_point, arm_remove_point): Adjust to new interface.
13003 (the_low_target): Install arm_supports_z_point_type.
13004 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
13005 (cris_insert_point, cris_remove_point): Adjust to new interface.
13006 Don't check whether the type is supported here.
13007 (the_low_target): Install cris_supports_z_point_type.
13008 * linux-low.c (linux_supports_z_point_type): New function.
13009 (linux_insert_point, linux_remove_point): Adjust to new interface.
13010 * linux-low.h (struct linux_target_ops) <insert_point,
13011 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
13012 raw_breakpoint pointer parameter.
13013 <supports_z_point_type>: New method.
13014 * linux-mips-low.c (mips_supports_z_point_type): New function.
13015 (mips_insert_point, mips_remove_point): Adjust to new interface.
13016 Use mips_supports_z_point_type.
13017 (the_low_target): Install mips_supports_z_point_type.
13018 * linux-ppc-low.c (the_low_target): Install NULL as
13019 supports_z_point_type method.
13020 * linux-s390-low.c (the_low_target): Install NULL as
13021 supports_z_point_type method.
13022 * linux-sparc-low.c (the_low_target): Install NULL as
13023 supports_z_point_type method.
13024 * linux-x86-low.c (x86_supports_z_point_type): New function.
13025 (x86_insert_point): Adjust to new insert_point interface. Use
13026 insert_memory_breakpoint. Adjust to new
13027 i386_low_insert_watchpoint interface.
13028 (x86_remove_point): Adjust to remove_point interface. Use
13029 remove_memory_breakpoint. Adjust to new
13030 i386_low_remove_watchpoint interface.
13031 (the_low_target): Install x86_supports_z_point_type.
13032 * lynx-low.c (lynx_target_ops): Install NULL as
13033 supports_z_point_type callback.
13034 * nto-low.c (nto_supports_z_point_type): New.
13035 (nto_insert_point, nto_remove_point): Adjust to new interface.
13036 (nto_target_ops): Install nto_supports_z_point_type.
13037 * mem-break.c: Adjust intro comment.
13038 (struct raw_breakpoint) <raw_type, size>: New fields.
13039 <inserted>: Update comment.
13040 <shlib_disabled>: Delete field.
13041 (enum bkpt_type) <gdb_breakpoint>: Delete value.
13042 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
13043 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
13044 (raw_bkpt_type_to_target_hw_bp_type): New function.
13045 (find_enabled_raw_code_breakpoint_at): New function.
13046 (find_raw_breakpoint_at): New type and size parameters. Use them.
13047 (insert_memory_breakpoint): New function, based off
13048 set_raw_breakpoint_at.
13049 (remove_memory_breakpoint): New function.
13050 (set_raw_breakpoint_at): Reimplement.
13051 (set_breakpoint): New, based on set_breakpoint_at.
13052 (set_breakpoint_at): Reimplement.
13053 (delete_raw_breakpoint): Go through the_target->remove_point
13054 instead of assuming memory breakpoints.
13055 (find_gdb_breakpoint_at): Delete.
13056 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
13057 (find_gdb_breakpoint): New function.
13058 (set_gdb_breakpoint_at): Delete.
13059 (z_type_supported): New function.
13060 (set_gdb_breakpoint_1): New function, loosely based off
13061 set_gdb_breakpoint_at.
13062 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
13063 (delete_gdb_breakpoint_at): Delete.
13064 (delete_gdb_breakpoint_1): New function, loosely based off
13065 delete_gdb_breakpoint_at.
13066 (delete_gdb_breakpoint): New function.
13067 (clear_gdb_breakpoint_conditions): Rename to ...
13068 (clear_breakpoint_conditions): ... this. Don't handle a NULL
13069 breakpoint.
13070 (add_condition_to_breakpoint): Make static.
13071 (add_breakpoint_condition): Take a struct breakpoint pointer
13072 instead of an address. Adjust.
13073 (gdb_condition_true_at_breakpoint): Rename to ...
13074 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
13075 z_type parameter.
13076 (gdb_condition_true_at_breakpoint): Reimplement.
13077 (add_breakpoint_commands): Take a struct breakpoint pointer
13078 instead of an address. Adjust.
13079 (gdb_no_commands_at_breakpoint): Rename to ...
13080 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
13081 parameter. Return true if no breakpoint was found. Change debug
13082 output.
13083 (gdb_no_commands_at_breakpoint): Reimplement.
13084 (run_breakpoint_commands): Rename to ...
13085 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
13086 and change return type to boolean.
13087 (run_breakpoint_commands): New function.
13088 (gdb_breakpoint_here): Also check for Z1 breakpoints.
13089 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
13090 breakpoint. Go through the_target->remove_point instead of
13091 assuming memory breakpoint.
13092 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
13093 software and hardware breakpoints.
13094 (reinsert_raw_breakpoint): Go through the_target->insert_point
13095 instead of assuming memory breakpoint.
13096 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
13097 software and hardware breakpoints.
13098 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
13099 Check both software and hardware breakpoints.
13100 (validate_inserted_breakpoint): Assert the breakpoint is a
13101 software breakpoint. Set the inserted flag to -1 instead of
13102 setting shlib_disabled.
13103 (delete_disabled_breakpoints): Adjust.
13104 (validate_breakpoints): Only validate software breakpoints.
13105 Adjust to inserted flag change.
13106 (check_mem_read, check_mem_write): Skip breakpoint types other
13107 than software breakpoints. Adjust to inserted flag change.
13108 * mem-break.h (enum raw_bkpt_type): New enum.
13109 (raw_breakpoint, struct process_info): Forward declare.
13110 (Z_packet_to_target_hw_bp_type): Delete declaration.
13111 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
13112 (set_gdb_breakpoint, delete_gdb_breakpoint)
13113 (clear_breakpoint_conditions): New declarations.
13114 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
13115 (breakpoint_inserted_here): Update comment.
13116 (add_breakpoint_condition, add_breakpoint_commands): Replace
13117 address parameter with a breakpoint pointer parameter.
13118 (gdb_breakpoint_here): Update comment.
13119 (delete_gdb_breakpoint_at): Delete.
13120 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
13121 * server.c (process_point_options): Take a struct breakpoint
13122 pointer instead of an address. Adjust.
13123 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
13124 delete_gdb_breakpoint.
13125 * spu-low.c (spu_target_ops): Install NULL as
13126 supports_z_point_type method.
13127 * target.h: Include mem-break.h.
13128 (struct target_ops) <prepare_to_access_memory>: Update comment.
13129 <supports_z_point_type>: New field.
13130 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13131 instead of a char. Also take a raw breakpoint pointer.
13132 * win32-arm-low.c (the_low_target): Install NULL as
13133 supports_z_point_type.
13134 * win32-i386-low.c (i386_supports_z_point_type): New function.
13135 (i386_insert_point, i386_remove_point): Adjust to new interface.
13136 (the_low_target): Install i386_supports_z_point_type.
13137 * win32-low.c (win32_supports_z_point_type): New function.
13138 (win32_insert_point, win32_remove_point): Adjust to new interface.
13139 (win32_target_ops): Install win32_supports_z_point_type.
13140 * win32-low.h (struct win32_target_ops):
13141 <supports_z_point_type>: New method.
13142 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13143 instead of a char. Also take a raw breakpoint pointer.
13144
13145 2014-05-20 Pedro Alves <palves@redhat.com>
13146
13147 * mem-break.h: Include break-common.h.
13148 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13149 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
13150 (Z_packet_to_target_hw_bp_type): New declaration.
13151 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
13152 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
13153 (Z_PACKET_ACCESS_WP): Delete macros.
13154 (Z_packet_to_hw_type): Delete function.
13155 * i386-low.h: Don't include break-common.h here.
13156 (Z_packet_to_hw_type): Delete declaration.
13157 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
13158 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13159 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
13160 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13161 * linux-aarch64-low.c: Don't include break-common.h here.
13162 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13163 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
13164 (Z_packet_to_target_hw_bp_type): Delete function.
13165 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
13166 function.
13167 (mips_insert_point, mips_remove_point): Use
13168 Z_packet_to_target_hw_bp_type.
13169
13170 2014-05-20 Pedro Alves <palves@redhat.com>
13171
13172 * linux-aarch64-low.c: Include break-common.h.
13173 (enum target_point_type): Delete.
13174 (Z_packet_to_point_type): Rename to ...
13175 (Z_packet_to_target_hw_bp_type): ... this, and return a
13176 target_hw_bp_type instead.
13177 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
13178 instead of an enum target_point_type.
13179 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
13180 breakpoint type.
13181 (aarch64_dr_state_insert_one_point)
13182 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
13183 (aarch64_handle_aligned_watchpoint)
13184 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
13185 Take an enum target_hw_bp_type instead of an enum
13186 target_point_type.
13187 (aarch64_supports_z_point_type): New function.
13188 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
13189 use Z_packet_to_target_hw_bp_type.
13190
13191 2014-05-20 Joel Brobecker <brobecker@adacore.com>
13192
13193 * configure.ac: Only use -Werror by default when DEVELOPMENT
13194 is true.
13195 * configure: Regenerate.
13196
13197 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
13198
13199 Fix gdbserver qGetTLSAddr for x86_64 -m32.
13200 * linux-x86-low.c (X86_64_USER_REGS): New.
13201 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
13202
13203 2014-04-28 Yao Qi <yao@codesourcery.com>
13204
13205 * Makefile.in (i386-avx512.c): Fix the typo of generated file
13206 name.
13207
13208 2014-04-25 Pedro Alves <palves@redhat.com>
13209
13210 PR server/16255
13211 * linux-low.c (linux_attach_fail_reason_string): New function.
13212 (linux_attach_lwp): Delete.
13213 (linux_attach_lwp_1): Rename to ...
13214 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
13215 argument. Remove "initial" parameter. Return int instead of
13216 void. Don't error or warn here.
13217 (linux_attach): Adjust to call linux_attach_lwp. Call error on
13218 failure to attach to the tgid. Call warning when failing to
13219 attach to an lwp.
13220 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
13221 argument. Remove "initial" parameter. Return int instead of
13222 void. Don't error or warn here.
13223 (linux_attach_fail_reason_string): New declaration.
13224 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
13225 interface change. Use linux_attach_fail_reason_string.
13226
13227 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
13228 Walfred Tedeschi <walfred.tedeschi@intel.com>
13229
13230 * Makefile.in: Added rules to handle new files
13231 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
13232 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
13233 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
13234 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
13235 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
13236 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
13237 x32-avx512-linux.o.
13238 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
13239 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
13240 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
13241 i386/x32-avx512.xml.
13242 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
13243 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
13244 i386/x32-avx512-linux.xml.
13245 * i387-fp.c (num_avx512_k_registers): New constant for number
13246 of K registers.
13247 (num_avx512_zmmh_low_registers): New constant for number of
13248 lower ZMM registers (0-15).
13249 (num_avx512_zmmh_high_registers): New constant for number of
13250 higher ZMM registers (16-31).
13251 (num_avx512_ymmh_registers): New contant for number of higher
13252 YMM registers (ymm16-31 added by avx521 on x86_64).
13253 (num_avx512_xmm_registers): New constant for number of higher
13254 XMM registers (xmm16-31 added by AVX512 on x86_64).
13255 (struct i387_xsave): Add space for AVX512 registers.
13256 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
13257 Add code to handle AVX512 registers.
13258 (i387_xsave_to_cache): Add code to handle AVX512 registers.
13259 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
13260 prototypei from generated file.
13261 (tdesc_amd64_avx512_linux): Likewise.
13262 (init_registers_x32_avx512_linux): Likewise.
13263 (tdesc_x32_avx512_linux): Likewise.
13264 (init_registers_i386_avx512_linux): Likewise.
13265 (tdesc_i386_avx512_linux): Likewise.
13266 (x86_64_regmap): Add AVX512 registers.
13267 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13268 mask.
13269 (initialize_low_arch): Add code to initialize AVX512 registers.
13270
13271 2014-04-23 Pedro Alves <palves@redhat.com>
13272
13273 * mem-break.c (find_gdb_breakpoint_at): Make static.
13274 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13275
13276 2014-04-23 Pedro Alves <palves@redhat.com>
13277
13278 * i386-low.c: Don't include break-common.h here.
13279 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13280 prototype to take target_hw_bp_type as argument instead of a Z
13281 packet char.
13282 * i386-low.h: Include break-common.h here.
13283 (Z_packet_to_hw_type): Declare.
13284 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13285 prototypes.
13286 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13287 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13288 (x86_remove_point): Convert the packet number to a
13289 target_hw_bp_type before calling i386_low_remove_watchpoint.
13290 * win32-i386-low.c (i386_insert_point): Convert the packet number
13291 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13292 (i386_remove_point): Convert the packet number to a
13293 target_hw_bp_type before calling i386_low_remove_watchpoint.
13294
13295 2014-04-23 Pedro Alves <palves@redhat.com>
13296
13297 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13298
13299 2014-04-10 Pedro Alves <palves@redhat.com>
13300
13301 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13302 Check if the condition or command is NULL before checking if the
13303 breakpoint is known. On success, return true.
13304 * mem-break.h (add_breakpoint_condition): Document return.
13305 (add_breakpoint_commands): Add describing comment.
13306 * server.c (skip_to_semicolon): New function.
13307 (process_point_options): Use it.
13308
13309 2014-04-09 Pedro Alves <palves@redhat.com>
13310
13311 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13312 to lwpid_of.
13313
13314 2014-02-27 Pedro Alves <palves@redhat.com>
13315
13316 PR 12702
13317 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13318 macros.
13319 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13320 output.
13321 (last_thread_of_process_p): Take a PID argument instead of a
13322 thread pointer.
13323 (linux_wait_for_lwp): Delete.
13324 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13325 functions.
13326 (linux_low_filter_event): New function, party factored out from
13327 linux_wait_for_event.
13328 (linux_wait_for_event): Rename to ...
13329 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13330 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13331 sigsuspend. Check for zombie leaders.
13332 (linux_wait_for_event): Reimplement as wrapper around
13333 linux_wait_for_event_filtered.
13334 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13335 a normal or signal exit is seen, it's the whole process exiting.
13336 (wait_for_sigstop): No longer a for_each_inferior callback.
13337 Rewrite on top of linux_wait_for_event_filtered.
13338 (stop_all_lwps): Call wait_for_sigstop directly.
13339 * server.c (resume, handle_target_event): Handle
13340 TARGET_WAITKIND_NO_RESUMED.
13341
13342 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13343
13344 * win32-low.c (psapi_get_dll_name,
13345 * win32_CreateToolhelp32Snapshot): Delete.
13346 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13347 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13348 Delete.
13349 (handle_load_dll): Add function description.
13350 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13351
13352 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13353
13354 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13355 Add comment.
13356 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13357 base address when calling win32_add_one_solib.
13358 (handle_load_dll): Delete local variable load_addr.
13359 Remove 0x1000 offset applied to DLL base address when calling
13360 win32_add_one_solib.
13361 (handle_unload_dll): Add comment.
13362
13363 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13364
13365 * win32-low.c (win32_add_all_dlls): Renames
13366 win32_ensure_ntdll_loaded. Rewrite function documentation.
13367 Adjust implementation to always load all DLLs.
13368 Add 0x1000 offset to DLL base address when calling
13369 win32_add_one_solib.
13370 (child_initialization_done): New static global.
13371 (do_initial_child_stuff): Set child_initialization_done to
13372 zero during child initialization, and 1 after. Replace call
13373 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13374 Add comment.
13375 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13376 (handle_unload_dll): Add function documentation.
13377 (get_child_debug_event): Ignore load and unload DLL events
13378 during child initialization.
13379
13380 2014-02-20 Doug Evans <dje@google.com>
13381
13382 Remove global all_lwps.
13383 * inferiors.h (ptid_of): Move here from linux-low.h.
13384 (pid_of, lwpid_of): Ditto.
13385 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13386 parameter is a struct thread_info * now.
13387 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13388 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13389 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13390 directly.
13391 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13392 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13393 * linux-arm-low.c (update_registers_callback): Update, "entry"
13394 parameter is a struct thread_info * now.
13395 Fetch lwpid from current_inferior directly.
13396 (arm_insert_point): Pass &all_threads to find_inferior instead of
13397 &all_lwps.
13398 (arm_remove_point): Ditto.
13399 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13400 (arm_prepare_to_resume): Fetch pid from thread.
13401 (arm_read_description): Fetch lwpid from current_inferior directly.
13402 * linux-low.c (all_lwps): Delete.
13403 (delete_lwp): Delete call to remove_inferior.
13404 (handle_extended_wait): Fetch lwpid from thread.
13405 (add_lwp): Don't set lwp->entry.id. Remove call to
13406 add_inferior_to_list.
13407 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13408 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13409 (kill_one_lwp_callback): Ditto.
13410 (linux_kill): Don't dereference NULL pointer.
13411 Fetch ptid,lwpid from thread.
13412 (get_detach_signal): Fetch ptid from thread.
13413 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13414 Simplify call to regcache_invalidate_thread.
13415 (delete_lwp_callback): Update, "entry" parameter is a
13416 struct thread_info * now. Fetch pid from thread.
13417 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13418 (status_pending_p_callback): Update, "entry" parameter is a
13419 struct thread_info * now. Fetch ptid from thread.
13420 (find_lwp_pid): Update, "entry" parameter is a
13421 struct thread_info * now.
13422 (linux_wait_for_lwp): Fetch pid from thread.
13423 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13424 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13425 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13426 (dequeue_one_deferred_signal): Ditto.
13427 (cancel_breakpoint): Fetch ptid from current_inferior.
13428 (linux_wait_for_event): Pass &all_threads to find_inferior,
13429 not &all_lwps. Fetch ptid, lwpid from thread.
13430 (count_events_callback): Update, "entry" parameter is a
13431 struct thread_info * now.
13432 (select_singlestep_lwp_callback): Ditto.
13433 (select_event_lwp_callback): Ditto.
13434 (cancel_breakpoints_callback): Ditto.
13435 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13436 not &all_lwps.
13437 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13438 (unsuspend_one_lwp): Update, "entry" parameter is a
13439 struct thread_info * now.
13440 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13441 not &all_lwps.
13442 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13443 Fetch lwpid from thread, not lwp.
13444 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13445 Pass &all_threads to find_inferior, not &all_lwps.
13446 (send_sigstop): Fetch lwpid from thread, not lwp.
13447 (send_sigstop_callback): Update, "entry" parameter is a
13448 struct thread_info * now.
13449 (suspend_and_send_sigstop_callback): Ditto.
13450 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13451 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13452 struct thread_info * now.
13453 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13454 from thread, lwp.
13455 (lwp_running): Update, "entry" parameter is a
13456 struct thread_info * now.
13457 (stop_all_lwps): Fetch ptid from thread.
13458 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13459 (linux_resume_one_lwp): Fetch lwpid from thread.
13460 (linux_set_resume_request): Update, "entry" parameter is a
13461 struct thread_info * now. Fetch pid, lwpid from thread.
13462 (resume_status_pending_p): Update, "entry" parameter is a
13463 struct thread_info * now.
13464 (need_step_over_p): Ditto. Fetch lwpid from thread.
13465 (start_step_over): Fetch lwpid from thread.
13466 (linux_resume_one_thread): Update, "entry" parameter is a
13467 struct thread_info * now. Fetch lwpid from thread.
13468 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13469 (proceed_one_lwp): Update, "entry" parameter is a
13470 struct thread_info * now. Fetch lwpid from thread.
13471 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13472 struct thread_info * now.
13473 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13474 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13475 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13476 directly.
13477 (regsets_store_inferior_registers): Ditto.
13478 (fetch_register, store_register): Ditto.
13479 (linux_read_memory, linux_write_memory): Ditto.
13480 (linux_request_interrupt): Ditto.
13481 (linux_read_auxv): Ditto.
13482 (linux_xfer_siginfo): Ditto.
13483 (linux_qxfer_spu): Ditto.
13484 (linux_qxfer_libraries_svr4): Ditto.
13485 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13486 moved to inferiors.h.
13487 (get_lwp): Delete.
13488 (get_thread_lwp): Update.
13489 (struct lwp_info): Delete member "entry". Simplify comment for
13490 member "thread".
13491 (all_lwps): Delete.
13492 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13493 current_inferior directly.
13494 (update_watch_registers_callback): Update, "entry" parameter is a
13495 struct thread_info * now. Fetch pid from thread.
13496 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13497 (mips_insert_point): Fetch lwpid from current_inferior.
13498 Pass &all_threads to find_inferior, not &all_lwps.
13499 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13500 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13501 directly.
13502 (mips_stopped_data_address): Ditto.
13503 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13504 directly.
13505 * linux-tile-low.c (tile_arch_setup): Ditto.
13506 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13507 (update_debug_registers_callback): Update, "entry" parameter is a
13508 struct thread_info * now. Fetch pid from thread.
13509 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13510 Pass &all_threads to find_inferior, not &all_lwps.
13511 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13512 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13513 Pass &all_threads to find_inferior, not &all_lwps.
13514 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13515 (i386_dr_low_get_status): Ditto.
13516 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13517 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13518 (x86_linux_read_description): Ditto.
13519 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13520
13521 2014-02-20 Doug Evans <dje@google.com>
13522
13523 * inferiors.c (get_first_inferior): Fix buglet.
13524
13525 2014-02-19 Doug Evans <dje@google.com>
13526
13527 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13528 * inferiors.c (add_thread): Change result type to struct thread_info *.
13529 All callers updated.
13530 (add_lwp): Call add_thread here instead of in callers.
13531 All callers updated.
13532 * linux-low.h (get_lwp_thread): Rewrite.
13533 (struct lwp_info): New member "thread".
13534
13535 2014-02-19 Doug Evans <dje@google.com>
13536
13537 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13538 All callers updated.
13539
13540 2014-02-19 Doug Evans <dje@google.com>
13541
13542 * inferiors.c (add_thread): Fix whitespace.
13543
13544 2014-02-19 Doug Evans <dje@google.com>
13545
13546 * dll.c (clear_dlls): Replace accessing list implemention details
13547 with API function.
13548 * gdbthread.h (get_first_thread): Declare.
13549 * inferiors.c (for_each_inferior_with_data): New function.
13550 (get_first_thread): New function.
13551 (find_thread_ptid): Simplify.
13552 (get_first_inferior): New function.
13553 (clear_list): Delete.
13554 (one_inferior_p): New function.
13555 (clear_inferior_list): New function.
13556 (clear_inferiors): Update.
13557 * inferiors.h (for_each_inferior_with_data): Declare.
13558 (clear_inferior_list): Declare.
13559 (one_inferior_p): Declare.
13560 (get_first_inferior): Declare.
13561 * linux-low.c (linux_wait_for_event): Replace accessing list
13562 implemention details with API function.
13563 * server.c (target_running): Ditto.
13564 (accumulate_file_name_length): New function.
13565 (emit_dll_description): New function.
13566 (handle_qxfer_libraries): Replace accessing list implemention
13567 details with API function.
13568 (handle_qxfer_threads_worker): New function.
13569 (handle_qxfer_threads_proper): Replace accessing list implemention
13570 details with API function.
13571 (handle_query): Ditto.
13572 (visit_actioned_threads_callback_ftype): New typedef.
13573 (visit_actioned_threads_data): New struct.
13574 (visit_actioned_threads): Rewrite to be find_inferior callback.
13575 (resume): Call find_inferior.
13576 (handle_status): Replace accessing list implemention
13577 details with API function.
13578 (process_serial_event): Replace accessing list implemention details
13579 with API function.
13580 * target.c (set_desired_inferior): Replace accessing list implemention
13581 details with API function.
13582 * tracepoint.c (same_process_p): New function.
13583 (gdb_agent_about_to_close): Replace accessing list implemention
13584 details with API function.
13585 * win32-low.c (child_delete_thread): Replace accessing list
13586 implemention details with API function.
13587 (match_dll_by_basename): New function.
13588 (dll_is_loaded_by_basename): New function.
13589 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13590 details call to dll_is_loaded_by_basename.
13591
13592 2014-02-19 Doug Evans <dje@google.com>
13593
13594 * dll.h (struct dll_info): Add comment.
13595 * gdbthread.h (struct thread_info): Add comment.
13596 (current_ptid): Simplify.
13597 * inferiors.c (add_process): Update.
13598 (remove_process): Update.
13599 * inferiors.h (struct process_info): Rename member "head" to "entry".
13600 * linux-low.c (delete_lwp): Update.
13601 (add_lwp): Update.
13602 (last_thread_of_process_p): Update.
13603 (kill_one_lwp_callback, linux_kill): Update.
13604 (status_pending_p_callback): Update.
13605 (wait_for_sigstop): Update. Simplify read of ptid.
13606 (start_step_over): Update.
13607 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13608 (get_lwp_thread): Update.
13609 (struct lwp_info): Rename member "head" to "entry".
13610 * regcache.h (inferior_list_entry): Delete.
13611 * server.c (kill_inferior_callback): Update.
13612 (detach_or_kill_inferior_callback): Update.
13613 (print_started_pid): Update.
13614 (print_attached_pid): Update.
13615 (process_serial_event): Simplify read of ptid.
13616 * thread-db.c (thread_db_create_event): Update.
13617 (thread_db_get_tls_address): Update.
13618 * win32-low.c (current_inferior_ptid): Simplify.
13619
13620 2014-02-19 Tom Tromey <tromey@redhat.com>
13621
13622 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13623 argument.
13624 (target_supports_btrace): Update.
13625
13626 2014-02-14 Yao Qi <yao@codesourcery.com>
13627
13628 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13629 (rsp-low-ipa.o): New target.
13630
13631 2014-02-12 Tom Tromey <tromey@redhat.com>
13632
13633 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13634 convert_ascii_to_int.
13635 * regcache.c (registers_to_string): Likewise.
13636 * remote-utils.c (decode_M_packet): Likewise.
13637 * server.c (process_serial_event): Likewise.
13638
13639 2014-02-12 Tom Tromey <tromey@redhat.com>
13640
13641 * server.c (handle_query, handle_v_run): Use hex2bin, not
13642 unhexify.
13643 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13644
13645 2014-02-12 Tom Tromey <tromey@redhat.com>
13646
13647 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13648 convert_int_to_ascii.
13649 * regcache.c (registers_to_string, collect_register_as_string):
13650 Likewise.
13651 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13652 Likewise.
13653 * server.c (process_serial_event): Likewise.
13654 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13655 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13656
13657 2014-02-12 Tom Tromey <tromey@redhat.com>
13658
13659 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13660 bin2hex, not hexify.
13661 * tracepoint.c (cmd_qtstatus): Likewise.
13662
13663 2014-02-12 Tom Tromey <tromey@redhat.com>
13664
13665 * remote-utils.c (monitor_output): Pass explicit length to
13666 hexify.
13667
13668 2014-02-12 Tom Tromey <tromey@redhat.com>
13669
13670 * tracepoint.c: Include rsp-low.h.
13671 * server.c: Include rsp-low.h.
13672 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13673 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13674 declare.
13675 * remote-utils.c: Include rsp-low.h.
13676 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13677 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13678 (convert_int_to_ascii, convert_ascii_to_int): Move to
13679 common/rsp-low.c.
13680 * regcache.c: Include rsp-low.h.
13681 * ax.c: Include rsp-low.h.
13682 * Makefile.in (SFILES): Add common/rsp-low.c.
13683 (OBS): Add rsp-low.o.
13684 (rsp-low.o): New target.
13685
13686 2014-02-12 Tom Tromey <tromey@redhat.com>
13687
13688 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13689 Include print-utils.h.
13690 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13691 (plongest, thirty_two, phex_nz): Remove.
13692 * Makefile.in (SFILES): Add common/print-utils.c.
13693 (OBS): Add print-utils.o.
13694 (print-utils-ipa.o): New target.
13695 (print-utils.o): New target.
13696 (IPA_OBJS): Add print-utils-ipa.o.
13697
13698 2014-02-06 Tom Tromey <tromey@redhat.com>
13699
13700 * Makefile.in (SFILES): Fix indentation.
13701
13702 2014-02-05 Doug Evans <dje@google.com>
13703
13704 * linux-low.c (linux_wait_for_event): Improve comment.
13705 (linux_wait_1): Keep current_inferior in sync with event_child.
13706
13707 2014-01-22 Doug Evans <dje@google.com>
13708
13709 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13710
13711 2014-01-22 Doug Evans <dje@google.com>
13712
13713 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13714 * configure: Regenerate.
13715 * config.in: Regenerate.
13716 * Makefile.in (SFILES): Add debug.c.
13717 (OBS): Add debug.o.
13718 * debug.c: New file.
13719 * debug.h: New file.
13720 * linux-aarch64-low.c (*): Update all debugging printfs to use
13721 debug_printf instead of fprintf.
13722 * linux-arm-low.c (*): Ditto.
13723 * linux-cris-low.c (*): Ditto.
13724 * linux-crisv32-low.c (*): Ditto.
13725 * linux-m32r-low.c (*): Ditto.
13726 * linux-sparc-low.c (*): Ditto.
13727 * linux-x86.c (*): Ditto.
13728 * linux-low.c (*): Ditto.
13729 (linux_wait_1): Add calls to debug_enter, debug_exit.
13730 (linux_wait): Remove redundant debugging printf.
13731 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13732 (linux_resume, unstop_all_lwps): Ditto.
13733 * mem-break.c (*): Update all debugging printfs to use
13734 debug_printf instead of fprintf.
13735 * remote-utils.c (*): Ditto.
13736 * thread-db.c (*): Ditto.
13737 * server.c #include <ctype.h>, "gdb_vecs.h".
13738 (debug_threads): Moved to debug.c.
13739 (*): Update all debugging printfs to use debug_printf instead of
13740 fprintf.
13741 (start_inferior): Replace call to fflush with call to debug_flush.
13742 (monitor_show_help): Mention set debug-format.
13743 (parse_debug_format_options): New function.
13744 (handle_monitor_command): Handle "monitor set debug-format".
13745 (gdbserver_usage): Mention --debug-format.
13746 (main): Parse --debug-format.
13747 * server.h (debug_threads): Declaration moved to debug.h.
13748 #include "debug.h".
13749 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13750 trace_debug_1 that uses debug_printf.
13751 (tracepoint_look_up_symbols): Update all debugging printfs to use
13752 debug_printf instead of fprintf.
13753
13754 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13755
13756 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13757 sys/ptrace.h.
13758
13759 2014-01-17 Pedro Alves <palves@redhat.com>
13760
13761 PR build/16445
13762 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13763 defined after including gdb_proc_service.h.
13764
13765 2014-01-16 Doug Evans <dje@google.com>
13766
13767 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13768 (match_dll): Use it.
13769
13770 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13771
13772 * target.h (target_ops) <read_btrace>: Change parameters and
13773 return type to allow error reporting.
13774 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13775 trace reading errors on.
13776 * linux-low.c (linux_low_read_btrace): Pass trace reading
13777 errors on.
13778 (linux_low_disable_btrace): New.
13779
13780 2014-01-15 Doug Evans <dje@google.com>
13781
13782 * inferiors.c (thread_id_to_gdb_id): Delete.
13783 * inferiors.h (thread_id_to_gdb_id): Delete.
13784
13785 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13786
13787 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13788 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13789 versions.
13790
13791 2014-01-08 Pedro Alves <palves@redhat.com>
13792
13793 * server.c (handle_status): Don't discard previous queued stop
13794 replies or thread's pending status here.
13795 (main) <disconnection>: Do it here instead.
13796
13797 2014-01-08 Pedro Alves <palves@redhat.com>
13798
13799 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13800 * server.c (visit_actioned_threads, handle_pending_status): New
13801 function.
13802 (handle_v_cont): Factor out parts to ...
13803 (resume): ... this new function. If in all-stop, and a thread
13804 being resumed has a pending status, report it without actually
13805 resuming.
13806 (myresume): Adjust to use the new 'resume' function.
13807 (clear_pending_status_callback, set_pending_status_callback)
13808 (find_status_pending_thread_callback): New functions.
13809 (handle_status): Handle the case of multiple threads having
13810 interesting statuses to report. Report threads' real last signal
13811 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13812 with an interesting thread to report the status for, instead of
13813 always reporting the status of the first thread.
13814
13815 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13816
13817 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13818 * gdbreplay.c (gdbreplay_version): Likewise.
13819
13820 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13821
13822 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13823 iov.iov_len with the real length in use.
13824
13825 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13826
13827 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13828 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13829 for all targets that use win32-low.c.
13830 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13831 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13832
13833 2013-12-13 Pedro Alves <palves@redhat.com>
13834
13835 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13836 if equal to TARGET_WAITKIND_LOADED.
13837 * win32-low.c (cached_status): New static global.
13838 (win32_wait): Add declaration.
13839 (do_initial_child_stuff): Flush all initial pending debug events
13840 up to the initial breakpoint.
13841 (win32_wait): If CACHED_STATUS was set, return that instead
13842 of doing a real wait. Remove the code resuming the execution
13843 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13844 during the initial phase. Also remove the code changing
13845 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13846 TARGET_WAITKIND_STOPPED.
13847
13848 2013-12-11 Yao Qi <yao@codesourcery.com>
13849
13850 * notif.c (handle_notif_ack): Return 0 if no notification
13851 matches.
13852
13853 2013-11-20 Doug Evans <dje@google.com>
13854
13855 * linux-low.c (linux_set_resume_request): Fix comment.
13856
13857 2013-11-20 Doug Evans <dje@google.com>
13858
13859 * linux-low.c (resume_status_pending_p): Tweak comment.
13860
13861 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13862
13863 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13864 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13865 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13866 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13867 (srv_amd64_regobj): Add amd64-mpx.o.
13868 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13869 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13870 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13871 * i387-fp.c (num_pl_bnd_register) Added constant.
13872 (num_pl_bnd_cfg_registers) Added constant.
13873 (struct i387_xsave) Added reserved area and MPX fields.
13874 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13875 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13876 function.
13877 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13878 (init_registers_amd64_mpx_linux): Declare new function.
13879 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13880 (x86_64_regmap): Add MPX registers.
13881 (x86_linux_read_description): Add MPX case.
13882 (initialize_low_arch): Initialize MPX targets.
13883
13884 2013-11-18 Tom Tromey <tromey@redhat.com>
13885
13886 * configure: Rebuild.
13887 * configure.ac: Don't check for stdlib.h.
13888 * gdbreplay.c: Unconditionally include stdlib.h.
13889
13890 2013-11-18 Tom Tromey <tromey@redhat.com>
13891
13892 * config.in: Rebuild.
13893 * configure: Rebuild.
13894 * configure.ac: Don't use AC_HEADER_DIRENT.
13895
13896 2013-11-18 Tom Tromey <tromey@redhat.com>
13897
13898 * server.h: Don't check HAVE_STRING_H.
13899 * gdbreplay.c: Don't check HAVE_STRING_H.
13900 * configure: Rebuild.
13901
13902 2013-11-18 Tom Tromey <tromey@redhat.com>
13903
13904 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13905 LIBGNU.
13906
13907 2013-11-08 Tom Tromey <tromey@redhat.com>
13908
13909 * configure, config.in: Rebuild.
13910 * configure.ac: Remove unused configury.
13911
13912 2013-11-08 Tom Tromey <tromey@redhat.com>
13913
13914 * acinclude.m4: Include common.m4, codeset.m4.
13915 * configure, config.in: Rebuild.
13916 * configure.ac: Use GDB_AC_COMMON.
13917
13918 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13919
13920 * linux-s390-low.c (HWCAP_S390_TE): New define.
13921 (s390_arch_setup): Consider the TE field in the HWCAP for
13922 determining 'have_regset_tdb'.
13923
13924 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13925
13926 PR gdb/16014
13927 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13928 call to sizeof.
13929
13930 2013-10-02 Pedro Alves <palves@redhat.com>
13931
13932 * server.c (process_serial_event): Don't output "GDBserver
13933 exiting" if GDB is connected through stdio.
13934 * target.c (mywait): Likewise, be silent if GDB is connected
13935 through stdio.
13936
13937 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13938
13939 * lynx-low.c (lynx_add_threads_after_attach): New function.
13940 (lynx_attach): Remove call to add_thread. Add call to
13941 lynx_add_threads_after_attach instead.
13942
13943 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13944
13945 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13946 * config.in, configure: Regenerated.
13947
13948 2013-09-18 Yao Qi <yao@codesourcery.com>
13949
13950 PR server/15959
13951 * server.c (start_inferior): Clear 'resume_info'.
13952
13953 2013-09-16 Jiong Wang <jiwang@tilera.com>
13954
13955 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13956 for each register.
13957
13958 2013-09-16 Jiong Wang <jiwang@tilera.com>
13959
13960 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13961 linux-tile-low.o to srv_tgtobj.
13962
13963 2013-09-16 Will Newton <will.newton@linaro.org>
13964
13965 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13966 out regs.
13967
13968 2013-09-06 Pedro Alves <palves@redhat.com>
13969
13970 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13971 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13972 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13973 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13974 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13975 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13976
13977 2013-09-06 Pedro Alves <palves@redhat.com>
13978
13979 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13980 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13981
13982 2013-09-06 Pedro Alves <palves@redhat.com>
13983
13984 * linux-amd64-ipa.c: Include tracepoint.h.
13985 * linux-i386-ipa.c: Include tracepoint.h.
13986
13987 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13988
13989 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13990 (ps_get_thread_area): New function.
13991
13992 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13993
13994 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13995 (initialize_low_arch): Call init_registers_crisv32 rather than
13996 init_register_crisv32.
13997
13998 2013-09-05 Pedro Alves <palves@redhat.com>
13999
14000 * server.h (handle_vFile, hostio_last_error_from_errno): Move
14001 to ...
14002 * hostio.h: ... this new file.
14003 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
14004 win32-low.c: Include hostio.h.
14005
14006 2013-09-05 Pedro Alves <palves@redhat.com>
14007
14008 * server.h (gdb_client_data, handler_func, callback_handler_func)
14009 (delete_file_handler, add_file_handler, append_callback_event)
14010 (delete_callback_event, start_event_loop, initialize_event_loop):
14011 Move to event-loop.h and include it.
14012 * event-loop.h: New file.
14013
14014 2013-09-05 Pedro Alves <palves@redhat.com>
14015
14016 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
14017 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
14018 (loaded_dll, unloaded_dll): Move to ...
14019 * dll.h: ... this new file.
14020 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
14021
14022 2013-09-05 Pedro Alves <palves@redhat.com>
14023
14024 * server.h (current_process, get_thread_process, all_processes)
14025 (add_inferior_to_list, for_each_inferior, current_inferior)
14026 (remove_inferior, add_process, remove_process, find_process_pid)
14027 (have_started_inferiors_p, have_attached_inferiors_p)
14028 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
14029 (clear_inferiors, find_inferior, find_inferior_id)
14030 (inferior_target_data, set_inferior_target_data)
14031 (inferior_regcache_data, set_inferior_regcache_data): Move to
14032 inferiors.h, and include it.
14033 * inferiors.h: New file.
14034
14035 2013-09-05 Pedro Alves <palves@redhat.com>
14036
14037 * server.h (struct emit_ops, current_insn_ptr, emit_error):
14038 Move ...
14039 * ax.h: ... here.
14040
14041 2013-09-05 Pedro Alves <palves@redhat.com>
14042
14043 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
14044 tracepoint.h.
14045 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
14046 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
14047 (handle_tracepoint_general_set, handle_tracepoint_query)
14048 (tracepoint_finished_step, tracepoint_was_hit)
14049 (release_while_stepping_state_list, current_traceframe)
14050 (in_readonly_region, traceframe_read_mem)
14051 (fetch_traceframe_registers, traceframe_read_sdata)
14052 (traceframe_read_info, struct fast_tpoint_collect_status)
14053 (fast_tracepoint_collecting, force_unlock_trace_buffer)
14054 (handle_tracepoit_bkpts, initialize_low_tracepoint)
14055 (supply_fast_tracepoint_registers)
14056 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
14057 (ipa_tdesc, claim_trampoline_space)
14058 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
14059 (agent_mem_read, agent_get_trace_state_variable_value)
14060 (agent_set_trace_state_variable_value, agent_tsv_read)
14061 (agent_mem_read_string, get_raw_reg_func_addr)
14062 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
14063 * tracepoint.h: ... this new file.
14064
14065 2013-09-05 Pedro Alves <palves@redhat.com>
14066
14067 * server.h (perror_with_name, error, fatal, warning, paddress)
14068 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
14069 include it.
14070 * utils.h: New file.
14071
14072 2013-09-05 Pedro Alves <palves@redhat.com>
14073
14074 * server.h (remote_debug, noack_mode, transport_is_reliable)
14075 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
14076 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
14077 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
14078 (write_enn, initialize_async_io, enable_async_io)
14079 (disable_async_io, check_remote_input_interrupt_request)
14080 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
14081 (dead_thread_notify, prepare_resume_reply)
14082 (decode_address_to_semicolon, decode_address, decode_m_packet)
14083 (decode_M_packet, decode_X_packet, decode_xfer_write)
14084 (decode_search_memory_packet, unhexify, hexify)
14085 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
14086 (look_up_one_symbol, relocate_instruction)
14087 (monitor_output): Move to remote-utils.h, and include it.
14088 * remote-utils.h: New file.
14089
14090 2013-09-05 Pedro Alves <palves@redhat.com>
14091
14092 * server.h (_): Delete.
14093
14094 2013-09-02 Pedro Alves <palves@redhat.com>
14095
14096 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
14097 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
14098 allocated.
14099 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
14100
14101 2013-09-02 Pierre Muller <muller@sourceware.org>
14102
14103 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
14104 or WriteProcessMemory complete successfully and handle
14105 ERROR_PARTIAL_COPY error.
14106
14107 2013-09-02 Pedro Alves <palves@redhat.com>
14108
14109 * server.c (gdb_read_memory): Return -1 on traceframe memory read
14110 error instead of EIO.
14111
14112 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14113
14114 PR server/15604
14115 * linux-low.c: Include filestuff.h.
14116 (linux_create_inferior) <pid == 0>: Call close_most_fds.
14117 * lynx-low.c: Include filestuff.h.
14118 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
14119 * server.c: Include filestuff.h.
14120 (main): Call notice_open_fds.
14121 * spu-low.c: Include filestuff.h.
14122 (spu_create_inferior) <pid == 0>: Call close_most_fds.
14123
14124 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
14125
14126 * Makefile.in: Explain why ../target and ../nat are not
14127 listed as include file search paths.
14128 (linux-waitpid.o): New object file rule.
14129 * configure.srv (srv_native_linux_obj): New variable.
14130 Replace all occurrences of linux native object files with
14131 $srv_native_linux_obj.
14132 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
14133 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
14134 (linux_enable_event_reporting): Remove declaration.
14135 (my_waitpid): Moved to common/linux-waitpid.c.
14136 (linux_wait_for_event): Pass ptid when calling
14137 linux_enable_event_reporting.
14138 (linux_supports_tracefork_flag): Remove.
14139 (linux_enable_event_reporting): Likewise.
14140 (linux_tracefork_grandchild): Remove.
14141 (STACK_SIZE): Moved to common/linux-ptrace.c.
14142 (linux_tracefork_child): Remove.
14143 (linux_test_for_tracefork): Remove.
14144 (linux_look_up_symbols): Call linux_supports_traceclone.
14145 (initialize_low): Remove call to linux_test_for_tracefork.
14146 * linux-low.h (PTRACE_TYPE_ARG3): Move to
14147 common/linux-ptrace.h.
14148 (PTRACE_TYPE_ARG4): Likewise.
14149 Include linux-ptrace.h.
14150
14151 2013-08-21 Pedro Alves <palves@redhat.com>
14152
14153 * config.in: Renegerate.
14154
14155 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
14156
14157 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
14158 (SFILES): Remove $(srcdir)/common/target-common.c and
14159 add $(srcdir)/target/waitstatus.c.
14160 (OBS): Remove target-common.o and add waitstatus.o.
14161 (server_h): Remove $(srcdir)/../common/target-common.h and
14162 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
14163 and $(srcdir)/../target/waitstatus.h.
14164 (target-common.o): Remove.
14165 (waitstatus.o): New target object file.
14166 * target.h: Do not include target-common.h and
14167 include target/resume.h, target/wait.h and
14168 target/waitstatus.h.
14169
14170 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
14171
14172 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14173 to PTRACE_TYPE_ARG3.
14174 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14175 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
14176 PTRACE_TYPE_ARG4.
14177 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
14178 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
14179
14180 2013-07-27 Jie Zhang <jie@codesourcery.com>
14181 Daniel Jacobowitz <dan@codesourcery.com>
14182 Yao Qi <yao@codesourcery.com>
14183
14184 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
14185 (mips-linux-watch.o): New rule.
14186 (mips_linux_watch_h): New variable.
14187 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
14188 srv_tgtobj.
14189 * linux-mips-low.c: Include mips-linux-watch.h.
14190 (struct arch_process_info, struct arch_lwp_info): New.
14191 (update_watch_registers_callback): New function.
14192 (mips_linux_new_process, mips_linux_new_thread) New functions.
14193 (mips_linux_prepare_to_resume, mips_insert_point): New
14194 functions.
14195 (mips_remove_point, mips_stopped_by_watchpoint): New
14196 functions.
14197 (rsp_bp_type_to_target_hw_bp_type): New function.
14198 (mips_stopped_data_address): New function.
14199 (the_low_target): Add watchpoint support functions.
14200
14201 2013-07-27 Yao Qi <yao@codesourcery.com>
14202
14203 * i386-low.c: Include break-common.h.
14204 (enum target_hw_bp_type): Remove.
14205
14206 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
14207
14208 * Makefile.in (SFILES): /common/target-common.c.
14209 (OBS): Add target-common.o.
14210 (server_h): Add $(srcdir)/../common/target-common.h.
14211 (target-common.o): New target.
14212 * server.c (queue_stop_reply_callback): Free
14213 status string after use.
14214 * target.c (target_waitstatus_to_string): Remove.
14215 * target.h: Include target-common.h.
14216 (resume_kind): Likewise.
14217 (target_waitkind): Likewise.
14218 (target_waitstatus): Likewise.
14219 (TARGET_WNOHANG): Likewise.
14220
14221 2013-07-04 Yao Qi <yao@codesourcery.com>
14222
14223 * Makefile.in (host_alias): Use @host_noncanonical@.
14224 (target_alias): Use @target_noncanonical@.
14225 * configure.ac: Use ACX_NONCANONICAL_TARGET and
14226 ACX_NONCANONICAL_HOST.
14227 * configure: Regenerated.
14228
14229 Revert:
14230 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14231
14232 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14233 * configure: Rebuild.
14234 * Makefile.in (version_host, version_target): Get from configure.
14235 (version.c): Use $(version_host) and $(version_target).
14236
14237 2013-07-03 Pedro Alves <palves@redhat.com>
14238
14239 * Makefile.in (config.status): Depend on development.sh.
14240 * acinclude.m4: Include libmcheck.m4.
14241 * configure: Regenerate.
14242
14243 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14244
14245 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
14246 attribute inside the parentheses.
14247 (winapi_DebugSetProcessKillOnExit): Ditto.
14248 (winapi_DebugBreakProcess): Ditto.
14249 (winapi_GenerateConsoleCtrlEvent): Ditto.
14250
14251 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14252
14253 * notif.h (notif_event): Add a dummy member to avoid compiler
14254 errors.
14255
14256 2013-07-01 Pedro Alves <palves@redhat.com>
14257
14258 * hostio.c (HOSTIO_PATH_MAX): Define.
14259 (require_filename, handle_open, handle_unlink, handle_readlink):
14260 Use it.
14261
14262 2013-07-01 Pedro Alves <palves@redhat.com>
14263
14264 * server.h: Include "pathmax.h".
14265 * linux-low.c: Don't include sys/param.h.
14266 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14267 MAXPATHLEN.
14268 * win32-low.c: Don't include sys/param.h.
14269 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14270
14271 2013-07-01 Pedro Alves <palves@redhat.com>
14272
14273 * event-loop.c: Don't check HAVE_UNISTD_H before including
14274 <unistd.h>.
14275 * gdbreplay.c: Likewise.
14276 * remote-utils.c: Likewise.
14277 * server.c: Likewise.
14278 * configure.ac: Don't check for unistd.h.
14279 * configure: Regenerate.
14280
14281 2013-06-28 Tom Tromey <tromey@redhat.com>
14282
14283 * Makefile.in (version.c): Use version.in, not
14284 common/version.in.
14285
14286 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14287
14288 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14289 * configure: Rebuild.
14290 * Makefile.in (version_host, version_target): Get from configure.
14291 (version.c): Use $(version_host) and $(version_target).
14292
14293 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14294
14295 Fix trace-status to output user name without trailing colon.
14296 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14297
14298 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14299
14300 Fix trace-status to output proper start-time and stop-time.
14301 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14302 output start time and stop time in hex as gdb expects.
14303
14304 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14305
14306 * tracepoint.c (build_traceframe_info_xml): Output trace state
14307 variables present in the trace buffer.
14308
14309 2013-06-24 Tom Tromey <tromey@redhat.com>
14310
14311 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14312 create-version.sh.
14313 (version.o): Remove.
14314 * gdbreplay.c: Include version.h.
14315 (version, host_name): Don't declare.
14316 * server.h: Include version.h.
14317 (version, host_name): Don't declare.
14318
14319 2013-06-12 Pedro Alves <palves@redhat.com>
14320
14321 * linux-x86-low.c (linux_is_elf64): Delete global.
14322 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14323 with local linux_pid_exe_is_elf_64_file use.
14324
14325 2013-06-11 Pedro Alves <palves@redhat.com>
14326
14327 * linux-low.c (regset_disabled, disable_regset): New functions.
14328 (regsets_fetch_inferior_registers)
14329 (regsets_store_inferior_registers): Use them.
14330 (initialize_regsets_info); Don't allocate the disabled_regsets
14331 array here.
14332 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14333 comment.
14334
14335 2013-06-11 Pedro Alves <palves@redhat.com>
14336
14337 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14338 xmalloc.
14339
14340 2013-06-11 Pedro Alves <palves@redhat.com>
14341
14342 * linux-x86-low.c (initialize_low_arch): Call
14343 init_registers_x32_avx_linux.
14344
14345 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14346
14347 Fix compatibility with Android Bionic.
14348 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14349 it is not empty.
14350
14351 2013-06-07 Pedro Alves <palves@redhat.com>
14352
14353 PR server/14823
14354 * Makefile.in (OBS): Add tdesc.o.
14355 (IPA_OBJS): Add tdesc-ipa.o.
14356 (tdesc-ipa.o): New rule.
14357 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14358 interface.
14359 * linux-low.c (new_inferior): Delete.
14360 (disabled_regsets, num_regsets): Delete.
14361 (linux_add_process): Adjust to set the new per-process
14362 new_inferior flag.
14363 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14364 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14365 was a stop. When calling arch_setup, switch the current inferior
14366 to the thread that got an event.
14367 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14368 (regsets_fetch_inferior_registers)
14369 (regsets_store_inferior_registers): New regsets_info parameter.
14370 Adjust to use it.
14371 (linux_register_in_regsets): New regs_info parameter. Adjust to
14372 use it.
14373 (register_addr, fetch_register, store_register): New usrregs_info
14374 parameter. Adjust to use it.
14375 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14376 parameter regs_info. Adjust to use it.
14377 (linux_fetch_registers): Get the current inferior's regs_info, and
14378 adjust to use it.
14379 (linux_store_registers): Ditto.
14380 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14381 (initialize_low): Don't initialize the target_regsets here. Call
14382 initialize_low_arch.
14383 * linux-low.h (target_regsets): Delete declaration.
14384 (struct regsets_info): New.
14385 (struct usrregs_info): New.
14386 (struct regs_info): New.
14387 (struct process_info_private) <new_inferior>: New field.
14388 (struct linux_target_ops): Delete the num_regs, regmap, and
14389 regset_bitmap fields. New field regs_info.
14390 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14391 * i387-fp.c (num_xmm_registers): Delete.
14392 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14393 calls to new interface.
14394 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14395 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14396 Infer the number of xmm registers from the regcache's target
14397 description.
14398 * i387-fp.h (num_xmm_registers): Delete.
14399 * inferiors.c (add_thread): Don't install the thread's regcache
14400 here.
14401 * proc-service.c (gregset_info): Fetch the current inferior's
14402 regs_info. Adjust to use it.
14403 * regcache.c: Include tdesc.h.
14404 (register_bytes, reg_defs, num_registers)
14405 (gdbserver_expedite_regs): Delete.
14406 (get_thread_regcache): If the thread doesn't have a regcache yet,
14407 create one, instead of aborting gdbserver.
14408 (regcache_invalidate_one): Rename to ...
14409 (regcache_invalidate_thread): ... this.
14410 (regcache_invalidate_one): New.
14411 (regcache_invalidate): Only invalidate registers of the current
14412 process.
14413 (init_register_cache): Add target_desc parameter, and use it.
14414 (new_register_cache): Ditto. Assert the target description has a
14415 non zero registers_size.
14416 (regcache_cpy): Add assertions. Adjust.
14417 (realloc_register_cache, set_register_cache): Delete.
14418 (registers_to_string, registers_from_string): Adjust.
14419 (find_register_by_name, find_regno, find_register_by_number)
14420 (register_cache_size): Add target_desc parameter, and use it.
14421 (free_register_cache_thread, free_register_cache_thread_one)
14422 (regcache_release, register_cache_size): New.
14423 (register_size): Add target_desc parameter, and use it.
14424 (register_data, supply_register, supply_register_zeroed)
14425 (supply_regblock, supply_register_by_name, collect_register)
14426 (collect_register_as_string, collect_register_by_name): Adjust.
14427 * regcache.h (struct target_desc): Forward declare.
14428 (struct regcache) <tdesc>: New field.
14429 (init_register_cache, new_register_cache): Add target_desc
14430 parameter.
14431 (regcache_invalidate_thread): Declare.
14432 (regcache_invalidate_one): Delete declaration.
14433 (regcache_release): Declare.
14434 (find_register_by_number, register_cache_size, register_size)
14435 (find_regno): Add target_desc parameter.
14436 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14437 declarations.
14438 * remote-utils.c: Include tdesc.h.
14439 (outreg, prepare_resume_reply): Adjust.
14440 * server.c: Include tdesc.h.
14441 (gdbserver_xmltarget): Delete declaration.
14442 (get_features_xml, process_serial_event): Adjust.
14443 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14444 declare.
14445 (struct process_info) <tdesc>: New field.
14446 (ipa_tdesc): Declare.
14447 * tdesc.c: New file.
14448 * tdesc.h: New file.
14449 * tracepoint.c: Include tdesc.h.
14450 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14451 (get_context_regcache): Adjust to pass ipa_tdesc down.
14452 (do_action_at_tracepoint): Adjust to get the register cache size
14453 from the context regcache's description.
14454 (traceframe_walk_blocks): Adjust to get the register cache size
14455 from the current trace frame's description.
14456 (traceframe_get_pc): Adjust to get current trace frame's
14457 description and pass it down.
14458 (gdb_collect): Adjust to get the register cache size from the
14459 IPA's description.
14460 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14461 (gdbserver_xmltarget): Delete.
14462 (initialize_low_tracepoint): Set the ipa's target description.
14463 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14464 (initialize_low_tracepoint): Set the ipa's target description.
14465 * linux-x86-low.c: Include tdesc.h.
14466 [__x86_64__] (is_64bit_tdesc): New.
14467 (ps_get_thread_area, x86_get_thread_area): Use it.
14468 (i386_cannot_store_register): Rename to ...
14469 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14470 (i386_cannot_fetch_register): Rename to ...
14471 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14472 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14473 to new interface.
14474 (target_regsets): Rename to ...
14475 (x86_regsets): ... this.
14476 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14477 interface.
14478 (x86_siginfo_fixup): Use is_64bit_tdesc.
14479 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14480 (tdesc_x32_avx_linux, tdesc_x32_linux)
14481 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14482 Declare.
14483 (x86_linux_update_xmltarget): Delete.
14484 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14485 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14486 (AMD64_LINUX_USER64_CS): New.
14487 (x86_linux_read_description): New, based on
14488 x86_linux_update_xmltarget.
14489 (same_process_callback): New.
14490 (x86_arch_setup_process_callback): New.
14491 (x86_linux_update_xmltarget): New.
14492 (x86_regsets_info): New.
14493 (amd64_linux_regs_info): New.
14494 (i386_linux_usrregs_info): New.
14495 (i386_linux_regs_info): New.
14496 (x86_linux_regs_info): New.
14497 (x86_arch_setup): Reimplement.
14498 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14499 (x86_emit_ops): Ditto.
14500 (the_low_target): Adjust. Install x86_linux_regs_info,
14501 x86_cannot_fetch_register, and x86_cannot_store_register.
14502 (initialize_low_arch): New.
14503 * linux-ia64-low.c (tdesc_ia64): Declare.
14504 (ia64_fetch_register): Adjust.
14505 (ia64_usrregs_info, regs_info): New globals.
14506 (ia64_regs_info): New function.
14507 (the_low_target): Adjust.
14508 (initialize_low_arch): New function.
14509 * linux-sparc-low.c (tdesc_sparc64): Declare.
14510 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14511 Adjust.
14512 (sparc_arch_setup): New function.
14513 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14514 (the_low_target): Adjust.
14515 (initialize_low_arch): New function.
14516 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14517 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14518 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14519 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14520 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14521 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14522 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14523 (tdesc_powerpc_isa205_vsx64l): Declare.
14524 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14525 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14526 (ppc_set_pc, ppc_get_hwcap): Adjust.
14527 (ppc_usrregs_info): Forward declare.
14528 (!__powerpc64__) ppc_regmap_adjusted: New global.
14529 (ppc_arch_setup): Adjust to the current process'es target
14530 description.
14531 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14532 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14533 (ppc_store_evrregset): Adjust.
14534 (target_regsets): Rename to ...
14535 (ppc_regsets): ... this, and make static.
14536 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14537 (ppc_regs_info): New function.
14538 (the_low_target): Adjust.
14539 (initialize_low_arch): New function.
14540 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14541 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14542 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14543 (tdesc_s390x_linux64v2): Declare.
14544 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14545 (s390_fill_gregset, s390_store_last_break): Adjust.
14546 (target_regsets): Rename to ...
14547 (s390_regsets): ... this, and make static.
14548 (s390_get_pc, s390_set_pc): Adjust.
14549 (s390_get_hwcap): New target_desc parameter, and use it.
14550 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14551 (s390_arch_setup): Adjust to set the current process'es target
14552 description. Don't adjust the regmap.
14553 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14554 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14555 (regs_info_3264): New globals.
14556 (s390_regs_info): New function.
14557 (the_low_target): Adjust.
14558 (initialize_low_arch): New function.
14559 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14560 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14561 [__mips64] (init_registers_mips_linux)
14562 (init_registers_mips_dsp_linux): Delete defines.
14563 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14564 (have_dsp): New global.
14565 (mips_read_description): New, based on mips_arch_setup.
14566 (mips_arch_setup): Reimplement.
14567 (get_usrregs_info): New function.
14568 (mips_cannot_fetch_register, mips_cannot_store_register)
14569 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14570 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14571 (target_regsets): Rename to ...
14572 (mips_regsets): ... this, and make static.
14573 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14574 (dsp_regs_info, regs_info): New globals.
14575 (mips_regs_info): New function.
14576 (the_low_target): Adjust.
14577 (initialize_low_arch): New function.
14578 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14579 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14580 Declare.
14581 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14582 (arm_read_description): New, with bits factored from
14583 arm_arch_setup.
14584 (arm_arch_setup): Reimplement.
14585 (target_regsets): Rename to ...
14586 (arm_regsets): ... this, and make static.
14587 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14588 (arm_regs_info): New function.
14589 (the_low_target): Adjust.
14590 (initialize_low_arch): New function.
14591 * linux-m68k-low.c (tdesc_m68k): Declare.
14592 (target_regsets): Rename to ...
14593 (m68k_regsets): ... this, and make static.
14594 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14595 (m68k_regs_info): New function.
14596 (m68k_arch_setup): New function.
14597 (the_low_target): Adjust.
14598 (initialize_low_arch): New function.
14599 * linux-sh-low.c (tdesc_sharch): Declare.
14600 (target_regsets): Rename to ...
14601 (sh_regsets): ... this, and make static.
14602 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14603 (sh_regs_info, sh_arch_setup): New functions.
14604 (the_low_target): Adjust.
14605 (initialize_low_arch): New function.
14606 * linux-bfin-low.c (tdesc_bfin): Declare.
14607 (bfin_arch_setup): New function.
14608 (bfin_usrregs_info, regs_info): New globals.
14609 (bfin_regs_info): New function.
14610 (the_low_target): Adjust.
14611 (initialize_low_arch): New function.
14612 * linux-cris-low.c (tdesc_cris): Declare.
14613 (cris_arch_setup): New function.
14614 (cris_usrregs_info, regs_info): New globals.
14615 (cris_regs_info): New function.
14616 (the_low_target): Adjust.
14617 (initialize_low_arch): New function.
14618 * linux-cris-low.c (tdesc_crisv32): Declare.
14619 (cris_arch_setup): New function.
14620 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14621 (cris_regs_info): New function.
14622 (the_low_target): Adjust.
14623 (initialize_low_arch): New function.
14624 * linux-m32r-low.c (tdesc_m32r): Declare.
14625 (m32r_arch_setup): New function.
14626 (m32r_usrregs_info, regs_info): New globals.
14627 (m32r_regs_info): Adjust.
14628 (initialize_low_arch): New function.
14629 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14630 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14631 (tic6x_usrregs_info): Forward declare.
14632 (tic6x_read_description): New function, based on ...
14633 (tic6x_arch_setup): ... this. Reimplement.
14634 (target_regsets): Rename to ...
14635 (tic6x_regsets): ... this, and make static.
14636 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14637 (tic6x_regs_info): New function.
14638 (the_low_target): Adjust.
14639 (initialize_low_arch): New function.
14640 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14641 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14642 (target_regsets): Rename to ...
14643 (xtensa_regsets): ... this, and make static.
14644 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14645 globals.
14646 (xtensa_arch_setup, xtensa_regs_info): New functions.
14647 (the_low_target): Adjust.
14648 (initialize_low_arch): New function.
14649 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14650 (nios2_arch_setup): Set the current process'es tdesc.
14651 (target_regsets): Rename to ...
14652 (nios2_regsets): ... this.
14653 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14654 (nios2_regs_info): New function.
14655 (the_low_target): Adjust.
14656 (initialize_low_arch): New function.
14657 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14658 (aarch64_arch_setup): Set the current process'es tdesc.
14659 (target_regsets): Rename to ...
14660 (aarch64_regsets): ... this.
14661 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14662 (aarch64_regs_info): New function.
14663 (the_low_target): Adjust.
14664 (initialize_low_arch): New function.
14665 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14666 globals.
14667 (target_regsets): Rename to ...
14668 (tile_regsets): ... this.
14669 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14670 (tile_regs_info): New function.
14671 (tile_arch_setup): Set the current process'es tdesc.
14672 (the_low_target): Adjust.
14673 (initialize_low_arch): New function.
14674 * spu-low.c (tdesc_spu): Declare.
14675 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14676 * win32-arm-low.c (tdesc_arm): Declare.
14677 (arm_arch_setup): New function.
14678 (the_low_target): Install arm_arch_setup instead of
14679 init_registers_arm.
14680 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14681 (init_windows_x86): Rename to ...
14682 (i386_arch_setup): ... this. Set `win32_tdesc'.
14683 (the_low_target): Adjust.
14684 * win32-low.c (win32_tdesc): New global.
14685 (child_add_thread): Don't create the thread cache here.
14686 (do_initial_child_stuff): Set the new process'es tdesc.
14687 * win32-low.h (struct target_desc): Forward declare.
14688 (win32_tdesc): Declare.
14689 * lynx-i386-low.c (tdesc_i386): Declare global.
14690 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14691 * lynx-low.c (lynx_tdesc): New global.
14692 (lynx_add_process): Set the new process'es tdesc.
14693 * lynx-low.h (struct target_desc): Forward declare.
14694 (lynx_tdesc): Declare global.
14695 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14696 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14697 * nto-low.c (nto_tdesc): New global.
14698 (do_attach): Set the new process'es tdesc.
14699 * nto-low.h (struct target_desc): Forward declare.
14700 (nto_tdesc): Declare.
14701 * nto-x86-low.c (tdesc_i386): Declare.
14702 (nto_x86_arch_setup): Set `nto_tdesc'.
14703
14704 2013-06-04 Gary Benson <gbenson@redhat.com>
14705
14706 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14707 to qSupported response when appropriate.
14708 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14709 with nonzero-length annex.
14710 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14711 arguments supplied in annex.
14712
14713 2013-05-31 Doug Evans <dje@google.com>
14714
14715 PR server/15594
14716 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14717 64 bits in 64-cross-32 environment.
14718
14719 2013-05-28 Pedro Alves <palves@redhat.com>
14720
14721 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14722 (aarch64-without-fpu.c): Delete rule.
14723 * configure.srv (aarch64*-*-linux*): Remove references to
14724 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14725 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14726 declaration.
14727
14728 2013-05-24 Pedro Alves <palves@redhat.com>
14729
14730 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14731 instead of strchr/decode_address. Error if the range isn't split
14732 with a ','. Don't assume there's be a ':' in the action.
14733
14734 2013-05-23 Yao Qi <yao@codesourcery.com>
14735 Pedro Alves <palves@redhat.com>
14736
14737 * linux-low.c (lwp_in_step_range): New function.
14738 (linux_wait_1): If the thread was range stepping and stopped
14739 outside the stepping range, report the stop to GDB. Otherwise,
14740 continue stepping. Add range stepping debug output.
14741 (linux_set_resume_request): Copy the step range from the resume
14742 request to the lwp.
14743 (linux_supports_range_stepping): New.
14744 (linux_target_ops) <supports_range_stepping>: Set to
14745 linux_supports_range_stepping.
14746 * linux-low.h (struct linux_target_ops)
14747 <supports_range_stepping>: New field.
14748 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14749 * linux-x86-low.c (x86_supports_range_stepping): New.
14750 (the_low_target) <supports_range_stepping>: Set to
14751 x86_supports_range_stepping.
14752 * server.c (handle_v_cont): Handle 'r' action.
14753 (handle_v_requests): Append ";r" if the target supports range
14754 stepping.
14755 * target.h (struct thread_resume) <step_range_start,
14756 step_range_end>: New fields.
14757 (struct target_ops) <supports_range_stepping>:
14758 New field.
14759 (target_supports_range_stepping): New macro.
14760
14761 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14762
14763 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14764 confusion in comment.
14765
14766 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14767
14768 * lynx-low.c (struct process_info_private): New type.
14769 (lynx_add_process): New function.
14770 (lynx_create_inferior, lynx_attach): Replace calls to
14771 add_process by calls to lynx_add_process.
14772 (lynx_resume): If PTID is null, then try using
14773 current_process()->private->last_wait_event_ptid.
14774 Add comments.
14775 (lynx_clear_inferiors): Delete. The contents of that function
14776 has been inlined in lynx_mourn;
14777 (lynx_wait_1): Save the ptid in the process's private data.
14778 (lynx_mourn): Free the process' private data. Replace call
14779 to lynx_clear_inferiors by call to clear_inferiors.
14780
14781 2013-05-17 Yao Qi <yao@codesourcery.com>
14782
14783 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14784 the right place.
14785
14786 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14787
14788 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14789 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14790 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14791 PT_TEXT_END_ADDR guards. Update comments.
14792 (linux_target_op) <read_offsets>: Conditionally define to
14793 linux_read_offsets if the target is UCLIBC and if it defines
14794 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14795
14796 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14797 Andrew Jenner <andrew@codesourcery.com>
14798
14799 * Makefile.in (SFILES): Add linux-nios2-low.c.
14800 (clean): Add action to delete nios2-linux.c.
14801 (nios2-linux.c): New rule.
14802 * configure.srv: Add nios2*-*-linux*.
14803 * linux-nios2-low.c: New.
14804
14805 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14806
14807 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14808
14809 2013-04-25 Hui Zhu <hui@codesourcery.com>
14810
14811 PR gdb/15186
14812 * ax.c (ax_printf): Add fflush.
14813
14814 2013-04-22 Tom Tromey <tromey@redhat.com>
14815
14816 * Makefile.in (SFILES): Add filestuff.c.
14817 (OBS): Add filestuff.o.
14818 (filestuff.o): New target.
14819 * config.in, configure: Rebuild.
14820 * configure.ac: Check for fdwalk, pipe2.
14821
14822 2013-04-17 Pedro Alves <palves@redhat.com>
14823
14824 * configure.ac (USE_THREAD_DB): Delete variable.
14825 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14826 Don't AC_SUBST USE_THREAD_DB.
14827 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14828 * config.in, configure: Regenerate.
14829
14830 2013-04-16 Pedro Alves <palves@redhat.com>
14831
14832 * linux-low.h (struct lwp_info) <thread_known>: Move under
14833 the USE_THREAD_DB #ifdef.
14834
14835 2013-04-16 Pedro Alves <palves@redhat.com>
14836
14837 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14838 (linux-low.o): Delete rule.
14839 * linux-low.h: Always include "gdb_thread_db.h" instead of
14840 conditionally including thread_db.h.
14841 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14842 HAVE_THREAD_DB_H.
14843
14844 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14845
14846 * Makefile.in (install-only): Fix make install regression.
14847
14848 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14849
14850 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14851 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14852 installation.
14853 * gdbserver.1: Remove.
14854
14855 2013-03-22 Pedro Alves <palves@redhat.com>
14856
14857 * linux-low.c (handle_extended_wait): Don't call
14858 linux_enable_event_reporting.
14859
14860 2013-03-15 Tony Theodore <tonyt@logyst.com>
14861
14862 PR build/9098:
14863 * Makefile.in (SHELL): Use @SHELL@.
14864
14865 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14866
14867 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14868 compiler warning.
14869
14870 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14871
14872 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14873 Remove extraneous NULL element.
14874
14875 2013-03-13 Yao Qi <yao@codesourcery.com>
14876
14877 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14878 'V' block in trace frame.
14879
14880 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14881
14882 * target.h (struct target_ops): Add btrace ops.
14883 (target_supports_btrace): New macro.
14884 (target_enable_btrace): New macro.
14885 (target_disable_btrace): New macro.
14886 (target_read_btrace): New macro.
14887 * gdbthread.h (struct thread_info): Add btrace field.
14888 * server.c: Include btrace-common.h.
14889 (handle_btrace_general_set): New function.
14890 (handle_btrace_enable): New function.
14891 (handle_btrace_disable): New function.
14892 (handle_general_set): Call handle_btrace_general_set.
14893 (handle_qxfer_btrace): New function.
14894 (struct qxfer qxfer_packets[]): Add btrace entry.
14895 * inferiors.c (remove_thread): Disable btrace.
14896 * linux-low: Include linux-btrace.h.
14897 (linux_low_enable_btrace): New function.
14898 (linux_low_read_btrace): New function.
14899 (linux_target_ops): Add btrace ops.
14900 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14901 Add srv_linux_btrace=yes.
14902 (x86_64-*-linux*): Add linux-btrace.o.
14903 Add srv_linux_btrace=yes.
14904 * configure.ac: Define HAVE_LINUX_BTRACE.
14905 * config.in: Regenerated.
14906 * configure: Regenerated.
14907
14908 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14909
14910 * server.c (handle_qxfer): Preserve error message if -3 is
14911 returned.
14912 (qxfer): Document the -3 return value.
14913
14914 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14915
14916 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14917 (linux_btrace_h): New variable.
14918 (linux-btrace.o): New rule.
14919
14920 2013-03-08 Stan Shebs <stan@codesourcery.com>
14921 Hafiz Abid Qadeer <abidh@codesourcery.com>
14922
14923 * tracepoint.c (trace_buffer_size): New global.
14924 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14925 (init_trace_buffer): Change to one-argument function. Allocate
14926 trace buffer memory.
14927 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14928 handle QTBuffer:size packet.
14929 (cmd_bigqtbuffer_size): New function.
14930 (initialize_tracepoint): Call init_trace_buffer with
14931 DEFAULT_TRACE_BUFFER_SIZE.
14932 * server.c (handle_query): Add QTBuffer:size in the
14933 supported packets.
14934
14935 2013-03-07 Yao Qi <yao@codesourcery.com>
14936
14937 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14938 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14939 of -1.
14940 (cmd_qtsp): Adjust condition. Do post increment.
14941 Set cur_action and cur_step_action back to 0.
14942
14943 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14944
14945 PR server/15236
14946 * linux-low.c (linux_write_memory): Return early success if LEN is
14947 zero.
14948
14949 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14950
14951 * configure.srv: Add x86_64-*-cygwin* as target.
14952
14953 2013-02-28 Tom Tromey <tromey@redhat.com>
14954
14955 * configure.ac: Invoke AC_SYS_LARGEFILE.
14956 * configure, config.in: Rebuild.
14957
14958 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14959
14960 * win32-low.c: Throughout, fix format strings and casts of
14961 printf-like functions to avoid type related warnings on all
14962 platforms.
14963 (get_child_debug_event): Print dwDebugEventCode as hex since
14964 that's how it's usually documented.
14965
14966 2013-02-28 Yao Qi <yao@codesourcery.com>
14967
14968 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14969 pulongest.
14970
14971 2013-02-27 Jiong Wang <jiwang@tilera.com>
14972
14973 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14974 (reg-tilegx32.c): New rule.
14975 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14976 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14977 different register info initializer according to elf class.
14978 (init_registers_tilgx32): New function. The tilegx32 register info
14979 initializer.
14980 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14981 (tile_store_gregset): Likewise.
14982
14983 2013-02-27 Yao Qi <yao@codesourcery.com>
14984
14985 * server.c (process_point_options): Print debug message when
14986 debug_threads is true.
14987
14988 2013-02-26 Yao Qi <yao@codesourcery.com>
14989
14990 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14991
14992 2013-02-19 Pedro Alves <palves@redhat.com>
14993 Kai Tietz <ktietz@redhat.com>
14994
14995 PR gdb/15161
14996
14997 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14998 instead of strtoul to extract address from packet.
14999 (process_serial_event) <'z'>: Likewise.
15000
15001 2013-02-18 Yao Qi <yao@codesourcery.com>
15002
15003 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
15004
15005 2013-02-14 Pedro Alves <palves@redhat.com>
15006
15007 Plug memory leak.
15008
15009 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
15010 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
15011
15012 2013-02-14 Pedro Alves <palves@redhat.com>
15013
15014 * tracepoint.c (cmd_qtdpsrc): Use savestring.
15015
15016 2013-02-14 Pedro Alves <palves@redhat.com>
15017
15018 * tracepoint.c (save_string): Delete.
15019 (add_tracepoint_action): Use savestring instead of save_string.
15020
15021 2013-02-12 Pedro Alves <palves@redhat.com>
15022
15023 * linux-xtensa-low.c: Ditto.
15024 * xtensa-xtregs.c: Ditto.
15025
15026 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
15027
15028 * thread-db.c (thread_db_get_tls_address): NULL pointer check
15029 thread_db.
15030
15031 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
15032
15033 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
15034 aarch64_num_wp_regs and aarch64_num_bp_regs to
15035 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
15036
15037 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
15038
15039 * linux-aarch64-low.c (ps_get_thread_area): Replace
15040 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
15041
15042 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
15043 Marcus Shawcroft <marcus.shawcroft@arm.com>
15044 Nigel Stephens <nigel.stephens@arm.com>
15045 Yufeng Zhang <yufeng.zhang@arm.com>
15046
15047 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
15048 (aarch64.c, aarch64-without-fpu.c): New targets.
15049 * configure.srv (aarch64*-*-linux*): New.
15050 * linux-aarch64-low.c: New file.
15051
15052 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
15053
15054 * linux-low.c (handle_extended_wait, linux_create_inferior)
15055 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
15056 (dequeue_one_deferred_signal, linux_resume_one_thread)
15057 (fetch_register, linux_write_memory, linux_enable_event_reporting)
15058 (linux_tracefork_grandchild, linux_test_for_tracefork)
15059 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
15060 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
15061 where the argument is 0.
15062
15063 2013-01-25 Yao Qi <yao@codesourcery.com>
15064
15065 * event-loop.c: Include "queue.h".
15066 (gdb_event_p): New typedef.
15067 (struct gdb_event) <next_event>: Remove.
15068 (event_queue): Change to QUEUE(gdb_event_p).
15069 (async_queue_event): Remove.
15070 (gdb_event_xfree): New.
15071 (initialize_event_loop): New.
15072 (process_event): Use API from QUEUE.
15073 (wait_for_event): Likewise.
15074 * server.c (main): Call initialize_event_loop.
15075 * server.h (initialize_event_loop): Declare.
15076
15077 2013-01-18 Yao Qi <yao@codesourcery.com>
15078
15079 * ax.h (struct eval_agent_expr_context): New.
15080 (gdb_eval_agent_expr): Update declaration.
15081 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
15082 TFRAME. Add new argument CTX.
15083 * server.h (struct eval_agent_expr_context): Declare.
15084 (agent_mem_read, agent_tsv_read): Update declaration.
15085 (agent_mem_read_string): Likewise.
15086 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
15087 (add_traceframe_block): Add new argument TPOINT.
15088 Increase TPOINT->traceframe_usage.
15089 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
15090 eval_tracepoint_agent_expr.
15091 (condition_true_at_tracepoint): Likewise.
15092 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
15093 (agent_mem_read_string, agent_tsv_read): Likewise.
15094
15095 2013-01-16 Yao Qi <yao@codesourcery.com>
15096
15097 * linux-low.c (linux_resume_one_lwp): Don't check
15098 'lwp->bp_reinsert != 0'.
15099
15100 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15101 Pedro Alves <palves@redhat.com>
15102
15103 * lynx-low.c (ptrace_request_to_str): Define a temporary
15104 macro and use it to simplify this function's implementation.
15105
15106 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15107
15108 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
15109 sets errno.
15110
15111 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15112
15113 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
15114
15115 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15116
15117 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
15118
15119 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15120
15121 * lynx-low.c (lynx_resume): Use the resume_info parameter
15122 to determine the ptid for the lynx_ptrace call, unless
15123 it is equal to minus_one_ptid, in which case we use the
15124 ptid of the current_inferior.
15125 (lynx_wait_1): After having received a thread create/exit
15126 event, resume the inferior's execution using the signaling
15127 thread's ptid, rather than the old ptid.
15128
15129 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15130
15131 * lynx-low.c (lynx_resume): Delete variable ret.
15132
15133 2013-01-01 Joel Brobecker <brobecker@adacore.com>
15134
15135 * gdbreplay.c (gdbreplay_version): Update copyright year.
15136 * server.c (gdbserver_version): Likewise.
15137
15138 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15139
15140 * lynx-low.c (lynx_wait_1): Add debug trace before adding
15141 new thread.
15142
15143 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15144
15145 * lynx-low.c (ptrace_request_to_str): Add handling for
15146 PTRACE_GETTRACESIG.
15147
15148 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15149
15150 * lynx-low.c (lynx_attach): Delete variable new_process.
15151
15152 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15153
15154 * lynx-low.c (lynx_create_inferior): Delete variable
15155 new_process.
15156
15157 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15158
15159 * lynx-low.c (ptrace_request_to_str): Do not handle
15160 PTRACE_GETTHREADLIST if this macro does not exist.
15161
15162 2012-12-15 Yao Qi <yao@codesourcery.com>
15163
15164 * Makefile.in (OBS): Add notif.o.
15165 * notif.c, notif.h: New.
15166 * server.c: Include "notif.h".
15167 (struct vstop_notif) <next>: Remove.
15168 <base>: New field.
15169 (queue_stop_reply): Update.
15170 (push_event, send_next_stop_reply): Remove.
15171 (discard_queued_stop_replies): Update.
15172 (notif_stop): New variable.
15173 (handle_v_stopped): Remove.
15174 (handle_v_requests): Don't call handle_v_stopped. Call
15175 handle_ack_notif instead.
15176 (queue_stop_reply_callback): Call notif_event_enque instead
15177 of queue_stop_reply.
15178 (handle_status): Don't call send_next_stop_reply, call
15179 notif_write_event instead.
15180 (kill_inferior_callback): Likewise.
15181 (detach_or_kill_inferior_callback): Likewise.
15182 (main): Call initialize_notif.
15183 (process_serial_event): Call QUEUE_is_empty.
15184 (handle_target_event): Call notif_push instead of push event.
15185 * server.h (push_event): Remove declaration.
15186
15187 2012-12-10 Tom Tromey <tromey@redhat.com>
15188
15189 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
15190 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
15191 macros.
15192 (.c.o): Rewrite.
15193 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
15194 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
15195 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
15196 (amd64-linux-ipa.o, ax.o): Rewrite.
15197 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
15198 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
15199 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
15200 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
15201 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
15202 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
15203 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
15204 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
15205 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
15206 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
15207 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
15208 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
15209 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
15210 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
15211 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
15212 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
15213 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
15214 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
15215 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
15216 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
15217 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
15218 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
15219 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
15220 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
15221 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
15222 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
15223 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
15224 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
15225 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
15226 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
15227 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
15228 (reg-tilegx.o): Remove.
15229 (all_object_files): New macro.
15230 Include .deps files.
15231 * aclocal.m4, configure: Rebuild.
15232 * acinclude.m4: Include depstand.m4, lead-dot.m4.
15233 * configure.ac: Invoke ZW_CREATE_DEPDIR,
15234 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
15235
15236 2012-12-05 Tom Tromey <tromey@redhat.com>
15237
15238 PR gdb/14917:
15239 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
15240
15241 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
15242
15243 * configure.ac: Check for linux/perf_event.h.
15244 * config.in: Regenerated.
15245 * configure: Regenerated.
15246
15247 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
15248
15249 * hostio.c (handle_readlink): Decrease buffer size
15250 parameter passed to readlink by one byte.
15251
15252 2012-11-26 Yao Qi <yao@codesourcery.com>
15253
15254 * configure.ac (build_warnings): Append '-Wempty-body'.
15255 * configure: Regenerated.
15256 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
15257 body.
15258
15259 2012-11-15 Pierre Muller <muller@sourceware.org>
15260
15261 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
15262 * config.in: Regenerate.
15263 * configure: Regenerate.
15264 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15265 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15266 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15267 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15268 header.
15269 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15270 instead of <sys/wait.h> header.
15271 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15272
15273 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15274
15275 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15276 (various make rules): Remove -DGDBSERVER
15277
15278 2012-11-09 Yao Qi <yao@codesourcery.com>
15279
15280 * spu-low.c (current_ptid): Move it to ..
15281 * gdbthread.h: ... here. New.
15282 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15283 * server.c (myresume, process_serial_event): Likewise.
15284 * thread-db.c (thread_db_find_new_threads): Likewise.
15285 * tracepoint.c (run_inferior_command): Likewise.
15286
15287 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15288
15289 * server.c (handle_search_memory_1): Include access length in
15290 warning message.
15291
15292 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15293
15294 * linux-crisv32-low.c: Fix compile errors.
15295
15296 2012-09-04 Yao Qi <yao@codesourcery.com>
15297
15298 * tracepoint.c (cmd_qtsv): Adjust debug message.
15299 Don't check CUR_TPOINT.
15300
15301 2012-08-28 Yao Qi <yao@codesourcery.com>
15302
15303 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15304 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15305 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15306 Remove declarations of xmalloc, xreallloc, xstrdup and
15307 freeargv.
15308 * Makefile.in (libiberty_h): New.
15309 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15310 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15311
15312 2012-08-23 Yao Qi <yao@codesourcery.com>
15313
15314 * server.h: Remove declaration of 'xsnprintf'.
15315
15316 2012-08-22 Keith Seitz <keiths@redhat.com>
15317
15318 * server.h: Include build-gnulib-gbserver/config.h.
15319 * gdbreplay.c: Likewise.
15320
15321 2012-08-08 Doug Evans <dje@google.com>
15322
15323 * Makefile.in (SFILES): Add gdb_vecs.c.
15324 (OBS): Add gdb_vecs.o.
15325 (gdb_vecs_h, host_defs_h): New variables.
15326 (thread-db.o): Add $(gdb_vecs_h) dependency.
15327 (gdb_vecs.o): New rule.
15328 * thread-db.c: #include "gdb_vecs.h".
15329 (thread_db_load_search): Use a vector to iterate over path elements.
15330 Handle text appearing after "$pdir".
15331
15332 * configure.ac: Add check for strstr.
15333 * config.in: Regenerate.
15334 * configure: Regenerate.
15335
15336 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15337
15338 * hostio.c (handle_pread): If pread fails, fall back to attempting
15339 lseek/read.
15340 (handle_pwrite): Likewise for pwrite.
15341
15342 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15343
15344 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15345 between unsupported TYPE and unimplementable ADDR/LEN combination.
15346 (arm_insert_point): Act on new return value.
15347
15348 2012-07-31 Pedro Alves <palves@redhat.com>
15349
15350 * server.c (process_point_options): Only skip tokens if we find
15351 one that is unrecognized. Don't treat 'X' specially while
15352 skipping unrecognized tokens.
15353
15354 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15355
15356 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15357 to 4-byte-align HW breakpoint addresses for Thumb.
15358
15359 2012-07-27 Yao Qi <yao@codesourcery.com>
15360
15361 PR remote/14161.
15362
15363 * server.h: Declare gdb_agent_about_to_close.
15364 * target.c (kill_inferior): Include "agent.h".
15365 New. Send command 'kill'.
15366 * target.h (kill_inferior): Removed macro.
15367 * tracepoint.c (gdb_agent_about_to_close): New.
15368 (gdb_agent_helper_thread): Handle command 'close'.
15369 Wait endlessly until the inferior stops.
15370 Install gdb_agent_remove_socket to atexit hook.
15371 (agent_socket_name): New static variable.
15372 (gdb_agent_socket_init): Replace local variable 'name' with
15373 'agent_socket_name'.
15374 (gdb_agent_remove_socket): New.
15375
15376 2012-07-27 Yao Qi <yao@codesourcery.com>
15377
15378 * server.c (process_point_options): Stop at 'X' when parsing.
15379
15380 2012-07-19 Michael Eager <eager@eagercon.com>
15381
15382 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15383 to hw_execute.
15384 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15385 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15386 hardware breakpoint.
15387
15388 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15389
15390 * gdbserver/linux-low.c (initialize_low): Call
15391 linux_ptrace_init_warnings.
15392
15393 2012-07-02 Doug Evans <dje@google.com>
15394
15395 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15396 pointer to int.
15397
15398 2012-07-02 Stan Shebs <stan@codesourcery.com>
15399
15400 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15401 (ax.o): Add it to build rule.
15402 (ax-ipa.o): Ditto.
15403 (OBS): Add format.o.
15404 (IPA_OBS): Add format.o.
15405 * server.c (handle_query): Claim support for breakpoint commands.
15406 (process_point_options): Add command case.
15407 (process_serial_event): Leave running if there are printfs in
15408 effect.
15409 * mem-break.h (any_persistent_commands): Declare.
15410 (add_breakpoint_commands): Declare.
15411 (gdb_no_commands_at_breakpoint): Declare.
15412 (run_breakpoint_commands): Declare.
15413 * mem-break.c (struct point_command_list): New struct.
15414 (struct breakpoint): New field command_list.
15415 (any_persistent_commands): New function.
15416 (add_commands_to_breakpoint): New function.
15417 (add_breakpoint_commands): New function.
15418 (gdb_no_commands_at_breakpoint): New function.
15419 (run_breakpoint_commands): New function.
15420 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15421 locally.
15422 * ax.c: Include format.h.
15423 (ax_printf): New function.
15424 (gdb_eval_agent_expr): Add printf opcode.
15425
15426 2012-06-13 Yao Qi <yao@codesourcery.com>
15427
15428 * server.c (start_inferior): Remove duplicated writes to fields
15429 'last_resume_kind' and 'last_status' of 'current_inferior'.
15430
15431 2012-06-12 Yao Qi <yao@codesourcery.com>
15432 Pedro Alves <palves@redhat.com>
15433
15434 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15435 comment.
15436 * server.c (handle_v_cont): Extend comment.
15437
15438 2012-06-11 Yao Qi <yao@codesourcery.com>
15439
15440 * linux-low.c (linux_attach): Add 'static'.
15441
15442 2012-06-06 Yao Qi <yao@codesourcery.com>
15443
15444 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15445
15446 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15447
15448 Fix gcc -flto compilation warning.
15449 * server.c (main): Make variable multi_mode and attach volatile.
15450
15451 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15452
15453 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15454 if the platform doesn't know about it.
15455
15456 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15457
15458 * Makefile.in (SFILES): Add linux-tile-low.c.
15459 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15460 * configure.srv: Handle tilegx-*-linux*.
15461 * linux-tile-low.c: New file.
15462
15463 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15464
15465 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15466
15467 2012-05-24 Pedro Alves <palves@redhat.com>
15468
15469 PR gdb/7205
15470
15471 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15472
15473 2012-05-24 Pedro Alves <palves@redhat.com>
15474
15475 PR gdb/7205
15476
15477 Replace target_signal with gdb_signal throughout.
15478
15479 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15480
15481 * linux-low.c (linux_store_registers): Avoid the copying sequence
15482 when no data has been retrieved by ptrace.
15483
15484 2012-05-22 Will Deacon <will.deacon@arm.com>
15485
15486 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15487 Include asm/ptrace.h.
15488 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15489 already defined.
15490
15491 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15492
15493 * linux-low.c (linux_store_registers): Don't re-retrieve data
15494 with ptrace that has already been obtained from /proc. Always
15495 copy any data retrieved with ptrace to the buffer supplied.
15496
15497 2012-05-11 Yao Qi <yao@codesourcery.com>
15498 Pedro Alves <palves@redhat.com>
15499
15500 * linux-low.c (enum stopping_threads_kind): New.
15501 (stopping_threads): Change type to `enum stopping_threads_kind'.
15502 (handle_extended_wait): If stopping and suspending threads, leave
15503 the new_lwp suspended too.
15504 (linux_wait_for_event): Adjust.
15505 (stop_all_lwps): Set `stopping_threads' to
15506 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15507 whether we're suspending threads or just stopping them. Assert no
15508 recursion happens.
15509
15510 2012-04-29 Yao Qi <yao@codesourcery.com>
15511
15512 * server.h: Move some code to ...
15513 * gdbthread.h: ... here. New.
15514 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15515 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15516 (nto-low.o, win32-low.o): Likewise.
15517 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15518 * regcache.c, remote-utils.c, server.c: Likewise.
15519 * target.c, tracepoint.c, win32-low.c: Likewise.
15520
15521 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15522
15523 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15524 (PTRACE_ARG4_TYPE): Likewise.
15525 (PTRACE_XFER_TYPE): Likewise.
15526 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15527 ptrace to PTRACE_ARG3_TYPE.
15528 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15529 (PTRACE_ARG4_TYPE): Likewise.
15530 (PTRACE_XFER_TYPE): Likewise.
15531 (linux_detach_one_lwp): Cast fourth argument of
15532 ptrace to long then PTRACE_ARG4_TYPE.
15533 (regsets_fetch_inferior_registers): Cast third argument of
15534 ptrace to long then PTRACE_ARG3_TYPE.
15535 (regsets_store_inferior_registers): Likewise.
15536
15537 2012-04-20 Pedro Alves <palves@redhat.com>
15538
15539 * configure: Regenerate.
15540
15541 2012-04-19 Pedro Alves <palves@redhat.com>
15542
15543 * Makefile.in (GNULIB_BUILDDIR): New.
15544 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15545 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15546 (all, install-only, uninstall, clean-info, all-lib, clean): No
15547 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15548 (maintainer-clean realclean distclean): Use subdir_do.
15549 (subdir_do): New.
15550 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15551 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15552 * acinclude.m4: Include acx_configure_dir.m4.
15553 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15554 calls. Call AC_PROG_RANLIB. Configure gnulib using
15555 ACX_CONFIGURE_DIR.
15556 (GNULIB): New.
15557 (GNULIB_STDINT_H): Adjust.
15558 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15559 * gdbreplay.c: Include build-gnulib/config.h.
15560 * server.h: Likewise.
15561 * aclocal.m4: Regenerate.
15562 * config.in: Regenerate.
15563 * configure: Regenerate.
15564
15565 2012-04-19 Pedro Alves <palves@redhat.com>
15566
15567 * Makefile.in (LIBGNU, INCGNU): Adjust.
15568 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15569 (all, install-only, uninstall, clean-info, all-lib, clean)
15570 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15571 * configure.ac: Adjust AC_OUTPUT output.
15572 * aclocal.m4: Regenerate.
15573 * configure: Regenerate.
15574
15575 2012-04-19 Pedro Alves <palves@redhat.com>
15576
15577 * Makefile.in (generated_files): New.
15578 (server_h): Remove the explicit dependency on config.h, and depend
15579 on $generated_files.
15580
15581 2012-04-19 Pedro Alves <palves@redhat.com>
15582
15583 * Makefile.in (INCGNU): Add -Ignulib.
15584
15585 2012-04-19 Pedro Alves <palves@redhat.com>
15586
15587 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15588 (INCGNU): ... this, and spell out -I here.
15589 (GNULIB_LIB): Rename to ...
15590 (LIBGNU): ... this.
15591 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15592
15593 2012-04-19 Pedro Alves <palves@redhat.com>
15594
15595 * config.in: Regenerate.
15596
15597 2012-04-19 Pedro Alves <palves@redhat.com>
15598
15599 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15600 * server.h (memmem): Remove declaration.
15601 * config.in: Regenerate.
15602 * configure: Regenerate.
15603
15604 2012-04-19 Yao Qi <yao@codesourcery.com>
15605
15606 * Makefile.in (SFILES): Add common/vec.c.
15607 (OBS): Add vec.o.
15608 (vec.o): New rule.
15609
15610 2012-04-19 Yao Qi <yao@codesourcery.com>
15611
15612 * remote-utils.c (prepare_resume_reply): Replace with macro
15613 target_core_of_thread.
15614 * server.c (handle_qxfer_threads_proper): Likewise.
15615 * target.h (traget_core_of_thread): New macro.
15616
15617 2012-04-18 Pedro Alves <palves@redhat.com>
15618
15619 * aclocal.m4: Regenerate.
15620 * configure: Regenerate.
15621
15622 2012-04-16 Yao Qi <yao@codesourcery.com>
15623
15624 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15625 duplicated on address.
15626
15627 2012-04-16 Yao Qi <yao@codesourcery.com>
15628
15629 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15630 (struct tracepoint_action_ops) <send>: New field.
15631 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15632 (agent_expr_send, x_tracepoint_action_send): New.
15633 (l_tracepoint_action_send): New.
15634 (cmd_qtdp): Download and install tracepoint
15635 according to `use_agent'.
15636 (run_inferior_command): Add one more parameter `len'.
15637 Update callers.
15638 (tracepoint_send_agent): New.
15639 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15640
15641 2012-04-16 Yao Qi <yao@codesourcery.com>
15642
15643 * tracepoint.c (download_tracepoints): Moved to ...
15644 (cmd_qtstart): ... here.
15645
15646 2012-04-14 Yao Qi <yao@codesourcery.com>
15647
15648 * tracepoint.c: Include inttypes.h.
15649 (struct collect_memory_action): Use sized types.
15650 (struct tracepoint): Likewise.
15651 (cmd_qtdp, stop_tracing): Update print specifiers.
15652 (cmd_qtp, response_tracepoint): Likewise.
15653 (collect_data_at_tracepoint): Likewise.
15654 (collect_data_at_step): Likewise.
15655
15656 2012-04-14 Yao Qi <yao@codesourcery.com>
15657
15658 Import gnulib module inttypes.
15659 * aclocal.m4, config.in, configure: Regenerated.
15660
15661 2012-04-14 Yao Qi <yao@codesourcery.com>
15662
15663 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15664 Makefile and config.status at last.
15665
15666 2012-04-13 Yao Qi <yao@codesourcery.com>
15667
15668 * tracepoint.c: Include stdint.h unconditionally.
15669
15670 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15671
15672 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15673 on BFD_HAVE_SYS_PROCFS_TYPE.
15674 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15675 * configure: Regenerate.
15676 * config.in: Likewise.
15677
15678 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15679
15680 * Makefile.in (clean): Also remove x32.c x32-linux.c
15681 x32-avx.c x32-avx-linux.c.
15682 (x32.o): New target.
15683 (x32.c): Likewise.
15684 (x32-linux.o): Likewise.
15685 (x32-linux.c): Likewise.
15686 (x32-avx.o): Likewise.
15687 (x32-avx.c): Likewise.
15688 (x32-avx-linux.o): Likewise.
15689 (x32-avx-linux.c): Likewise.
15690
15691 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15692 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15693 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15694 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15695 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15696 i386/x32-avx-linux.xml.
15697
15698 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15699 (init_registers_x32_avx_linux): Likwise.
15700 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15701 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15702
15703 2012-04-13 Pedro Alves <palves@redhat.com>
15704
15705 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15706 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15707 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15708 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15709 the sub-make.
15710
15711 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15712
15713 * linux-x86-low.c (compat_x32_clock_t): New.
15714 (compat_x32_siginfo_t): Likewise.
15715 (compat_x32_siginfo_from_siginfo): Likewise.
15716 (siginfo_from_compat_x32_siginfo): Likewise.
15717 (linux_is_elf64): Likewise.
15718 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15719 and siginfo_from_compat_x32_siginfo for x32.
15720 (x86_arch_setup): Set linux_is_elf64.
15721
15722 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15723
15724 PR gdb/13969
15725 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15726 e_machine field.
15727 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15728 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15729 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15730 compatible with process.
15731
15732 2012-04-12 Yao Qi <yao@codesourcery.com>
15733
15734 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15735 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15736 (install-only, install-info, clean): Handle sub dir gnulib.
15737 (all-lib, am--refresh): New targets.
15738 (memmem.o): Remove target.
15739 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15740 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15741 (AC_REPLACE_FUNCS): Remove memmem.
15742 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15743 (AC_OUTPUT): Generate Makefile in gnulib/.
15744 * aclocal.m4, config.in, configure: Regenerated.
15745
15746 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15747
15748 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15749
15750 2012-04-05 Pedro Alves <palves@redhat.com>
15751
15752 -Werror=strict-aliasing
15753
15754 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15755 pointer.
15756
15757 2012-04-04 Pedro Alves <palves@redhat.com>
15758
15759 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15760 (sparc_store_gregset_from_stack, sparc_store_gregset)
15761 (sparc_breakpoint_at): Fix formatting.
15762
15763 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15764
15765 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15766 are available.
15767 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15768 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15769 * config.in: Regenerate.
15770 * configure: Likewise.
15771
15772 2012-03-29 Pedro Alves <palves@redhat.com>
15773
15774 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15775 Correct ptrace arguments.
15776
15777 2012-03-28 Pedro Alves <palves@redhat.com>
15778
15779 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15780 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15781 (IA64_FR1_REGNUM): New defines.
15782 (ia64_fetch_register): New.
15783 (the_low_target): Install it.
15784 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15785 field.
15786 * linux-low.c (linux_fetch_registers): Try the
15787 the_low_target.fetch_register hook first.
15788
15789 * linux-arm-low.c (the_low_target): Adjust.
15790 * linux-bfin-low.c (the_low_target): Adjust.
15791 * linux-cris-low.c (the_low_target): Adjust.
15792 * linux-crisv32-low.c (the_low_target): Adjust.
15793 * linux-m32r-low.c (the_low_target): Adjust.
15794 * linux-m68k-low.c (the_low_target): Adjust.
15795 * linux-mips-low.c (the_low_target): Adjust.
15796 * linux-ppc-low.c (the_low_target): Adjust.
15797 * linux-s390-low.c (the_low_target): Adjust.
15798 * linux-sh-low.c (the_low_target): Adjust.
15799 * linux-sparc-low.c (the_low_target): Adjust.
15800 * linux-tic6x-low.c (the_low_target): Adjust.
15801 * linux-x86-low.c (the_low_target): Adjust.
15802 * linux-xtensa-low.c (the_low_target): Adjust.
15803
15804 2012-03-26 Pedro Alves <palves@redhat.com>
15805
15806 * server.c (handle_qxfer_libraries): Don't bail early if
15807 the_target->qxfer_libraries_svr4 is not NULL.
15808
15809 2012-03-26 Pedro Alves <palves@redhat.com>
15810
15811 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15812
15813 2012-03-23 Pedro Alves <palves@redhat.com>
15814
15815 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15816 "library-list-svr4" element's start tag when the the DSO list is
15817 empty.
15818
15819 2012-03-23 Pedro Alves <palves@redhat.com>
15820
15821 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15822 a variable whose type size is the same as the inferior's pointer
15823 size.
15824
15825 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15826
15827 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15828 struct siginfo.
15829 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15830 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15831 * linux-low.h: Include <signal.h>.
15832 (struct siginfo): Remove forward declaration.
15833 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15834 struct siginfo.
15835
15836 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15837
15838 * .gitignore: Ignore more files.
15839
15840 2012-03-19 Pedro Alves <palves@redhat.com>
15841 Jan Kratochvil <jan.kratochvil@redhat.com>
15842
15843 * server.c (cont_thread, general_thread): Add describing comments.
15844 (start_inferior): Clear `cont_thread'.
15845 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15846 of a process.
15847
15848 2012-03-15 Yao Qi <yao@codesourcery.com>
15849
15850 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15851 handling to ...
15852 (cmd_qtdp): ... here.
15853
15854 2012-03-15 Yao Qi <yao@codesourcery.com>
15855
15856 * tracepoint.c (struct tracepoint_action_ops): New.
15857 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15858 (m_tracepoint_action_download): New.
15859 (r_tracepoint_action_download): New.
15860 (x_tracepoint_action_download): New.
15861 (l_tracepoint_action_download): New.
15862 (add_tracepoint_action): Install `action->ops' according type.
15863 (download_tracepoint_1): Move code `download' function pointer
15864 of various tracepoint_action_ops.
15865
15866 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15867
15868 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15869 linux_ptrace_attach_warnings.
15870
15871 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15872
15873 * Makefile.in (linux-ptrace.o): New.
15874 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15875 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15876 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15877 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15878 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15879 of these targets.
15880 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15881
15882 2012-03-08 Yao Qi <yao@codesourcery.com>
15883 Pedro Alves <palves@redhat.com>
15884
15885 Fix PR server/13392.
15886 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15887 offset of JMP insn.
15888 * tracepoint.c (remove_tracepoint): New.
15889 (cmd_qtdp): Call remove_tracepoint when failed to install.
15890
15891 2012-03-07 Pedro Alves <palves@redhat.com>
15892
15893 * linux-low.c (get_detach_signal): New.
15894 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15895 Pass on pending signals to PTRACE_DETACH. Check the result of the
15896 ptrace call.
15897 * server.c (program_signals, program_signals_p): New.
15898 (handle_general_set): Handle QProgramSignals.
15899 * server.h (program_signals, program_signals_p): Declare.
15900
15901 2012-03-05 Pedro Alves <palves@redhat.com>
15902 Jan Kratochvil <jan.kratochvil@redhat.com>
15903
15904 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15905 New comment why.
15906
15907 2012-03-03 Yao Qi <yao@codesourcery.com>
15908
15909 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15910 agent_look_up_symbols.
15911
15912 2012-03-03 Yao Qi <yao@codesourcery.com>
15913
15914 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15915 (linux-x86-low.o): Likewise.
15916 * server.h: Remove in_process_agent_loaded.
15917 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15918 common/agent.c.
15919 Update callers.
15920
15921 2012-03-03 Yao Qi <yao@codesourcery.com>
15922
15923 * tracepoint.c (gdb_agent_capability): New global.
15924 (in_process_agent_loaded_ust): Renamed to
15925 `in_process_agent_supports_ust'.
15926 Update callers.
15927 (in_process_agent_supports_ust): Call agent_capability_check.
15928 (clear_installed_tracepoints): Assert that agent supports
15929 agent.
15930
15931 2012-03-03 Yao Qi <yao@codesourcery.com>
15932
15933 * linux-low.c (linux_supports_agent): New.
15934 (linux_target_ops): Initialize field `supports_agent' with
15935 linux_supports_agent.
15936 * target.h (struct target_ops) <supports_agent>: New.
15937 (target_supports_agent): New macro.
15938 * server.c (handle_general_set): Handle packet 'QAgent'.
15939 (handle_query): Send `QAgent+'.
15940 * Makefile.in (server.o): Depends on agent.h.
15941
15942 2012-03-03 Yao Qi <yao@codesourcery.com>
15943
15944 * Makefile.in (OBS): Add agent.o.
15945 Add new rule for agent.o.
15946 Track dependence of tracepoint.c on agent.h.
15947 * tracepoint.c (run_inferior_command_1):
15948 (run_inferior_command): Call agent_run_command.
15949 (gdb_ust_connect_sync_socket): Deleted. Move it to
15950 common/agent.c.
15951 (resume_thread, stop_thread): Likewise.
15952 (gdb_ust_socket_init): Renamed to ...
15953 (gdb_agent_socket_init): ... New.
15954 (gdb_ust_thread): Renamed to ...
15955 (gdb_agent_helper_thread): ... New.
15956 (gdb_ust_init): Move some code to ...
15957 (gdb_agent_init): ... here. New.
15958 [HAVE_UST]: Call gdb_ust_init.
15959 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15960 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15961 * config.in, configure: Regenerated.
15962
15963 2012-03-02 Pedro Alves <palves@redhat.com>
15964
15965 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15966 * linux-low.c (struct simple_pid_list): New.
15967 (stopped_pids): New a struct simple_pid_list pointer.
15968 (add_to_pid_list, pull_pid_from_list): New.
15969 (handle_extended_wait): Don't assume the first signal new children
15970 report is SIGSTOP. Adjust call to pull_pid_from_list.
15971 (linux_wait_for_lwp): Adjust.
15972
15973 2012-03-02 Yao Qi <yao@codesourcery.com>
15974
15975 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15976 debug log.
15977
15978 2012-03-02 Yao Qi <yao@codesourcery.com>
15979
15980 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15981 `stop_pc' and `tpoint'. Update caller.
15982
15983 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15984
15985 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15986 * linux-low.c (use_linux_regsets): New macro.
15987 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15988 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15989 (linux_register_in_regsets): New function.
15990 (usr_fetch_inferior_registers): Skip registers covered by
15991 regsets.
15992 (usr_store_inferior_registers): Likewise.
15993 (usr_fetch_inferior_registers): New macro.
15994 (usr_store_inferior_registers): Likewise.
15995 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15996 (linux_store_registers): Likewise.
15997 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15998 prototype.
15999 (init_registers_mips64_dsp_linux): Likewise.
16000 (init_registers_mips_linux): New macro.
16001 (init_registers_mips_dsp_linux): Likewise.
16002 (mips_dsp_num_regs): Likewise.
16003 (DSP_BASE, DSP_CONTROL): New fallback macros.
16004 (mips_base_regs): New macro.
16005 (mips_regmap): Use it. Fix the size.
16006 (mips_dsp_regmap): New variable.
16007 (mips_dsp_regset_bitmap): Likewise.
16008 (mips_arch_setup): New function.
16009 (mips_cannot_fetch_register): Use the_low_target.regmap rather
16010 than mips_regmap.
16011 (mips_cannot_store_register): Likewise.
16012 (the_low_target): Update .arch_setup, .num_regs and .regmap
16013 initializers. Add .regset_bitmap initializer.
16014 * linux-arm-low.c (the_low_target): Add .regset_bitmap
16015 initializer.
16016 * linux-bfin-low.c (the_low_target): Likewise.
16017 * linux-cris-low.c (the_low_target): Likewise.
16018 * linux-crisv32-low.c (the_low_target): Likewise.
16019 * linux-ia64-low.c (the_low_target): Likewise.
16020 * linux-m32r-low.c (the_low_target): Likewise.
16021 * linux-m68k-low.c (the_low_target): Likewise.
16022 * linux-ppc-low.c (the_low_target): Likewise.
16023 * linux-s390-low.c (the_low_target): Likewise.
16024 * linux-sh-low.c (the_low_target): Likewise.
16025 * linux-sparc-low.c (the_low_target): Likewise.
16026 * linux-tic6x-low.c (the_low_target): Likewise.
16027 * linux-x86-low.c (the_low_target): Likewise.
16028 * linux-xtensa-low.c (the_low_target): Likewise.
16029 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
16030 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
16031 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
16032 srv_xmlfiles.
16033 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
16034 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
16035
16036 2012-02-29 Yao Qi <yao@codesourcery.com>
16037 Pedro Alves <palves@redhat.com>
16038
16039 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
16040 `step_over_finished' is true.
16041
16042 2012-02-27 Pedro Alves <palves@redhat.com>
16043
16044 * linux-low.c (pid_is_stopped): Delete, moved to common/.
16045 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
16046
16047 2012-02-27 Pedro Alves <palves@redhat.com>
16048
16049 PR server/9684
16050 * linux-low.c (pid_is_stopped): New.
16051 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
16052
16053 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
16054
16055 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
16056 of conditions.
16057
16058 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
16059
16060 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
16061
16062 2012-02-24 Luis Machado <lgustavo@codesourcery>
16063
16064 * server.c (handle_query): Advertise support for target-side
16065 breakpoint condition evaluation.
16066 (process_point_options): New function.
16067 (process_serial_event): When inserting a breakpoint, check for
16068 a target-side condition that should be evaluated.
16069
16070 * mem-break.c: Include regcache.h and ax.h.
16071 (point_cond_list_t): New data structure.
16072 (breakpoint) <cond_list>: New field.
16073 (find_gdb_breakpoint_at): Make non-static.
16074 (delete_gdb_breakpoint_at): Clear any target-side
16075 conditions.
16076 (clear_gdb_breakpoint_conditions): New function.
16077 (add_condition_to_breakpoint): Likewise.
16078 (add_breakpoint_condition): Likewise.
16079 (gdb_condition_true_at_breakpoint): Likewise.
16080 (gdb_breakpoint_here): Return result directly instead
16081 of going through a local variable.
16082
16083 * mem-break.h (find_gdb_breakpoint_at): New prototype.
16084 (clear_gdb_breakpoint_conditions): Likewise.
16085 (add_breakpoint_condition): Likewise.
16086 (gdb_condition_true_at_breakpoint): Likewise.
16087
16088 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
16089 (need_step_over_p): Take target-side breakpoint condition into
16090 consideration.
16091
16092 2012-02-24 Luis Machado <lgustavo@codesourcery>
16093
16094 * server.h: Include tracepoint.h.
16095 (agent_mem_read, agent_get_trace_state_variable_value,
16096 agent_set_trace_state_variable_value,
16097 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
16098 get_set_tsv_func_addr): New prototypes.
16099
16100 * ax.h: New include file.
16101 * ax.c: New source file.
16102
16103 * tracepoint.c: Include ax.h.
16104 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
16105 agent_expr, eval_result_type): Move to ax.h.
16106 (parse_agent_expr): Rename to ...
16107 (gdb_parse_agent_expr): ... this, make it non-static and move
16108 to ax.h.
16109 (unparse_agent_expr) Rename to ...
16110 (gdb_unparse_agent_expr): ... this, make it non-static and move
16111 to ax.h.
16112 (eval_agent_expr): Rename to ...
16113 (eval_tracepoint_agent_expr): ... this.
16114 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
16115 forward declarations.
16116 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
16117 (agent_get_trace_state_variable_value): New function.
16118 (agent_set_trace_state_variable_value): New function.
16119 (cmd_qtdp): Call gdb_parse_agent_expr (...).
16120 (response_tracepoint): Call gdb_unparse_agent_expr (...).
16121 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
16122 (condition_true_at_tracepoint): Likewise.
16123 (parse_agent_expr): Rename to ...
16124 (gdb_parse_agent_expr): ... this and move to ax.c.
16125 (unparse_agent_expr): Rename to ...
16126 (gdb_unparse_agent_expr): ... this and move to ax.c.
16127 (gdb_agent_op_name): Move to ax.c.
16128 (eval_agent_expr): Rename to ...
16129 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
16130 and move to ax.c.
16131 (eval_tracepoint_agent_expr): New function.
16132 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
16133 non-static.
16134 (current_insn_ptr, emit_error, struct bytecode_address): Move to
16135 ax.c.
16136 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
16137 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
16138 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
16139 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
16140 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
16141 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
16142 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
16143 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
16144 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
16145 (compile_bytecodes): Remove forward declaration.
16146 (is_goto_target): Move to ax.c.
16147 (compile_bytecodes): Move to ax.c and call
16148 agent_get_trace_state_variable_value (...) and
16149 agent_set_trace_state_variable_value (...).
16150
16151 * Makefile.in: Update ax.c and IPA dependencies.
16152
16153 2012-02-24 Pedro Alves <palves@redhat.com>
16154
16155 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
16156 (cmd_bigqtbuffer_circular): ... this. Only handle
16157 'QTBuffer:circular:'.
16158 (handle_tracepoint_general_set): Adjust.
16159
16160 2012-02-16 Yao Qi <yao@codesourcery.com>
16161
16162 * inferiors.c: Move code to ...
16163 * dll.c: .... here. New.
16164 * server.h: Declare clear_dlls.
16165 * Makefile.in (SFILES): Add dll.c.
16166 (OBS): Add dll.o
16167 (dll.o): New rule.
16168
16169 2012-02-11 Yao Qi <yao@codesourcery.com>
16170
16171 * server.c: (handle_monitor_command): Add a new parameter
16172 `own_buf'.
16173 (handle_query): Update caller.
16174
16175 2012-02-09 Joel Brobecker <brobecker@adacore.com>
16176
16177 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
16178 * configure, config.in: Regenerate.
16179 * hostio.c: Provide an alternate implementation if HAVE_READLINK
16180 is not defined.
16181
16182 2012-02-02 Pedro Alves <palves@redhat.com>
16183
16184 Try SIGKILL first, then PTRACE_KILL.
16185 * linux-low.c (linux_kill_one_lwp): New.
16186 (linux_kill_one_lwp): Rename to ...
16187 (kill_one_lwp_callback): ... this. Use the new
16188 linux_kill_one_lwp.
16189
16190 2012-02-02 Pedro Alves <palves@redhat.com>
16191
16192 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
16193 inferior.
16194
16195 2012-01-27 Pedro Alves <palves@redhat.com>
16196
16197 * linux-low.c (linux_child_pid_to_exec_file): Delete.
16198 (elf_64_file_p): Make static.
16199 (linux_pid_exe_is_elf_64_file): New.
16200 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
16201 Delete declarations.
16202 (linux_pid_exe_is_elf_64_file): Declare.
16203 * linux-x86-low.c (x86_arch_setup): Use
16204 linux_pid_exe_is_elf_64_file.
16205
16206 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16207
16208 * linux-low.c (linux_wait_for_event_1): Rename to ...
16209 (linux_wait_for_event): ... here and merge it with former
16210 linux_wait_for_event - new variable wait_ptid, use it.
16211 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
16212
16213 2012-01-23 Pedro Alves <palves@redhat.com>
16214
16215 * server.c (main): Avoid yet another case of infinite loop while
16216 detaching/killing after a longjmp.
16217
16218 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16219
16220 Code cleanup.
16221 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
16222
16223 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
16224
16225 * hostio.c (handle_readlink): New function.
16226 (handle_vFile): Call it to handle "vFile:readlink" packets.
16227
16228 2012-01-20 Pedro Alves <palves@redhat.com>
16229 Ulrich Weigand <ulrich.weigand@linaro.org>
16230
16231 * server.c (handle_v_requests): Only support vAttach and vRun to
16232 start multiple processes when in extended protocol mode.
16233
16234 2012-01-17 Pedro Alves <palves@redhat.com>
16235
16236 * tracepoint.c (initialize_tracepoint): Use mmap instead of
16237 memalign plus mprotect to allocate the scratch buffer.
16238
16239 2012-01-13 Pedro Alves <palves@redhat.com>
16240
16241 * server.c (attach_inferior): Clear `cont_thread'.
16242
16243 2012-01-13 Pedro Alves <palves@redhat.com>
16244
16245 * server.c (main): Avoid infinite loop while detaching/killing
16246 after a longjmp.
16247
16248 2012-01-09 Doug Evans <dje@google.com>
16249
16250 * server.c (start_inferior): Set last_ptid in --wrapper case.
16251
16252 2012-01-06 Yao Qi <yao@codesourcery.com>
16253
16254 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
16255 defined.
16256 [IN_PROCESS_AGENT] (debug_agent): New global variable.
16257
16258 2012-01-04 Yao Qi <yao@codesourcery.com>
16259
16260 * tracepoint.c (cmd_qtdp): Print debug message
16261 for static tracepoint.
16262
16263 2012-01-04 Yao Qi <yao@codesourcery.com>
16264
16265 * tracepoint.c (trace_vdebug): Differentiate debug message
16266 between gdbserver and IPA.
16267
16268 2012-01-03 Yao Qi <yao@codesourcery.com>
16269
16270 * tracepoint.c (tracepoint_was_hit): Don't collect for
16271 static tracepoint.
16272
16273 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16274
16275 * terminal.h: Reformat copyright header.
16276
16277 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16278
16279 * server.c (gdbserver_version): Update copyright year.
16280 * gdbreplay.c (gdbreplay_version): Likewise.
16281
16282 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16283
16284 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16285
16286 Revert:
16287 2011-12-18 Hui Zhu <teawater@gmail.com>
16288 * linux-low.c (linux_create_inferior): Save return value to ret.
16289
16290 2011-12-18 Hui Zhu <teawater@gmail.com>
16291
16292 * linux-low.c (linux_create_inferior): Save return value to ret.
16293
16294 2011-12-16 Doug Evans <dje@google.com>
16295
16296 * linux-low.c (linux_create_inferior): If stdio connection,
16297 redirect stdin from /dev/null, stdout to stderr.
16298 * remote-utils.c (remote_is_stdio): New static global.
16299 (remote_connection_is_stdio): New function.
16300 (remote_prepare): Handle stdio connection.
16301 (remote_open): Ditto.
16302 (remote_close): Don't close stdin for stdio connections.
16303 (read_prim,write_prim): New functions. Replace all calls to
16304 read/write to these.
16305 * server.c (main): Watch for "-" argument. Move call to
16306 remote_prepare before start_inferior.
16307 * server.h (STDIO_CONNECTION_NAME): New macro.
16308 (remote_connection_is_stdio): Declare.
16309
16310 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16311 in debugging output.
16312
16313 2011-12-15 Yao Qi <yao@codesourcery.com>
16314
16315 * tracepoint.c: Include sys/syscall.h.
16316 (gdb_ust_thread): Remove preprocessor conditional.
16317
16318 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16319
16320 * linux-low.c (linux_detach_one_lwp): Call
16321 the_low_target.prepare_to_resume before detaching.
16322
16323 2011-12-14 Yao Qi <yao@codesourcery.com>
16324
16325 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16326 of write.
16327
16328 2011-12-14 Yao Qi <yao@codesourcery.com>
16329
16330 * i386-low.c (i386_low_stopped_data_address): Initialize local
16331 variable `control'.
16332
16333 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16334
16335 PR remote/13492
16336
16337 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16338 DR_CONTROL unless necessary. Extend comments.
16339 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16340 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16341
16342 2011-12-13 Yao Qi <yao@codesourcery.com>
16343
16344 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16345 macros.
16346 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16347
16348 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16349
16350 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16351 Print new debug message for such case.
16352
16353 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16354
16355 Fix overlapping memcpy.
16356 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16357 the read_inferior_memory transfer.
16358 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16359 write_inferior_memory transfer.
16360 (set_fast_tracepoint_jump): New variable buf. Use it for the
16361 read_inferior_memory and write_inferior_memory transfers.
16362 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16363 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16364 Use it for the write_inferior_memory transfer.
16365 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16366 buffers.
16367
16368 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16369
16370 * linux-low.c (fetch_register, store_register): Make code
16371 consistent, fix formatting.
16372
16373 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16374
16375 * linux-low.c (usr_store_inferior_registers): Factor out code
16376 to handle individual registers into...
16377 (store_register): ... this new function.
16378
16379 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16380
16381 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16382 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16383 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16384 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16385 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16386 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16387 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16388 (srv_xmlfiles): Add new XML files.
16389
16390 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16391 and <sys/uio.h>.
16392 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16393 (init_registers_s390_linux32v1): Add prototype.
16394 (init_registers_s390_linux32v2): Likewise.
16395 (init_registers_s390_linux64v1): Likewise.
16396 (init_registers_s390_linux64v2): Likewise.
16397 (init_registers_s390x_linux64v1): Likewise.
16398 (init_registers_s390x_linux64v2): Likewise.
16399 (s390_num_regs): Increment to 52.
16400 (s390_regmap): Add orig_r2 register.
16401 (s390_num_regs_3264): Increment to 68.
16402 (s390_regmap_3264): Add orig_r2 register.
16403 (s390_collect_ptrace_register): Handle orig_r2 register.
16404 (s390_supply_ptrace_register): Likewise.
16405 (s390_fill_last_break): New function.
16406 (s390_store_last_break): Likewise.
16407 (s390_fill_system_call): New function.
16408 (s390_store_system_call): Likewise.
16409 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16410 register sets.
16411 (s390_check_regset): New function.
16412 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16413 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16414 Update target_regsets for available register sets.
16415
16416 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16417 Jan Kratochvil <jan.kratochvil@redhat.com>
16418
16419 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16420 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16421 New.
16422 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16423 * linux-low.h (struct process_info_private): New member r_debug.
16424 * server.c (handle_qxfer_libraries): Call
16425 the_target->qxfer_libraries_svr4.
16426 (handle_qxfer_libraries_svr4): New function.
16427 (qxfer_packets): New entry "libraries-svr4".
16428 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16429 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16430 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16431 PACKET_qXfer_libraries_svr4.
16432
16433 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16434
16435 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16436 PSW address/mask between 8-byte and 16-byte formats.
16437 (s390_supply_ptrace_register): Likewise.
16438 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16439 basic addressing mode bit.
16440
16441 2011-11-24 Stan Shebs <stan@codesourcery.com>
16442
16443 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16444
16445 2011-11-17 Stan Shebs <stan@codesourcery.com>
16446
16447 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16448 (tracing_start_time): New global.
16449 (tracing_stop_time): New global.
16450 (tracing_user_name): New global.
16451 (tracing_notes): New global.
16452 (tracing_stop_note): New global.
16453 (cmd_qtstart): Set traceframe_usage, start_time.
16454 (stop_tracing): Set stop_time.
16455 (cmd_qtstatus): Report additional status.
16456 (cmd_qtp): New function.
16457 (handle_tracepoint_query): Call it.
16458 (cmd_qtnotes): New function.
16459 (handle_tracepoint_general_set): Call it.
16460 (get_timestamp): Rename from tsv_get_timestamp.
16461
16462 2011-11-14 Stan Shebs <stan@codesourcery.com>
16463 Kwok Cheung Yeung <kcy@codesourcery.com>
16464
16465 * linux-x86-low.c (small_jump_insn): New.
16466 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16467 trampoline and error message, build a trampoline and issue a small
16468 jump instruction to it.
16469 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16470 trampoline and error message.
16471 (x86_get_min_fast_tracepoint_insn_len): New.
16472 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16473 * linux-low.h (struct linux_target_ops): Add arguments to
16474 install_fast_tracepoint_jump_pad operation, add new operation.
16475 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16476 arguments.
16477 (linux_get_min_fast_tracepoint_insn_len): New function.
16478 (linux_target_op): Add new operation.
16479 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16480 (gdb_trampoline_buffer_end): Ditto.
16481 (gdb_trampoline_buffer_error): Ditto.
16482 (struct ipa_sym_addresses): Add fields for new IPA variables.
16483 (symbol_list): Add entries for new IPA variables.
16484 (struct tracepoint): Add fields to hold the address range of the
16485 trampoline used by the tracepoint.
16486 (trampoline_buffer_head): New static variable.
16487 (trampoline_buffer_tail): Ditto.
16488 (claim_trampoline_space): New function.
16489 (have_fast_tracepoint_trampoline_buffer): New function.
16490 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16491 structure.
16492 (install_fast_tracepoint): Ditto, also add error buffer argument.
16493 (cmd_qtminftpilen): New function.
16494 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16495 (fast_tracepoint_from_trampoline_address): New function.
16496 (fast_tracepoint_collecting): Handle trampoline as part of jump
16497 pad space.
16498 (set_trampoline_buffer_space): New function.
16499 (initialize_tracepoint): Initialize new IPA variables.
16500 * target.h (struct target_ops): Add arguments to
16501 install_fast_tracepoint_jump_pad operation, add new
16502 get_min_fast_tracepoint_insn_len operation.
16503 (target_get_min_fast_tracepoint_insn_len): New.
16504 (install_fast_tracepoint_jump_pad): Add arguments.
16505 * server.h (IPA_BUFSIZ): Define.
16506 * linux-i386-ipa.c: Include extra header files.
16507 (initialize_fast_tracepoint_trampoline_buffer): New function.
16508 (initialize_low_tracepoint): Call it.
16509 * server.h (set_trampoline_buffer_space): Declare.
16510 (claim_trampoline_space): Ditto.
16511 (have_fast_tracepoint_trampoline_buffer): Ditto.
16512
16513 2011-11-14 Yao Qi <yao@codesourcery.com>
16514
16515 * server.c (handle_query): Handle InstallInTrace for qSupported.
16516 * tracepoint.c (add_tracepoint): Sort list.
16517 (install_tracepoint, download_tracepoint): New.
16518 (cmd_qtdp): Call them to install and download tracepoints.
16519 (sort_tracepoints): Removed.
16520 (cmd_qtstart): Update.
16521
16522 2011-11-14 Yao Qi <yao@codesourcery.com>
16523
16524 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16525 * mem-break.h: Declare.
16526 * tracepoint.c (cmd_qtstart): Move some code to ...
16527 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16528 New.
16529 (download_tracepoints): Move some code to ...
16530 (download_tracepoint_1): ... here. New.
16531
16532 2011-11-08 Yao Qi <yao@codesourcery.com>
16533
16534 * remote-utils.c (relocate_instruction): A comment fix.
16535
16536 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16537
16538 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16539 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16540 dr_status_mirror and dr_control_mirror from debug_reg_state.
16541 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16542 (i386_initial_stuff): Remove use of deleted globals.
16543 (i386_get_thread_context, i386_set_thread_context,
16544 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16545 from debug_reg_state.
16546
16547 2011-11-05 Yao Qi <yao@codesourcery.com>
16548
16549 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16550 address as TPOINT's.
16551
16552 2011-11-02 Stan Shebs <stan@codesourcery.com>
16553
16554 * tracepoint.c (agent_mem_read_string): New function.
16555 (eval_agent_expr): Call it for tracenz.
16556 * server.c (handle_query): Report support for tracenz.
16557
16558 2011-11-02 Yao Qi <yao@codesourcery.com>
16559
16560 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16561
16562 2011-11-02 Yao Qi <yao@codesourcery.com>
16563
16564 * target.h: Fix a typo in comment.
16565
16566 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16567
16568 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16569 clobber the breakpoints' shadows with fast tracepoint jumps.
16570 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16571 * target.c (write_inferior_memory): Also pass MYADDR down to
16572 check_mem_write.
16573
16574 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16575
16576 * configure.ac: Check support for personality routine.
16577 * configure: Regenerate.
16578 * config.in: Likewise.
16579 * linux-low.c: Include <sys/personality.h>.
16580 Define ADDR_NO_RANDOMIZE if necessary.
16581 (linux_create_inferior): Disable address space randomization when
16582 forking inferior, if requested.
16583 (linux_supports_disable_randomization): New function.
16584 (linux_target_ops): Install it.
16585 * server.h (disable_randomization): Declare.
16586 * server.c (disable_randomization): New global variable.
16587 (handle_general_set): Handle QDisableRandomization.
16588 (handle_query): Likewise for qSupported.
16589 (main): Support --disable-randomization and --no-disable-randomization
16590 command line arguments.
16591 * target.h (struct target_ops): Add supports_disable_randomization.
16592 (target_supports_disable_randomization): New macro.
16593
16594 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16595
16596 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16597 ifdef check.
16598 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16599 [!PT_GETDSBT] (target_loadmap): New definition.
16600 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16601 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16602 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16603 and PT_GETDSBT to LINUX_LOADMAP.
16604 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16605 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16606
16607 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16608
16609 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16610 (arm_linux_hwbp_cap): New static variable.
16611 (arm_linux_get_hwbp_cap): Replace by ...
16612 (arm_linux_init_hwbp_cap): ... this new function.
16613 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16614 (arm_linux_get_hw_watchpoint_count): Likewise.
16615 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16616 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16617 (arm_prepare_to_resume): Use perror_with_name instead of error.
16618
16619 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16620
16621 * linux-arm-low.c: Include <signal.h>.
16622 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16623 (struct arm_linux_hwbp_cap): New data type.
16624 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16625 (struct arm_linux_hw_breakpoint): New data type.
16626 (MAX_BPTS, MAX_WPTS): Define.
16627 (struct arch_process_info, struct arch_lwp_info): New data types.
16628 (arm_linux_get_hwbp_cap): New function.
16629 (arm_linux_get_hw_breakpoint_count): Likewise.
16630 (arm_linux_get_hw_watchpoint_count): Likewise.
16631 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16632 (arm_hwbp_control_initialize): Likewise.
16633 (arm_hwbp_control_is_enabled): Likewise.
16634 (arm_hwbp_control_is_initialized): Likewise.
16635 (arm_hwbp_control_disable): Likewise.
16636 (arm_linux_hw_breakpoint_equal): Likewise.
16637 (arm_linux_hw_point_initialize): Likewise.
16638 (struct update_registers_data): New data structure.
16639 (update_registers_callback: New function.
16640 (arm_insert_point): Likewise.
16641 (arm_remove_point): Likewise.
16642 (arm_stopped_by_watchpoint): Likewise.
16643 (arm_stopped_data_address): Likewise.
16644 (arm_new_process): Likewise.
16645 (arm_new_thread): Likewise.
16646 (arm_prepare_to_resume): Likewise.
16647 (the_low_target): Register arm_insert_point, arm_remove_point,
16648 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16649 arm_new_thread, and arm_prepare_to_resume.
16650
16651 2011-09-15 Stan Shebs <stan@codesourcery.com>
16652
16653 * server.h (struct emit_ops): Add compare-goto fields.
16654 * tracepoint.c (gdb_agent_op_sizes): New table.
16655 (emit_eq_goto): New function.
16656 (emit_ne_goto): New function.
16657 (emit_lt_goto): New function.
16658 (emit_le_goto): New function.
16659 (emit_gt_goto): New function.
16660 (emit_ge_goto): New function.
16661 (is_goto_target): New function.
16662 (compile_bytecodes): Recognize special cases of compare-goto
16663 combinations and call specialized emitters for them.
16664 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16665 (amd64_emit_ne_goto): New function.
16666 (amd64_emit_lt_goto): New function.
16667 (amd64_emit_le_goto): New function.
16668 (amd64_emit_gt_goto): New function.
16669 (amd64_emit_ge_goto): New function.
16670 (amd64_emit_ops): Add the new functions.
16671 (i386_emit_eq_goto): New function.
16672 (i386_emit_ne_goto): New function.
16673 (i386_emit_lt_goto): New function.
16674 (i386_emit_le_goto): New function.
16675 (i386_emit_gt_goto): New function.
16676 (i386_emit_ge_goto): New function.
16677 (i386_emit_ops): Add the new functions.
16678
16679 2011-09-08 Stan Shebs <stan@codesourcery.com>
16680
16681 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16682 (i386_emit_epilogue): Restore %ebx.
16683
16684 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16685
16686 * server.c (step_thread): Remove definition.
16687 (process_serial_event): Don't handle Hs.
16688 * server.h (step_thread): Remove declaration.
16689 * target.c (set_desired_inferior): Remove use of step_thread.
16690
16691 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16692
16693 * linux-low.c: Include linux-procfs.h.
16694 (linux_attach_lwp_1): Update comments.
16695 (linux_attach): Scan for existing threads when attaching to a
16696 process that is the tgid.
16697 * Makefile.in: Update dependencies.
16698
16699 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16700
16701 * configure.srv: Add linux-procfs.o dependencies.
16702
16703 2011-08-14 Yao Qi <yao@codesourcery.com>
16704
16705 * target.h (struct target_ops): Fix indent.
16706 * win32-low.c (win32_target_ops): Fix comment.
16707
16708 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16709 Yao Qi <yao@codesourcery.com>
16710
16711 * Makefile.in (clean): Remove tic6x-*.c files.
16712 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16713 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16714 (tic6x-c64xp-linux.c): Likewise.
16715 * configure.srv: Add support for tic6x-*-uclinux.
16716 * linux-tic6x-low.c: New.
16717 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16718
16719 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16720 Yao Qi <yao@codesourcery.com>
16721
16722 * target.h (struct target_ops): Add read_loadmap.
16723 * linux-low.c (struct target_loadseg): New type.
16724 (struct target_loadmap): New type.
16725 (linux_read_loadmap): New function.
16726 (linux_target_ops): Add linux_read_loadmap.
16727 * server.c (handle_query): Support qXfer:fdpic:read packet.
16728 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16729 to NULL.
16730
16731 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16732
16733 * win32-low.c: Include <stdint.h>.
16734
16735 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16736
16737 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16738 to the inferior here.
16739 (i386_remove_aligned_watchpoint): Ditto.
16740 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16741 fit part of the watchpoint in the debug registers.
16742 (i386_update_inferior_debug_regs): New.
16743 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16744 registers, and only update the inferior on success.
16745 (i386_low_remove_watchpoint): Ditto.
16746
16747 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16748
16749 * linux-low.c (compare_ints, unique, list_threads, show_process,
16750 linux_core_of_thread): Delete.
16751 (linux_target_ops): Change linux_core_of_thread to
16752 linux_common_core_of_thread.
16753 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16754 * utils.c (malloc_failure): Change type of argument.
16755 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16756 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16757 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16758 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16759 (IPA_OBJS): Add common-utils-ipa.o.
16760 (ptid_h, linux_osdata_h): New macros.
16761 (server_h): Add common/common-utils.h, common/xml-utils.h,
16762 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16763 common/ptid.h.
16764 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16765 ptid.o, buffer.o): New rules.
16766 (linux-low.o): Add common/linux-osdata.h as a dependency.
16767 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16768 * configure.ac: Add AC_HEADER_DIRENT check.
16769 * config.in: Regenerate.
16770 * configure: Regenerate.
16771 * remote-utils.c (xml_escape_text): Delete.
16772 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16773 buffer_xml_printf): Move to common/buffer.c.
16774 * server.c (main): Remove call to initialize_inferiors.
16775 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16776 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16777 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16778 internal_error, gdb_assert, gdb_assert_fail): Delete.
16779 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16780 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16781 common/buffer.h.
16782 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16783 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16784 initialize_inferiors): Delete.
16785
16786 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16787
16788 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16789 symbol error.
16790
16791 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16792
16793 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16794 assertion.
16795 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16796
16797 2011-05-26 Yao Qi <yao@codesourcery.com>
16798
16799 * Makefile.in (thread-db.o): Track dependence to
16800 common/gdb_thread_db.h.
16801 * thread-db.c: include gdb_thread_db.h from right place.
16802
16803 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16804
16805 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16806 __FILE__ and __LINE__ to internal_error.
16807
16808 2011-05-13 Doug Evans <dje@google.com>
16809
16810 * thread-db.c (try_thread_db_load_from_sdir): New function.
16811 (try_thread_db_load_from_dir): New function.
16812 (thread_db_load_search): Handle $sdir, ignore $pdir.
16813 Remove trying of system directories if search of
16814 libthread-db-search-path fails, that is now done via $sdir.
16815
16816 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16817
16818 * server.c (handle_query): Add EnableDisableTracepoints to the list
16819 of supported features.
16820 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16821 tracepoints.
16822 (cmd_qtenable_disable): New.
16823 (cmd_qtstart): Install tracepoints even if disabled.
16824 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16825 receiving a QTEnable or QTDisable packet.
16826 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16827 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16828 tracepoints.
16829 (gdb_probe): Skip data collection if static tracepoint is disabled.
16830
16831 2011-05-10 Doug Evans <dje@google.com>
16832
16833 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16834
16835 2011-05-04 Doug Evans <dje@google.com>
16836
16837 * linux-low.c (linux_join): Skip process lookup.
16838 * spu-low.c (spu_join): Ditto.
16839 * server.c (join_inferiors_callback): Delete.
16840 (process_serial_event): For 'D' packet (detach) call join_inferior
16841 directly.
16842
16843 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16844
16845 * README: Don't mention xscale*-*-linux*.
16846 * configure.srv (xscale*-*-linux*): Don't handle target.
16847
16848 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16849
16850 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16851 casting pointers.
16852 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16853 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16854 (i386_emit_void_call_2): Likewise.
16855
16856 2011-04-26 Yao Qi <yao@codesourcery.com>
16857
16858 * linux-low.c: Move common macros to linux-ptrace.h.
16859 Include linux-ptrace.h.
16860 * Makefile.in (linux_ptrace_h): New.
16861 (linux-low.o): Depends on linux-ptrace.h.
16862
16863 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16864
16865 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16866 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16867 (remote_prepare): New function with most of the TCP code from ...
16868 (remote_open): ... here. Detect PORT here unconditionally. Move also
16869 setting transport_is_reliable.
16870 * server.c (run_once): New variable.
16871 (gdbserver_usage): Document it.
16872 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16873 the first run if RUN_ONCE.
16874 * server.h (run_once, remote_prepare): New declarations.
16875
16876 2011-04-19 Tom Tromey <tromey@redhat.com>
16877
16878 * win32-low.c (handle_load_dll): Remove duplicate "the".
16879
16880 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16881
16882 Remove support for old Cygwin 1.5 versions.
16883 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16884 function to avoid warning.
16885 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16886 warning.
16887
16888 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16889
16890 * gdbserver/server.h (Macro _): Define it if not available.
16891
16892 2011-03-14 Michael Snyder <msnyder@vmware.com>
16893
16894 * hostio.c (handle_close): Remove unnecessary null test.
16895
16896 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16897
16898 * Makefile.in (maintainer-clean realclean distclean): Remove
16899 "make ... subdir_do" command.
16900
16901 2011-03-10 Michael Snyder <msnyder@vmware.com>
16902
16903 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16904
16905 * server.c (handle_v_run): Free alloced buffer on early return.
16906
16907 2011-03-09 Yao Qi <yao@codesourcery.com>
16908
16909 Revert:
16910 2011-03-04 Yao Qi <yao@codesourcery.com>
16911
16912 * Makefile.in: Remove GNU make feature --directory.
16913
16914 2011-03-05 Yao Qi <yao@codesourcery.com>
16915
16916 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16917 (subdir_do): New make target. Copied from gdb/Makefile.
16918 (maintainer-clean, realclean, distclean, clean): Call corresponding
16919 make targets in common/Makefile.
16920
16921 2011-02-11 Yao Qi <yao@codesourcery.com>
16922
16923 * configure.ac: Call AC_PROG_RANLIB.
16924 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16925 * configure: Regenerate.
16926
16927 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16928
16929 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16930
16931 2011-03-06 Yao Qi <yao@codesourcery.com>
16932
16933 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16934
16935 2011-03-05 Yao Qi <yao@codesourcery.com>
16936
16937 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16938 (subdir_do): New make target. Copied from gdb/Makefile.
16939 (maintainer-clean, realclean, distclean, clean): Call corresponding
16940 make targets in common/Makefile.
16941
16942 2011-03-04 Yao Qi <yao@codesourcery.com>
16943
16944 * Makefile.in: Remove GNU make feature --directory.
16945
16946 2011-03-04 Michael Snyder <msnyder@vmware.com>
16947
16948 * server.c (queue_stop_reply): Call xmalloc not malloc.
16949
16950 2011-03-02 Michael Snyder <msnyder@vmware.com>
16951
16952 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16953
16954 2011-02-28 Michael Snyder <msnyder@vmware.com>
16955
16956 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16957 (cmd_qtframe): Ditto.
16958 (cmd_qtbuffer): Ditto.
16959 (cmd_bigqtbuffer): Ditto.
16960
16961 * utils.c (decimal2str): Initialize 'width' to nine, then
16962 don't mess with it.
16963
16964 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16965
16966 * hostio.c (require_data): Free *data, not data.
16967
16968 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16969
16970 * hostio.c (require_data): Use free, not xfree.
16971
16972 2011-02-27 Michael Snyder <msnyder@vmware.com>
16973
16974 * server.c (handle_query): Discard unused value.
16975
16976 * hostio.c (require_data): Free malloc memory before returning
16977 error.
16978
16979 2011-02-26 Michael Snyder <msnyder@vmware.com>
16980
16981 * linux-low.c (list_threads): Call closedir for dirent.
16982
16983 2011-02-27 Michael Snyder <msnyder@vmware.com>
16984
16985 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16986 a case statement falls through.
16987
16988 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16989
16990 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16991 in comparison.
16992
16993 2011-02-26 Michael Snyder <msnyder@vmware.com>
16994
16995 * utils.c (decimal2str): Eliminate dead code and dead param.
16996 (pulongest): Drop dead param from call to decimal2str.
16997 (plongest): Ditto.
16998
16999 2011-02-24 Joel Brobecker <brobecker@adacore.com>
17000
17001 Revert the following patch (not approved yet):
17002 2011-02-21 Hui Zhu <teawater@gmail.com>
17003 * tracepoint.c (tp_printf): New function.
17004 (eval_agent_expr): Handle gdb_agent_op_printf.
17005
17006 2011-02-21 Hui Zhu <teawater@gmail.com>
17007
17008 * tracepoint.c (tp_printf): New function.
17009 (eval_agent_expr): Handle gdb_agent_op_printf.
17010
17011 2011-02-18 Tom Tromey <tromey@redhat.com>
17012
17013 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
17014 (tracepoint.o): Likewise.
17015 * tracepoint.c (enum gdb_agent_op): Use ax.def.
17016 (gdb_agent_op_names): Likewise.
17017
17018 2011-02-18 Tom Tromey <tromey@redhat.com>
17019
17020 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
17021 gdb_agent_op_rot>: New constants.
17022 (gdb_agent_op_names): Add pick and roll.
17023 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
17024 cases.
17025
17026 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
17027
17028 * aclocal.m4: Regenerated with aclocal-1.11.1.
17029
17030 2011-02-14 Pedro Alves <pedro@codesourcery.com>
17031
17032 * server.c (handle_qxfer_traceframe_info): New.
17033 (qxfer_packets): Register "traceframe-info".
17034 (handle_query): Report support for qXfer:traceframe-info:read+.
17035 * tracepoint.c (match_blocktype): New.
17036 (traceframe_find_block_type): Rename to ...
17037 (traceframe_walk_blocks): ... this. Add callback filter argument,
17038 and use it.
17039 (traceframe_find_block_type): New, reimplemented on top of
17040 traceframe_walk_blocks.
17041 (build_traceframe_info_xml): New.
17042 (traceframe_read_info): New.
17043 * server.h (traceframe_read_info): Declare.
17044
17045 2011-02-11 Yao Qi <yao@codesourcery.com>
17046
17047 * configure.ac: Call AC_PROG_RANLIB.
17048 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
17049 * configure: Regenerate.
17050
17051 2011-02-07 Pedro Alves <pedro@codesourcery.com>
17052
17053 * server.c (gdb_read_memory): Change return semantics to allow
17054 partial transfers.
17055 (handle_search_memory_1): Adjust.
17056 (process_serial_event) <'m' packet>: Handle partial transfers.
17057 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
17058
17059 2011-01-28 Pedro Alves <pedro@codesourcery.com>
17060
17061 * regcache.c (init_register_cache): Initialize
17062 regcache->register_status.
17063 (free_register_cache): Release regcache->register_status.
17064 (regcache_cpy): Copy register_status.
17065 (registers_to_string): Print 'x's for unavailable registers.
17066 (supply_register): Mark the register's status valid or
17067 unavailable, depending on whether a buffer was passed in or not.
17068 (supply_register_zeroed): New.
17069 (supply_regblock): Mark the registers' status valid or
17070 unavailable, depending on whether a buffer was passed in or not.
17071 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
17072 (struct regcache): New `register_status' field.
17073 (supply_register_zeroed): Declare.
17074 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
17075 supply_register_zeroed, rather than passing a NULL buffer to
17076 supply_register.
17077 * tracepoint.c (fetch_traceframe_registers): Update comment.
17078
17079 2011-01-28 Pedro Alves <pedro@codesourcery.com>
17080
17081 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
17082 buffer explicit.
17083
17084 2011-01-25 Pedro Alves <pedro@codesourcery.com>
17085
17086 * server.h (decode_xfer_write): Change prototype.
17087 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
17088 and don't extract the annex here.
17089 * server.c (decode_xfer_read): Remove `annex' parameter,
17090 and don't extract the annex here.
17091 (decode_xfer): New.
17092 (struct qxfer): New.
17093 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
17094 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
17095 (handle_qxfer_statictrace): New functions, abstracted out from
17096 handle_query, and made to use the struct qxfer interface.
17097 (handle_threads_qxfer_proper): Rename to ...
17098 (handle_qxfer_threads_proper): ... this.
17099 (handle_threads_qxfer): Rename to ...
17100 (handle_qxfer_threads): ... this. Adjust.
17101 (qxfer_packets): New array.
17102 (handle_qxfer): New function.
17103 (handle_query): Use handle_qxfer.
17104
17105 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
17106
17107 * gdbreplay.c: Shorten lines of >= 80 columns.
17108 * linux-low.c: Ditto.
17109 * linux-ppc-low.c: Ditto.
17110 * linux-s390-low.c: Ditto.
17111 * linux-sparc-low.c: Ditto.
17112 * linux-x86-low.c: Ditto.
17113 * linux-xtensa-low.c: Ditto.
17114 * mem-break.c: Ditto.
17115 * nto-low.c: Ditto.
17116 * regcache.h: Ditto.
17117 * remote-utils.c: Ditto.
17118 * server.c: Ditto.
17119 * server.h: Ditto.
17120 * thread-db.c: Ditto.
17121 * tracepoint.c: Ditto.
17122 * utils.c: Ditto.
17123 * win32-low.h: Ditto.
17124
17125 2011-01-05 Joel Brobecker <brobecker@adacore.com>
17126
17127 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
17128 update.
17129
17130 2011-01-01 Joel Brobecker <brobecker@adacore.com>
17131
17132 * server.c (gdbserver_version): Update copyright year in version
17133 output.
17134 * gdbreplay.c (gdbreplay_version): Ditto.
17135
17136 2010-12-29 Jie Zhang <jie.zhang@analog.com>
17137
17138 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
17139 * linux-bfin-low.c: New file.
17140 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
17141 PT_DATA_ADDR for BFIN targets.
17142 * Makefile.in (SFILES): Add linux-bfin-low.c.
17143 (clean): Remove reg-bfin.c.
17144 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
17145 * README: Mention supported Blackfin targets.
17146
17147 2010-12-23 Mike Frysinger <vapier@gentoo.org>
17148
17149 * .gitignore: New file.
17150
17151 2010-11-16 Mike Frysinger <vapier@gentoo.org>
17152
17153 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
17154
17155 2010-10-22 Jie Zhang <jie@codesourcery.com>
17156
17157 * Makefile.in: Add FLAGS_TO_PASS variable.
17158 (install): Remove dependency of install-only and recursively
17159 invoke make for install-only.
17160
17161 2010-10-04 Doug Evans <dje@google.com>
17162
17163 * Makefile.in (uninstall): Use $(DESTDIR).
17164
17165 2010-09-24 Pedro Alves <pedro@codesourcery.com>
17166
17167 PR gdb/11842
17168
17169 * linux-x86-low.c (compat_siginfo_from_siginfo)
17170 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
17171 si_code is < 0. Check for si_code == SI_TIMER before checking for
17172 si_code < 0.
17173
17174 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17175
17176 * lynx-i386-low.c: New file.
17177 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
17178
17179 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17180
17181 * lynx-low.c (ptrace_request_to_str): Remove handling for
17182 request values that have been removed in LynxOS 5.x.
17183
17184 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17185
17186 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
17187 <ptrace.h>
17188
17189 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
17190
17191 * configure.ac: Add --enable-inprocess-agent option.
17192 * configure: Rebuilt.
17193
17194 2010-09-06 Yao Qi <yao@codesourcery.com>
17195
17196 * linux-low.c (linux_kill): Remove unused variable.
17197 (linux_stabilize_threads): Likewise.
17198 * server.c (start_inferior): Likewise.
17199 (queue_stop_reply_callback): Likewise.
17200 * tracepoint.c (do_action_at_tracepoint): Likewise.
17201
17202 2010-09-06 Yao Qi <yao@codesourcery.com>
17203
17204 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
17205 on return.
17206
17207 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
17208
17209 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
17210
17211 2010-09-06 Pedro Alves <pedro@codesourcery.com>
17212
17213 * Makefile.in (install-only): Replace $IPA_DEPFILES with
17214 "$(IPA_DEPFILES)".
17215
17216 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17217
17218 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
17219 gdbserver/lynx-ppc-low.c: New files.
17220 * Makefile.in (lynx_low_h): New variable.
17221 (lynx-low.o, lynx-ppc-low.o): New rules.
17222 * configure.ac: On LynxOS, link with -lnetinet.
17223 * configure.srv: Add handling of powerpc-*-lynxos* targets.
17224 * configure: regenerate.
17225
17226 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17227
17228 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
17229 * configure.ac: Add check for vasprintf and vsnprintf.
17230 * configure, config.in: Regenerate.
17231 * server.h (vasprintf, vsnprintf): Add conditional declarations.
17232
17233 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17234
17235 * gdbreplay.c: Move include of alloca.h up, next to include of
17236 malloc.h.
17237 * server.h: Add include of malloc.h.
17238 * mem-break.c: Remove include of malloc.h.
17239 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
17240
17241 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17242
17243 * Makefile.in (memmem.o): Build with -Wno-error.
17244
17245 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17246
17247 * utils.c (xsnprintf): Make non-static.
17248 * server.h: Add xsnprintf declaration.
17249 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
17250 replace calls to snprintf by calls to xsnprintf throughout.
17251
17252 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17253
17254 * configure.ac: Add configure check for alloca.
17255 * configure, config.in: Regenerate.
17256 * server.h: Include alloca.h if it exists.
17257 * gdbreplay.c: Include alloca.h if it exists.
17258
17259 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17260
17261 * linux-low.c (__SIGRTMIN): Define if not already defined.
17262 (linux_create_inferior): Check for __ANDROID__ rather than
17263 __SIGRTMIN.
17264 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17265 are already deferred.
17266 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17267 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17268 stopped and already has a pending signal to report.
17269 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17270 a pending signal to report or is moving out of a jump pad.
17271 (linux_init_signals): Check for __ANDROID__ rather than
17272 __SIGRTMIN.
17273
17274 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17275
17276 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17277 debug_threads check. Avoid a linear search when not doing debug
17278 output.
17279
17280 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17281
17282 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17283 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17284 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17285 (process_event): Change local fd's type to gdb_fildes_t.
17286 (create_file_handler): Adjust prototype.
17287 (delete_file_handler): Adjust prototype.
17288 (handle_file_event): Adjust prototype. Use pfildes.
17289 (create_file_event): Adjsut prototype.
17290 * remote-utils.c (remote_desc, listen_desc): Change type to
17291 gdb_fildes_t.
17292 * server.h: New gdb_fildes_t typedef.
17293 [USE_WIN32API]: Include winsock2.h.
17294 (delete_file_handler, add_file_handler): Adjust prototypes.
17295 (pfildes): Declare.
17296 * utils.c (pfildes): New.
17297
17298 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17299
17300 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17301 * configure: Regenerate.
17302
17303 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17304
17305 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17306 (linux_done_accessing_memory): ... this.
17307 (linux_target_ops): Adjust.
17308 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17309 * nto-low.c (nto_target_ops): Adjust comment.
17310 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17311 * spu-low.c (spu_target_ops): Adjust comment.
17312 * target.h (target_ops): Rename unprepare_to_access_memory field
17313 to done_accessing_memory.
17314 (unprepare_to_access_memory): Rename to ...
17315 (done_accessing_memory): ... this.
17316
17317 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17318
17319 * linux-low.c (linux_prepare_to_access_memory): New.
17320 (linux_unprepare_to_access_memory): New.
17321 (linux_target_ops): Install them.
17322 * server.c (read_memory): Rename to ...
17323 (gdb_read_memory): ... this. Use
17324 prepare_to_access_memory/prepare_to_access_memory.
17325 (write_memory): Rename to ...
17326 (gdb_write_memory): ... this. Use
17327 prepare_to_access_memory/prepare_to_access_memory.
17328 (handle_search_memory_1): Adjust.
17329 (process_serial_event): Adjust.
17330 * target.h (struct target_ops): New fields
17331 prepare_to_access_memory and unprepare_to_access_memory.
17332 (prepare_to_access_memory, unprepare_to_access_memory): New.
17333 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17334 prepare_to_access_memory/prepare_to_access_memory.
17335 * nto-low.c (nto_target_ops): Adjust.
17336 * spu-low.c (spu_target_ops): Adjust.
17337 * win32-low.c (win32_target_ops): Adjust.
17338
17339 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17340
17341 * Makefile.in (WARN_CFLAGS): Get it from configure.
17342 (WERROR_CFLAGS): New.
17343 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17344 * configure.ac: Introduce --enable-werror, which adds -Werror to
17345 the compiler command line. Enabled by default. Disable with
17346 --disable-werror. Add -Wdeclaration-after-statement
17347 Wpointer-arith and -Wformat-nonliteral to warning flags.
17348 * configure: Regenerate.
17349
17350 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17351
17352 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17353
17354 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17355
17356 * gdbreplay.c (remote_error): New.
17357 (gdbchar): New.
17358 (expect): Use gdbchar. Check for error reading from GDB.
17359 Clarify sync error output.
17360 (play): Check for errors writing to GDB.
17361 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17362 * remote-utils.c (getpkt): Check for errors writing to the remote
17363 descriptor.
17364
17365 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17366
17367 * linux-low.c (linux_wait_1): Move non-debugging code out of
17368 `debug_threads' control.
17369
17370 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17371
17372 * linux-low.c (linux_wait_1): Don't set last_status here.
17373 * server.c (push_event, queue_stop_reply_callback): Assert we're
17374 not pushing a TARGET_WAITKIND_IGNORE event.
17375 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17376 (myresume, handle_target_event): Set the thread's last_resume_kind
17377 and last_status from the target returned status.
17378
17379 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17380
17381 PR threads/10729
17382
17383 * linux-x86-low.c (update_debug_registers_callback): New.
17384 (i386_dr_low_set_addr): Use it.
17385 (i386_dr_low_get_addr): New.
17386 (i386_dr_low_set_control): Use update_debug_registers_callback.
17387 (i386_dr_low_get_control): New.
17388 (i386_dr_low_get_status): Adjust.
17389 * linux-low.c (linux_stop_lwp): New.
17390 * linux-low.h (linux_stop_lwp): Declare.
17391
17392 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17393 argument instead of a i386_debug_reg_state.
17394 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17395 a i386_debug_reg_state.
17396 (i386_insert_aligned_watchpoint): Adjust.
17397 (i386_remove_aligned_watchpoint): Adjust.
17398 (i386_low_stopped_data_address): Read the debug registers from the
17399 inferior instead of from the mirrors.
17400 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17401 (i386_dr_low_get_addr): Declare.
17402 (i386_dr_low_get_control): Declare.
17403 (i386_dr_low_get_status): Change prototype.
17404
17405 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17406 (i386_dr_low_get_addr): New.
17407 (i386_dr_low_get_control): New.
17408 (i386_dr_low_get_status): Adjust prototype. Return
17409 dr_status_mirror.
17410 (i386_initial_stuff): Clear dr_status_mirror and
17411 dr_control_mirror.
17412 (i386_get_thread_context): Adjust.
17413 (i386_set_thread_context): Adjust.
17414 (i386_thread_added): Adjust.
17415
17416 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17417
17418 * linux-low.h (linux_thread_area): Delete declaration.
17419
17420 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17421
17422 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17423 after its termination.
17424
17425 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17426
17427 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17428 (gdb_wants_all_stopped): Delete.
17429 (linux_wait_1): Don't call them.
17430 * server.c (handle_v_cont): Tag all threads as want-stopped.
17431 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17432 stopped as "client-wants-stopped".
17433
17434 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17435
17436 * Makefile.in (signals_h): New.
17437 (server_h): Depend on it.
17438 (server.o): Don't depend on $(signals_def).
17439 (signals.o): Depend on $(signals_def).
17440
17441 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17442
17443 * Makefile.in (signals_def): New.
17444 (server_h): Append include/gdb/signals.h and signals_def.
17445 (server.o): Append signals_def.
17446
17447 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17448
17449 * server.c (handle_target_event): Use target_signal_to_host for
17450 resume_info.sig initialization.
17451 * target.h (struct thread_resume) <sig>: New comment.
17452
17453 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17454
17455 * server.c (handle_query): strcpy() the returned string from paddress()
17456 instead of sprintf().
17457 * utils.c (paddress): Return phex_nz().
17458
17459 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17460
17461 * server.c (handle_v_cont): Call mourn_inferior if process
17462 just exited.
17463 (myresume): Likewise.
17464
17465 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17466
17467 Static tracepoints, and integration with UST.
17468
17469 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17470 * mem-break.c (uninsert_all_breakpoints)
17471 (reinsert_all_breakpoints): New.
17472 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17473 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17474 (gdb_agent_ust_loaded, helper_thread_id)
17475 (gdb_agent_helper_thread_id): New macros.
17476 (struct ipa_sym_addresses): Add addr_ust_loaded,
17477 addr_helper_thread_id, addr_cmd_buf.
17478 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17479 (in_process_agent_loaded_ust): New.
17480 (write_e_ust_not_loaded): New.
17481 (maybe_write_ipa_ust_not_loaded): New.
17482 (struct collect_static_trace_data_action): New.
17483 (enum tracepoint_type) <static_tracepoint>: New.
17484 (struct tracepoint) <handle>: Mention static tracepoints.
17485 (struct static_tracepoint_ctx): New.
17486 (CMD_BUF_SIZE): New.
17487 (add_tracepoint_action): Handle static tracepoint actions.
17488 (unprobe_marker_at): New.
17489 (clear_installed_tracepoints): Handle static tracepoints.
17490 (cmd_qtdp): Handle static tracepoints.
17491 (probe_marker_at): New.
17492 (cmd_qtstart): Handle static tracepoints.
17493 (response_tracepoint): Handle static tracepoints.
17494 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17495 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17496 (get_context_regcache): Handle static tracepoints.
17497 (do_action_at_tracepoint): Handle static tracepoint actions.
17498 (traceframe_find_block_type): Handle static trace data blocks.
17499 (traceframe_read_sdata): New.
17500 (download_tracepoints): Download static tracepoint actions.
17501 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17502 (GDB_PROBE_NAME): New.
17503 (ust_ops): New.
17504 (GET_UST_SYM): New.
17505 (USTF): New.
17506 (dlsym_ust): New.
17507 (ust_marker_to_static_tracepoint): New.
17508 (gdb_probe): New.
17509 (collect_ust_data_at_tracepoint): New.
17510 (gdb_ust_probe): New.
17511 (UNIX_PATH_MAX, SOCK_DIR): New.
17512 (gdb_ust_connect_sync_socket): New.
17513 (resume_thread, stop_thread): New.
17514 (run_inferior_command): New.
17515 (init_named_socket): New.
17516 (gdb_ust_socket_init): New.
17517 (cstr_to_hexstr): New.
17518 (next_st): New.
17519 (first_marker, next_marker): New.
17520 (response_ust_marker): New.
17521 (cmd_qtfstm, cmd_qtsstm): New.
17522 (unprobe_marker_at, probe_marker_at): New.
17523 (cmd_qtstmat, gdb_ust_thread): New.
17524 (gdb_ust_init): New.
17525 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17526 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17527 (ST_REGENTRY): New.
17528 (x86_64_st_collect_regmap): New.
17529 (X86_64_NUM_ST_COLLECT_GREGS): New.
17530 (AMD64_RIP_REGNUM): New.
17531 (supply_static_tracepoint_registers): New.
17532 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17533 (ST_REGENTRY): New.
17534 (i386_st_collect_regmap): New.
17535 (i386_NUM_ST_COLLECT_GREGS): New.
17536 (supply_static_tracepoint_registers): New.
17537 * server.c (handle_query): Handle qXfer:statictrace:read.
17538 <qSupported>: Report support for StaticTracepoints, and
17539 qXfer:statictrace:read features.
17540 * server.h (traceframe_read_sdata)
17541 (supply_static_tracepoint_registers): Declare.
17542 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17543 (unpack_varlen_hex): Include in IPA build.
17544 * Makefile.in (ustlibs, ustinc): New.
17545 (IPA_OBJS): Add remote-utils-ipa.o.
17546 ($(IPA_LIB)): Link -ldl and -lpthread.
17547 (UST_CFLAGS): New.
17548 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17549 * config.in, configure: Regenerate.
17550
17551 2010-06-20 Ian Lance Taylor <iant@google.com>
17552 Pedro Alves <pedro@codesourcery.com>
17553
17554 * linux-x86-low.c (always_true): Delete.
17555 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17556 trying to fool the compiler with always_true.
17557
17558 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17559
17560 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17561 conditions in gdbserver.
17562
17563 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17564
17565 * spu-low.c (spu_read_memory): Wrap around local store limit.
17566 (spu_write_memory): Likewise.
17567
17568 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17569
17570 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17571 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17572 LONGEST uses.
17573 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17574 uses.
17575 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17576 uses with LONGEST uses.
17577
17578 2010-06-14 Stan Shebs <stan@codesourcery.com>
17579 Pedro Alves <pedro@codesourcery.com>
17580
17581 Bytecode compiler.
17582
17583 * linux-x86-low.c: Include limits.h.
17584 (add_insns): New.
17585 (always_true): New.
17586 (EMIT_ASM): New.
17587 (EMIT_ASM32): New.
17588 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17589 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17590 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17591 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17592 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17593 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17594 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17595 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17596 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17597 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17598 (amd64_emit_void_call_2): New.
17599 (amd64_emit_ops): New.
17600 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17601 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17602 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17603 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17604 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17605 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17606 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17607 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17608 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17609 (i386_emit_stack_adjust, i386_emit_int_call_1)
17610 (i386_emit_void_call_2): New.
17611 (i386_emit_ops): New.
17612 (x86_emit_ops): New.
17613 (the_low_target): Install x86_emit_ops.
17614 * server.h (struct emit_ops): New.
17615 (get_raw_reg_func_addr): Declare.
17616 (current_insn_ptr, emit_error): Declare.
17617 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17618 (set_trace_state_variable_value): New defines.
17619 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17620 addr_get_trace_state_variable_value and
17621 addr_set_trace_state_variable_value.
17622 (symbol_list): New fields for get_raw_reg,
17623 get_trace_state_variable_value and set_trace_state_variable_value.
17624 (condfn): New typedef.
17625 (struct tracepoint): New field `compiled_cond'.
17626 (do_action_at_tracepoint): Clear compiled_cond.
17627 (get_trace_state_variable_value, set_trace_state_variable_value):
17628 Export in the IPA.
17629 (condition_true_at_tracepoint): If there's a compiled condition,
17630 run that.
17631 (current_insn_ptr, emit_error): New globals.
17632 (struct bytecode_address): New.
17633 (get_raw_reg_func_addr): New.
17634 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17635 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17636 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17637 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17638 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17639 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17640 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17641 (compile_tracepoint_condition, compile_bytecodes): New.
17642 * target.h (emit_ops): Forward declare.
17643 (struct target_ops): New field emit_ops.
17644 (target_emit_ops): New.
17645 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17646 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17647 * linux-low.c (linux_emit_ops): New.
17648 (linux_target_ops): Install it.
17649 * linux-low.h (struct linux_target_ops): New field emit_ops.
17650
17651 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17652
17653 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17654 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17655
17656 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17657 Stan Shebs <stan@codesourcery.com>
17658
17659 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17660 (all): Depend on $(extra_libraries).
17661 (install-only): Install the IPA.
17662 (IPA_OBJS, IPA_LIB): New.
17663 (clean): Remove the IPA lib.
17664 (IPAGENT_CFLAGS): New.
17665 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17666 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17667 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17668 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17669 * configure.ac: Check for atomic builtins support in the compiler.
17670 (IPA_DEPFILES, extra_libraries): Define.
17671 * configure.srv (ipa_obj): Add description.
17672 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17673 (i[34567]86-*-linux*): Set ipa_obj.
17674 (x86_64-*-linux*): Set ipa_obj.
17675 * linux-low.c (stabilizing_threads): New.
17676 (supports_fast_tracepoints): New.
17677 (linux_detach): Stabilize threads before detaching.
17678 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17679 the lwp is either not stabilizing, or is moving out of a jump pad.
17680 (linux_fast_tracepoint_collecting): New.
17681 (maybe_move_out_of_jump_pad): New.
17682 (enqueue_one_deferred_signal): New.
17683 (dequeue_one_deferred_signal): New.
17684 (linux_wait_for_event_1): If moving out of a jump pad, defer
17685 pending signals to later.
17686 (linux_stabilize_threads): New.
17687 (linux_wait_1): Check if threads need moving out of jump pads, and
17688 do it if so.
17689 (stuck_in_jump_pad_callback): New.
17690 (move_out_of_jump_pad_callback): New.
17691 (lwp_running): New.
17692 (linux_resume_one_lwp): Handle moving out of jump pads.
17693 (linux_set_resume_request): Dequeue deferred signals.
17694 (need_step_over_p): Also step over fast tracepoint jumps.
17695 (start_step_over): Also uninsert fast tracepoint jumps.
17696 (finish_step_over): Also reinsert fast tracepoint jumps.
17697 (linux_install_fast_tracepoint_jump): New.
17698 (linux_target_ops): Install linux_stabilize_threads and
17699 linux_install_fast_tracepoint_jump_pad.
17700 * linux-low.h (linux_target_ops) <get_thread_area,
17701 install_fast_tracepoint_jump_pad>: New fields.
17702 (struct lwp_info) <collecting_fast_tracepoint,
17703 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17704 (linux_get_thread_area): Declare.
17705 * linux-x86-low.c (jump_insn): New.
17706 (x86_get_thread_area): New.
17707 (append_insns): New.
17708 (push_opcode): New.
17709 (amd64_install_fast_tracepoint_jump_pad): New.
17710 (i386_install_fast_tracepoint_jump_pad): New.
17711 (x86_install_fast_tracepoint_jump_pad): New.
17712 (the_low_target): Install x86_get_thread_area and
17713 x86_install_fast_tracepoint_jump_pad.
17714 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17715 (struct fast_tracepoint_jump): New.
17716 (fast_tracepoint_jump_insn): New.
17717 (fast_tracepoint_jump_shadow): New.
17718 (find_fast_tracepoint_jump_at): New.
17719 (fast_tracepoint_jump_here): New.
17720 (delete_fast_tracepoint_jump): New.
17721 (set_fast_tracepoint_jump): New.
17722 (uninsert_fast_tracepoint_jumps_at): New.
17723 (reinsert_fast_tracepoint_jumps_at): New.
17724 (set_breakpoint_at): Use write_inferior_memory.
17725 (uninsert_raw_breakpoint): Use write_inferior_memory.
17726 (check_mem_read): Mask out fast tracepoint jumps.
17727 (check_mem_write): Mask out fast tracepoint jumps.
17728 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17729 (set_fast_tracepoint_jump): Declare.
17730 (delete_fast_tracepoint_jump)
17731 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17732 (reinsert_fast_tracepoint_jumps_at): Declare.
17733 * regcache.c: Don't compile many functions when building the
17734 in-process agent library.
17735 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17736 the register buffer in the heap.
17737 (free_register_cache): If the register buffer isn't owned by the
17738 regcache, don't free it.
17739 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17740 pre-existing register caches.
17741 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17742 type.
17743 (convert_ascii_to_int): : Constify `from' parameter type.
17744 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17745 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17746 the needed buffer in-place.
17747 (relocate_instruction): New.
17748 * server.c (handle_query) <qSymbols>: If the target supports
17749 tracepoints, give it a chance of looking up symbols. Report
17750 support for fast tracepoints.
17751 (handle_status): Stabilize threads.
17752 (process_serial_event): Adjust.
17753 * server.h (struct fast_tracepoint_jump): Forward declare.
17754 (struct process_info) <fast_tracepoint_jumps>: New field.
17755 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17756 (decode_X_packet, decode_M_packet): Adjust.
17757 (relocate_instruction): Declare.
17758 (in_process_agent_loaded): Declare.
17759 (tracepoint_look_up_symbols): Declare.
17760 (struct fast_tpoint_collect_status): Declare.
17761 (fast_tracepoint_collecting): Declare.
17762 (force_unlock_trace_buffer): Declare.
17763 (handle_tracepoint_bkpts): Declare.
17764 (initialize_low_tracepoint)
17765 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17766 * target.h (struct target_ops) <stabilize_threads,
17767 install_fast_tracepoint_jump_pad>: New fields.
17768 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17769 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17770 [HAVE_STDINT_H]: Include stdint.h.
17771 (trace_debug_1): Rename to ...
17772 (trace_vdebug): ... this.
17773 (trace_debug): Rename to ...
17774 (trace_debug_1): ... this. Add `level' parameter.
17775 (trace_debug): New.
17776 (ATTR_USED, ATTR_NOINLINE): New.
17777 (IP_AGENT_EXPORT): New.
17778 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17779 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17780 (about_to_request_buffer_space, trace_buffer_is_full)
17781 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17782 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17783 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17784 (traceframe_write_count, traceframes_created)
17785 (trace_state_variables)
17786 New renaming defines.
17787 (struct ipa_sym_addresses): New.
17788 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17789 (symbol_list): New.
17790 (ipa_sym_addrs): New.
17791 (all_tracepoint_symbols_looked_up): New.
17792 (in_process_agent_loaded): New.
17793 (write_e_ipa_not_loaded): New.
17794 (maybe_write_ipa_not_loaded): New.
17795 (tracepoint_look_up_symbols): New.
17796 (debug_threads) [IN_PROCESS_AGENT]: New.
17797 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17798 (UNKNOWN_SIDE_EFFECTS): New.
17799 (stop_tracing): New.
17800 (flush_trace_buffer): New.
17801 (stop_tracing_bkpt): New.
17802 (flush_trace_buffer_bkpt): New.
17803 (read_inferior_integer): New.
17804 (read_inferior_uinteger): New.
17805 (read_inferior_data_pointer): New.
17806 (write_inferior_data_pointer): New.
17807 (write_inferior_integer): New.
17808 (write_inferior_uinteger): New.
17809 (struct collect_static_trace_data_action): Delete.
17810 (enum tracepoint_type): New.
17811 (struct tracepoint) <type>: New field `type'.
17812 <actions_str, step_actions, step_actions_str>: Only include in
17813 GDBserver.
17814 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17815 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17816 (tracepoints): Use IP_AGENT_EXPORT.
17817 (last_tracepoint): Don't include in the IPA.
17818 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17819 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17820 (alloced_trace_state_variables): New.
17821 (trace_state_variables): Use IP_AGENT_EXPORT.
17822 (traceframe_t): Delete unused variable.
17823 (circular_trace_buffer): Don't include in the IPA.
17824 (trace_buffer_start): Delete.
17825 (struct trace_buffer_control): New.
17826 (trace_buffer_free): Delete.
17827 (struct ipa_trace_buffer_control): New.
17828 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17829 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17830 New.
17831 (trace_buffer_ctrl): New.
17832 (TRACE_BUFFER_CTRL_CURR): New.
17833 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17834 Reimplement as macros.
17835 (trace_buffer_wrap): Delete.
17836 (traceframe_write_count, traceframe_read_count)
17837 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17838 (struct tracepoint_hit_ctx) <type>: New field.
17839 (struct fast_tracepoint_ctx): New.
17840 (memory_barrier): New.
17841 (cmpxchg): New.
17842 (record_tracepoint_error): Update atomically in the IPA.
17843 (clear_inferior_trace_buffer): New.
17844 (about_to_request_buffer_space): New.
17845 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17846 updating the same buffer.
17847 (add_tracepoint): Default the tracepoint's type to trap
17848 tracepoint, and orig_size to -1.
17849 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17850 internal variables.
17851 (create_trace_state_variable): New parameter `gdb'. Handle it.
17852 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17853 (cmd_qtdp): Handle fast tracepoints.
17854 (cmd_qtdv): Adjust.
17855 (max_jump_pad_size): New.
17856 (gdb_jump_pad_head): New.
17857 (get_jump_space_head): New.
17858 (claim_jump_space): New.
17859 (sort_tracepoints): New.
17860 (MAX_JUMP_SIZE): New.
17861 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17862 IPA.
17863 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17864 support. Upload fast traceframes, and delete internal IPA
17865 breakpoints.
17866 (stop_tracing_handler): New.
17867 (flush_trace_buffer_handler): New.
17868 (cmd_qtstop): Upload fast tracepoints.
17869 (response_tracepoint): Handle fast tracepoints.
17870 (tracepoint_finished_step): Upload fast traceframes. Set the
17871 tracepoint hit context's tracepoint type.
17872 (handle_tracepoint_bkpts): New.
17873 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17874 type. Add comment about fast tracepoints.
17875 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17876 non-existing action_str field.
17877 (get_context_regcache): Handle fast tracepoints.
17878 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17879 to the regcache.
17880 (fast_tracepoint_from_jump_pad_address): New.
17881 (fast_tracepoint_from_ipa_tpoint_address): New.
17882 (collecting_t): New.
17883 (force_unlock_trace_buffer): New.
17884 (fast_tracepoint_collecting): New.
17885 (collecting): New.
17886 (gdb_collect): New.
17887 (write_inferior_data_ptr): New.
17888 (target_tp_heap): New.
17889 (target_malloc): New.
17890 (download_agent_expr): New.
17891 (UALIGN): New.
17892 (download_tracepoints): New.
17893 (download_trace_state_variables): New.
17894 (upload_fast_traceframes): New.
17895 (IPA_FIRST_TRACEFRAME): New.
17896 (IPA_NEXT_TRACEFRAME_1): New.
17897 (IPA_NEXT_TRACEFRAME): New.
17898 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17899 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17900 (gdb_jump_pad_buffer_end): New.
17901 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17902 (initialize_tracepoint): Adjust.
17903 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17904 buffer. Initialize the low module.
17905 * utils.c (PREFIX, TOOLNAME): New.
17906 (malloc_failure): Use PREFIX.
17907 (error): In the IPA, an error causes an exit.
17908 (fatal, warning): Use PREFIX.
17909 (internal_error): Use TOOLNAME.
17910 (NUMCELLS): Increase to 10.
17911 * configure, config.in: Regenerate.
17912
17913 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17914
17915 * server.c (handle_query) <qSupported>: Do two passes over the
17916 qSupported string to avoid nesting strtok.
17917
17918 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17919
17920 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17921 (CDEPS): New.
17922 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17923 -Wl,--dynamic-list.
17924 * configure: Regenerate.
17925 * proc-service.list: New.
17926
17927 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17928
17929 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17930 New comment.
17931
17932 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17933
17934 * gdbreplay.c (remote_open): Check error return from socket() call by
17935 its equality to -1 not by it being negative.
17936 * remote-utils.c (remote_open): Likewise.
17937
17938 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17939
17940 * config.h: Regenerate.
17941
17942 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17943
17944 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17945 doesn't provide PTRACE_GET_THREAD_AREA.
17946
17947 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17948
17949 * linux-m68k-low.c: Include <asm/ptrace.h>
17950 (ps_get_thread_area): Implement.
17951
17952 2010-05-03 Doug Evans <dje@google.com>
17953
17954 * event-loop.c (struct callback_event): New struct.
17955 (callback_list): New global.
17956 (append_callback_event, delete_callback_event): New functions.
17957 (process_callback): New function.
17958 (start_event_loop): Call it.
17959 * remote-utils.c (NOT_SCHEDULED): Define.
17960 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17961 moved out of readchar.
17962 (readchar): Rewrite. Call reschedule before returning.
17963 (reset_readchar): New function.
17964 (remote_close): Call it.
17965 (process_remaining, reschedule): New functions.
17966 * server.h (callback_handler_func): New typedef.
17967 (append_callback_event, delete_callback_event): Declare.
17968
17969 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17970
17971 * proc-service.c (ps_pglobal_lookup): Use
17972 thread_db_look_up_one_symbol.
17973 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17974 parameter. Use it instead of all_symbols_looked_up.
17975 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17976 field.
17977 (all_symbols_looked_up): Don't declare.
17978 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17979 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17980 field.
17981 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17982 Set all_symbols_looked_up here.
17983 (thread_db_look_up_one_symbol): New.
17984 (thread_db_get_tls_address): Adjust.
17985 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17986 thread_db object on the heap, and tentatively set it in the
17987 process structure.
17988 (thread_db_init): Don't set all_symbols_looked_up here.
17989 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17990
17991 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17992
17993 * linux-low.c (linux_kill, linux_detach): Adjust.
17994 (status_pending_p_callback): Remove redundant statement. Check
17995 for !TARGET_WAITIKIND_IGNORE, instead of
17996 TARGET_WAITKIND_STOPPED.
17997 (handle_tracepoints): Make sure LWP is locked. Adjust.
17998 (linux_wait_for_event_1): Adjust.
17999 (linux_cancel_breakpoints): New.
18000 (unsuspend_one_lwp): New.
18001 (unsuspend_all_lwps): New.
18002 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
18003 (send_sigstop_callback): Change return type to int, add new
18004 `except' parameter and handle it.
18005 (suspend_and_send_sigstop_callback): New.
18006 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
18007 pass them down. If SUSPEND, also increment the lwp's suspend
18008 count.
18009 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
18010 (need_step_over_p): Don't consider suspended LWPs.
18011 (start_step_over): Adjust.
18012 (proceed_one_lwp): Change return type to int, add new `except'
18013 parameter and handle it.
18014 (unsuspend_and_proceed_one_lwp): New.
18015 (proceed_all_lwps): Use find_inferior instead of
18016 for_each_inferior.
18017 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
18018 also decrement the suspend count of LWPs. Pass `except' down,
18019 instead of hacking its suspend count.
18020 (linux_pause_all): Add `freeze' parameter. Adjust.
18021 (linux_unpause_all): New.
18022 (linux_target_ops): Install linux_unpause_all.
18023 * server.c (handle_status): Adjust.
18024 * target.h (struct target_ops): New fields `unpause_all' and
18025 `cancel_breakpoints'. Add new parameter to `pause_all'.
18026 (pause_all): Add new `freeze' parameter.
18027 (unpause_all): New.
18028 (cancel_breakpoints): New.
18029 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
18030 cancel breakpoints.
18031 (cmd_qtstart): Pause threads.
18032 (stop_tracing): Pause threads, and cancel breakpoints.
18033 * win32-low.c (win32_target_ops): Adjust.
18034
18035 2010-05-03 Pedro Alves <pedro@codesourcery.com>
18036
18037 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
18038 the inferior right away from here...
18039 (linux_wait_1): ... to here, and adjust to check the thread's
18040 last_resume_kind instead of the lwp's step or stop_expected flags.
18041
18042 2010-05-02 Pedro Alves <pedro@codesourcery.com>
18043
18044 * README: Use consistent `GDB' and `GDBserver' spellings.
18045
18046 2010-05-02 Pedro Alves <pedro@codesourcery.com>
18047
18048 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
18049 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
18050 (linux_detach_one_lwp): Assume the lwp is stopped.
18051 (any_thread_of): Delete.
18052 (linux_detach): Stop all lwps here. Don't blindly delete all
18053 breakpoints.
18054 (delete_lwp_callback): New.
18055 (linux_mourn): Delete all lwps of the process that is gone.
18056 (linux_wait_1): Don't delete the last lwp of the process here.
18057 * mem-break.h (mark_breakpoints_out): Declare.
18058 * mem-break.c (mark_breakpoints_out): New.
18059 (free_all_breakpoints): Use it.
18060 * server.c (handle_target_event): If the process is gone, mark
18061 breakpoints out.
18062 * thread-db.c (struct thread_db) <create_bp>: New field.
18063 (thread_db_enable_reporting): Fix prototype. Store a thread event
18064 breakpoint reference in the thread_db struct.
18065 (thread_db_load_search): Clear the thread_db object.
18066 (try_thread_db_load_1): Ditto.
18067 (switch_to_process): New.
18068 (disable_thread_event_reporting): Use it.
18069 (remove_thread_event_breakpoints): New.
18070 (thread_db_detach, thread_db_mourn): Use it.
18071
18072 2010-05-01 Pedro Alves <pedro@codesourcery.com>
18073
18074 * linux-low.c (linux_enable_event_reporting): New.
18075 (linux_wait_for_event_1, handle_extended_wait): Use it.
18076
18077 2010-04-30 Pedro Alves <pedro@codesourcery.com>
18078
18079 * linux-low.c (linux_kill_one_lwp, linux_kill)
18080 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
18081 (send_sigstop): Take an lwp_info as parameter instead. Queue a
18082 SIGSTOP even if the LWP is stopped.
18083 (send_sigstop_callback): New.
18084 (stop_all_lwps): Use send_sigstop_callback instead.
18085 (linux_resume_one_thread): Adjust.
18086 (proceed_one_lwp): Still proceed an LWP that the client has
18087 requested to stop, if we haven't reported it as stopped yet. Make
18088 sure that LWPs the client want stopped, have a pending SIGSTOP.
18089
18090 2010-04-26 Doug Evans <dje@google.com>
18091
18092 * server.c (handle_general_set): Make static.
18093
18094 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
18095 Print received char after testing for error/eof instead of before.
18096 (input_interrupt): Tweak comment.
18097
18098 2010-04-23 Doug Evans <dje@google.com>
18099
18100 * server.c (start_inferior): Print inferior argv if --debug.
18101
18102 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
18103
18104 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
18105 * nto-x86-low.c: Include server.h
18106
18107 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
18108
18109 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
18110 be consistent with other sources of this directory.
18111 (init_registers_amd64): Correct name of source file of this function
18112 in the comment.
18113
18114 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18115
18116 * configure.srv (x86_64-*-mingw*): New configuration for Windows
18117 64-bit executables.
18118
18119 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18120
18121 * win32-i386-low.c: Add 64-bit support.
18122 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
18123 (init_registers_amd64): Declare.
18124 (mappings): Add 64-bit version of array.
18125 (init_windows_x86): New function.
18126 (the_low_target): Change init_arch field to init_windows_x86.
18127
18128 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18129
18130 * win32-low.c: Adapt to support also 64-bit architecture.
18131 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
18132 (get_image_name): Use SIZE_T type for local variable `done'.
18133 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
18134 (toolhelp_get_dll_name): Idem.
18135 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
18136 Use uintptr_t typecast to avoid warning.
18137 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
18138 (handle_exception): Use phex_nz to avoid warning.
18139 (win32_wait): Remove unused local variable `process'.
18140
18141 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18142
18143 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
18144 `amd64-avx.o'.
18145
18146 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
18147
18148 * configure.ac: Use `ws2_32' library for srv_mingw.
18149 * configure: Regenerate.
18150 * gdbreplay.c: Include winsock2.h instead of winsock.h.
18151 * remote-utils.c: Likewise.
18152
18153 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
18154
18155 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
18156 if __x86_64__ is defined.
18157
18158 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18159
18160 * configure: Regenerate.
18161
18162 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18163
18164 * server.c (handle_query): Handle 'qGetTIBAddr' query.
18165 * target.h (target_ops): New get_tib_address field.
18166 * win32-low.h (win32_thread_info): Add thread_local_base field.
18167 * win32-low.c (child_add_thread): Add tlb argument.
18168 Set thread_local_base field to TLB.
18169 (get_child_debug_event): Adapt to child_add_thread change.
18170 (win32_get_tib_address): New function.
18171 (win32_target_ops): Set get_tib_address field to
18172 win32_get_tib_address.
18173 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
18174
18175 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18176
18177 * linux-low.c (linux_mourn): Also remove the process.
18178 * server.c (handle_target_event): Don't remove the process here.
18179 * nto-low.c (nto_mourn): New.
18180 (nto_target_ops): Install it.
18181 * spu-low.c (spu_mourn): New.
18182 (spu_target_ops): Install it.
18183 * win32-low.c (win32_mourn): New.
18184 (win32_target_ops): Install it.
18185
18186 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18187
18188 * server.h (buffer_xml_printf): Remove redundant `;'.
18189
18190 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18191
18192 * regcache.c (set_register_cache): Invalidate regcaches before
18193 changing the register cache layout.
18194 (regcache_invalidate_one): Allow a NULL regcache.
18195 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
18196 regcaches before changing the register cache layout or the target
18197 regsets.
18198
18199 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
18200
18201 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
18202 variable warning on Linux/x86-64.
18203
18204 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18205
18206 GDBserver disconnected tracing support.
18207
18208 * linux-low.c (linux_remove_process): Delete.
18209 (add_lwp): Don't set last_resume_kind here.
18210 (linux_kill): Use `mourn'.
18211 (linux_detach): Use `thread_db_detach', and `mourn'.
18212 (linux_mourn): New.
18213 (linux_attach_lwp_1): Adjust comment.
18214 (linux_attach): last_resume_kind moved the thread_info; adjust.
18215 (status_pending_p_callback): Adjust.
18216 (linux_wait_for_event_1): Adjust.
18217 (count_events_callback, select_singlestep_lwp_callback)
18218 (select_event_lwp_callback, cancel_breakpoints_callback)
18219 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
18220 (proceed_one_lwp): Adjust.
18221 (linux_async): Add debug output.
18222 (linux_thread_stopped): New.
18223 (linux_pause_all): New.
18224 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
18225 linux_pause_all.
18226 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
18227 (thread_db_free): Delete declaration.
18228 (thread_db_detach, thread_db_mourn): Declare.
18229 * thread-db.c (thread_db_init): Use thread_db_mourn.
18230 (thread_db_free): Delete, split in two.
18231 (disable_thread_event_reporting): New.
18232 (thread_db_detach): New.
18233 (thread_db_mourn): New.
18234
18235 * server.h (struct thread_info) <last_resume_kind>: New field.
18236 <attached>: Add comment.
18237 <gdb_detached>: New field.
18238 (handler_func): Change return type to int.
18239 (handle_serial_event, handle_target_event): Ditto.
18240 (gdb_connected): Declare.
18241 (tracing): Delete.
18242 (disconnected_tracing): Declare.
18243 (stop_tracing): Declare.
18244
18245 * server.c (handle_query) <qSupported>: Report support for
18246 disconnected tracing.
18247 (queue_stop_reply_callback): Account for running threads.
18248 (gdb_wants_thread_stopped): New.
18249 (gdb_wants_all_threads_stopped): New.
18250 (gdb_reattached_process): New.
18251 (handle_status): Clear the `gdb_detached' flag of all processes.
18252 In all-stop, stop all threads.
18253 (main): Be sure to leave tfind mode. Handle disconnected tracing.
18254 (process_serial_event): If the remote connection breaks, or if an
18255 exit was forced with "monitor exit", force an event loop exit.
18256 Handle disconnected tracing on detach.
18257 (handle_serial_event): Adjust.
18258 (handle_target_event): If GDB isn't connected, forward events back
18259 to the inferior, unless the last process exited, in which case,
18260 exit gdbserver. Adjust interface.
18261
18262 * remote-utils.c (remote_open): Don't block in accept. Instead
18263 register an event loop source on the listen socket file
18264 descriptor. Refactor bits into ...
18265 (listen_desc): ... this new global.
18266 (gdb_connected): ... this new function.
18267 (enable_async_notification): ... this new function.
18268 (handle_accept_event): ... this new function.
18269 (remote_close): Clear remote_desc.
18270
18271 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18272
18273 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18274 New fields.
18275 (mourn_inferior): Define.
18276 (target_process_qsupported): Avoid the dangling else problem.
18277 (thread_stopped): Define.
18278 (pause_all): Define.
18279 (target_waitstatus_to_string): Declare.
18280 * target.c (target_waitstatus_to_string): New.
18281
18282 * tracepoint.c (tracing): Make extern.
18283 (disconnected_tracing): New.
18284 (stop_tracing): Make extern. Handle tracing stops due to GDB
18285 disconnecting.
18286 (cmd_qtdisconnected): New.
18287 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18288 (handle_tracepoint_general_set): Handle QTDisconnected.
18289
18290 * event-loop.c (event_handler_func): Change return type to int.
18291 (process_event): Bail out if the event handler wants the event
18292 loop to stop.
18293 (handle_file_event): Ditto.
18294 (start_event_loop): Bail out if the event handler wants the event
18295 loop to stop.
18296
18297 * nto-low.c (nto_target_ops): Adjust.
18298 * spu-low.c (spu_wait): Don't remove the process here.
18299 (spu_target_ops): Adjust.
18300 * win32-low.c (win32_wait): Don't remove the process here.
18301 (win32_target_ops): Adjust.
18302
18303 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18304
18305 * regcache.c (realloc_register_cache): Invalidate inferior's
18306 regcache before recreating it.
18307
18308 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18309
18310 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18311
18312 2010-04-09 Stan Shebs <stan@codesourcery.com>
18313 Pedro Alves <pedro@codesourcery.com>
18314
18315 * server.h (LONGEST): New.
18316 (struct thread_info) <while_stepping>: New field.
18317 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18318 Declare.
18319 (initialize_tracepoint, handle_tracepoint_general_set)
18320 (handle_tracepoint_query, tracepoint_finished_step)
18321 (tracepoint_was_hit, release_while_stepping_state_list):
18322 (current_traceframe): Declare.
18323 * server.c (handle_general_set): Handle tracepoint packets.
18324 (read_memory): New.
18325 (write_memory): New.
18326 (handle_search_memory_1): Use read_memory.
18327 (handle_query): Report support for conditional tracepoints, trace
18328 state variables, and tracepoint sources. Handle tracepoint
18329 queries.
18330 (main): Initialize the tracepoints module.
18331 (process_serial_event): Handle traceframe reads/writes.
18332
18333 * linux-low.c (handle_tracepoints): New.
18334 (linux_wait_1): Call it.
18335 (linux_resume_one_lwp): Handle while-stepping.
18336 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18337 (linux_target_ops): Install them.
18338 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18339 New field.
18340 * linux-x86-low.c (x86_supports_tracepoints): New.
18341 (the_low_target). Install it.
18342
18343 * mem-break.h (delete_breakpoint): Declare.
18344 * mem-break.c (delete_breakpoint): Make external.
18345
18346 * target.h (struct target_ops): Add `supports_tracepoints',
18347 `read_pc', and `write_pc' fields.
18348 (target_supports_tracepoints): Define.
18349 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18350 (phex_nz): New.
18351
18352 * regcache.h (struct regcache) <registers_owned>: New field.
18353 (init_register_cache, regcache_cpy): Declare.
18354 (regcache_read_pc, regcache_write_pc): Declare.
18355 (register_cache_size): Declare.
18356 (supply_regblock): Declare.
18357 * regcache.c (init_register_cache): New.
18358 (new_register_cache): Use it.
18359 (regcache_cpy): New.
18360 (register_cache_size): New.
18361 (supply_regblock): New.
18362 (regcache_read_pc, regcache_write_pc): New.
18363
18364 * tracepoint.c: New.
18365
18366 * Makefile.in (OBS): Add tracepoint.o.
18367 (tracepoint.o): New rule.
18368
18369 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18370
18371 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18372 (i386-mmx.o): New.
18373 (i386-mmx.c): Likewise.
18374 (i386-mmx-linux.o): Likewise.
18375 (i386-mmx-linux.c): Likewise.
18376
18377 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18378 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18379 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18380 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18381
18382 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18383 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18384 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18385
18386 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18387
18388 * Makefile.in (clean): Updated.
18389 (i386-avx.o): New.
18390 (i386-avx.c): Likewise.
18391 (i386-avx-linux.o): Likewise.
18392 (i386-avx-linux.c): Likewise.
18393 (amd64-avx.o): Likewise.
18394 (amd64-avx.c): Likewise.
18395 (amd64-avx-linux.o): Likewise.
18396 (amd64-avx-linux.c): Likewise.
18397
18398 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18399 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18400 (srv_amd64_regobj): Add amd64-avx.o.
18401 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18402 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18403 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18404 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18405 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18406 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18407 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18408
18409 * i387-fp.c: Include "i386-xstate.h".
18410 (i387_xsave): New.
18411 (i387_cache_to_xsave): Likewise.
18412 (i387_xsave_to_cache): Likewise.
18413 (x86_xcr0): Likewise.
18414
18415 * i387-fp.h (i387_cache_to_xsave): Likewise.
18416 (i387_xsave_to_cache): Likewise.
18417 (x86_xcr0): Likewise.
18418
18419 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18420 * linux-crisv32-low.c (target_regsets): Likewise.
18421 * linux-m68k-low.c (target_regsets): Likewise.
18422 * linux-mips-low.c (target_regsets): Likewise.
18423 * linux-ppc-low.c (target_regsets): Likewise.
18424 * linux-s390-low.c (target_regsets): Likewise.
18425 * linux-sh-low.c (target_regsets): Likewise.
18426 * linux-sparc-low.c (target_regsets): Likewise.
18427 * linux-xtensa-low.c (target_regsets): Likewise.
18428
18429 * linux-low.c: Include <sys/uio.h>.
18430 (regsets_fetch_inferior_registers): Support nt_type.
18431 (regsets_store_inferior_registers): Likewise.
18432 (linux_process_qsupported): New.
18433 (linux_target_ops): Add linux_process_qsupported.
18434
18435 * linux-low.h (regset_info): Add nt_type.
18436 (linux_target_ops): Add process_qsupported.
18437
18438 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18439 and <sys/uio.h>.
18440 (init_registers_i386_avx_linux): New.
18441 (init_registers_amd64_avx_linux): Likewise.
18442 (xmltarget_i386_linux_no_xml): Likewise.
18443 (xmltarget_amd64_linux_no_xml): Likewise.
18444 (PTRACE_GETREGSET): Likewise.
18445 (PTRACE_SETREGSET): Likewise.
18446 (x86_fill_xstateregset): Likewise.
18447 (x86_store_xstateregset): Likewise.
18448 (use_xml): Likewise.
18449 (x86_linux_update_xmltarget): Likewise.
18450 (x86_linux_process_qsupported): Likewise.
18451 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18452 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18453 init_registers_i386_linux here. Call
18454 x86_linux_update_xmltarget.
18455 (the_low_target): Add x86_linux_process_qsupported.
18456
18457 * server.c (handle_query): Call target_process_qsupported.
18458
18459 * target.h (target_ops): Add process_qsupported.
18460 (target_process_qsupported): New.
18461
18462 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18463
18464 * inferiors.c (add_thread): Set last_status kind to
18465 TARGET_WAITKIND_IGNORE.
18466 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18467 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18468 (linux_wait_1): Move `thread' local definition to block that uses
18469 it. Don't NULL initialize `event_child'.
18470 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18471 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18472 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18473
18474 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18475
18476 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18477 an extended waitstatus, or by a watchpoint.
18478 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18479 thread was stepping or has been stopped by a watchpoint.
18480
18481 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18482
18483 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18484 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18485 of another, then delete the previous, and validate all
18486 breakpoints.
18487 (validate_inserted_breakpoint): New.
18488 (delete_disabled_breakpoints): New.
18489 (validate_breakpoints): New.
18490 (check_mem_read): Validate breakpoints before trusting their
18491 shadow. Delete disabled breakpoints.
18492 (check_mem_write): Validate breakpoints before trusting they
18493 should be inserted. Delete disabled breakpoints.
18494 * mem-break.h (validate_breakpoints):
18495 * server.c (handle_query): Validate breakpoints when we see a
18496 qSymbol query.
18497
18498 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18499
18500 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18501 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18502 if we could tell there's a GDB breakpoint at stop_pc.
18503 (need_step_over_p): Don't do a step over if we find a GDB
18504 breakpoint at the resume PC.
18505
18506 * mem-break.c (struct raw_breakpoint): New.
18507 (enum bkpt_type): New type `gdb_breakpoint'.
18508 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18509 fields. New field `raw'.
18510 (find_raw_breakpoint_at): New.
18511 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18512 breakpoint instead.
18513 (set_breakpoint_at): Adjust.
18514 (delete_raw_breakpoint): New.
18515 (release_breakpoint): New.
18516 (delete_breakpoint): Rename to...
18517 (delete_breakpoint_1): ... this. Add proc parameter. Use
18518 release_breakpoint. Return ENOENT.
18519 (delete_breakpoint): Reimplement.
18520 (find_breakpoint_at): Delete.
18521 (find_gdb_breakpoint_at): New.
18522 (delete_breakpoint_at): Delete.
18523 (set_gdb_breakpoint_at): New.
18524 (delete_gdb_breakpoint_at): New.
18525 (gdb_breakpoint_here): New.
18526 (set_reinsert_breakpoint): Use release_breakpoint.
18527 (uninsert_breakpoint): Rename to ...
18528 (uninsert_raw_breakpoint): ... this.
18529 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18530 (reinsert_raw_breakpoint): Change parameter type to
18531 raw_breakpoint.
18532 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18533 instead.
18534 (check_breakpoints): Adjust. Use release_breakpoint.
18535 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18536 (breakpoint_inserted_here): Ditto.
18537 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18538 Don't trust the breakpoint's shadow if it is not inserted.
18539 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18540 (delete_all_breakpoints): Adjust.
18541 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18542 use delete_breakpoint_1.
18543
18544 * mem-break.h (breakpoints_supported): Delete declaration.
18545 (set_gdb_breakpoint_at): Declare.
18546 (gdb_breakpoint_here): Declare.
18547 (delete_breakpoint_at): Delete.
18548 (delete_gdb_breakpoint_at): Declare.
18549
18550 * server.h (struct raw_breakpoint): Forward declare.
18551 (struct process_info): New field `raw_breakpoints'.
18552
18553 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18554 breakpoints.
18555
18556 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18557
18558 * linux-low.c (status_pending_p_callback): Fix comment.
18559 (linux_wait_for_event_1): Move most of the internal breakpoint
18560 handling from here...
18561 (linux_wait_1): ... to here.
18562 (count_events_callback): New.
18563 (select_singlestep_lwp_callback): New.
18564 (select_event_lwp_callback): New.
18565 (cancel_breakpoints_callback): New.
18566 (select_event_lwp): New.
18567 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18568 priority to all LWPs that have had events that should be reported
18569 to the client. Cancel breakpoints when about to reporting the
18570 event to the client, not while stopping lwps. No longer cancel
18571 finished single-steps here.
18572 (cancel_finished_single_step): Delete.
18573 (cancel_finished_single_steps): Delete.
18574
18575 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18576
18577 * mem-break.c (enum bkpt_type): New.
18578 (struct breakpoint): New field `type'.
18579 (set_breakpoint_at): Change return type to struct breakpoint
18580 pointer. Set type to `other_breakpoint' by default.
18581 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18582 in the breakpoint list.
18583 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18584 (reinsert_breakpoint): Rename to ...
18585 (reinsert_raw_breakpoint): ... this.
18586 (reinsert_breakpoints_at): Adjust.
18587 * mem-break.h (struct breakpoint): Declare.
18588 (set_breakpoint_at): Change return type to struct breakpoint
18589 pointer.
18590
18591 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18592
18593 * server.c (handle_query): Assign, not compare.
18594
18595 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18596
18597 Teach linux gdbserver to step-over-breakpoints.
18598
18599 * linux-low.c (can_hardware_single_step): New.
18600 (supports_breakpoints): New.
18601 (handle_extended_wait): If stopping threads, read the stop pc of
18602 the new cloned LWP.
18603 (get_pc): New.
18604 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18605 low target doesn't support retrieving the PC.
18606 (add_lwp): Set last_resume_kind to resume_continue.
18607 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18608 (linux_attach): Don't clear stop_expected. Set the lwp's
18609 last_resume_kind to resume_stop.
18610 (linux_detach_one_lwp): Don't check for removed breakpoints.
18611 (check_removed_breakpoint): Delete.
18612 (status_pending_p): Rename to ...
18613 (status_pending_p_callback): ... this. Don't check for removed
18614 breakpoints. Don't consider threads that are stopped from GDB's
18615 perspective.
18616 (linux_wait_for_lwp): Always read the stop_pc here.
18617 (cancel_breakpoint): New.
18618 (step_over_bkpt): New global.
18619 (linux_wait_for_event_1): Implement stepping over breakpoints.
18620 (gdb_wants_lwp_stopped): New.
18621 (gdb_wants_all_stopped): New.
18622 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18623 single-step traps here. Store the thread's last reported target
18624 wait status.
18625 (send_sigstop): Don't clear stop_expected. Always set it,
18626 instead.
18627 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18628 (cancel_finished_single_step): New.
18629 (cancel_finished_single_steps): New.
18630 (wait_for_sigstop): Don't cancel finished single-step traps here.
18631 (linux_resume_one_lwp): Don't check for removed breakpoints.
18632 Don't set `step' on non-hardware step archs.
18633 (linux_set_resume_request): Ignore resume_stop requests if already
18634 stopping or stopped. Set the lwp's last_resume_kind.
18635 (resume_status_pending_p): Don't check for removed breakpoints.
18636 (need_step_over_p): New.
18637 (start_step_over): New.
18638 (finish_step_over): New.
18639 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18640 requests. Clear the thread's last reported target waitstatus.
18641 Don't use the `suspended' flag. Don't consider pending breakpoints.
18642 (linux_resume): Start a step-over if necessary.
18643 (proceed_one_lwp): New.
18644 (proceed_all_lwps): New.
18645 (unstop_all_lwps): New.
18646 * linux-low.h (struct lwp_info): Rewrite comment for the
18647 `suspended' flag. Add the `stop_pc' field. Delete the
18648 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18649 Add `'last_resume_kind' and `need_step_over' fields.
18650 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18651 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18652 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18653 (set_raw_breakpoint_at): New.
18654 (set_breakpoint_at): Rewrite to use it.
18655 (reinsert_breakpoint_handler): Delete.
18656 (set_reinsert_breakpoint): New.
18657 (reinsert_breakpoint_by_bp): Delete.
18658 (delete_reinsert_breakpoints): New.
18659 (uninsert_breakpoint): Rewrite.
18660 (uninsert_breakpoints_at): New.
18661 (reinsert_breakpoint): Rewrite.
18662 (reinsert_breakpoints_at): New.
18663 (check_breakpoints): Rewrite.
18664 (breakpoint_here): New.
18665 (breakpoint_inserted_here): New.
18666 (check_mem_read): Adjust.
18667 * mem-break.h (breakpoints_supported, breakpoint_here)
18668 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18669 (reinsert_breakpoint_by_bp): Delete declaration.
18670 (delete_reinsert_breakpoints): Declare.
18671 (reinsert_breakpoint): Delete declaration.
18672 (reinsert_breakpoints_at): Declare.
18673 (uninsert_breakpoint): Delete declaration.
18674 (uninsert_breakpoints_at): Declare.
18675 (check_breakpoints): Adjust prototype.
18676 * server.h: Adjust include order.
18677 (struct thread_info): Declare here. Add a `last_status' field.
18678
18679 2010-03-23 Michael Snyder <msnyder@vmware.com>
18680
18681 * server.c (crc32): New function.
18682 (handle_query): Add handling for 'qCRC:' request.
18683
18684 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18685
18686 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18687 lwp had been stopped by a watchpoint.
18688
18689 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18690
18691 * server.h (internal_error): Declare.
18692 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18693 * utils.c (internal_error): New function.
18694
18695 2010-03-15 Andreas Schwab <schwab@redhat.com>
18696
18697 * configure.srv: Fix typo setting srv_regobj.
18698
18699 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18700
18701 * linux-low.c (fetch_register): Avoid passing a non string literal
18702 format to `error'.
18703 (usr_store_inferior_registers): Ditto.
18704
18705 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18706
18707 * linux-low.c (linux_write_memory): Bail out early if peeking
18708 memory failed.
18709
18710 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18711
18712 * linux-low.h (struct lwp_info): New fields
18713 `stopped_by_watchpoint' and `stopped_data_address'.
18714 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18715 here, and cache them in the lwp object.
18716 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18717 directly.
18718 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18719 field.
18720 (linux_stopped_by_watchpoint): Rewrite.
18721 (linux_stopped_data_address): Rewrite.
18722
18723 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18724
18725 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18726 switching the current inferior, not before.
18727
18728 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18729
18730 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18731 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18732 i386-linux.c and amd64-linux.c.
18733 (reg-i386.o): Removed.
18734 (reg-i386.c): Likewise.
18735 (reg-i386-linux.o): Likewise.
18736 (reg-i386-linux.c): Likewise.
18737 (reg-x86-64.o): Likewise.
18738 (reg-x86-64.c): Likewise.
18739 (reg-x86-64-linux.o): Likewise.
18740 (reg-x86-64-linux.c): Likewise.
18741 (i386.o): New.
18742 (i386.c): Likewise.
18743 (i386-linux.o): Likewise.
18744 (i386-linux.c): Likewise.
18745 (amd64.o): Likewise.
18746 (amd64.c): Likewise.
18747 (amd64-linux.o): Likewise.
18748 (amd64-linux.c): Likewise.
18749
18750 * configure.srv (srv_i386_regobj): New.
18751 (srv_i386_linux_regobj): Likewise.
18752 (srv_amd64_regobj): Likewise.
18753 (srv_amd64_linux_regobj): Likewise.
18754 (srv_i386_32bit_xmlfiles): Likewise.
18755 (srv_i386_64bit_xmlfiles): Likewise.
18756 (srv_i386_xmlfiles): Likewise.
18757 (srv_amd64_xmlfiles): Likewise.
18758 (srv_i386_linux_xmlfiles): Likewise.
18759 (srv_amd64_linux_xmlfiles): Likewise.
18760 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18761 srv_xmlfiles to $srv_i386_xmlfiles.
18762 (i[34567]86-*-mingw32ce*): Likewise.
18763 (i[34567]86-*-mingw*): Likewise.
18764 (i[34567]86-*-nto*): Likewise.
18765 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18766 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18767 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18768 (x86_64-*-linux*): Likewise.
18769
18770 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18771 (init_registers_amd64_linux): New.
18772 (x86_arch_setup): Replace init_registers_x86_64_linux with
18773 init_registers_amd64_linux.
18774
18775 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18776
18777 * configure.ac: Check for libdl. If it is not available link against
18778 static libthread_db.
18779 * configure: Regenerate.
18780
18781 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18782
18783 PR9605
18784
18785 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18786 handing a read watchpoint.
18787 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18788
18789 2010-02-12 Doug Evans <dje@google.com>
18790
18791 * linux-low.c (linux_supports_tracefork_flag): Document.
18792 (linux_look_up_symbols): Add comment.
18793
18794 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18795
18796 * regcache.c (supply_register): Clear regcache if buf is NULL.
18797
18798 2010-02-02 Nicolas Roche <roche@sourceware.org>
18799 Joel Brobecker <brobecker@adacore.com>
18800
18801 * inferiors.c (find_inferior): Add function documentation.
18802 (unloaded_dll): Handle the case where the unloaded dll has not
18803 been previously registered in the dll list.
18804
18805 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18806
18807 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18808 (thumb2_breakpoint): New.
18809 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18810
18811 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18812
18813 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18814 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18815 breakpoints.
18816
18817 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18818
18819 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18820
18821 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18822
18823 * linux-s390-low.c (s390_collect_ptrace_register)
18824 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18825
18826 2010-01-21 Doug Evans <dje@google.com>
18827
18828 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18829 (PTRACE_ARG4_TYPE): New macro.
18830 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18831 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18832 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18833 (usr_store_inferior_registers): Ditto.
18834 (linux_read_memory, linux_write_memory): Ditto.
18835 (linux_test_for_tracefork): Ditto.
18836
18837 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18838 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18839
18840 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18841
18842 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18843 target.
18844
18845 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18846
18847 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18848 prototype to take a regcache. Adjust.
18849
18850 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18851
18852 * regcache.h (struct thread_info): Forward declare.
18853 (struct regcache): New.
18854 (new_register_cache): Adjust prototype.
18855 (get_thread_regcache): Declare.
18856 (free_register_cache): Adjust prototype.
18857 (registers_to_string, registers_from_string): Ditto.
18858 (supply_register, supply_register_by_name, collect_register)
18859 (collect_register_as_string, collect_register_by_name): Ditto.
18860 * regcache.c (struct inferior_regcache_data): Delete.
18861 (get_regcache): Rename to ...
18862 (get_thread_regcache): ... this. Adjust. Switch inferior before
18863 fetching registers.
18864 (regcache_invalidate_one): Adjust.
18865 (regcache_invalidate): Fix prototype.
18866 (new_register_cache): Return the new register cache.
18867 (free_register_cache): Change prototype.
18868 (realloc_register_cache): Adjust.
18869 (registers_to_string): Change prototype to take a regcache. Adjust.
18870 (registers_from_string): Ditto.
18871 (register_data): Ditto.
18872 (supply_register): Ditto.
18873 (supply_register_by_name): Ditto.
18874 (collect_register): Ditto.
18875 (collect_register_as_string): Ditto.
18876 (collect_register_by_name): Ditto.
18877 * server.c (process_serial_event): Adjust.
18878 * linux-low.h (regset_fill_func, regset_store_func): Change
18879 prototype.
18880 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18881 Change prototype.
18882 * linux-low.c (get_stop_pc): Adjust.
18883 (check_removed_breakpoint): Adjust.
18884 (linux_wait_for_event): Adjust.
18885 (linux_resume_one_lwp): Adjust.
18886 (fetch_register): Add regcache parameter. Adjust.
18887 (usr_store_inferior_registers): Ditto.
18888 (regsets_fetch_inferior_registers): Ditto.
18889 (regsets_store_inferior_registers): Ditto.
18890 (linux_fetch_registers, linux_store_registers): Ditto.
18891 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18892 regcache. Adjust.
18893 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18894 Ditto.
18895 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18896 prototype to take a regcache.
18897 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18898 * remote-utils.c (convert_ascii_to_int, outreg)
18899 (prepare_resume_reply): Change prototype to take a regcache.
18900 Adjust.
18901 * target.h (struct target_ops) <fetch_registers, store_registers>:
18902 Change prototype to take a regcache.
18903 (fetch_inferior_registers, store_inferior_registers): Change
18904 prototype to take a regcache. Adjust.
18905 * proc-service.c (ps_lgetregs): Adjust.
18906 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18907 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18908 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18909 take a regcache. Adjust.
18910 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18911 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18912 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18913 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18914 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18915 (cris_cannot_fetch_register):
18916 (cris_breakpoint_at): Change prototype to take a regcache.
18917 Adjust.
18918 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18919 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18920 to take a regcache. Adjust.
18921 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18922 Adjust.
18923 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18924 take a regcache. Adjust.
18925 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18926 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18927 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18928 * linux-mips-low.c (mips_get_pc):
18929 (mips_set_pc): Change prototype to take a regcache. Adjust.
18930 (mips_reinsert_addr): Adjust.
18931 (mips_collect_register): Change prototype to take a regcache.
18932 Adjust.
18933 (mips_supply_register):
18934 (mips_collect_register_32bit, mips_supply_register_32bit)
18935 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18936 (mips_store_fpregset): Ditto.
18937 * linux-ppc-low.c (ppc_supply_ptrace_register)
18938 (ppc_supply_ptrace_register): Ditto.
18939 (parse_spufs_run): Adjust.
18940 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18941 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18942 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18943 take a regcache. Adjust.
18944 * linux-s390-low.c (s390_collect_ptrace_register)
18945 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18946 (s390_set_pc): Change prototype to take a regcache. Adjust.
18947 (s390_arch_setup): Adjust.
18948 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18949 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18950 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18951 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18952 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18953 regcache. Adjust.
18954 (sparc_breakpoint_at): Adjust.
18955 * linux-xtensa-low.c (xtensa_fill_gregset):
18956 (xtensa_store_gregset):
18957 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18958 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18959 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18960 prototype to take a regcache. Adjust.
18961 * win32-arm-low.c (arm_fetch_inferior_register)
18962 (arm_store_inferior_register): Change prototype to take a
18963 regcache. Adjust.
18964 * win32-i386-low.c (i386_fetch_inferior_register)
18965 (i386_store_inferior_register): Change prototype to take a
18966 regcache. Adjust.
18967 * win32-low.c (child_fetch_inferior_registers)
18968 (child_store_inferior_registers): Change prototype to take a
18969 regcache. Adjust.
18970 (win32_wait): Adjust.
18971 (win32_fetch_inferior_registers): Change prototype to take a
18972 regcache. Adjust.
18973 (win32_store_inferior_registers): Adjust.
18974 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18975 store_inferior_register>: Change prototype to take a regcache.
18976
18977 2010-01-20 Doug Evans <dje@google.com>
18978
18979 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18980 #ifdef.
18981 (linux_wait_for_event1, linux_init_signals): Ditto.
18982 (W_STOPCODE): Provide definition if missing.
18983
18984 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18985
18986 * linux-low.c (linux_core_of_thread): New.
18987 (compare_ints, show_process, list_threads): New.
18988 (linux_qxfer_osdata): Report threads and cores.
18989 (linux_target_op): Register linux_core_of_thread.
18990 * remote-utils.c (prepare_resume_reply): Report the core.
18991 (buffer_xml_printf): Support %d specifier.
18992 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18993 New.
18994 (handle_query): Handle qXfer:threads. Announce availability
18995 thereof.
18996 * target.h (struct target_ops): New field core_of_thread.
18997
18998 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18999
19000 * Makefile.in (clean): Remove new generated files.
19001 (reg-s390.o, reg-s390.c): Remove rules.
19002 (reg-s390x.o, reg-s390x.c): Likewise.
19003 (s390-linux32.o, s390-linux32.c): Add rules.
19004 (s390-linux64.o, s390-linux64.c): Likewise.
19005 (s390x-linux64.o, s390x-linux64.c): Likewise.
19006 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
19007 * linux-s390-low.c: Include <elf.h>.
19008 (HWCAP_S390_HIGH_GPRS): Define if undefined.
19009 (init_registers_s390): Remove prototype.
19010 (init_registers_s390x): Likewise.
19011 (init_registers_s390_linux32): Add prototype.
19012 (init_registers_s390_linux64): Likewise.
19013 (init_registers_s390x_linux64): Likewise.
19014 (s390_num_regs_3264): New define.
19015 (s390_regmap_3264): New global variable.
19016 (s390_cannot_fetch_register): Remove obsolete check.
19017 (s390_cannot_store_register): Likewise.
19018 (s390_collect_ptrace_register): Handle upper/lower register halves.
19019 (s390_supply_ptrace_register): Likewise.
19020 (s390_fill_gregset): Update to register number changes.
19021 (s390_get_hwcap): New routine.
19022 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
19023 Install appropriate regmap and register set.
19024
19025 2010-01-01 Joel Brobecker <brobecker@adacore.com>
19026
19027 * server.c (gdbserver_version): Update copyright year to 2010.
19028 * gdbreplay.c (gdbreplay_version): Likewise.
19029
19030 2009-12-28 Doug Evans <dje@google.com>
19031
19032 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
19033 elf/external.h. Include <elf.h> instead but only if necessary.
19034
19035 2009-12-28 Pedro Alves <pedro@codesourcery.com>
19036
19037 * linux-low.c (linux_remove_process): Remove `detaching'
19038 parameter. Don't release/detach from thread_db here.
19039 (linux_kill): Release/detach from thread_db here, ...
19040 (linux_detach): ... and here, before actually detaching.
19041 (linux_wait_1): ... and here, when a process exits.
19042 * thread-db.c (any_thread_of): New.
19043 (thread_db_free): Switch the current inferior to a thread of the
19044 passed in process.
19045
19046 2009-12-21 Doug Evans <dje@google.com>
19047
19048 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
19049
19050 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
19051 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
19052 warning ifndef __NR_tkill. Move setting of errno there too.
19053 Delete unnecessary resetting of errno after syscall.
19054 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
19055
19056 * configure.ac: Check for dladdr.
19057 * config.in: Regenerate.
19058 * configure: Regenerate.
19059 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
19060 (try_thread_db_load): Update.
19061
19062 * linux-low.c (my_waitpid): Delete unnecessary prototype.
19063
19064 2009-12-18 Doug Evans <dje@google.com>
19065
19066 * event-loop.c: Include unistd.h if it exists.
19067
19068 * linux-low.c (my_waitpid): Move definition away from being in
19069 between linux_tracefork_child/linux_test_for_tracefork.
19070
19071 * gdb_proc_service.h (psaddr_t): Fix type.
19072 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
19073 signature to match glibc.
19074
19075 2009-12-16 Doug Evans <dje@google.com>
19076
19077 * linux-low.c (linux_read_memory): Fix argument to read.
19078
19079 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19080
19081 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
19082 events, don't leave current_inferior pointing at null.
19083
19084 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19085
19086 * win32-low.c (LOG): Delete.
19087 (OUTMSG): Output to stderr.
19088 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
19089 on compile time LOG macro.
19090 (win32_wait): Fix debug output.
19091
19092 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19093
19094 * win32-low.c (win32_add_one_solib): If the dll name is
19095 "ntdll.dll", prepend the system directory to the dll path.
19096
19097 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
19098
19099 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
19100
19101 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
19102 Vladimir Prus <vladimir@codesourcery.com>
19103
19104 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
19105 * configure.ac: Check for __mcoldfire__ and set
19106 gdb_cv_m68k_is_coldfire.
19107 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
19108 reg-cf.o and reg-m68k.o.
19109 * configure: Regenerated.
19110
19111 2009-11-16 Pedro Alves <pedro@codesourcery.com>
19112
19113 * linux-low.c (linux_remove_process): Add `detaching' parameter.
19114 Pass it to thread_db_free.
19115 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
19116 proper `detaching' argument to linux_remove_process.
19117 * linux-low.h (thread_db_free): Add `detaching' parameter.
19118 * thread-db.c (thread_db_init): Pass false as `detaching' argument
19119 to thread_db_free.
19120 (thread_db_free): Add `detaching' parameter. Only
19121 call td_ta_clear_event if detaching from process.
19122
19123 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
19124
19125 * thread-db.c (thread_db_free): Fix typo.
19126
19127 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
19128
19129 PR gdb/10838
19130 * thread-db.c (thread_db_free): Call td_ta_clear_event.
19131
19132 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
19133
19134 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
19135 with an i686 compiler.
19136 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
19137 needed.
19138 * configure: Rebuilt.
19139
19140 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
19141
19142 PR gdb/10783
19143
19144 * server.c (handle_search_memory_1): Correct read_addr initialization
19145 in loop for searching subsequent chunks.
19146
19147 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
19148
19149 * configure.ac: New --with-libthread-db option.
19150 * thread-db.c: Allow direct dependence on libthread_db.
19151 (thread_db_free): Adjust.
19152 * config.in: Regenerate.
19153 * configure: Likewise.
19154
19155 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
19156
19157 PR gdb/10757
19158 * thread-db.c (attach_thread): New function.
19159 (maybe_attach_thread): Return success/failure.
19160 (find_new_threads_callback): Adjust.
19161 (thread_db_find_new_threads): Loop until no new threads.
19162
19163 2009-10-13 Pedro Alves <pedro@codesourcery.com>
19164
19165 * proc-service.c (ps_lgetregs): Formatting.
19166
19167 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
19168
19169 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
19170 * configure.ac: Adjust.
19171 * linux-low.h (struct process_info_private): Move members to struct
19172 thread_db.
19173 (thread_db_free, thread_db_handle_monitor_command): New prototype.
19174 * linux-low.c (linux_remove_process): Adjust.
19175 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
19176 * server.c (handle_query): Move code ...
19177 (handle_monitor_command): ... here. New function.
19178 * target.h (struct target_ops): New member.
19179 * thread-db.c (struct thread_db): New.
19180 (libthread_db_search_path): New variable.
19181 (thread_db_create_event, thread_db_enable_reporting)
19182 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
19183 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
19184 (try_thread_db_load_1, dladdr_to_soname): New functions.
19185 (try_thread_db_load, thread_db_load_search): New functions.
19186 (thread_db_init): Search for libthread_db.
19187 (thread_db_free): New function.
19188 (thread_db_handle_monitor_command): Likewise.
19189 * config.in: Regenerate.
19190 * configure: Regenerate.
19191
19192 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
19193
19194 * spu-low.c (spu_kill): Wait for inferior to terminate.
19195 Call clear_inferiors.
19196 (spu_detach): Call clear_inferiors.
19197
19198 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19199
19200 * aclocal.m4: Regenerate.
19201 * config.in: Likewise.
19202 * configure: Likewise.
19203
19204 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19205
19206 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
19207 (parse_spufs_run): New function.
19208 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
19209 (ppc_breakpoint_at): Handle SPU breakpoints.
19210
19211 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19212
19213 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
19214 (SPUFS_MAGIC): Define.
19215 (spu_enumerate_spu_ids): New function.
19216 (linux_qxfer_spu): New function.
19217 (linux_target_ops): Install linux_qxfer_spu.
19218
19219 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19220
19221 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
19222 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
19223 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
19224 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
19225 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
19226 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
19227 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
19228 (init_registers_powerpc_cell32l): Add prototype.
19229 (init_registers_powerpc_cell64l): Likewise.
19230 (ppc_arch_setup): Detect Cell/B.E. architecture.
19231
19232 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19233
19234 * Makefile.in (datarootdir): New variable.
19235
19236 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19237
19238 * linux-low.c (linux_write_memory): Update debugging output.
19239 * Makefile.in (clean): Add new descriptions.
19240 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
19241 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
19242 * configure.srv: Add new files for arm*-*-linux*.
19243 * linux-arm-low.c: Add new declarations.
19244 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
19245 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
19246 (HWCAP_VFPv3D16): New.
19247 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
19248 instead of __IWMMXT__.
19249 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
19250 (arm_arch_setup): New.
19251 (target_regsets): Remove #ifdef. Add VFP regset.
19252 (the_low_target): Use arm_arch_setup.
19253
19254 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19255
19256 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
19257 the main thread again.
19258
19259 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
19260
19261 Adding Neutrino gdbserver.
19262 * configure: Regenerated.
19263 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19264 * configure.srv (i[34567]86-*-nto*): New target.
19265 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19266 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19267 (nto_comctrl) [__QNX__]: New function.
19268 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19269
19270 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19271
19272 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19273 srv_tgtobj.
19274
19275 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19276 Pedro Alves <pedro@codesourcery.com>
19277
19278 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19279 don't support CONTEXT_EXTENDED_REGISTERS.
19280 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19281 (the_low_target): Install them.
19282 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19283 failing with ERROR_PIPE_NOT_CONNECTED.
19284
19285 2009-06-30 Doug Evans <dje@google.com>
19286 Pierre Muller <muller@ics.u-strasbg.fr>
19287
19288 Add h/w watchpoint support to x86-linux, win32-i386.
19289 * Makefile.in (SFILES): Add i386-low.c
19290 (i386_low_h): Define.
19291 (i386-low.o): Add dependencies.
19292 (linux-x86-low.o): Add i386-low.h dependency.
19293 (win32-i386-low.o): Ditto.
19294 * i386-low.c: New file.
19295 * i386-low.h: New file.
19296 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19297 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19298 * linux-low.c (linux_add_process): Initialize arch_private.
19299 (linux_remove_process): Free arch_private.
19300 (add_lwp): Initialize arch_private.
19301 (delete_lwp): Free arch_private.
19302 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19303 provided.
19304 * linux-low.h (process_info_private): New member arch_private.
19305 (lwp_info): New member arch_private.
19306 (linux_target_ops): New members new_process, new_thread,
19307 prepare_to_resume.
19308 (ptid_of): New macro.
19309 * linux-x86-low.c: Include stddef.h, i386-low.h.
19310 (arch_process_info): New struct.
19311 (arch_lwp_info): New struct.
19312 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19313 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19314 (i386_dr_low_get_status): New function.
19315 (x86_insert_point, x86_remove_point): New functions.
19316 (x86_stopped_by_watchpoint): New function.
19317 (x86_stopped_data_address): New function.
19318 (x86_linux_new_process, x86_linux_new_thread): New functions.
19319 (x86_linux_prepare_to_resume): New function.
19320 (the_low_target): Add entries for insert_point, remove_point,
19321 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19322 prepare_to_resume.
19323 * server.c (debug_hw_points): New global.
19324 (monitor_show_help): Document set debug-hw-points.
19325 (handle_query): Process "set debug-hw-points".
19326 * server.h (debug_hw_points): Declare.
19327 (paddress): Declare.
19328 * utils.c (NUMCELLS, CELLSIZE): New macros.
19329 (get_sell, xsnprintf, paddress): New functions.
19330 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19331 remove_point, stopped_by_watchpoint, stopped_data_address.
19332 * win32-i386-low.c: Include i386-low.h.
19333 (debug_reg_state): Replaces dr.
19334 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19335 (i386_dr_low_get_status): New function.
19336 (i386_insert_point, i386_remove_point): New functions.
19337 (i386_stopped_by_watchpoint): New function.
19338 (i386_stopped_data_address): New function.
19339 (i386_initial_stuff): Update.
19340 (get_thread_context,set_thread_context,i386_thread_added): Update.
19341 (the_low_target): Add entries for insert_point,
19342 remove_point, stopped_by_watchpoint, stopped_data_address.
19343 * win32-low.c (win32_insert_watchpoint): New function.
19344 (win32_remove_watchpoint): New function.
19345 (win32_stopped_by_watchpoint): New function.
19346 (win32_stopped_data_address): New function.
19347 (win32_target_ops): Add entries for insert_watchpoint,
19348 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19349 * win32-low.h (win32_target_ops): New members insert_point,
19350 remove_point, stopped_by_watchpoint, stopped_data_address.
19351
19352 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19353
19354 * server.c (process_serial_event): Re-return unsupported, not
19355 error, if the type isn't recognized. Re-allow supporting only
19356 insert or remove packets. Also call require_running for
19357 breakpoints. Add missing break statement to default case. Tidy.
19358 * target.h (struct target_ops): Rename insert_watchpoint to
19359 insert_point, and remove_watchpoint to remove_point.
19360
19361 * linux-low.h (struct linux_target_ops): Likewise.
19362 * linux-low.c (linux_insert_watchpoint): Rename to ...
19363 (linux_insert_point): ... this. Adjust.
19364 (linux_remove_watchpoint): Rename to ...
19365 (linux_remove_point): ... this. Adjust.
19366 (linux_target_ops): Adjust.
19367 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19368 (cris_insert_point): ... this.
19369 (cris_remove_watchpoint): Rename to ...
19370 (cris_remove_point): ... this.
19371 (the_low_target): Adjust.
19372
19373 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19374
19375 * server.c (handle_v_kill): Pass signal_pid to
19376 kill_inferior if multi_process is zero.
19377
19378 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19379
19380 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19381 * target.h (target_ops): Comment for *_watchpoint to make it clear
19382 the functions can get types '0' and '1'.
19383
19384 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19385
19386 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19387 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19388 * regcache.c (get_regcache): Likewise.
19389 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19390 * win32-low.c (child_fetch_inferior_registers): Remove check for
19391 regno 0.
19392
19393 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19394 Pedro Alves <pedro@codesourcery.com>
19395
19396 * target.h (struct target_ops) <supports_multi_process>: New
19397 callback.
19398 (target_supports_multi_process): New.
19399 * server.c (handle_query): Even if GDB reports support, only
19400 enable multi-process if the target also supports it. Report
19401 multi-process support only if the target backend supports it.
19402 * linux-low.c (linux_supports_multi_process): New function.
19403 (linux_target_ops): Install it as target_supports_multi_process
19404 callback.
19405
19406 2009-05-24 Doug Evans <dje@google.com>
19407
19408 Global renaming of find_thread_pid to find_thread_ptid.
19409 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19410 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19411 All callers updated.
19412
19413 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19414 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19415 directly.
19416
19417 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19418 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19419 (linux_resume_one_lwp): Ditto.
19420
19421 2009-05-23 Doug Evans <dje@google.com>
19422
19423 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19424 from struct inferior_list_entry * to struct lwp_info *.
19425 All callers updated.
19426
19427 2009-05-13 Doug Evans <dje@google.com>
19428
19429 * linux-x86-low.c: Don't include assert.h.
19430 (x86_siginfo_fixup): Use fatal, not assert.
19431 (x86_arch_setup): Fix comment.
19432
19433 2009-05-12 Doug Evans <dje@google.com>
19434
19435 Biarch support for i386/amd64 gdbserver.
19436 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19437 Add linux-x86-low.c.
19438 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19439 (linux-x86-low.o): Add.
19440 * linux-x86-64-low.c: Delete.
19441 * linux-i386-low.c: Delete.
19442 * linux-x86-low.c: New file.
19443 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19444 linux-x86-low.o.
19445 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19446 linux-x86-low.o.
19447 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19448 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19449 (linux_child_pid_to_exec_file): New function.
19450 (elf_64_header_p, elf_64_file_p): New functions.
19451 (siginfo_fixup): New function.
19452 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19453 give target a chance to convert layout.
19454 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19455 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19456
19457 2009-05-07 Doug Evans <dje@google.com>
19458
19459 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19460 (regsets_store_inferior_registers): Ditto.
19461
19462 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19463
19464 PR server/10048
19465
19466 * linux-low.c (must_set_ptrace_flags): Delete.
19467 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19468 of the global.
19469 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19470 `lwp->must_set_ptrace_flags' instead.
19471 (linux_wait_for_event_1): Set ptrace options here.
19472 (linux_wait_1): ... not here.
19473
19474 2009-04-30 Doug Evans <dje@google.com>
19475
19476 * inferiors.c (started_inferior_callback): New function.
19477 (attached_inferior_callback): New function.
19478 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19479 * server.c (print_started_pid, print_attached_pid): New functions.
19480 (detach_or_kill_for_exit): New function.
19481 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19482 * server.h (have_started_inferiors_p): Declare.
19483 (have_attached_inferiors_p): Declare.
19484
19485 * inferiors.c (remove_process): Fix memory leak, free process.
19486 * linux-low.c (linux_remove_process): New function.
19487 (linux_kill): Call it instead of remove_process.
19488 (linux_detach, linux_wait_1): Ditto.
19489
19490 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19491
19492 * configure.srv: Add x86 Windows CE target.
19493
19494 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19495
19496 * inferiors.c (get_thread_process): Make global.
19497 * server.h (get_thread_process): Add prototype.
19498 * thread-db.c (find_one_thread): Use get_thread_process
19499 instead of current_process.
19500 (thread_db_get_tls_address): Do not crash if called when
19501 thread layer is not yet initialized.
19502
19503 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19504
19505 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19506 * spu-low.c (current_tid): Rename to ...
19507 (current_ptid): ... this.
19508 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19509 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19510 ptid_get_lwp (current_ptid) instead of current_tid.
19511 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19512 instead of current_tid. Use find_process_pid to verify pid
19513 argument is valid. Pass proper argument to remove_process.
19514 (spu_thread_alive): Compare current_ptid instead of current_tid.
19515 (spu_resume): Likewise.
19516
19517 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19518
19519 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19520 variable.
19521
19522 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19523
19524 Implement the multiprocess extensions, and add linux multiprocess
19525 support.
19526
19527 * server.h (ULONGEST): Declare.
19528 (struct ptid, ptid_t): New.
19529 (minus_one_ptid, null_ptid): Declare.
19530 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19531 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19532 (struct inferior_list_entry): Change `id' type from unsigned from
19533 to ptid_t.
19534 (struct sym_cache, struct breakpoint, struct
19535 process_info_private): Forward declare.
19536 (struct process_info): Declare.
19537 (current_process): Declare.
19538 (all_processes): Declare.
19539 (initialize_inferiors): Declare.
19540 (add_thread): Adjust to use ptid_t.
19541 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19542 (add_process, remove_process, find_thread_pid): Declare.
19543 (find_inferior_id): Adjust to use ptid_t.
19544 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19545 (multi_process): Declare.
19546 (push_event): Adjust to use ptid_t.
19547 (read_ptid, write_ptid): Declare.
19548 (prepare_resume_reply): Adjust to use ptid_t.
19549 (clear_symbol_cache): Declare.
19550 * inferiors.c (all_processes): New.
19551 (null_ptid, minus_one_ptid): New.
19552 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19553 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19554 (add_thread): Change unsigned long to ptid. Remove gdb_id
19555 parameter. Adjust.
19556 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19557 (gdb_id_to_thread): Rename to ...
19558 (find_thread_pid): ... this. Change unsigned long to ptid.
19559 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19560 (loaded_dll, pull_pid_from_list): Adjust.
19561 (add_process, remove_process, find_process_pid)
19562 (get_thread_process, current_process, initialize_inferiors): New.
19563 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19564 (struct target_waitstatus) <related_pid>: Ditto.
19565 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19566 return type to int.
19567 (struct target_ops) <join>: Add `pid' argument.
19568 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19569 (struct target_ops) <wait>: Add `ptid' field. Change return type
19570 to ptid.
19571 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19572 (mywait): Add `ptid' argument. Change return type to ptid_t.
19573 (target_pid_to_str): Declare.
19574 * target.c (set_desired_inferior): Adjust to use ptids.
19575 (mywait): Add new `ptid' argument. Adjust.
19576 (target_pid_to_str): New.
19577 * mem-break.h (free_all_breakpoints): Declare.
19578 * mem-break.c (breakpoints): Delelete.
19579 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19580 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19581 to use per-process breakpoint list.
19582 (free_all_breakpoints): New.
19583 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19584 (symbol_cache, all_symbols_looked_up): Delete.
19585 (hexchars): New.
19586 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19587 read_ptid): New.
19588 (prepare_resume_reply): Change ptid argument's type from unsigned
19589 long to ptid_t. Adjust. Implement W;process and X;process.
19590 (free_sym_cache, clear_symbol_cache): New.
19591 (look_up_one_symbol): Adjust to per-process symbol cache. *
19592 * server.c (cont_thread, general_thread, step_thread): Change type
19593 to ptid_t.
19594 (attached): Delete.
19595 (multi_process): New.
19596 (last_ptid): Change type to ptid_t.
19597 (struct vstop_notif) <ptid>: Change type to ptid_t.
19598 (queue_stop_reply, push_event): Change `ptid' argument's type to
19599 ptid_t.
19600 (discard_queued_stop_replies): Add `pid' argument.
19601 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19602 changes. Don't reference the `attached' global.
19603 (attach_inferior): Adjust to mywait interface changes.
19604 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19605 features. Handle and report "multiprocess+". Handle
19606 "qAttached:PID".
19607 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19608 changes.
19609 (handle_v_kill): New.
19610 (handle_v_stopped): Adjust to use target_pid_to_str.
19611 (handle_v_requests): Allow multiple attaches and runs when
19612 multiprocess extensions are in effect. Handle "vKill".
19613 (myresume): Adjust to use ptids.
19614 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19615 (handle_status): Adjust to discard_queued_stop_replies interface
19616 change.
19617 (first_thread_of, kill_inferior_callback)
19618 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19619 (main): Call initialize_inferiors. Adjust to use ptids, killing
19620 and detaching from all inferiors. Handle multiprocess packet
19621 variants.
19622 * linux-low.h: Include gdb_proc_service.h.
19623 (struct process_info_private): New.
19624 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19625 <lwpid_of>: Use ptid_get_lwp.
19626 (get_lwp_thread): Adjust.
19627 (struct lwp_info): Add `dead' member.
19628 (find_lwp_pid): Declare.
19629 * linux-low.c (thread_db_active): Delete.
19630 (new_inferior): Adjust comment.
19631 (inferior_pid): Delete.
19632 (linux_add_process): New.
19633 (handle_extended_wait): Adjust.
19634 (add_lwp): Change unsigned long to ptid.
19635 (linux_create_inferior): Add process to processes table. Adjust
19636 to use ptids. Don't set new_inferior here.
19637 (linux_attach_lwp): Rename to ...
19638 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19639 it. Adjust to use ptids.
19640 (linux_attach_lwp): New.
19641 (linux_attach): Add process to processes table. Don't set
19642 new_inferior here.
19643 (struct counter): New.
19644 (second_thread_of_pid_p, last_thread_of_process_p): New.
19645 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19646 multiple processes.
19647 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19648 processes. Remove process from process table.
19649 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19650 to multiple processes.
19651 (any_thread_of): New.
19652 (linux_detach): Add `pid' argument, and handle it. Remove process
19653 from processes table.
19654 (linux_join): Add `pid' argument. Handle it.
19655 (linux_thread_alive): Change unsighed long argument to ptid_t.
19656 Consider dead lwps as not being alive.
19657 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19658 threads we're not interested in.
19659 (same_lwp, find_lwp_pid): New.
19660 (linux_wait_for_lwp): Change `pid' argument's type from int to
19661 ptid_t. Adjust.
19662 (linux_wait_for_event): Rename to ...
19663 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19664 from int to ptid_t. Adjust.
19665 (linux_wait_for_event): New.
19666 (linux_wait_1): Add `ptid' argument. Change return type to
19667 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19668 that exit from the process table.
19669 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19670 Adjust.
19671 (mark_lwp_dead): New.
19672 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19673 stopping all threads, mark its main lwp as dead.
19674 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19675 ptids.
19676 (fetch_register, usr_store_inferior_registers)
19677 (regsets_fetch_inferior_registers)
19678 (regsets_store_inferior_registers, linux_read_memory)
19679 (linux_write_memory): Inline `inferior_pid'.
19680 (linux_look_up_symbols): Adjust to use per-process
19681 `thread_db_active'.
19682 (linux_request_interrupt): Adjust to use ptids.
19683 (linux_read_auxv): Inline `inferior_pid'.
19684 (initialize_low): Don't reference thread_db_active.
19685 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19686 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19687 (ps_getpid): Return the pid of the current inferior.
19688 * thread-db.c (proc_handle, thread_agent): Delete.
19689 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19690 per-process data.
19691 (find_one_thread): Change argument type to ptid_t. Adjust to
19692 per-process data.
19693 (maybe_attach_thread): Adjust to per-process data and ptids.
19694 (thread_db_find_new_threads): Ditto.
19695 (thread_db_init): Ditto.
19696 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19697 processes table. Adjust to use ptids.
19698 (spu_kill, spu_detach): Adjust interface. Remove process from
19699 processes table.
19700 (spu_join, spu_thread_alive): Adjust interface.
19701 (spu_wait): Adjust interface. Remove process from processes
19702 table. Adjust to use ptids.
19703 * win32-low.c (current_inferior_tid): Delete.
19704 (current_inferior_ptid): New.
19705 (debug_event_ptid): New.
19706 (thread_rec): Take a ptid. Adjust.
19707 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19708 (child_delete_thread): Ditto.
19709 (do_initial_child_stuff): Add `attached' argument. Add process to
19710 processes table.
19711 (child_fetch_inferior_registers, child_store_inferior_registers):
19712 Adjust.
19713 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19714 (win32_attach): Pass 1 to do_initial_child_stuff.
19715 (win32_kill): Adjust interface. Remove process from processes
19716 table.
19717 (win32_detach): Ditto.
19718 (win32_join): Adjust interface.
19719 (win32_thread_alive): Take a ptid.
19720 (win32_resume): Adjust to use ptids.
19721 (get_child_debug_event): Ditto.
19722 (win32_wait): Adjust interface. Remove exiting process from
19723 processes table.
19724
19725 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19726
19727 Non-stop mode support.
19728
19729 * server.h (non_stop): Declare.
19730 (gdb_client_data, handler_func): Declare.
19731 (delete_file_handler, add_file_handler, start_event_loop):
19732 Declare.
19733 (handle_serial_event, handle_target_event, push_event)
19734 (putpkt_notif): Declare.
19735 * target.h (enum resume_kind): New.
19736 (struct thread_resume): Replace `step' field by `kind' field.
19737 (TARGET_WNOHANG): Define.
19738 (struct target_ops) <wait>: Add `options' argument.
19739 <supports_non_stop, async, start_non_stop>: New fields.
19740 (target_supports_non_stop, target_async): New.
19741 (start_non_stop): Declare.
19742 (mywait): Add `options' argument.
19743 * target.c (mywait): Add `options' argument. Print child exit
19744 notifications here.
19745 (start_non_stop): New.
19746 * server.c (non_stop, own_buf, mem_buf): New globals.
19747 (struct vstop_notif): New.
19748 (notif_queue): New global.
19749 (queue_stop_reply, push_event, discard_queued_stop_replies)
19750 (send_next_stop_reply): New.
19751 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19752 interface changes.
19753 (attach_inferior): In non-stop mode, don't wait for the target
19754 here.
19755 (handle_general_set): Handle QNonStop.
19756 (handle_query): When handling qC, return the current general
19757 thread, instead of the first thread of the list.
19758 (handle_query): If the backend supports non-stop mode, include
19759 QNonStop+ in the qSupported query response.
19760 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19761 and non-stop mode.
19762 (handle_v_attach, handle_v_run): Handle non-stop mode.
19763 (handle_v_stopped): New.
19764 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19765 (myresume): Adjust to use resume_kind. Handle non-stop.
19766 (queue_stop_reply_callback): New.
19767 (handle_status): Handle non-stop mode.
19768 (main): Clear non_stop flag on reconnection. Use the event-loop.
19769 Refactor serial protocol handling from here ...
19770 (process_serial_event): ... to this new function. When GDB
19771 selects any thread, select one here. In non-stop mode, wait until
19772 GDB acks all pending events before exiting.
19773 (handle_serial_event, handle_target_event): New.
19774 * remote-utils.c (remote_open): Install remote_desc in the event
19775 loop.
19776 (remote_close): Remove remote_desc from the event loop.
19777 (putpkt_binary): Rename to...
19778 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19779 (putpkt_binary): New as wrapper around putpkt_binary_1.
19780 (putpkt_notif): New.
19781 (prepare_resume_reply): In non-stop mode, don't change the
19782 general_thread.
19783 * event-loop.c: New.
19784 * Makefile.in (OBJ): Add event-loop.o.
19785 (event-loop.o): New rule.
19786
19787 * linux-low.h (pid_of): Moved here.
19788 (lwpid_of): New.
19789 (get_lwp_thread): Use lwpid_of.
19790 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19791 * linux-low.c (pid_of): Delete.
19792 (inferior_pid): Use lwpid_of.
19793 (linux_event_pipe): New.
19794 (target_is_async_p): New.
19795 (delete_lwp): New.
19796 (handle_extended_wait): Use lwpid_of.
19797 (add_lwp): Don't set lwpid field.
19798 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19799 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19800 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19801 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19802 first. Adjust to linux_wait_for_event interface changes. Use
19803 lwpid_of.
19804 (linux_detach): Don't delete the main lwp here.
19805 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19806 (status_pending_p): Don't consider explicitly suspended lwps.
19807 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19808 pointer. Add OPTIONS argument. Change return type to int. Use
19809 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19810 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19811 pointer. Add status pointer argument. Return a pid instead of a
19812 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19813 changes. In non-stop mode, don't switch to a random thread.
19814 (linux_wait): Rename to...
19815 (linux_wait_1): ... this. Add target_options argument, and handle
19816 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19817 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19818 clean exit and signal exit code. Don't stop all threads in
19819 non-stop mode. In all-stop mode, only stop all threads when
19820 reporting a stop to GDB. Handle explicit thread stop requests.
19821 (async_file_flush, async_file_mark): New.
19822 (linux_wait): New.
19823 (send_sigstop): Use lwpid_of.
19824 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19825 interface changes. In non-stop mode, don't switch to a random
19826 thread.
19827 (linux_resume_one_lwp): Use lwpid_of.
19828 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19829 (linux_resume_one_thread): ... this. Handle resume_stop. In
19830 non-stop mode, don't look for pending flag in all threads.
19831 (resume_status_pending_p): Don't consider explicitly suspended
19832 threads.
19833 (my_waitpid): Reimplement. Emulate __WALL.
19834 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19835 Use lwpid_of.
19836 (sigchld_handler, linux_supports_non_stop, linux_async)
19837 (linux_start_non_stop): New.
19838 (linux_target_ops): Register linux_supports_non_stop, linux_async
19839 and linux_start_non_stop.
19840 (initialize_low): Install SIGCHLD handler.
19841 * thread-db.c (thread_db_create_event, find_one_thread)
19842 (thread_db_get_tls_address): Use lwpid_of.
19843 * win32-low.c (win32_detach): Adjust to use resume_kind.
19844 (win32_wait): Add `options' argument.
19845 * spu-low.c (spu_resume): Adjust to use resume_kind.
19846 (spu_wait): Add `options' argument.
19847
19848 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19849
19850 Decouple target code from remote protocol.
19851
19852 * target.h (enum target_waitkind): New.
19853 (struct target_waitstatus): New.
19854 (struct target_ops) <wait>: Return an unsigned long. Take a
19855 target_waitstatus pointer instead of a char pointer.
19856 (mywait): Likewise.
19857 * target.c (mywait): Change prototype to return an unsigned long.
19858 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19859 * server.h (thread_from_wait, old_thread_from_wait): Delete
19860 declarations.
19861 (prepare_resume_reply): Change prototype to take a
19862 target_waitstatus.
19863 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19864 (last_status, last_ptid): New.
19865 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19866 pid instead of a signal.
19867 (attach_inferior): Remove "status" and "signal" parameters.
19868 Adjust.
19869 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19870 not as an address.
19871 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19872 (handle_v_requests, myresume): Remove "status" and "signal"
19873 parameters. Adjust.
19874 (handle_status): New.
19875 (main): Delete local `status'. Adjust.
19876 * remote-utils.c: Include target.h.
19877 (prepare_resume_reply): Change prototype to take a
19878 target_waitstatus. Adjust.
19879
19880 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19881 interface.
19882 * spu-low.c (spu_wait): Adjust.
19883 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19884 Delete.
19885 (win32_wait): Adjust.
19886
19887 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19888
19889 * target.h (struct thread_resume): Delete leave_stopped member.
19890 (struct target_ops): Add a `n' argument to the `resume' callback.
19891 * server.c (start_inferior): Adjust.
19892 (handle_v_cont, myresume): Adjust.
19893 * linux-low.c (check_removed_breakpoint): Adjust to resume
19894 interface change, and to removed leave_stopped field.
19895 (resume_ptr): Delete.
19896 (struct thread_resume_array): New.
19897 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19898 resume interface change.
19899 (linux_continue_one_thread, linux_queue_one_thread)
19900 (resume_status_pending_p): Check if the resume field is NULL
19901 instead of checking the leave_stopped member.
19902 (linux_resume): Adjust to the target resume interface change.
19903 * spu-low.c (spu_resume): Adjust to the target resume interface
19904 change.
19905 * win32-low.c (win32_detach, win32_resume): Ditto.
19906
19907 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19908
19909 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19910 flag.
19911 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19912 pending.
19913 (linux_continue_one_thread): Only preserve the stepping flag if
19914 there's a pending breakpoint.
19915
19916 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19917
19918 * server.c (main): After the inferior having exited, call
19919 remote_close before exiting gdbserver.
19920
19921 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19922
19923 Fix size of FPSCR in Power 7 processors.
19924 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19925 (PPC_FEATURE_HAS_DFP): New #define.
19926 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19927 size of the FPSCR.
19928
19929 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19930
19931 * server.c (handle_query) Whitespace and formatting.
19932
19933 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19934
19935 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19936 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19937 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19938 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19939 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19940 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19941 Makefile.in, configure.ac: Fix whitespace throughout.
19942 * configure: Regenerate.
19943
19944 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19945
19946 * inferiors.c (find_inferior): Make it safe for the callback
19947 function to delete the currently iterated inferior.
19948
19949 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19950
19951 * Makefile.in (linuw_low_h): Move higher.
19952 (thread-db.o): Depend on $(linux_low_h).
19953
19954 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19955
19956 Rename "process" to "lwp" throughout.
19957
19958 * linux-low.c (all_processes): Rename to...
19959 (all_lwps): ... this.
19960 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19961 (add_process): Rename to ...
19962 (add_lwp): ... this. Adjust.
19963 (linux_create_inferior): Adjust.
19964 (linux_attach_lwp): Adjust.
19965 (linux_attach): Adjust.
19966 (linux_kill_one_process): Rename to ...
19967 (linux_kill_one_lwp): ... this. Adjust.
19968 (linux_kill): Adjust.
19969 (linux_detach_one_process): Rename to ...
19970 (linux_detach_one_lwp): ... this. Adjust.
19971 (linux_detach): Adjust.
19972 (check_removed_breakpoint): Adjust.
19973 (status_pending_p): Adjust.
19974 (linux_wait_for_process): Rename to ...
19975 (linux_wait_for_lwp): ... this. Adjust.
19976 (linux_wait_for_event): Adjust.
19977 (send_sigstop): Adjust.
19978 (wait_for_sigstop): Adjust.
19979 (stop_all_processes): Rename to ...
19980 (stop_all_lwps): ... this.
19981 (linux_resume_one_process): Rename to ...
19982 (linux_resume_one_lwp): ... this. Adjust.
19983 (linux_set_resume_request, linux_continue_one_thread)
19984 (linux_queue_one_thread, resume_status_pending_p)
19985 (usr_store_inferior_registers, regsets_store_inferior_registers)
19986 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19987 Adjust.
19988 * linux-low.h (get_process): Rename to ...
19989 (get_lwp): ... this. Adjust.
19990 (get_thread_process): Rename to ...
19991 (get_thread_lwp): ... this. Adjust.
19992 (get_process_thread): Rename to ...
19993 (get_lwp_thread): ... this. Adjust.
19994 (struct process_info): Rename to ...
19995 (struct lwp_info): ... this.
19996 (all_processes): Rename to ...
19997 (all_lwps): ... this.
19998 * proc-service.c (ps_lgetregs): Adjust.
19999 * thread-db.c (thread_db_create_event, find_one_thread)
20000 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
20001
20002 2009-03-14 Pedro Alves <pedro@codesourcery.com>
20003
20004 * server.c (handle_query): Handle "qAttached".
20005
20006 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
20007
20008 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
20009 GPLv3, update license URL.
20010
20011 2009-03-01 Doug Evans <dje@google.com>
20012
20013 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
20014 (server_h): Add gdb_signals.h.
20015 (signals.o): Update.
20016 * server.h (target_signal_from_host,target_signal_to_host_p)
20017 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
20018
20019 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
20020
20021 * remote-utils.c (getpkt): Also generate remote-debug
20022 information if noack_mode is set.
20023
20024 2009-02-06 Pedro Alves <pedro@codesourcery.com>
20025
20026 * server.c (handle_query): Report qXfer:siginfo:read and
20027 qXfer:siginfo:write as supported and handle them.
20028 * target.h (struct target_ops) <qxfer_siginfo>: New field.
20029 * linux-low.c (linux_xfer_siginfo): New.
20030 (linux_target_ops): Set it.
20031
20032 2009-01-26 Pedro Alves <pedro@codesourcery.com>
20033
20034 * server.c (gdbserver_usage): Mention --remote-debug.
20035 (main): Accept '--remote-debug' switch.
20036
20037 2009-01-18 Doug Evans <dje@google.com>
20038
20039 * regcache.c (new_register_cache): No need to check result of xcalloc.
20040 * server.c (handle_search_memory): Back out calls to xmalloc,
20041 result is checked and error is returned to user upon failure.
20042 (handle_query): Ditto. Add more checks for result of malloc.
20043 (handle_v_cont): Check result of malloc, report error back to
20044 user upon failure.
20045 (handle_v_run): Ditto. Call freeargv.
20046 * server.h (freeargv): Declare.
20047 * utils.c (freeargv): New fn.
20048
20049 2009-01-15 Doug Evans <dje@google.com>
20050
20051 * gdbreplay.c (perror_with_name): Make arg const char *.
20052 * server.h (target_signal_to_name): Make return type const char *.
20053 * thread-db.c (thread_db_err_str): Make return type const char *.
20054 * utils.c (perror_with_name): Make arg const char *.
20055
20056 2009-01-14 Pedro Alves <pedro@codesourcery.com>
20057
20058 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
20059 when handling a EXIT_PROCESS_DEBUG_EVENT.
20060
20061 2009-01-06 Joel Brobecker <brobecker@adacore.com>
20062
20063 * gdbreplay.c (gdbreplay_version): Update copyright year.
20064 * server.c (gdbserver_version): Likewise.
20065
20066 2009-01-05 Doug Evans <dje@google.com>
20067
20068 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
20069 (handle_extended_wait): Improve comment.
20070
20071 2008-12-13 Doug Evans <dje@google.com>
20072
20073 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
20074 * server.h (ATTR_MALLOC): New macro.
20075 (xmalloc,xcalloc,xstrdup): Declare.
20076 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
20077 * inferiors.c: Ditto.
20078 * linux-low.c: Ditto.
20079 * mem-break.c: Ditto.
20080 * regcache.c: Ditto.
20081 * remote-utils.c: Ditto.
20082 * server.c: Ditto.
20083 * target.c: Ditto.
20084 * win32-low.c: Ditto.
20085
20086 2008-12-12 Doug Evans <dje@google.com>
20087
20088 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
20089 in debugging printf.
20090
20091 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
20092
20093 2008-12-09 Doug Evans <dje@google.com>
20094
20095 * linux-low.h (struct process_info): Delete member tid, unused.
20096 * thread-db.c (find_one_thread): Update.
20097 (maybe_attach_thread): Update.
20098
20099 2008-12-02 Pedro Alves <pedro@codesourcery.com>
20100
20101 * target.h (struct target_ops): Add qxfer_osdata member.
20102 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
20103 and dirent.h.
20104 (linux_qxfer_osdata): New functions.
20105 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
20106 callback.
20107 * server.c (handle_query): Handle "qXfer:osdata:read:".
20108 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
20109 (buffer_xml_printf): New functions.
20110 * server.h (struct buffer): New.
20111 (buffer_grow_str, buffer_grow_str0): New macros.
20112 (buffer_grow, buffer_free, buffer_init, buffer_finish)
20113 (buffer_xml_printf): Declare.
20114
20115 2008-11-24 Doug Evans <dje@google.com>
20116
20117 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
20118
20119 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
20120
20121 * server.c (handle_v_run): Always use the supplied argument list.
20122
20123 2008-11-19 Bob Wilson <bob.wilson@acm.org>
20124
20125 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
20126 (xtensa_regmap_table): Add entry for scompare1.
20127
20128 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
20129
20130 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
20131 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
20132 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
20133 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
20134 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
20135 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
20136 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
20137 XML target descriptions.
20138 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
20139 when inferior is running on an ISA 2.05 or later processor. Add
20140 special case to return offset for full 64-bit slot of FPSCR when
20141 in 32-bits.
20142
20143 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
20144
20145 * Makefile.in (SFILES, clean): Added sparc64 files.
20146 (reg-sparc64.o, reg-sparc64.c): New.
20147 * configure.srv (sparc*-*-linux*): New configuration.
20148 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
20149 syscall arguments for SPARC.
20150 (regsets_store_inferior_registers): Likewise.
20151 * linux-sparc-low.c: New file.
20152
20153 2008-10-21 Doug Evans <dje@google.com>
20154
20155 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
20156 (READLINE_DIR,READLINE_DEP): Delete.
20157 (INTERNAL_CFLAGS): Update.
20158 (LINTFLAGS): Update.
20159
20160 2008-10-10 Pedro Alves <pedro@codesourcery.com>
20161
20162 * server.c (handle_v_run): If GDB didn't specify an argv, use the
20163 whole argv from the last run, not just argv[0].
20164
20165 2008-09-08 Pedro Alves <pedro@codesourcery.com>
20166
20167 * regcache.c (new_register_cache): Return NULL if the register
20168 cache size isn't known yet.
20169 (free_register_cache): Avoid dereferencing a NULL regcache.
20170
20171 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20172
20173 * configure.srv: Merge MIPS and MIPS64.
20174
20175 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
20176
20177 * Makefile.in (uninstall): Apply $(EXEEXT) too.
20178
20179 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
20180
20181 * Makefile.in: Add required vsx dependencies.
20182
20183 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
20184 Declare init_registers_powerpc_vsx32l.
20185 Declare init_registers_powerpc_vsx64l.
20186 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
20187 (ppc_arch_setup): Check for VSX in hwcap.
20188 (ppc_fill_vsxregset): New function.
20189 (ppc_store_vsxregset): New function.
20190 Add new VSX entry in regset_info target_regsets.
20191
20192 * configure.srv: Add new VSX dependencies.
20193
20194 2008-08-12 Pedro Alves <pedro@codesourcery.com>
20195
20196 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
20197 (remote_open): Set or clear transport_is_reliable.
20198 (putpkt_binary): Don't expect acks in noack mode.
20199 (getpkt): Don't send ack/nac in noack mode.
20200 * server.c (handle_general_set): Handle QStartNoAckMode.
20201 (handle_query): If connected by tcp pass QStartNoAckMode+ in
20202 qSupported.
20203 (main): Reset noack_mode on every connection.
20204 * server.h (noack_mode): Declare.
20205
20206 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
20207
20208 * Makefile.in (GDBREPLAY_OBS): New variable.
20209 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
20210
20211 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
20212 Daniel Jacobowitz <dan@codesourcery.com>
20213
20214 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
20215 (usr_store_inferior_registers): Likewise.
20216 (regsets_store_inferior_registers): Likewise.
20217
20218 2008-07-31 Rolf Jansen <rj@surtec.com>
20219 Pedro Alves <pedro@codesourcery.com>
20220
20221 * configure.ac: Check for memmem declaration.
20222 * server.c [HAVE_MALLOC_H]: Include malloc.h.
20223 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
20224 (disable_packet_qfThreadInfo): Unconditionally compile.
20225 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
20226 * configure, config.in: Regenerate.
20227
20228 2008-07-28 Doug Kwan <dougkwan@google.com>
20229
20230 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
20231 (linux_write_memory): Remove declaration of errno.
20232
20233 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
20234
20235 * linux-low.c (handle_extended_wait): Do not use "status"
20236 variable uninitialized.
20237
20238 2008-07-07 Pedro Alves <pedro@codesourcery.com>
20239
20240 * server.c (handle_v_attach): Inhibit reporting dll changes.
20241
20242 2008-06-27 Pedro Alves <pedro@codesourcery.com>
20243
20244 * remote-utils.c (prepare_resume_reply): If requested, don't
20245 output "thread:TID" in the T stop reply.
20246
20247 * server.c (disable_packet_vCont, disable_packet_Tthread)
20248 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
20249 (handle_query): If requested, disable support for qC, qfThreadInfo
20250 and qsThreadInfo.
20251 (handle_v_requests): If requested, disable support for vCont.
20252 (gdbserver_show_disableable): New.
20253 (main): Handle --disable-packet and --disable-packet=LIST.
20254
20255 * server.h (disable_packet_vCont, disable_packet_Tthread)
20256 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
20257
20258 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
20259
20260 * server.c (gdbserver_usage): Mention --version.
20261
20262 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20263
20264 * Makefile.in (gdbreplay.o): New rule.
20265
20266 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20267
20268 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20269 message, not gdbserver.
20270
20271 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20272 Nathan Sidwell <nathan@codesourcery.com>
20273 Joseph Myers <joseph@codesourcery.com>
20274
20275 * acinclude.m4: Include ../../config/acx.m4.
20276 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20277 * configure, config.in: Regenerate.
20278 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20279 * server.c (gdbserver_version): Print PKGVERSION.
20280 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20281 (main): Adjust gdbserver_usage calls.
20282 * gdbreplay.c (version, host_name): Add declarations.
20283 (gdbreplay_version, gdbreplay_usage): New.
20284 (main): Accept --version and --help options.
20285
20286 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20287
20288 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20289 (arm_breakpoint_at): Handle Thumb.
20290 (the_low_target): Add comment.
20291
20292 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20293
20294 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20295
20296 2008-05-09 Doug Evans <dje@google.com>
20297
20298 * server.h (decode_search_memory_packet): Declare.
20299 * remote-utils.c (decode_search_memory_packet): New fn.
20300 * server.c (handle_search_memory_1): New fn.
20301 (handle_search_memory): New fn.
20302 (handle_query): Process qSearch:memory packets.
20303
20304 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20305
20306 * regcache.c (registers_length): Remove.
20307 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20308 full register packet.
20309 * regcache.h (registers_length): Remove prototype.
20310 * server.h (PBUFSIZ): Define to 16384.
20311
20312 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20313
20314 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20315 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20316 powerpc-64l.o, and powerpc-altivec64l.o.
20317 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20318 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20319 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20320 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20321 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20322 to srv_xmlfiles.
20323
20324 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20325 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20326 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20327 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20328 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20329 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20330 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20331 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20332 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20333 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20334 (clean): Update.
20335
20336 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20337 (init_registers_powerpc_32l): ... this new prototype.
20338 (init_registers_powerpc_32): Remove, replace by ...
20339 (init_registers_powerpc_altivec32l): ... this new prototype.
20340 (init_registers_powerpc_e500): Remove, replace by ...
20341 (init_registers_powerpc_e500l): ... this new prototype.
20342 (init_registers_ppc64): Remove, replace by ...
20343 (init_registers_powerpc_64l): ... this new prototype.
20344 (init_registers_powerpc_64): Remove, replace by ...
20345 (init_registers_powerpc_altivec64l): ... this new prototype.
20346 (ppc_num_regs): Set to 73.
20347 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20348 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20349 (ppc_cannot_store_register): Handle orig_r3 and trap.
20350 (ppc_arch_setup): Update init_registers_... calls.
20351 (ppc_fill_gregset): Handle orig_r3 and trap.
20352
20353 * inferiors.c (clear_inferiors): Reset current_inferior.
20354
20355 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20356
20357 * acinclude.m4: Add override.m4.
20358 * configure: Regenerate.
20359
20360 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20361
20362 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20363 initial call to init_register_ppc64.
20364
20365 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20366
20367 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20368 single powerpc*-*-linux* case.
20369 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20370
20371 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20372
20373 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20374 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20375 from reg_xmlfiles.
20376 * linux-ppc-low.c: Include <elf.h>.
20377 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20378 (ppc_hwcap): New global variable.
20379 (ppc_regmap): Remove __SPE__ #ifdef sections.
20380 (ppc_regmap_e500): New global variable.
20381 (ppc_cannot_store_register): Update __SPE__ special case.
20382 (ppc_get_hwcap): New function.
20383 (ppc_arch_setup): Use it to determine whether inferior supports
20384 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20385 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20386 Do not access registers if target does not support AltiVec.
20387 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20388 Do not access registers if target does not support SPE.
20389 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20390
20391 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20392
20393 * linux-low.c (disabled_regsets, num_regsets): New.
20394 (use_regsets_p): Delete.
20395 (linux_wait_for_process): Clear disabled_regsets.
20396 (regsets_fetch_inferior_registers): Check and set it.
20397 (regsets_store_inferior_registers): Likewise.
20398 (linux_fetch_registers, linux_store_registers): Do not use
20399 use_regsets_p.
20400 (initialize_low): Allocate disabled_regsets.
20401
20402 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20403
20404 * Makefile.in (LIBOBJS): New.
20405 (OBS): Use LIBOBJS.
20406 (memmem.o): New rule.
20407 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20408 * configure: Regenerated.
20409
20410 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20411
20412 * server.c (handle_query): Never return "unsupported" for
20413 qXfer:features:read queries.
20414
20415 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20416
20417 * server.c (get_features_xml): Fix inverted condition.
20418 (handle_query): Always support qXfer:feature:read.
20419
20420 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20421
20422 * server.c (wrapper_argv): New.
20423 (start_inferior): Handle wrapper_argv. If set, expect an extra
20424 trap.
20425 (gdbserver_usage): Document --wrapper.
20426 (main): Parse --wrapper.
20427
20428 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20429
20430 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20431 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20432 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20433 (ppc_set_pc): Likewise.
20434 (ppc_arch_setup): New function.
20435 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20436 of collect_register.
20437 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20438
20439 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20440
20441 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20442 instead of linux-ppc64-low.o.
20443 * linux-ppc64-low.c: Remove file.
20444 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20445 (linux-ppc64-low.o): Remove rule.
20446
20447 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20448 (init_registers_powerpc_64): Likewise.
20449 (ppc_regmap): Conditionally define depending on __powerpc64__.
20450 (ppc_cannot_store_register): Do not special-case "fpscr" when
20451 compiled on __powerpc64__.
20452 (ppc_collect_ptrace_register): New function.
20453 (ppc_supply_ptrace_register): New function.
20454 (ppc_breakpoint): Change type to "unsigned int".
20455 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20456 (the_low_target): Conditionally provide initializers for the
20457 arch_setup member depending on __powerpc64__. Install
20458 collect_ptrace_register and supply_ptrace_register members.
20459
20460 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20461
20462 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20463 * server.c (gdbserver_xmltarget): Define.
20464 (get_features_xml): Use it to replace "target.xml" and arch_string.
20465
20466 * configure.srv: Remove srv_xmltarget. Add XML files that were
20467 mentioned there to srv_xmlfiles instead. Remove conditional tests
20468 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20469 srv_xmlfiles and srv_regobj to include all possible choices.
20470 * configure.ac (srv_xmltarget): Remove.
20471 (srv_xmlfiles): Do not add "target.xml".
20472 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20473 checks for supplementary target information.
20474 * configure: Regenerate.
20475 * Makefile.in (XML_TARGET): Remove.
20476 (target.xml): Remove rule.
20477 (clean): Do not clean up target.xml.
20478 (.PRECIOUS): Do not mention target.xml.
20479
20480 * target.h (struct target_ops): Remove arch_string member.
20481 * linux-low.c (linux_arch_string): Remove.
20482 (linux_target_ops): Remove arch_string initializer.
20483 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20484 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20485 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20486 * spu-low.c (spu_arch_string): Remove.
20487 (spu_target_ops): Remove arch_string initializer.
20488 * win32-low.c (win32_arch_string): Remove.
20489 (win32_target_ops): Remove arch_string initializer.
20490 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20491 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20492 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20493
20494 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20495
20496 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20497 by collect_ptrace_register and supply_ptrace_register hooks.
20498 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20499 instead of checking for the_low_target.left_pad_xfer.
20500 (usr_store_inferior_registers): Use collect_ptrace_register callback
20501 instead of checking for the_low_target.left_pad_xfer.
20502
20503 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20504 (s390_supply_ptrace_register): Likewise.
20505 (s390_fill_gregset): Call s390_collect_ptrace_register.
20506 (the_low_target): Update.
20507
20508 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20509 (ppc_supply_ptrace_register): Likewise.
20510 (the_low_target): Update.
20511
20512 * linux-i386-low.c (the_low_target): Update.
20513 * linux-x86-64-low.c (the_low_target): Update.
20514
20515 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20516
20517 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20518 reg-s390.o and reg-s390x.o.
20519
20520 * linux-low.c (new_inferior): New global variable.
20521 (linux_create_inferior, linux_attach): Set it.
20522 (linux_wait_for_process): Call the_low_target.arch_setup after the
20523 target has stopped for the first time.
20524 (initialize_low): Do not call the_low_target.arch_setup.
20525
20526 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20527 (s390_set_pc): Likewise.
20528 (s390_arch_setup): New function.
20529 (the_low_target): Use s390_arch_setup as arch_setup routine.
20530
20531 * regcache.c (realloc_register_cache): New function.
20532 (set_register_cache): Call it for each existing regcache.
20533
20534 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20535
20536 * server.h (init_registers): Remove prototype.
20537
20538 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20539 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20540 instead of init_registers ().
20541 * linux-arm-low.c (init_registers_arm): Add prototype.
20542 (init_registers_arm_with_iwmmxt): Likewise.
20543 (the_low_target): Add initializer for arch_setup field.
20544 * linux-cris-low.c (init_registers_cris): Add prototype.
20545 (the_low_target): Add initializer for arch_setup field.
20546 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20547 (the_low_target): Add initializer for arch_setup field.
20548 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20549 (the_low_target): Add initializer for arch_setup field.
20550 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20551 (the_low_target): Add initializer for arch_setup field.
20552 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20553 (the_low_target): Add initializer for arch_setup field.
20554 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20555 (the_low_target): Add initializer for arch_setup field.
20556 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20557 (init_registers_mips64_linux): Likewise.
20558 (the_low_target): Add initializer for arch_setup field.
20559 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20560 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20561 (the_low_target): Add initializer for arch_setup field.
20562 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20563 (init_registers_powerpc_64): Likewise.
20564 (the_low_target): Add initializer for arch_setup field.
20565 * linux-s390-low.c (init_registers_s390): Add prototype.
20566 (init_registers_s390x): Likewise.
20567 (the_low_target): Add initializer for arch_setup field.
20568 * linux-sh-low.c (init_registers_sh): Add prototype.
20569 (the_low_target): Add initializer for arch_setup field.
20570 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20571 (the_low_target): Add initializer for arch_setup field.
20572 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20573 (the_low_target): Add initializer for arch_setup field.
20574
20575 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20576 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20577 instead of init_registers ().
20578 * win32-arm-low.c (init_registers_arm): Add prototype.
20579 (the_low_target): Add initializer for arch_setup field.
20580 * win32-i386-low.c (init_registers_i386): Add prototype.
20581 (the_low_target): Add initializer for arch_setup field.
20582
20583 * spu-low.c (init_registers_spu): Add prototype.
20584 (initialize_low): Call initialie_registers_spu () instead of
20585 initialize_registers ().
20586
20587 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20588
20589 * server.c (handle_v_requests): When handling the vRun and vAttach
20590 packets, if already debugging a process, don't kill it. Return an
20591 error instead.
20592
20593 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20594
20595 * server.c (handle_query): Correct length check.
20596
20597 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20598
20599 * win32-low.c (do_initial_child_stuff): Add process handle
20600 parameter. Set current_process_handle and current_process_id from the
20601 parameters. Clear globals.
20602 (win32_create_inferior): Don't set current_process_handle and
20603 current_process_id here. Instead pass them on the call to
20604 do_initial_child_stuff.
20605 (win32_attach): Likewise.
20606 (win32_clear_inferiors): New.
20607 (win32_kill): Don't close the current process handle or the
20608 current thread handle here. Instead call win32_clear_inferiors.
20609 (win32_detach): Don't open a new handle to the process. Call
20610 win32_clear_inferiors.
20611 (win32_join): Don't rely on current_process_handle; open a new
20612 handle using the process id.
20613 (win32_wait): Call win32_clear_inferiors when the inferior process
20614 has exited.
20615
20616 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20617
20618 * server.c (monitor_show_help): Add "exit".
20619
20620 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20621
20622 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20623 (clean): Add reg-xtensa.c.
20624 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20625 * configure.srv (xtensa*-*-linux*) New target.
20626 * linux-xtensa-low.c: New.
20627 * xtensa-xtregs.c: New.
20628
20629 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20630
20631 * hostio.c: Don't include errno.h.
20632 (errno_to_fileio_errno): Move to hostio-errno.
20633 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20634 error number outputting to the target->hostio_last_error callback.
20635 (hostio_packet_error): Use FILEIO_EINVAL directly.
20636 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20637 calls to hostio_error.
20638 * hostio-errno.c: New.
20639 * server.h (hostio_last_error_from_errno): Declare.
20640 * target.h (target_ops): Add hostio_last_error member.
20641 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20642 as hostio_last_error handler.
20643 * spu-low.c (spu_target_ops): Likewise.
20644 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20645 (wince_hostio_last_error): New functions.
20646 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20647 as hostio_last_error handler.
20648 (win32_target_ops) [!_WIN32_WCE]: Register
20649 hostio_last_error_from_errno as hostio_last_error handler.
20650 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20651 (hostio-errno.o): New rule.
20652 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20653 * configure.srv (srv_hostio_err_objs): New variable. Default to
20654 hostio-errno.o.
20655 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20656 * configure: Regenerate.
20657
20658 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20659
20660 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20661 (linux_kill, linux_detach): Clean up the process list.
20662 * remote-utils.c (remote_open): Improve port number parsing.
20663 (putpkt_binary, input_interrupt): Only send interrupts if the target
20664 is running.
20665 * server.c (extended_protocol): Make static.
20666 (attached): Define earlier.
20667 (exit_requested, response_needed, program_argv): New variables.
20668 (target_running): New.
20669 (start_inferior): Clear attached here.
20670 (attach_inferior): Set attached here.
20671 (require_running): Define.
20672 (handle_query): Use require_running and target_running. Implement
20673 "monitor exit".
20674 (handle_v_attach, handle_v_run): New.
20675 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20676 (gdbserver_usage): Update.
20677 (main): Redo argument parsing. Handle --debug and --multi. Handle
20678 --attach along with other options or after the port. Save
20679 program_argv. Support no initial program. Resynchronize
20680 communication with GDB after an error. Handle "monitor exit".
20681 Use require_running and target_running. Always allow the extended
20682 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20683 restart in extended mode.
20684 * README: Refer to the GDB manual. Update --attach usage.
20685
20686 2007-12-20 Andreas Schwab <schwab@suse.de>
20687
20688 * linux-low.c (STACK_SIZE): Define.
20689 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20690 (linux_test_for_tracefork): Likewise.
20691
20692 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20693
20694 * linux-low.c (linux_wait_for_event): Update messages. Do not
20695 reinsert auto-delete breakpoints.
20696 * mem-break.c (struct breakpoint): Change return type of handler to
20697 int.
20698 (set_breakpoint_at): Update handler type.
20699 (reinsert_breakpoint_handler): Return 1 instead of calling
20700 delete_breakpoint.
20701 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20702 setting a new one.
20703 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20704 * mem-break.h (set_breakpoint_at): Update handler type.
20705 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20706 * win32-low.c (auto_delete_breakpoint): New.
20707 (get_child_debug_event): Use it.
20708
20709 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20710
20711 * configure.ac: Check for pread and pwrite.
20712 * hostio.c (handle_pread): Fall back to lseek and read.
20713 (handle_pwrite): Fall back to lseek and write.
20714 * config.in, configure: Regenerated.
20715
20716 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20717
20718 * server.c (myresume): Add own_buf argument.
20719 (main): Update calls.
20720
20721 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20722
20723 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20724 * remote-utils.c (remote_open): Do not call disable_async_io.
20725 (block_async_io): Delete.
20726 (unblock_async_io): Make static.
20727 (initialize_async_io): New.
20728 * server.c (handle_v_cont): Handle async I/O here.
20729 (myresume): Likewise. Move other common resume tasks here...
20730 (main): ... from here. Call initialize_async_io. Disable async
20731 I/O before the main loop.
20732 * server.h (initialize_async_io): Declare.
20733 (block_async_io, unblock_async_io): Delete prototypes.
20734 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20735
20736 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20737
20738 * remote-utils.c (readchar): Allow binary data in received messages.
20739
20740 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20741
20742 * win32-low.c (attaching): New global.
20743 (win32_create_inferior): Clear the `attaching' global.
20744 (win32_attach): Set the `attaching' global.
20745 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20746 attaching. Only set a breakpoint at the entry point if not
20747 attaching.
20748
20749 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20750
20751 * server.c (main): Don't report dll events on the initial
20752 connection on attaches.
20753
20754 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20755
20756 * server.c (main): Relax numerical bases supported for the pid of
20757 the --attach command line argument.
20758
20759 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20760
20761 * win32-low.c (win32_attach): Call OpenProcess before
20762 DebugActiveProcess, not after. Add last error output to error
20763 call.
20764
20765 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20766
20767 * win32-low.c (win32_get_thread_context)
20768 (win32_set_thread_context): New functions.
20769 (thread_rec): Use win32_get_thread_context.
20770 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20771 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20772 field.
20773
20774 2007-12-03 Leo Zayas
20775 Pedro Alves <pedro_alves@portugalmail.pt>
20776
20777 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20778 global variables.
20779 (child_add_thread): Minor cleanup.
20780 (child_continue): Resume artificially suspended threads before
20781 calling ContinueDebugEvent.
20782 (suspend_one_thread): New.
20783 (fake_breakpoint_event): New.
20784 (get_child_debug_event): Change return type to int. Check here if
20785 gdb sent an interrupt request. If a soft interrupt was requested,
20786 fake a breakpoint event. Return 0 if there is no event to handle,
20787 and 1 otherwise.
20788 (win32_wait): Don't check here if gdb sent an interrupt request.
20789 Ensure there is a valid event to handle.
20790 (win32_request_interrupt): Add soft interruption method as last
20791 resort.
20792
20793 2007-12-03 Leo Zayas
20794 Pedro Alves <pedro_alves@portugalmail.pt>
20795
20796 * win32-low.h (win32_thread_info): Add descriptions to the
20797 structure members. Replace `suspend_count' counter by a
20798 `suspended' flag.
20799 * win32-low.c (thread_rec): Update condition of when to get the
20800 context from the inferior. Rely on ContextFlags being set if it
20801 has already been retrieved. Only suspend the inferior thread if
20802 we haven't already. Warn if that fails.
20803 (continue_one_thread): s/suspend_count/suspended/. Only call
20804 ResumeThread once. Warn if that fails.
20805
20806 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20807
20808 * win32-low.c (win32_wait): Don't read from the inferior when it
20809 has already exited.
20810
20811 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20812
20813 * Makefile.in (win32_low_h): New variable.
20814 (win32-low.o): Add dependency on $(win32_low_h).
20815 (win32-arm-low.o, win32-i386-low.o): New rules.
20816
20817 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20818
20819 * hostio.c: Correct copyright year.
20820
20821 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20822
20823 * Makefile.in (OBS): Add hostio.o.
20824 (hostio.o): New rule.
20825 * server.h (handle_vFile): Declare.
20826 * hostio.c: New file.
20827 * server.c (handle_v_requests): Take packet_len and new_packet_len
20828 for binary packets. Call handle_vFile.
20829 (main): Update call to handle_v_requests.
20830
20831 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20832
20833 * linux-low.c: Include <sched.h>.
20834
20835 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20836
20837 * linux-low.c (linux_tracefork_grandchild): New.
20838 (linux_tracefork_child): Use clone.
20839 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20840
20841 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20842
20843 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20844
20845 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20846
20847 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20848
20849 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20850
20851 * inferiors.c (change_inferior_id): Delete.
20852 (add_pid_to_list, pull_pid_from_list): New.
20853 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20854 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20855 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20856 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20857 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20858 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20859 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20860 (using_threads): Always set to 1.
20861 (handle_extended_wait): New.
20862 (add_process): Do not set TID.
20863 (linux_create_inferior): Set must_set_ptrace_flags.
20864 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20865 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20866 (linux_thread_alive): Rename TID argument to LWPID.
20867 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20868 (linux_wait_for_event): Do not use TID or check using_threads. Update
20869 call to dead_thread_notify. Call handle_extended_wait.
20870 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20871 (send_sigstop): Delete sigstop_sent.
20872 (wait_for_sigstop): Avoid TID.
20873 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20874 (linux_test_for_tracefork): New.
20875 (linux_lookup_signals): Use thread_db_active and
20876 linux_supports_tracefork_flag.
20877 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20878 * linux-low.h (get_process_thread): Avoid TID.
20879 (struct process_ifo): Move thread_known and tid to the end. Remove
20880 sigstop_sent.
20881 (linux_attach_lwp, thread_db_init): Update prototypes.
20882 * server.h (change_inferior_id): Delete prototype.
20883 (add_pid_to_list, pull_pid_from_list): New prototypes.
20884 * thread-db.c (thread_db_use_events): New.
20885 (find_first_thread): Rename to...
20886 (find_one_thread): ...this. Update callers and messages. Do not
20887 call fatal. Check thread_db_use_events. Do not call
20888 change_inferior_id or new_thread_notify.
20889 (maybe_attach_thread): Update. Do not call new_thread_notify.
20890 (thread_db_init): Set thread_db_use_events. Check use_events.
20891 * utils.c (fatal, warning): Correct message prefix.
20892
20893 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20894
20895 * Makefile.in (clean): Remove new files.
20896 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20897 (powerpc-64.o, powerpc-64.c): New rules.
20898 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20899 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20900 with SPE.
20901 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20902 SPE targets.
20903 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20904 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20905 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20906 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20907 (target_regsets): Add AltiVec and SPE register sets.
20908 * configure.ac: Check for AltiVec and SPE.
20909 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20910 (ppc_fill_vrregset, ppc_store_vrregset): New.
20911 (target_regsets): Add AltiVec register set.
20912 * configure: Regenerated.
20913
20914 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20915
20916 * linux-low.c (O_LARGEFILE): Define.
20917 (linux_read_memory): Use /proc/PID/mem.
20918 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20919 * configure, config.in: Regenerated.
20920
20921 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20922
20923 * linux-low.c (linux_wait_for_event): Do not pass signals while
20924 single-stepping.
20925
20926 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20927
20928 * win32-low.c (create_process): New.
20929 (win32_create_inferior): Use create_process instead of
20930 CreateProcess. If create_process failed retry appending an ".exe"
20931 suffix. Store the GetLastError result immediatelly after
20932 create_process calls and use it on the call to error.
20933
20934 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20935
20936 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20937
20938 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20939
20940 * configure.ac: Switch license to GPLv3.
20941
20942 2007-08-01 Michael Snyder <msnyder@access-company.com>
20943
20944 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20945
20946 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20947
20948 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20949 typedef.
20950 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20951 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20952 CloseToolhelp32Snapshot.
20953 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20954 CloseToolhelp32Snapshot.
20955
20956 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20957
20958 * server.c (main): Check for inferior exit before main loop.
20959
20960 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20961
20962 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20963 instead of on tmp_desc.
20964
20965 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20966 Daniel Jacobowitz <dan@codesourcery.com>
20967
20968 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20969 (add_thread): Minor cleanups.
20970 (clear_inferiors): Move lower in the file. Clear the DLL
20971 list.
20972 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20973 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20974 (xml_escape_text): New.
20975 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20976 for qSupported.
20977 (handle_v_cont): Report errors.
20978 (gdbserver_version): Update.
20979 (main): Correct size of own_buf. Do not report initial DLL events.
20980 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20981 (unloaded_dll, xml_escape_text): New.
20982 * win32-low.c (enum target_waitkind): Update comments.
20983 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20984 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20985 (win32_EnumProcessModules, win32_GetModuleInformation)
20986 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20987 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20988 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20989 (win32_Module32First, win32_Module32Next, load_toolhelp)
20990 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20991 (get_child_debug_event): Handle DLL events.
20992 (win32_wait): Likewise.
20993
20994 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20995
20996 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20997 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20998
20999 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
21000
21001 * win32-low.c (handle_output_debug_string): Ignore event if not
21002 waiting.
21003
21004 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
21005
21006 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
21007
21008 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
21009
21010 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
21011
21012 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
21013
21014 * inferiors.c (change_inferior_id): Add comment.
21015 * linux-low.c (check_removed_breakpoint): Add an early
21016 prototype. Improve debug output.
21017 (linux_attach): Doc update.
21018 (linux_detach_one_process, linux_detach): Clean up before releasing
21019 each process.
21020 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
21021 * linux-low.h (struct process_info): Doc improvement.
21022 * mem-break.c (delete_all_breakpoints): New.
21023 * mem-break.h (delete_all_breakpoints): New prototype.
21024 * thread-db.c (find_first_thread): New.
21025 (thread_db_create_event): Call it instead of
21026 thread_db_find_new_threads. Clean up unused variables.
21027 (maybe_attach_thread): Remove first thread handling.
21028 (thread_db_find_new_threads): Use find_first_thread.
21029 (thread_db_get_tls_address): Likewise.
21030
21031 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
21032
21033 * thread-db.c (thread_db_find_new_threads): Add prototype.
21034 (thread_db_create_event): Check for the main thread before adding
21035 a new thread.
21036 (maybe_attach_thread): Only enable event reporting if TID == 0.
21037 (thread_db_get_tls_address): Check for new threads.
21038
21039 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
21040
21041 * linux-low.c (linux_create_inferior): Try execv before execvp.
21042 * spu-low.c (spu_create_inferior): Likewise.
21043
21044 2007-06-13 Mike Frysinger <vapier@gentoo.org>
21045
21046 * linux-low.c (linux_create_inferior): Change execv to execvp.
21047 * spu-low.c (spu_create_inferior): Likewies.
21048
21049 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
21050
21051 * Makefile.in (clean): Clean new files instead of deleted ones.
21052 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
21053 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
21054 rules.
21055 * configure.srv: Specify XML files and new regformats for MIPS and
21056 MIPS64 GNU/Linux.
21057 * linux-mips-low.c (mips_num_regs): Set to only used registers.
21058 (mips_regmap): Do not fetch $0. Remove unused registers. Add
21059 an entry for the restart register.
21060 (mips_cannot_fetch_register, mips_cannot_store_register)
21061 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
21062 register names to match the XML descriptions.
21063 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
21064 restart register instead of $0.
21065
21066 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
21067 Markus Deuling <deuling@de.ibm.com>
21068
21069 * remote-utils.c (decode_xfer_write): New function.
21070 * server.h (decode_xfer_write): Add prototype.
21071 * server.c (handle_query): Add PACKET_LEN argument. Support
21072 qXfer:spu:read and qXfer:spu:write packets.
21073 (main): Pass packet_len to handle_query.
21074 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
21075 * target.h (target_ops): Add qxfer_spu.
21076
21077 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
21078
21079 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
21080 accessing non-seekable spufs files.
21081
21082 2007-05-16 Markus Deuling <deuling@de.ibm.com>
21083
21084 * server.c (handle_query): Add reply for qC packet.
21085
21086 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21087 Leo Zayas <lerele@champenstudios@com>
21088
21089 * server.h (check_remote_input_interrupt_request): New function.
21090 * remote_utils.c (INVALID_DESCRIPTOR): New define.
21091 (remote_desc): Initialize with INVALID_DESCRIPTOR.
21092 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
21093 (check_remote_input_interrupt_request): New function.
21094 * server.h (check_remote_input_interrupt_request): Declare.
21095 * win32-low.c (winapi_DebugBreakProcess,
21096 winapi_GenerateConsoleCtrlEvent): New typedefs.
21097 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
21098 to 250 ms.
21099 (win32_wait): Check for remote interrupt request
21100 with check_remote_input_interrupt_request.
21101 (win32_request_interrupt): New function.
21102 (win32_target_op): Set request_interrupt to win32_request_interrupt.
21103
21104 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21105
21106 * win32-low.c (debug_registers_changed,
21107 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
21108 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
21109 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
21110 (thread_rec): Get context using the low target.
21111 (child_add_thread): Call thread_added on the low target,
21112 which does the same thing.
21113 (regptr): Delete.
21114 (do_initial_child_stuff): Remove debug registers references.
21115 Set context using the low target. Resume threads after
21116 setting the contexts.
21117 (child_continue): Remove dead variable. Remove debug
21118 registers references.
21119 (child_fetch_inferior_registers): Go through the low target.
21120 (do_child_store_inferior_registers): Remove.
21121 (child_store_inferior_registers): Go through the low target.
21122 (win32_resume): Remove debug registers references.
21123 Set context using the low target.
21124 (handle_exception): Change return type to void. Don't record
21125 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
21126 first chance exception.
21127 (get_child_debug_event): Change return type to void. Remove
21128 goto loop. Always return after waiting for debug event.
21129 (win32_wait): Convert to switch statement. Handle spurious
21130 events.
21131
21132 * win32-i386-low.c (debug_registers_changed,
21133 debug_registers_used): New.
21134 (initial_stuff): Rename to ...
21135 (i386_initial_stuff): ... this. Clear debug registers
21136 state variables.
21137 (store_debug_registers): Delete.
21138 (i386_get_thread_context): New.
21139 (load_debug_registers): Delete.
21140 (i386_set_thread_context): New.
21141 (i386_thread_added): New.
21142 (single_step): Rename to ...
21143 (i386_single_step): ... this.
21144 (do_fetch_inferior_registers): Rename to ...
21145 (i386_fetch_inferior_register): ... this.
21146 (i386_store_inferior_register): New.
21147 (the_low_target): Adapt to new interface.
21148
21149 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
21150 (arm_get_thread_context): New.
21151 (arm_set_thread_context): New.
21152 (regptr): New.
21153 (do_fetch_inferior_registers): Rename to ...
21154 (arm_fetch_inferior_register): ... this.
21155 (arm_store_inferior_register): New.
21156 (arm_wince_breakpoint): Reimplement as unsigned long.
21157 (arm_wince_breakpoint_len): Define.
21158 (the_low_target): Adapt to new interface.
21159
21160 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
21161 load_debug_registers. Add get_thread_context, set_thread_context,
21162 thread_added and store_inferior_register. Rename
21163 fetch_inferior_registers to fetch_inferior_register.
21164 (regptr): Remove declaration.
21165
21166 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21167
21168 * linux-low.c (linux_detach): Change return type to int. Return 0.
21169 * spu-low.c (spu_detach): Likewise.
21170
21171 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21172
21173 * target.h (target_ops): Change return type of detach to int.
21174 Add join.
21175 (join_inferior): New.
21176 * server.c (main): Don't skip detach support on mingw32.
21177 If the inferior doesn't support detaching return error.
21178 Call join_inferior instead of using waitpid.
21179 * linux-low.c (linux_join): New.
21180 (linux_target_op): Add linux_join.
21181 * spu-low.c (spu_join): New.
21182 (spu_target_ops): Add spu_join.
21183 * win32-low.c (win32_detach): Adapt to new interface.
21184 Reopen current_process_handle before detaching. Issue a child
21185 resume before detaching.
21186 (win32_join): New.
21187 (win32_target_op): Add win32_join.
21188
21189 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21190
21191 * win32-low.c (win32-attach): Fix return value.
21192 * target.h (target_ops): Describe ATTACH return values.
21193
21194 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21195
21196 * win32-low.c (GETPROCADDRESS): Define.
21197 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
21198 (winapi_DebugSetProcessKillOnExit): Likewise.
21199 (win32_create_inferior): Force usage of ansi CreateProcessA.
21200 (win32_attach): Use GETPROCADDRESS.
21201 (win32_detach): Likewise.
21202
21203 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21204
21205 * win32-low.c (win32_wait): Don't use WSTOPSIG.
21206
21207 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
21208
21209 * win32-low.c: Commit leftover changes from 2007-03-29.
21210
21211 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21212
21213 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
21214 fields short instead of int. Add explicit padding.
21215 (i387_cache_to_fsave): Remove unnecessary casts.
21216 (i387_fsave_to_cache): Doc fix.
21217 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
21218
21219 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21220
21221 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
21222 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
21223
21224 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21225
21226 * configure.srv (arm*-*-mingw32ce*): Move near the other
21227 arm targets.
21228
21229 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21230
21231 * configure.ac: Add errno checking.
21232 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
21233 sys/file.h and malloc.h.
21234 (AC_CHECK_DECLS): Add perror.
21235 (srv_mingwce): Handle.
21236 * configure.srv (i[34567]86-*-cygwin*): Add
21237 win32-i386-low.o to srv_tgtobj.
21238 (i[34567]86-*-mingw*): Likewise.
21239 (arm*-*-mingw32ce*): Add case.
21240 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21241 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
21242 [__MINGW32CE__] (strerror): New function.
21243 [__MINGW32CE__] (errno): Define to GetLastError.
21244 [__MINGW32CE__] (COUNTOF): New macro.
21245 (remote_open): Remove extra close call.
21246 * mem-break.c (delete_breakpoint_at): New function.
21247 * mem-break.h (delete_breakpoint_at): Declare.
21248 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21249 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
21250 [USE_WIN32API] (read, write): Add char* casts.
21251 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
21252 * server.h: Include wincecompat.h on Windows CE.
21253 [HAVE_ERRNO_H]: Check.
21254 (perror): Declare if not declared.
21255 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
21256 (perror_with_name): Remove errno declaration.
21257 * wincecompat.h: New.
21258 * wincecompat.c: New.
21259 * win32-low.h: New.
21260 * win32-arm-low.c: New.
21261 * win32-i386-low.c: New.
21262 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21263 (OUTMSG2): Make it safe.
21264 (_T): New macro.
21265 (COUNTOF): New macro.
21266 (NUM_REGS): Get it from the low target.
21267 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21268 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21269 (thread_rec): Let low target handle debug registers.
21270 (child_add_thread): Likewise.
21271 (child_init_thread_list): Likewise.
21272 (continue_one_thread): Likewise.
21273 (regptr): New.
21274 (do_child_fetch_inferior_registers): Move to ...
21275 * win32-i386-low.c: ... here, and rename to ...
21276 (do_fetch_inferior_registers): ... this.
21277 * win32-low.c (child_fetch_inferior_registers):
21278 Go through the low target.
21279 (do_child_store_inferior_registers): Use regptr.
21280 (strwinerror): New function.
21281 (win32_create_inferior): Handle Windows CE.
21282 Use strwinerror instead of strerror on Windows error
21283 codes. Add program to the error output.
21284 Don't close the main thread handle on Windows CE.
21285 (win32_attach): Use coredll.dll on Windows CE.
21286 (win32_kill): Close current process and current
21287 thread handles.
21288 (win32_detach): Use coredll.dll on Windows CE.
21289 (win32_resume): Let low target handle debug registers, and
21290 step request.
21291 (handle_exception): Add/Remove initial breakpoint. Avoid
21292 non-existant WSTOPSIG on Windows CE.
21293 (win32_read_inferior_memory): Cast to remove warning.
21294 (win32_arch_string): Go through the low target.
21295 (initialize_low): Call set_breakpoint_data with the low
21296 target's breakpoint.
21297 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21298 FOP_REGNUM, mappings): Move to ...
21299 * win32-i386-low.c: ... here.
21300 * win32-low.c (win32_thread_info): Move to ...
21301 * win32-low.h: ... here.
21302 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21303 win32-arm-low.c and wincecompat.c.
21304 (all:): Add $EXEEXT.
21305 (install-only:): Likewise.
21306 (gdbserver:): Likewise.
21307 (gdbreplay:): Likewise.
21308 * config.in: Regenerate.
21309 * configure: Regenerate.
21310
21311 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21312
21313 * win32-low.c: Rename typedef thread_info to
21314 win32_thread_info throughout.
21315
21316 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21317
21318 * win32-i386-low.c: Rename to ...
21319 * win32-low.c: ... this.
21320 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21321 * Makefile.in: Likewise.
21322
21323 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21324
21325 * remote-utils.c (monitor_output): Constify msg parameter.
21326 * server.h (monitor_output): Likewise.
21327 * win32-i386-low.c (handle_output_debug_string): New.
21328 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21329 handle_output_debug_string.
21330 (get_child_debug_event): Likewise.
21331
21332 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21333
21334 * server.c (main): Correct strtoul check.
21335
21336 2007-03-27 Jon Ringle <jon@ringle.org>
21337
21338 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21339
21340 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21341
21342 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21343
21344 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21345
21346 * terminal.h: Check HAVE_SGTTY_H.
21347
21348 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21349
21350 * remote-utils.c (remote_open): Print out the assigned port number.
21351
21352 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21353
21354 * remote-utils.c (monitor_output): New function.
21355 * server.c (debug_threads): Define here.
21356 (monitor_show_help): New function.
21357 (handle_query): Handle qRcmd.
21358 (main): Do not handle 'd' packet.
21359 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21360 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21361 of debug_threads.
21362
21363 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21364
21365 * Makefile.in (EXEEXT): New.
21366 (clean): Use $(EXEEXT).
21367
21368 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21369
21370 * target.h (target_ops): Rename send_signal to request_interrupt,
21371 and remove enum target_signal parameter.
21372 * linux-low.c (linux_request_interrupt): Rename from
21373 linux_send_signal, and always send SIGINT.
21374 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21375 and always send SIGINT.
21376 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21377 of send_signal.
21378 (input_interrupt): Likewise.
21379
21380 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21381
21382 * server.c (get_features_xml): Check if target implemented
21383 arch_string.
21384 * win32-i386-low.c (win32_arch_string): New.
21385 (win32_target_ops): Add win32_arch_string as arch_string member.
21386
21387 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21388
21389 * spu-low.c (spu_arch_string): New.
21390 (spu_target_ops): Add spu_arch_string.
21391
21392 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21393
21394 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21395 * configure.ac: Do not check for terminal.h.
21396 * configure, config.in: Regenerated.
21397
21398 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21399
21400 * Makefile.in (OBS): Add $(XML_BUILTIN).
21401 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21402 (clean): Update.
21403 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21404 (arm-with-iwmmxt.c): New.
21405 * config.in, configure: Regenerate.
21406 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21407 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21408 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21409 (arm*-*-linux*): Add iWMMXt and regset support.
21410 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21411 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21412 (arm_store_wmmxregset, target_regsets): New.
21413 * server.c (get_features_xml): Take annex argument. Check builtin
21414 XML documents.
21415 (handle_query): Handle multiple annexes.
21416
21417 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21418
21419 * remote-utils.c [USE_WIN32API] (read, write): Define.
21420 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21421 write.
21422
21423 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21424
21425 * linux-i386-low.c (the_low_target): Set arch_string.
21426 * linux-x86-64-low.c (the_low_target): Likewise.
21427 * linux-low.c (linux_arch_string): New.
21428 (linux_target_ops): Add it.
21429 * linux-low.h (struct linux_target_ops): Add arch_string.
21430 * server.c (write_qxfer_response): Use const void * for DATA.
21431 (get_features_xml): New.
21432 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21433 * target.h (struct target_ops): Add arch_string method.
21434
21435 2007-01-03 Denis Pilat <denis.pilat@st.com>
21436 Daniel Jacobowitz <dan@codesourcery.com>
21437
21438 * linux-low.c (linux_kill): Handle being called with no threads.
21439 * win32-i386-low.c (win32_kill): Likewise.
21440 (get_child_debug_event): Clear current_process_handle.
21441
21442 2006-12-30 Denis PILAT <denis.pilat@st.com>
21443 Daniel Jacobowitz <dan@codesourcery.com>
21444
21445 * remote-utils.c (remote_open): Check the type of specified
21446 serial port devices before opening them.
21447 * server.c (main): Kill the inferior if an error occurs during
21448 the first remote_open.
21449
21450 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21451
21452 * README: Update supported targets.
21453
21454 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21455
21456 * Makefile.in (clean): Remove reg-mips64.c.
21457 (reg-mips64.c, reg-mips64.o): New rules.
21458 * configure.srv: Handle mips64. Include regset support for mips.
21459 * linux-mips-low.c (union mips_register): New.
21460 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21461 (mips_breakpoint, mips_breakpoint_at): Use int.
21462 (mips_collect_register, mips_supply_register)
21463 (mips_collect_register_32bit, mips_supply_register_32bit)
21464 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21465 (mips_store_fpregset, target_regsets): New.
21466 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21467
21468 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21469
21470 * configure.srv: Add target "spu*-*-*".
21471 * Makefile.in (clean): Remove reg-spu.c.
21472 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21473 * spu-low.c: New file.
21474
21475 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21476
21477 * configure.ac: Correct td_thr_tls_get_addr test.
21478 * configure: Regenerated.
21479
21480 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21481
21482 * linux-low.c (linux_wait_for_event): Reformat. Use the
21483 pass_signals array.
21484 * remote-utils.c (decode_address_to_semicolon): New.
21485 * server.c (pass_signals, handle_general_set): New.
21486 (handle_query): Mention QPassSignals for qSupported.
21487 (main): Call handle_general_set.
21488 * server.h (pass_signals, decode_address_to_semicolon): New.
21489
21490 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21491
21492 * server.c (handle_query): Correct error handling for read_auxv.
21493
21494 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21495
21496 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21497 and srv_linux_thread_db to yes.
21498 * linux-s390-low.c (s390_fill_gregset): New function.
21499 (target_regsets): Define data structure.
21500
21501 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21502
21503 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21504 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21505 * config.in, configure: Regenerated.
21506 * inferiors.c (gdb_id_to_thread): New function.
21507 (gdb_id_to_thread_id): Use it.
21508 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21509 * linux-low.h (struct process_info): Add th member.
21510 (thread_db_get_tls_address): New prototype.
21511 * remote-utils.c (decode_address): Make non-static.
21512 * server.c (handle_query): Handle qGetTLSAddr.
21513 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21514 * target.h (struct target_ops): Add get_tls_address.
21515 * thread-db.c (maybe_attach_thread): Save the thread handle.
21516 (thread_db_get_tls_address): New.
21517
21518 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21519
21520 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21521 (linux_resume_one_process): Take a siginfo_t *. Update all
21522 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21523 (struct pending_signals): Add a siginfo_t.
21524 (linux_wait_for_process): Always set last_status.
21525 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21526 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21527 * linux-low.h (struct process_info): Add last_status.
21528
21529 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21530
21531 * remote-utils.c (try_rle): New function.
21532 (putpkt_binary): Use it.
21533
21534 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21535
21536 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21537 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21538 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21539 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21540 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21541 point registers.
21542
21543 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21544
21545 * server.c (terminal_fd): New variable.
21546 (old_foreground_pgrp): Likewise.
21547 (restore_old_foreground_pgrp): New function.
21548 (start_inferior): Record the terminal file descriptor in terminal_fd
21549 and its original foreground group in old_foreground_pgrp. Register
21550 restore_old_foreground_pgrp with atexit().
21551
21552 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21553
21554 * server.c (handle_query): Correct qPart to qXfer.
21555
21556 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21557
21558 * configure.ac: Check for more headers which are missing on
21559 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21560 * configure.srv: Add Cygwin and mingw32.
21561 * remote-utils.c: Don't include headers unconditionally which
21562 are missing on mingw32. Include <winsock.h> for mingw32.
21563 (remote_open): Adjust for mingw32 support. Flush
21564 standard error after writing to it.
21565 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21566 (unblock_async_io, enable_async_io, disable_async_io)
21567 (readchar, getpkt): Update for Winsock support.
21568 (prepare_resume_reply): Expect a protocol signal number.
21569 * server.c: Disable <sys/wait.h> on mingw32.
21570 (start_inferior): Adjust for mingw32 support. Flush
21571 standard error after writing to it.
21572 (attach_inferior): Likewise. Use protocol signal
21573 numbers.
21574 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21575 and names.
21576 * win32-i386-low.c: New file.
21577 * Makefile.in (XM_CLIBS): Set.
21578 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21579 (win32-i386-low.o): New dependency rule.
21580 * linux-low.c (linux_wait): Use target signal numbers.
21581 * target.h (struct target_ops): Doc fix.
21582 * server.h (target_signal_to_name): New prototype.
21583 * gdbreplay.c: Don't include headers unconditionally which
21584 are missing on mingw32. Include <winsock.h> for mingw32.
21585 (remote_close, remote_open): Adjust for Winsock support.
21586 * configure, config.in: Regenerated.
21587
21588 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21589
21590 * server.c (decode_xfer_read, write_qxfer_response): New.
21591 (handle_query): Take a packet length argument. Handle
21592 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21593 the qSupported response.
21594 (main): Update call to handle_query.
21595
21596 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21597
21598 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21599 (putpkt_binary): Renamed from putpkt and adjusted for binary
21600 data.
21601 (putpkt): New wrapper for putpkt_binary.
21602 (readchar): Don't mask off the high bit.
21603 (decode_X_packet): New function.
21604 * server.c (main): Call putpkt_binary if a handler sets the packet
21605 length. Save the length of the incoming packet. Handle 'X'.
21606 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21607
21608 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21609
21610 * server.c (handle_query): Handle qSupported.
21611
21612 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21613
21614 * remote-utils.c (all_symbols_looked_up): New variable.
21615 (look_up_one_symbol): Check it.
21616 * server.h (look_up_one_symbol): New declaration.
21617 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21618
21619 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21620
21621 * Makefile.in (linux-arm-low.o): Update dependencies.
21622 * linux-arm-low.c: Include "gdb_proc_service.h".
21623 (PTRACE_GET_THREAD_AREA): Define.
21624 (ps_get_thread_area): New function.
21625
21626 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21627
21628 * configure.srv (m68k*-*-uclinux*): New target.
21629 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21630 (linux_resume_one_process): Remove extraneous cast.
21631 (linux_read_offsets): New.
21632 (linux_target_op): Add linux_read_offsets on mmuless systems.
21633 * server.c (handle_query): Add qOffsets logic.
21634 * target.h (struct target_ops): Add read_offsets.
21635
21636 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21637
21638 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21639 (PTRACE_GET_THREAD_AREA): Define.
21640 (ps_get_thread_area): New function.
21641 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21642 (linux-x86-64-low.o): Update.
21643
21644 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21645
21646 * configure.ac: Remove checks for prfpregset_t.
21647 * gdb_proc_service.h: New file.
21648 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21649 new "gdb_proc_service.h".
21650 * proc-service.c: Likewise.
21651 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21652 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21653 * Makefile.in (gdb_proc_service_h): Updated.
21654 * configure, config.in: Regenerated.
21655
21656 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21657
21658 * remote-utils.c (prepare_resume_reply): Move declaration
21659 of gdb_id_from_wait to the top of the block.
21660
21661 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21662
21663 * linux-low.c (regsets_store_inferior_registers): Read the regset
21664 from the target before filling it.
21665
21666 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21667
21668 * server.c (attach_inferior): Return SIGTRAP for a successful
21669 attach.
21670
21671 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21672
21673 * Makefile.in (OBS): Add version.o.
21674 (STAGESTUFF): Delete.
21675 (version.o): Add dependencies.
21676 (version.c): Replace rule.
21677 (clean): Remove version.c.
21678 * server.c (gdbserver_version): New.
21679 (gdbserver_usage): Use printf.
21680 (main): Handle --version and --help.
21681 * server.h (version, host_name): Add declarations.
21682
21683 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21684
21685 * linux-arm-low.c:
21686 * linux-arm-low.c:
21687 * inferiors.c:
21688 * i387-fp.h:
21689 * i387-fp.c:
21690 * gdbreplay.c:
21691 * regcache.c:
21692 * proc-service.c:
21693 * mem-break.h:
21694 * mem-break.c:
21695 * linux-x86-64-low.c:
21696 * linux-sh-low.c:
21697 * linux-s390-low.c:
21698 * linux-ppc64-low.c:
21699 * linux-ppc-low.c:
21700 * linux-mips-low.c:
21701 * linux-m68k-low.c:
21702 * linux-m32r-low.c:
21703 * linux-low.h:
21704 * linux-low.c:
21705 * linux-ia64-low.c:
21706 * linux-i386-low.c:
21707 * linux-crisv32-low.c:
21708 * thread-db.c:
21709 * terminal.h:
21710 * target.h:
21711 * target.c:
21712 * server.h:
21713 * server.c:
21714 * remote-utils.c:
21715 * regcache.h:
21716 * utils.c:
21717 * Makefile.in:
21718 * configure.ac:
21719 * gdbserver.1: Add (C) after Copyright. Update the FSF
21720 address.
21721
21722 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21723
21724 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21725 (arm_breakpoint_at): Recognize both breakpoints.
21726 (the_low_target): Use the correct breakpoint instruction.
21727
21728 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21729
21730 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21731 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21732 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21733 (the_low_target): Update.
21734
21735 2005-10-25 Andreas Schwab <schwab@suse.de>
21736
21737 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21738
21739 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21740 (ia64_num_regs): Reduce to 462.
21741
21742 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21743
21744 * acinclude.m4: Correct quoting.
21745 * aclocal.m4: Regenerated.
21746
21747 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21748 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21749 (thread_db_init): Call thread_db_err_str.
21750 * configure.ac: Check for TD_VERSION.
21751 * config.in, configure: Regenerated.
21752
21753 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21754
21755 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21756
21757 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21758
21759 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21760 is not available. Define HAVE_PTRACE_GETREGS if it is.
21761 * config.in, configure: Regenerated.
21762 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21763 * linux-i386-low.c, linux-m68k-low.c: Update to use
21764 HAVE_PTRACE_GETREGS.
21765 * linux-low.c (regsets_fetch_inferior_registers)
21766 (regsets_store_inferior_registers): Only return 0 if we processed
21767 GENERAL_REGS.
21768 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21769 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21770
21771 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21772
21773 * inferiors.c (struct thread_info): Add gdb_id.
21774 (add_thread): Add gdb_id argument.
21775 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21776 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21777 calls to add_thread.
21778 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21779 * server.c (handle_query): Use thread_to_gdb_id.
21780 (handle_v_cont, main): Use gdb_id_to_thread_id.
21781 * server.h (add_thread): Update prototype.
21782 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21783 prototypes.
21784
21785 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21786
21787 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21788 left-padded registers.
21789 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21790 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21791
21792 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21793
21794 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21795 * configure: Regenerate.
21796 * config.in: Regenerate.
21797 * server.h (NEED_DECLARATION_STRERROR):
21798 Replace with !HAVE_DECL_STRERROR.
21799
21800 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21801
21802 * linux-low.c (linux_wait, linux_send_signal): Don't test
21803 an unsigned long variable for > 0 if it could be MAX_ULONG.
21804 * server.c (myresume): Likewise.
21805 * target.c (set_desired_inferior): Likewise.
21806
21807 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21808
21809 * configure.ac: Simplify and improve check for socklen_t.
21810 * configure, config.in: Regenerate.
21811
21812 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21813
21814 * acconfig.h: Remove.
21815 * configure.ac: Add a test for socklen_t. Use three-argument
21816 AC_DEFINE throughout.
21817 * config.in: Regenerated using autoheader 2.59.
21818 * configure: Regenerated.
21819
21820 * gdbreplay.c (socklen_t): Provide a default.
21821 (remote_open): Use socklen_t.
21822 * remote-utils.c (socklen_t): Provide a default.
21823 (remote_open): Use socklen_t.
21824 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21825 unsigned char.
21826
21827 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21828 char for buffers.
21829 * linux-low.c (linux_read_memory, linux_write_memory)
21830 (linux_read_auxv): Likewise.
21831 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21832 (check_mem_write): Likewise.
21833 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21834 Likewise.
21835 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21836 (registers_from_string, register_data): Likewise.
21837 * server.c (handle_query, main): Likewise.
21838 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21839 (decode_M_packet): Likewise.
21840 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21841 * target.h (struct target_ops): Update read_memory, write_memory,
21842 and read_auxv.
21843 (read_inferior_memory, write_inferior_memory): Update.
21844 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21845 to unsigned char *.
21846 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21847 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21848 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21849 linux-s390-low.c, linux-sh-low.c: Update for changes in
21850 read_inferior_memory and the_low_target->breakpoint.
21851
21852 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21853
21854 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21855 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21856 * configure.srv: Add powerpc64-*-linux*.
21857 * linux-ppc64-low.c: New file.
21858
21859 2005-05-23 Orjan Friberg <orjanf@axis.com>
21860
21861 * linux-cris-low.c: New file with support for CRIS.
21862 * linux-crisv32-low.c: Ditto for CRISv32.
21863 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21864 (clean): Add reg-cris.c and reg-crisv32.c.
21865 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21866 reg-crisv32.o, and reg-crisv32.c to make rules.
21867 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21868 recognized targets.
21869
21870 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21871
21872 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21873 of sizeof (PTRACE_XFER_TYPE).
21874 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21875
21876 2005-05-12 Orjan Friberg <orjanf@axis.com>
21877
21878 * target.h (struct target_ops): Add insert_watchpoint,
21879 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21880 pointers for hardware watchpoint support.
21881 * linux-low.h (struct linux_target_ops): Ditto.
21882 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21883 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21884 to linux_target_ops.
21885 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21886 reply packet.
21887 * server.c (main): Recognize 'Z' and 'z' packets.
21888
21889 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21890
21891 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21892 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21893 (the_low_target): Add new members.
21894
21895 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21896
21897 * proc-service.c (ps_lgetregs): Search all_processes instead of
21898 all_threads.
21899
21900 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21901
21902 * server.c (start_inferior): Change return type to int.
21903 (attach_inferior): Change sigptr to int *.
21904 (handle_v_cont, handle_v_requests): Change signal to int *.
21905 (main): Change signal to int.
21906
21907 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21908
21909 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21910 * configure.srv: Add m32r*-*-linux*.
21911 * linux-m32r-low.c: New file.
21912
21913 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21914
21915 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21916
21917 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21918
21919 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21920 Take unsigned long arguments for PIDs.
21921 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21922 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21923 (wait_for_sigstop, linux_resume_one_process)
21924 (regsets_fetch_inferior_registers, linux_send_signal)
21925 (linux_read_auxv): Likewise. Update the types of variables holding
21926 PIDs. Update format string specifiers.
21927 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21928 * remote-utils.c (prepare_resume_reply): Likewise.
21929 * server.c (cont_thread, general_thread, step_thread)
21930 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21931 unsigned long.
21932 (handle_query): Update format specifiers.
21933 (handle_v_cont, main): Use strtoul for thread IDs.
21934 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21935 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21936 (general_thread, step_thread, thread_from_wait)
21937 (old_thread_from_wait): Update.
21938 * target.h (struct thread_resume): Use unsigned long for THREAD.
21939 (struct target_ops): Use unsigned long for arguments to attach and
21940 thread_alive.
21941
21942 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21943
21944 * acinclude.m4: Include bfd/bfd.m4 directly.
21945 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21946 <agriffis@toolchain.org>.
21947 * aclocal.m4, configure: Regenerated.
21948
21949 2005-01-07 Andrew Cagney <cagney@gnu.org>
21950
21951 * configure.ac: Rename configure.in, require autoconf 2.59.
21952 * configure: Re-generate.
21953
21954 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21955
21956 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21957 LIBS when finished.
21958 * aclocal.m4: Regenerated.
21959 * configure: Regenerated.
21960
21961 2004-11-21 Andreas Schwab <schwab@suse.de>
21962
21963 * linux-m68k-low.c (m68k_num_gregs): Define.
21964 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21965 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21966 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21967 (m68k_breakpoint_at): New. Add to the_low_target.
21968
21969 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21970 srv_linux_thread_db to yes.
21971
21972 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21973
21974 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21975 (ARCH_SET_FS): Likewise.
21976 (ARCH_GET_FS): Likewise.
21977 (ARCH_GET_GS): Likewise.
21978
21979 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21980
21981 * linux-i386-low.c (ps_get_thread_area): New.
21982 * linux-x86-64-low.c (ps_get_thread_area): New.
21983 * linux-low.c: Include <sys/syscall.h>.
21984 (linux_kill_one_process): Don't kill the first thread here.
21985 (linux_kill): Kill the first thread here.
21986 (kill_lwp): New function.
21987 (send_sigstop, linux_send_signal): Use it.
21988 * proc-service.c: Clean up #ifdefs.
21989 (fpregset_info): Delete.
21990 (ps_lgetregs): Update and enable implementation.
21991 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21992 implementations.
21993 * remote-utils.c (struct sym_cache, symbol_cache): New.
21994 (input_interrupt): Print a clearer message.
21995 (async_io_enabled): New variable.
21996 (enable_async_io, disable_async_io): Use it. Update comments.
21997 (look_up_one_symbol): Use the symbol cache.
21998 * thread-db.c (thread_db_look_up_symbols): New function.
21999 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
22000
22001 2004-10-16 Daniel Jacobowitz <dan@debian.org>
22002
22003 * configure.in: Test for -rdynamic.
22004 * configure: Regenerated.
22005 * Makefile (INTERNAL_LDFLAGS): New.
22006 (gdbserver, gdbreplay): Use it.
22007
22008 2004-09-02 Andrew Cagney <cagney@gnu.org>
22009
22010 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
22011
22012 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
22013
22014 * linux-low.c (linux_wait): Clear all_processes list also.
22015
22016 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
22017
22018 * linux-low.c: Include <errno.h>. Remove extern declaration of
22019 errno.
22020
22021 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
22022
22023 * gdbreplay.c, server.h, utils.c: Update copyright years.
22024
22025 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
22026
22027 * server.c (main): Print child status or termination signal from
22028 variable 'signal', not 'sig'.
22029
22030 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
22031
22032 * linux-low.c (linux_read_memory): Change return type to
22033 int. Check for and return error from ptrace().
22034 * target.c (read_inferior_memory): Change return type to int. Pass
22035 back return status from the_target->read_memory().
22036 * target.h (struct target_ops): Adapt *read_memory() prototype.
22037 Update comment.
22038 (read_inferior_memory): Adapt prototype.
22039 * server.c (main): Return an error packet if
22040 read_inferior_memory() returns an error.
22041
22042 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
22043
22044 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
22045 Unify with other clean targets.
22046
22047 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22048
22049 * server.c (handle_v_cont): Call set_desired_inferior.
22050
22051 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22052
22053 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
22054
22055 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22056
22057 * linux-low.c (linux_wait): Unblock async I/O.
22058 (linux_resume): Block and enable async I/O.
22059 * remote-utils.c (block_async_io, unblock_async_io): New functions.
22060 * server.h (block_async_io, unblock_async_io): Add prototypes.
22061
22062 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22063
22064 * remote-utils.c (remote_open): Print a status notice after
22065 opening a TCP port.
22066 * server.c (attach_inferior): Print a status notice after
22067 attaching.
22068
22069 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22070
22071 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
22072
22073 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
22074
22075 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
22076 error packet.
22077 * server.c, target.h: Update copyright years.
22078
22079 2004-02-25 Roland McGrath <roland@redhat.com>
22080
22081 * target.h (struct target_ops): New member `read_auxv'.
22082 * server.c (handle_query): Handle qPart:auxv:read: query using that.
22083 * linux-low.c (linux_read_auxv): New function.
22084 (linux_target_ops): Initialize `read_auxv' member to that.
22085
22086 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
22087
22088 Committed by Jim Blandy <jimb@redhat.com>.
22089
22090 * linux-s390-low.c (s390_num_regs): Update.
22091 (s390_regmap): Remove control registers. Use __s390x__ predefine
22092 instead of GPR_SIZE to distiguish s390 and s390x targets.
22093
22094 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
22095
22096 * linux-low.c: Update copyright year.
22097 (check_removed_breakpoint): Clear pending_is_breakpoint.
22098 (linux_set_resume_request, linux_queue_one_thread)
22099 (resume_status_pending_p): New functions.
22100 (linux_continue_one_thread): Use process->resume.
22101 (linux_resume): Only resume threads if there are no pending events.
22102 * linux-low.h (struct process_info): Add resume request
22103 pointer.
22104
22105 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
22106
22107 * regcache.c (new_register_cache): Clear the allocated register
22108 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
22109
22110 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
22111
22112 * linux-low.c (linux_resume): Take a struct thread_resume *
22113 argument.
22114 (linux_wait): Update call.
22115 (resume_ptr): New static variable.
22116 (linux_continue_one_thread): Renamed from
22117 linux_continue_one_process. Use resume_ptr.
22118 (linux_resume): Use linux_continue_one_thread.
22119 * server.c (handle_v_cont, handle_v_requests): New functions.
22120 (myresume): New function.
22121 (main): Handle 'v' case.
22122 * target.h (struct thread_resume): New type.
22123 (struct target_ops): Change argument of "resume" to struct
22124 thread_resume *.
22125 (myresume): Delete macro.
22126
22127 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
22128
22129 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
22130 (uninstall): Support DESTDIR.
22131
22132 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
22133
22134 * configure.srv: Add xscale*linux copy of arm*linux entry.
22135
22136 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
22137
22138 * linux-arm-low.c (arm_reinsert_addr): New function.
22139 (the_low_target): Add arm_reinsert_addr.
22140
22141 2003-07-08 Mark Kettenis <kettenis@gnu.org>
22142
22143 * mem-break.c: Remove whitespace at end of file.
22144
22145 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22146
22147 * configure.in: Check whether we need to prototype strerror.
22148 * server.h: Optionally prototype strerror.
22149 * gdbreplay.c (perror_with_name): Use strerror.
22150 * linux-low.c (linux_attach_lwp): Use strerror.
22151 * utils.c (perror_with_name): Use strerror.
22152 * config.in, configure: Regenerated.
22153
22154 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22155
22156 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
22157 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
22158
22159 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
22160
22161 * Makefile.in (SFILES): Update.
22162 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
22163 low-sun3.c: Remove files.
22164
22165 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
22166
22167 * linux-low.c: Move comment to linux_thread_alive where it belonged.
22168 (linux_detach_one_process, linux_detach): New functions.
22169 (linux_target_ops): Add linux_detach.
22170 * server.c (main): Handle 'D' packet.
22171 * target.h (struct target_ops): Add "detach" member.
22172 (detach_inferior): Define.
22173
22174 2003-06-13 Mark Kettenis <kettenis@gnu.org>
22175
22176 From Kelley Cook <kelleycook@wideopenwest.com>:
22177 * configure.srv: Accept i[34567]86 variants.
22178
22179 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
22180
22181 * linux-low.c (linux_wait_for_event): Correct comment typos.
22182 (linux_resume_one_process): Call check_removed_breakpoint.
22183 (linux_send_signal): New function.
22184 (linux_target_ops): Add linux_send_signal.
22185 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
22186 of kill.
22187 * target.h (struct target_ops): Add send_signal.
22188
22189 2003-05-29 Jim Blandy <jimb@redhat.com>
22190
22191 * linux-low.c (usr_store_inferior_registers): Transfer buf in
22192 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
22193 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
22194 away part of the register's value.
22195
22196 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
22197
22198 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
22199 (linux_wait_for_event, linux_init_signals): Likewise.
22200
22201 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
22202
22203 * configure.in: Check for stdlib.h.
22204 * configure: Regenerated.
22205 * config.in: Regenerated.
22206
22207 2003-01-04 Andreas Schwab <schwab@suse.de>
22208
22209 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
22210
22211 2003-01-02 Andrew Cagney <ac131313@redhat.com>
22212
22213 * Makefile.in: Remove obsolete code.
22214
22215 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
22216
22217 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
22218 defined(PT_FPR0_HI).
22219
22220 2002-11-17 Stuart Hughes <seh@zee2.com>
22221
22222 * linux-arm-low.c (arm_num_regs): Increase.
22223 (arm_regmap): Include status register.
22224
22225 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
22226
22227 * linux-low.c (register_addr): Remove incorrect -1 check.
22228
22229 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
22230
22231 * linux-low.c (linux_create_inferior): Call setpgid. Return
22232 the new PID.
22233 (unstopped_p, linux_signal_pid): Remove.
22234 (linux_target_ops): Remove linux_signal_pid.
22235 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
22236 global instead of target method.
22237 * target.h (struct target_ops): Remove signal_pid. Update comment
22238 for create_inferior.
22239 * server.c (signal_pid): New variable.
22240 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
22241 gdbserver. Set the child to be the foreground process group.
22242 (attach_inferior): Set signal_pid.
22243
22244 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
22245
22246 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
22247
22248 2002-08-20 Jim Blandy <jimb@redhat.com>
22249
22250 * Makefile.in (LDFLAGS): Allow the configure script to establish a
22251 default for this.
22252
22253 2002-08-01 Andrew Cagney <cagney@redhat.com>
22254
22255 * Makefile.in: Make chill references obsolete.
22256
22257 2002-07-24 Kevin Buettner <kevinb@redhat.com>
22258
22259 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
22260 * configure: Regenerate.
22261 * config.in: Regenerate.
22262
22263 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22264
22265 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22266 (perror_with_name, remote_close, remote_open, expect, play): Static.
22267
22268 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22269
22270 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22271 byte offsets instead of an array of indexes.
22272 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22273
22274 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22275
22276 * regcache.c: Add comment.
22277
22278 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22279
22280 * thread-db.c: New file.
22281 * proc-service.c: New file.
22282 * acinclude.m4: New file.
22283 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22284 proc-service.o, and thread-db.o.
22285 (linux-low.o): Add USE_THREAD_DB.
22286 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22287 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22288 * aclocal.m4: Regenerated.
22289 * config.in: Regenerated.
22290 * configure: Regenerated.
22291 * configure.in: Check for proc_service.h, sys/procfs.h,
22292 thread_db.h, and linux/elf.h headrs.
22293 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22294 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22295 Check for -lthread_db and thread support.
22296 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22297 PowerPC, and SuperH.
22298 * i387-fp.c: Constify arguments.
22299 * i387-fp.h: Likewise.
22300 * inferiors.c: (struct thread_info): Renamed from
22301 `struct inferior_info'. Remove PID member. Use generic inferior
22302 list header. All uses updated.
22303 (inferiors, signal_pid): Removed.
22304 (all_threads): New variable.
22305 (get_thread): Define.
22306 (add_inferior_to_list): New function.
22307 (for_each_inferior): New function.
22308 (change_inferior_id): New function.
22309 (add_inferior): Removed.
22310 (remove_inferior): New function.
22311 (add_thread): New function.
22312 (free_one_thread): New function.
22313 (remove_thread): New function.
22314 (clear_inferiors): Use for_each_inferior and free_one_thread.
22315 (find_inferior): New function.
22316 (find_inferior_id): New function.
22317 (inferior_target_data): Update argument type.
22318 (set_inferior_target_data): Likewise.
22319 (inferior_regcache_data): Likewise.
22320 (set_inferior_regcache_data): Likewise.
22321 * linux-low.c (linux_bp_reinsert): Remove.
22322 (all_processes, stopping_threads, using_thrads)
22323 (struct pending_signals, debug_threads, pid_of): New.
22324 (inferior_pid): Replace with macro.
22325 (struct inferior_linux_data): Remove.
22326 (get_stop_pc, add_process): New functions.
22327 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22328 Use add_process and add_thread.
22329 (linux_attach_lwp): New function, based on old linux_attach. Use
22330 add_process and add_thread. Set stop_expected for new threads.
22331 (linux_attach): New function.
22332 (linux_kill_one_process): New function.
22333 (linux_kill): Kill all LWPs.
22334 (linux_thread_alive): Use find_inferior_id.
22335 (check_removed_breakpoints, status_pending_p): New functions.
22336 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22337 Update. Use WNOHANG. Wait for cloned processes also. Update process
22338 struct for the found process.
22339 (linux_wait_for_event): New function.
22340 (linux_wait): Use it. Support LWPs.
22341 (send_sigstop, wait_for_sigstop, stop_all_processes)
22342 (linux_resume_one_process, linux_continue_one_process): New functions.
22343 (linux_resume): Support LWPs.
22344 (REGISTER_RAW_SIZE): Remove.
22345 (fetch_register): Use register_size instead. Call supply_register.
22346 (usr_store_inferior_registers): Likewise. Call collect_register.
22347 Fix recursive case.
22348 (regsets_fetch_inferior_registers): Improve error message.
22349 (regsets_store_inferior_registers): Add debugging.
22350 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22351 (unstopped_p, linux_signal_pid): New functions.
22352 (linux_target_ops): Add linux_signal_pid.
22353 (linux_init_signals): New function.
22354 (initialize_low): Call it. Initialize using_threads.
22355 * regcache.c (inferior_regcache_data): Add valid
22356 flag.
22357 (get_regcache): Fetch registers lazily. Add fetch argument
22358 and update all callers.
22359 (regcache_invalidate_one, regcache_invalidate): New
22360 functions.
22361 (new_register_cache): Renamed from create_register_cache.
22362 Return the new regcache.
22363 (free_register_cache): Change argument to a void *.
22364 (registers_to_string, registers_from_string): Call get_regcache
22365 with fetch flag set.
22366 (register_data): Make static. Pass fetch flag to get_regcache.
22367 (supply_register): Call get_regcache with fetch flag clear.
22368 (collect_register): Call get_regcache with fetch flag set.
22369 (collect_register_as_string): New function.
22370 * regcache.h: Update.
22371 * remote-utils.c (putpkt): Flush after debug output and use
22372 stderr.
22373 Handle input interrupts while waiting for an ACK.
22374 (input_interrupt): Use signal_pid method.
22375 (getpkt): Flush after debug output and use stderr.
22376 (outreg): Use collect_register_as_string.
22377 (new_thread_notify, dead_thread_notify): New functions.
22378 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22379 and general_thread.
22380 (look_up_one_symbol): Flush after debug output.
22381 * server.c (step_thread, server_waiting): New variables.
22382 (start_inferior): Don't use signal_pid. Update call to mywait.
22383 (attach_inferior): Update call to mywait.
22384 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22385 (main): Don't fetch/store registers explicitly. Use
22386 set_desired_inferior. Support proposed ``Hs'' packet. Update
22387 calls to mywait.
22388 * server.h: Update.
22389 (struct inferior_list, struct_inferior_list_entry): New.
22390 * target.c (set_desired_inferior): New.
22391 (write_inferior_memory): Constify.
22392 (mywait): New function.
22393 * target.h: Update.
22394 (struct target_ops): New signal_pid method.
22395 (mywait): Removed macro, added prototype.
22396
22397 * linux-low.h (regset_func): Removed.
22398 (regset_fill_func, regset_store_func): New.
22399 (enum regset_type): New.
22400 (struct regset_info): Add type field. Use new operation types.
22401 (struct linux_target_ops): stop_pc renamed to get_pc.
22402 Add decr_pc_after_break and breakpoint_at.
22403 (get_process, get_thread_proess, get_process_thread)
22404 (strut process_info, all_processes, linux_attach_lwp)
22405 (thread_db_init): New.
22406
22407 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22408 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22409 (the_low_target): Add new members.
22410 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22411 (i386_store_fpxregset): Constify.
22412 (target_regsets): Add new kind identifier.
22413 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22414 (i386_set_pc): Add debugging.
22415 (i386_breakpoint_at): New function.
22416 (the_low_target): Add new members.
22417 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22418 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22419 (mips_breakpoint_at): New.
22420 (the_low_target): Add new members.
22421 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22422 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22423 (the_low_target): Add new members.
22424 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22425 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22426 (the_low_target): Add new members.
22427 * linux-x86-64-low.c (target_regsets): Add new kind
22428 identifier.
22429
22430 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22431
22432 From Martin Pool <mbp@samba.org>:
22433 * server.c (gdbserver_usage): New function.
22434 (main): Call it.
22435
22436 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22437
22438 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22439 stop_at -> stop_pc.
22440
22441 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22442
22443 * Makefile.in: Remove obsolete code.
22444
22445 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22446
22447 * linux-low.c (regsets_fetch_inferior_registers),
22448 (regsets_store_inferior_registers): Removed cast to int from
22449 ptrace() calls.
22450 * regcache.h: Added declaration of struct inferior_info.
22451
22452 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22453
22454 * inferiors.c (struct inferior_info): Add regcache_data.
22455 (add_inferior): Call create_register_cache.
22456 (clear_inferiors): Call free_register_cache.
22457 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22458 * regcache.c (struct inferior_regcache_data): New.
22459 (registers): Remove.
22460 (get_regcache): New function.
22461 (create_register_cache, free_register_cache): New functions.
22462 (set_register_cache): Don't initialize the register cache here.
22463 (registers_to_string, registers_from_string, register_data): Call
22464 get_regcache.
22465 * regcache.h: Add prototypes.
22466 * server.h: Likewise.
22467
22468 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22469
22470 * mem-break.c: New file.
22471 * mem-break.h: New file.
22472 * Makefile.in: Add mem-break.o rule; update server.h
22473 dependencies.
22474 * inferiors.c (struct inferior_info): Add target_data
22475 member.
22476 (clear_inferiors): Free target_data member if set.
22477 (inferior_target_data, set_inferior_target_data): New functions.
22478 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22479 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22480 * linux-low.c (linux_bp_reinsert): New variable.
22481 (struct inferior_linux_data): New.
22482 (linux_create_inferior): Use set_inferior_target_data.
22483 (linux_attach): Likewise. Call add_inferior.
22484 (linux_wait_for_one_inferior): New function.
22485 (linux_wait): Call it.
22486 (linux_write_memory): Add const.
22487 (initialize_low): Call set_breakpoint_data.
22488 * linux-low.h (struct linux_target_ops): Add breakpoint
22489 handling members.
22490 * server.c (attach_inferior): Remove extra add_inferior
22491 call.
22492 * server.h: Include mem-break.h. Update inferior.c
22493 prototypes.
22494 * target.c (read_inferior_memory)
22495 (write_inferior_memory): New functions.
22496 * target.h (read_inferior_memory)
22497 (write_inferior_memory): Change macros to prototypes.
22498 (struct target_ops): Update comments. Add const to write_memory
22499 definition.
22500
22501 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22502
22503 * linux-low.c (usr_store_inferior_registers): Support
22504 registers which are allowed to fail to store.
22505 * linux-low.h (linux_target_ops): Likewise.
22506 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22507 (ppc_cannot_store_register): FPSCR may not be storable.
22508
22509 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22510
22511 * server.h: Include <string.h> if HAVE_STRING_H.
22512 * ChangeLog: Correct paths in last ChangeLog entry.
22513
22514 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22515
22516 * linux-low.h: Remove obsolete prototypes.
22517 (struct linux_target_ops): New.
22518 (extern the_low_target): New.
22519 * linux-low.c (num_regs, regmap): Remove declarations.
22520 (register_addr): Use the_low_target explicitly.
22521 (fetch_register): Likewise.
22522 (usr_fetch_inferior_registers): Likewise.
22523 (usr_store_inferior_registers): Likewise.
22524 * linux-arm-low.c (num_regs): Remove.
22525 (arm_num_regs): Define.
22526 (arm_regmap): Renamed from regmap, made static.
22527 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22528 made static.
22529 (arm_cannot_store_register): Renamed from cannot_store_register,
22530 made static.
22531 (the_low_target): New.
22532 * linux-i386-low.c (num_regs): Remove.
22533 (i386_num_regs): Define.
22534 (i386_regmap): Renamed from regmap, made static.
22535 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22536 made static.
22537 (i386_cannot_store_register): Renamed from cannot_store_register,
22538 made static.
22539 (the_low_target): New.
22540 * linux-ia64-low.c (num_regs): Remove.
22541 (ia64_num_regs): Define.
22542 (ia64_regmap): Renamed from regmap, made static.
22543 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22544 made static.
22545 (ia64_cannot_store_register): Renamed from cannot_store_register,
22546 made static.
22547 (the_low_target): New.
22548 * linux-m68k-low.c (num_regs): Remove.
22549 (m68k_num_regs): Define.
22550 (m68k_regmap): Renamed from regmap, made static.
22551 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22552 made static.
22553 (m68k_cannot_store_register): Renamed from cannot_store_register,
22554 made static.
22555 (the_low_target): New.
22556 * linux-mips-low.c (num_regs): Remove.
22557 (mips_num_regs): Define.
22558 (mips_regmap): Renamed from regmap, made static.
22559 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22560 made static.
22561 (mips_cannot_store_register): Renamed from cannot_store_register,
22562 made static.
22563 (the_low_target): New.
22564 * linux-ppc-low.c (num_regs): Remove.
22565 (ppc_num_regs): Define.
22566 (ppc_regmap): Renamed from regmap, made static.
22567 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22568 made static.
22569 (ppc_cannot_store_register): Renamed from cannot_store_register,
22570 made static.
22571 (the_low_target): New.
22572 * linux-s390-low.c (num_regs): Remove.
22573 (s390_num_regs): Define.
22574 (s390_regmap): Renamed from regmap, made static.
22575 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22576 made static.
22577 (s390_cannot_store_register): Renamed from cannot_store_register,
22578 made static.
22579 (the_low_target): New.
22580 * linux-sh-low.c (num_regs): Remove.
22581 (sh_num_regs): Define.
22582 (sh_regmap): Renamed from regmap, made static.
22583 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22584 made static.
22585 (sh_cannot_store_register): Renamed from cannot_store_register,
22586 made static.
22587 (the_low_target): New.
22588 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22589 (the_low_target): New.
22590
22591 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22592
22593 * Makefile.in: Add stamp-h target.
22594 * configure.in: Create stamp-h.
22595 * configure: Regenerated.
22596
22597 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22598
22599 * inferiors.c: New file.
22600 * target.c: New file.
22601 * target.h: New file.
22602 * Makefile.in: Add target.o and inferiors.o. Update
22603 dependencies.
22604 * linux-low.c (inferior_pid): New static variable,
22605 moved from server.c.
22606 (linux_create_inferior): Renamed from create_inferior.
22607 Call add_inferior. Return 0 on success instead of a PID.
22608 (linux_attach): Renamed from myattach.
22609 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22610 (linux_thread_alive): Renamed from mythread_alive.
22611 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22612 child dies.
22613 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22614 (regsets_store_inferior_registers): Correct error message.
22615 Add missing ``return 0''.
22616 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22617 (linux_store_registers): Renamed from store_inferior_registers.
22618 (linux_read_memory): Renamed from read_inferior_memory.
22619 (linux_write_memory): Renamed from write_inferior_memory.
22620 (linux_target_ops): New structure.
22621 (initialize_low): Call set_target_ops ().
22622 * remote-utils.c (unhexify): New function.
22623 (hexify): New function.
22624 (input_interrupt): Send signals to ``signal_pid''.
22625 * server.c (inferior_pid): Remove.
22626 (start_inferior): Update create_inferior call.
22627 (attach_inferior): Call add_inferior.
22628 (handle_query): New function.
22629 (main): Call handle_query for `q' packets.
22630 * server.h: Include "target.h". Remove obsolete prototypes.
22631 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22632
22633 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22634
22635 * Makefile.in: Add WARN_CFLAGS. Update configury
22636 dependencies.
22637 * configure.in: Check for <string.h>
22638 * configure: Regenerate.
22639 * config.in: Regenerate.
22640 * gdbreplay.c: Include needed system headers.
22641 (remote_open): Remove strchr prototype.
22642 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22643 * regcache.c (supply_register): Change buf argument to const void *.
22644 (supply_register_by_name): Likewise.
22645 (collect_register): Change buf argument to void *.
22646 (collect_register_by_name): Likewise.
22647 * regcache.h: Add missing prototypes.
22648 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22649 * server.c (handle_query): New function.
22650 (attached): New static variable, moved out of main.
22651 (main): Quiet longjmp clobber warnings.
22652 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22653 * utils.c (error): Remove NORETURN.
22654 (fatal): Likewise.
This page took 0.590647 seconds and 5 git commands to generate.