AArch64: Add gdbserver MTE support
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2021-03-24 Luis Machado <luis.machado@linaro.org>
2
3 * Makefile.in (SFILES): Add /../gdb/nat/aarch64-mte-linux-ptrace.c.
4 * configure.srv (aarch64*-*-linux*): Add arch/aarch64-mte-linux.o and
5 nat/aarch64-mte-linux-ptrace.o.
6 * linux-aarch64-low.cc: Include nat/aarch64-mte-linux-ptrace.h.
7 (class aarch64_target) <supports_memory_tagging>
8 <fetch_memtags, store_memtags>: New method overrides.
9 (aarch64_target::supports_memory_tagging)
10 (aarch64_target::fetch_memtags)
11 (aarch64_target::store_memtags): New methods.
12
13 2021-03-24 Luis Machado <luis.machado@linaro.org>
14
15 * linux-aarch64-low.cc (aarch64_fill_mteregset): New function.
16 (aarch64_store_mteregset): New function.
17 (aarch64_regsets): Add MTE register set entry.
18 (aarch64_sve_regsets): Add MTE register set entry.
19
20 2021-03-24 Luis Machado <luis.machado@linaro.org>
21
22 * linux-aarch64-ipa.cc (get_ipa_tdesc): Update call to
23 aarch64_linux_read_description.
24 (initialize_low_tracepoint): Likewise.
25 * linux-aarch64-low.cc (aarch64_target::low_arch_setup): Take MTE flag
26 into account.
27 * linux-aarch64-tdesc.cc (tdesc_aarch64_list): Add one more dimension
28 for MTE.
29 (aarch64_linux_read_description): Add mte_p parameter and update to
30 use it.
31 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add mte_p
32 parameter.
33
34 2021-03-24 Luis Machado <luis.machado@linaro.org>
35
36 * linux-aarch64-low.cc: Include arch/aarch64-mte-linux.h.
37
38 2021-03-24 Luis Machado <luis.machado@linaro.org>
39
40 * server.cc (test_memory_tagging_functions): New function.
41 (captured_main): Register test_memory_tagging_functions.
42
43 2021-03-24 Luis Machado <luis.machado@linaro.org>
44
45 * remote-utils.cc (decode_m_packet_params): Renamed from ...
46 (decode_m_packet): ... this, which now calls decode_m_packet_params.
47 Make char * param/return const char *.
48 (decode_M_packet): Use decode_m_packet_params and make char * param
49 const char *.
50 * remote-utils.h (decode_m_packet_params): New prototype.
51 (decode_m_packet): Constify char pointers.
52 (decode_M_packet): Likewise.
53 * server.cc (create_fetch_memtags_reply)
54 (parse_store_memtags_request): New
55 functions.
56 (handle_general_set): Handle the QMemTags packet.
57 (parse_fetch_memtags_request): New function.
58 (handle_query): Handle the qMemTags packet and advertise memory
59 tagging support.
60 (captured_main): Initialize memory tagging flag.
61 * server.h (struct client_state): Initialize memory tagging flag.
62 * target.cc (process_stratum_target::supports_memory_tagging)
63 (process_stratum_target::fetch_memtags)
64 (process_stratum_target::store_memtags): New methods.
65 * target.h: Include gdbsupport/byte-vector.h.
66 (class process_stratum_target) <supports_memory_tagging>
67 <fetch_memtags, store_memtags>: New class virtual methods.
68 (target_supports_memory_tagging): Define.
69
70 2021-03-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
71
72 * inferiors.h (struct process_info) <all_dlls, dlls_changed>: New
73 fields.
74 * dll.h (loaded_dll)
75 (unloaded_dll): Declare an overloaded version that takes a proc
76 parameter.
77 * dll.cc (loaded_dll)
78 (unloaded_dll): Implement the overloaded versions.
79 (clear_dlls): Clear all process' dll lists.
80 (all_dlls, dlls_changed): Remove the global variables.
81 * remote-utils.cc (prepare_resume_reply): Update to consider a dll
82 list per proc.
83 * server.cc (handle_qxfer_libraries): Ditto.
84 (handle_v_attach): Ditto.
85 (captured_main): Ditto.
86
87 2021-02-23 Simon Marchi <simon.marchi@polymtl.ca>
88
89 * linux-low.cc (linux_process_target::filter_event): Return
90 void.
91 * linux-low.h (class linux_process_target) <filter_event>:
92 Return void.
93
94 2021-02-12 Tom Tromey <tromey@adacore.com>
95
96 * gdbreplay.cc (remote_desc): Remove.
97 (remote_desc_in, remote_desc_out): New globals.
98 (remote_close): Update.
99 (remote_open): Handle "-".
100 (remote_open): Update.
101 (logchar): Log to stderr.
102 (expect, play): Update.
103
104 2021-02-12 Tom Tromey <tromey@adacore.com>
105
106 * gdbreplay.cc (remote_open): Constify.
107
108 2021-02-05 Paul E. Murphy <murphyp@linux.ibm.com>
109
110 * Makefile.in (UNDO_GNULIB_CFLAGS): Disable
111 gnulib free replacement too.
112 * common-defs.h [USE_WIN32API](read, write): Undefine
113 gnulib versions before defining these macros.
114
115 2021-02-03 Pedro Alves <pedro@palves.net>
116
117 * linux-low.cc (linux_process_target::complete_ongoing_step_over):
118 Discard step SIGTRAP, unless GDB wanted the thread to step.
119
120 2021-02-03 Pedro Alves <pedro@palves.net>
121
122 * server.cc (discard_queued_stop_replies): Don't ever discard the
123 notification at the head of the list.
124
125 2021-01-20 Simon Marchi <simon.marchi@polymtl.ca>
126
127 * ax.cc (bytecode_address_table): Make static.
128 * debug.cc (debug_file): Make static.
129 * linux-low.cc (stopping_threads): Make static.
130 (step_over_bkpt): Make static.
131 * linux-x86-low.cc (amd64_emit_ops, i386_emit_ops): Make static.
132 * tracepoint.cc (stop_tracing_bkpt, flush_trace_buffer_bkpt,
133 alloced_trace_state_variables, trace_buffer_ctrl,
134 tracing_start_time, tracing_stop_time, tracing_user_name,
135 tracing_notes, tracing_stop_note): Make static.
136
137 2021-01-20 Tom de Vries <tdevries@suse.de>
138
139 * linux-x86-low.cc (collect_register_i386): New function.
140 (x86_fill_gregset): Remove memset. Use collect_register_i386.
141
142 2021-01-07 Tom de Vries <tdevries@suse.de>
143
144 * Makefile.in (LIBIBERTY_NORMAL, LIBIBERTY_NOASAN, LIBIBERTY_PIC):
145 (LIBIBERTY_FOR_SHLIB): New var.
146 (LIBIBERTY): Set using $(LIBIBERTY_NORMAL).
147 (IPA_LIB): Use LIBIBERTY_FOR_SHLIB instead of LIBIBERTY in target rule.
148
149 2021-01-04 Simon Marchi <simon.marchi@efficios.com>
150
151 * debug.cc (debug_print_depth): New.
152
153 2021-01-01 Joel Brobecker <brobecker@adacore.com>
154
155 * server.cc (gdbserver_version): Update copyright year.
156 * gdbreplay.cc (gdbreplay_version): Likewise.
157
158 2020-12-16 Luis Machado <luis.machado@linaro.org>
159
160 * linux-aarch64-low.cc (address_significant): New function.
161 (aarch64_target::low_stopped_data_address): Handle the TBI.
162
163 2020-12-11 Andrew Burgess <andrew.burgess@embecosm.com>
164
165 * Makefile.in (IPA_LIB): Include libiberty library.
166
167 2020-11-11 Andrew Burgess <andrew.burgess@embecosm.com>
168
169 * server.cc (gdbserver_usage): Add missing option to usage text.
170 (gdbserver_show_disableable): Likewise.
171
172 2020-11-02 Simon Marchi <simon.marchi@efficios.com>
173
174 * ax.cc: Fix indentation.
175 * dll.cc: Fix indentation.
176 * inferiors.h: Fix indentation.
177 * linux-low.cc: Fix indentation.
178 * linux-nios2-low.cc: Fix indentation.
179 * linux-ppc-ipa.cc: Fix indentation.
180 * linux-ppc-low.cc: Fix indentation.
181 * linux-x86-low.cc: Fix indentation.
182 * linux-xtensa-low.cc: Fix indentation.
183 * regcache.cc: Fix indentation.
184 * server.cc: Fix indentation.
185 * tracepoint.cc: Fix indentation.
186
187 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
188
189 * acinclude.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
190 AC_LANG_PROGRAM.
191 * configure: Re-generate.
192
193 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
194
195 * configure: Re-generate.
196
197 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
198
199 * configure: Re-generate.
200
201 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
202
203 * configure: Re-generate.
204
205 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
206
207 * configure: Re-generate.
208
209 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
210
211 * configure.ac: Modernize.
212 * configure: Re-generate.
213
214 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
215
216 * configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
217 AC_CANONICAL_SYSTEM.
218 * configure: Re-generate.
219
220 2020-10-26 Pedro Alves <pedro@palves.net>
221
222 * netbsd-low.cc (netbsd_waitpid, netbsd_process_target::kill)
223 (netbsd_qxfer_libraries_svr4): Use gdb::handle_eintr without
224 explicit type.
225
226 2020-10-25 Simon Marchi <simon.marchi@polymtl.ca>
227
228 * acinclude.m4: Update ptrace.m4 path.
229
230 2020-10-24 Simon Marchi <simon.marchi@polymtl.ca>
231
232 * config.in: Re-generate.
233 * configure: Re-generate.
234
235 2020-10-21 Simon Marchi <simon.marchi@polymtl.ca>
236
237 * server.cc (handle_general_set): Don't use sprintf with
238 argument overlapping buffer.
239
240 2020-10-20 Tom Tromey <tromey@adacore.com>
241
242 PR gdb/26742:
243 * inferiors.cc (remove_thread): Clear current_thread before
244 freeing the thread.
245
246 2020-10-13 Kamil Rytarowski <n54@gmx.com>x
247
248 * netbsd-low.cc (netbsd_tdesc): Remove.
249 (netbsd_add_process): Likewise.
250 (netbsd_process_target::create_inferior): Update.
251
252 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
253
254 * linux-arc-low.cc (arc_linux_read_description): Release the
255 unique_ptr returned from arc_create_target_description.
256
257 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
258
259 * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
260 or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
261
262 2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
263
264 * linux-low.cc (linux_process_target::handle_extended_wait):
265 Release the unique_ptr returned from allocate_target_description.
266 * linux-riscv-low.cc (riscv_target::low_arch_setup): Likewise.
267 * linux-x86-low.cc (tdesc_amd64_linux_no_xml): Change type.
268 (tdesc_i386_linux_no_xml): Change type.
269 (x86_linux_read_description): Borrow pointer from unique_ptr
270 object.
271 (x86_target::get_ipa_tdesc_idx): Likewise.
272 (initialize_low_arch): Likewise.
273 * tdesc.cc (allocate_target_description): Update return type.
274
275 2020-10-07 Tom Tromey <tromey@adacore.com>
276
277 * server.cc (handle_search_memory): Remove dead code.
278
279 2020-10-07 Tom Tromey <tromey@adacore.com>
280
281 * server.cc (handle_search_memory_1): Remove.
282 (handle_search_memory): Use simple_search_memory.
283
284 2020-10-07 Simon Marchi <simon.marchi@efficios.com>
285
286 * Makefile.in (COMPILE): Add CXXFLAGS.
287 (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
288 (gdbserver$(EXEEXT)): Add CXXFLAGS.
289 (gdbreplay$(EXEEXT)): Add CXXFLAGS.
290 ($(IPA_LIB)): Add CXXFLAGS.
291 (IPAGENT_COMPILE): Add CXXFLAGS.
292
293 2020-10-07 Anton Kolesov <anton.kolesov@synopsys.com>
294
295 * configure.srv: Support ARC architecture.
296 * Makefile.in: Add linux-arc-low.cc and arch/arc.o.
297 * linux-arc-low.cc: New file.
298
299 2020-10-07 Kamil Rytarowski <n54@gmx.com>
300
301 * netbsd-low.cc (get_dynamic, get_r_debug, read_one_ptr)
302 (netbsd_qxfer_libraries_svr4): Remove "target" argument and update.
303 (netbsd_process_target::qxfer_libraries_svr4): Update.
304
305 2020-10-07 Kamil Rytarowski <n54@gmx.com>
306
307 * netbsd-low.cc: Fix whitespace formatting.
308 * netbsd-amd64-low.cc: Likewise.
309
310 2020-10-07 Kamil Rytarowski <n54@gmx.com>
311
312 * netbsd-low.cc (netbsd_process_target::read_memory)
313 (netbsd_process_target::write_memory): Update.
314
315 2020-10-07 Kamil Rytarowski <n54@gmx.com>
316
317 * netbsd-aarch64-low.cc: Add.
318 * Makefile.in (SFILES): Register "netbsd-aarch64-low.c".
319 * configure.srv: Add aarch64*-*-netbsd*.
320
321 2020-10-06 Shahab Vahedi <shahab@synopsys.com>
322
323 * regcache.cc (register_data): Remove unused "fetch" argument.
324
325 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
326
327 * server.cc (handle_monitor_command): Handle "set
328 debug-event-loop".
329 (captured_main): Handle "--debug-event-loop".
330 (monitor_show_help): Mention new setting.
331 (gdbserver_usage): Mention new flag.
332
333 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
334
335 * linux-low.cc (linux_process_target::async): Pass name to
336 add_file_handler.
337 * remote-utils.cc (handle_accept_event): Likewise.
338 (remote_open): Likewise.
339
340 2020-10-01 Kamil Rytarowski <n54@gmx.com>
341
342 * netbsd-i386-low.cc: Add.
343 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
344 * configure.srv: Add i[34567]86-*-netbsd*.
345
346 2020-10-01 Kamil Rytarowski <n54@gmx.com>
347
348 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
349 (netbsd_target_regsets): Now const.
350 (the_low_target): Remove.
351 (class netbsd_amd64_target, the_netbsd_amd64_target)
352 (the_netbsd_target): Add.
353 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
354 low_arch_setup ().
355 (netbsd_process_target::fetch_registers)
356 (netbsd_process_target::store_registers, initialize_low): Update.
357 (the_netbsd_target): Remove.
358 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
359 (the_low_target, netbsd_tdesc): Remove.
360 (netbsd_process_target::get_regs_info)
361 (netbsd_process_target::low_arch_setup): Add.
362
363 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
364
365 * win32-low.cc: Remove local wow64_process variable.
366 * win32-low.h: Remove local wow64_process variable.
367
368 2020-09-18 Tom Tromey <tromey@adacore.com>
369
370 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
371 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
372 (netbsd_process_target::wait): Change type of target_options.
373 * win32-low.h (class win32_process_target) <wait>: Update.
374 * win32-low.cc (win32_process_target::wait): Update.
375 * target.h (class process_stratum_target) <wait>: Update.
376 (mywait): Update.
377 * target.cc (mywait, target_wait): Change type of "options".
378 * linux-low.h (class linux_process_target) <wait, wait_1>:
379 Update.
380 * linux-low.cc (linux_process_target::wait)
381 (linux_process_target::wait_1): Update.
382
383 2020-09-15 Tom Tromey <tromey@adacore.com>
384
385 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
386 (xmltarget_amd64_linux_no_xml): Now arrays.
387
388 2020-09-14 Tom Tromey <tromey@adacore.com>
389
390 * tracepoint.cc (eval_result_names): Now const.
391 * ax.cc (gdb_agent_op_names): Now const.
392
393 2020-09-10 Kamil Rytarowski <n54@gmx.com>
394
395 * netbsd-low.cc: Add.
396 * netbsd-low.h: Likewise.
397 * netbsd-amd64-low.cc: Likewise.
398 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
399 "netbsd-amd64-low.cc".
400 * configure.srv: Add x86_64-*-netbsd*.
401
402 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
403
404 * server.cc (captured_main): Accept multiple `--selftest=`
405 options. Pass all `--selftest=` arguments to run_tests.
406
407 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
408
409 * configure, config.in: Regenerate.
410
411 2020-07-26 Eli Zaretskii <eliz@gnu.org>
412
413 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
414 When checking whether socklen_t type is defined, use ws2tcpip.h if
415 it is available and sys/socket.h isn't.
416 * configure: Regenerate.
417 * config.in: Regenerate.
418
419 2020-07-22 Pedro Alves <pedro@palves.net>
420
421 * inferiors.cc (switch_to_process): New, moved here from
422 thread-db.cc, and made extern.
423 * inferiors.h (switch_to_process): Declare.
424 * server.cc: Include "gdbsupport/scoped_restore.h".
425 (handle_qxfer_threads_proper): Now returns bool. Prepare to
426 access memory around target calls.
427 (handle_qxfer_threads): Handle errors.
428 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
429
430 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
431
432 * linux-low.cc (stopped_pids): Make static.
433
434 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
435
436 * tdesc.cc (allocate_target_description): Add header comment.
437 (target_desc_deleter::operator()): New function.
438 * tdesc.h (struct target_desc): Declare as final.
439
440 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
441
442 * server.cc (handle_query): Use std::vector of
443 std::string for `qsupported` vector. Use separate
444 vector for unknowns.
445 * target.h (class process_stratum_target) <process_qsupported>:
446 Change parameters to array_view of const char *.
447 (target_process_qsupported): Remove `count` parameter.
448 * target.cc (process_stratum_target::process_qsupported): Change
449 parameters to array_view of const char *.
450 * linux-x86-low.cc (class x86_target) <process_qsupported>:
451 Likewise.
452
453 2020-06-29 Tom de Vries <tdevries@suse.de>
454
455 * ax.h: Include gdbsupport/debug_agent.h.
456
457 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
458
459 * tdesc.cc (struct tdesc_compatible_info): New struct.
460 (tdesc_compatible_info_list): New function.
461 (tdesc_compatible_info_arch_name): New function.
462
463 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
464
465 Use std::list to stop pending signal instead of manually-created
466 linked list.
467 * linux-low.h: Include <list>.
468 (struct pending_signal): Move here from linux-low.cc.
469 (struct lwp_info) <pending_signals>
470 <pending_signals_to_report>: Update the type.
471 * linux-low.cc (struct pending_signals): Remove.
472 (linux_process_target::delete_lwp)
473 (linux_process_target::add_lwp)
474 (enqueue_one_deferred_signal)
475 (dequeue_one_deferred_signal)
476 (enqueue_pending_signal)
477 (linux_process_target::resume_one_lwp_throw)
478 (linux_process_target::thread_needs_step_over)
479 (linux_process_target::resume_one_thread)
480 (linux_process_target::proceed_one_lwp): Update the use of pending
481 signal list.
482
483 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
484
485 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
486 Remove.
487
488 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
489
490 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
491 * configure.srv: Remove mingw32ce cases.
492 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
493 * win32-low.h (to_back_slashes): Remove.
494 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
495
496 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
497
498 * Makefile.in (SFILES): linux-tile-low.cc.
499 * configure.srv: Remove tilegx case.
500 * linux-tile-low.cc: Remove.
501
502 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
503
504 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
505 * configure.srv: Remove m32r case.
506 * linux-m32r-low.cc: Remove.
507
508 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
509
510 * Makefile.in (SFILES): Remove linux-cris-low.c.
511 * configure.srv: Remove cris cases.
512 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
513
514 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
515
516 * Makefile.in (SFILES): Remove linux-bfin-low.c.
517 * configure.srv: Remove bfin case.
518 * linux-bfin-low.cc: Remove.
519 * linux-low.cc: Remove BFIN-conditional code.
520
521 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
522
523 * configure: Re-generate.
524 * configure.ac: Remove srv_qnx test.
525 * configure.srv: Remove nto case.
526 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
527 * remote-utils.c: Remove __QNX__-guarded code.
528
529 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
530
531 * configure: Re-generate.
532 * configure.ac: Remove srv_lynxos test.
533 * configure.srv: Remove lynxos cases.
534 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
535 Remove.
536
537 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
538
539 * README: Fix a few outdated or incoherent things.
540
541 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
542
543 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
544 (win32_clear_inferiors): Use open_process_used.
545 (get_child_debug_event): Likewise.
546
547 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
548
549 PR gdbserver/25893
550 * linux-low.cc (linux_process_target::create_inferior),
551 lynx-low.cc (lynx_process_target::create_inferior),
552 win32-low.cc (win32_process_target::create_inferior): Use
553 construct_inferior_arguments instead of stringify_argv
554 to get string representation which properly escapes
555 special characters.
556 * server.cc (handle_v_run): Just pass empty program arg
557 as such, since any further processing is now handled via
558 construct_inferior_arguments.
559
560 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
561
562 * nto-low.cc (nto_process_target::create_inferior): Pass
563 argv to spawnp function as char **.
564
565 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
566
567 * server.cc (captured_main), (handle_v_run): No longer
568 insert extra NULL element to args vector.
569
570 2020-05-23 Pedro Alves <palves@redhat.com>
571
572 * gdb-safe-ctype.h: New.
573
574 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
575
576 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
577 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
578 (ia64_target::low_breakpoint_at): Ditto.
579
580 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
581
582 * win32-i386-low.cc (i386_supports_z_point_type): Handle
583 Z_PACKET_HW_BP z_type.
584 (i386_insert_point): Handle raw_bkpt_type type.
585 (i386_remove_point): Likewise.
586
587 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
588
589 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
590 Add arch/i386.o.
591 * win32-arm-low.cc (arm_num_regs): New function.
592 (struct win32_target_ops): Use arm_num_regs.
593 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
594 processes.
595 (i386_get_thread_context): Likewise.
596 (i386_prepare_to_resume): Likewise.
597 (i386_thread_added): Likewise.
598 (i386_single_step): Likewise.
599 (i386_fetch_inferior_register): Likewise.
600 (i386_store_inferior_register): Likewise.
601 (i386_arch_setup): Likewise.
602 (i386_win32_num_regs): New function.
603 (struct win32_target_ops): Use i386_win32_num_regs.
604 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
605 processes.
606 (win32_require_context): Likewise.
607 (child_add_thread): Likewise.
608 (do_initial_child_stuff): Likewise.
609 (continue_one_thread): Likewise.
610 (win32_process_target::resume): Likewise.
611 (load_psapi): Likewise.
612 (win32_add_all_dlls): Likewise.
613 (maybe_adjust_pc): Likewise.
614 (win32_process_target::qxfer_siginfo): Likewise.
615 (initialize_low): Likewise.
616 * win32-low.h (struct win32_target_ops): Change num_regs to
617 callback function.
618
619 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
620
621 * configure.ac: Remove check for fs_base/gs_base in
622 user_regs_struct.
623 * configure: Re-generate.
624 * config.in: Re-generate.
625 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
626 x86_store_gregset): Adjust.
627
628 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
629
630 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
631 comparison.
632
633 2020-04-16 Tom Tromey <tromey@adacore.com>
634
635 * win32-low.cc (windows_nat::handle_access_violation): New
636 function.
637
638 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
639
640 * win32-low.cc (get_child_debug_event): Fix format string warning.
641
642 2020-04-13 Tom Tromey <tom@tromey.com>
643
644 * server.h (gdb_fildes_t): Remove typedef.
645 * remote-utils.c (remote_desc, list_desc): Now int.
646 (INVALID_DESCRIPTOR): Remove.
647 (gdb_connected, remote_close)
648 (check_remote_input_interrupt_request): Update.
649 * utils.h (pfildes): Don't declare.
650 * utils.c (pfildes): Remove.
651
652 2020-04-13 Tom Tromey <tom@tromey.com>
653
654 * server.h (handle_serial_event, handle_target_event): Update.
655 * server.c: Don't call initialize_event_loop.
656 (keep_processing_events): New global.
657 (handle_serial_event): Return void. Set keep_processing_events.
658 (handle_target_event): Return void.
659 (start_event_loop): Move from event-loop.c. Rewrite.
660 * remote-utils.c (handle_accept_event): Return void.
661 (reset_readchar): Use delete_timer.
662 (process_remaining): Return void.
663 (reschedule): Use create_timer.
664 * event-loop.h: Remove.
665 * event-loop.cc: Remove.
666 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
667
668 2020-04-13 Tom Tromey <tom@tromey.com>
669
670 * server.c (invoke_async_signal_handlers)
671 (check_async_event_handlers, flush_streams, gdb_select): New
672 functions.
673
674 2020-04-13 Tom Tromey <tom@tromey.com>
675
676 * configure: Rebuild.
677 * config.in: Rebuild.
678
679 2020-04-08 Tom Tromey <tromey@adacore.com>
680
681 PR gdb/22992
682 * win32-low.c (child_continue): Call matching_pending_stop.
683 (get_child_debug_event): Call fetch_pending_stop. Push pending
684 stop when needed.
685
686 2020-04-08 Tom Tromey <tromey@adacore.com>
687
688 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
689 (win32_process_target::supports_stopped_by_sw_breakpoint):
690 Declare.
691 * win32-low.c (win32_supports_z_point_type): Always handle
692 Z_PACKET_SW_BP.
693 (win32_insert_point): Call insert_memory_breakpoint when needed.
694 (win32_remove_point): Call remove_memory_breakpoint when needed.
695 (win32_process_target::stopped_by_sw_breakpoint)
696 (win32_process_target::supports_stopped_by_sw_breakpoint): New
697 methods.
698 (win32_target_ops): Update.
699 (maybe_adjust_pc): New function.
700 (win32_wait): Call maybe_adjust_pc.
701
702 2020-04-08 Tom Tromey <tromey@adacore.com>
703
704 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
705 field.
706 * win32-i386-low.c (the_low_target): Update.
707 * win32-arm-low.c (the_low_target): Update.
708
709 2020-04-08 Tom Tromey <tromey@adacore.com>
710
711 * win32-low.h (win32_process_target::read_pc)
712 (win32_process_target::write_pc): Declare.
713 * win32-low.c (win32_process_target::read_pc)
714 (win32_process_target::write_pc): New methods.
715 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
716 functions.
717 (the_low_target): Update.
718 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
719 functions.
720 (the_low_target): Update.
721
722 2020-04-08 Tom Tromey <tromey@adacore.com>
723
724 * win32-low.c (win32_kill, get_child_debug_event): Use
725 wait_for_debug_event.
726
727 2020-04-08 Tom Tromey <tromey@adacore.com>
728
729 * win32-low.c (child_continue): Call continue_last_debug_event.
730
731 2020-04-08 Tom Tromey <tromey@adacore.com>
732
733 * win32-low.c (handle_exception): Remove.
734 (windows_nat::handle_ms_vc_exception): New function.
735 (get_child_debug_event): Add "continue_status" parameter.
736 Update.
737 (win32_wait): Update.
738
739 2020-04-08 Tom Tromey <tromey@adacore.com>
740
741 * win32-low.c (windows_nat::handle_load_dll): Rename from
742 handle_load_dll. No longer static.
743 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
744 No longer static.
745
746 2020-04-08 Tom Tromey <tromey@adacore.com>
747
748 * win32-low.c (handle_output_debug_string): Add parameter. Change
749 return type.
750 (win32_kill, get_child_debug_event): Update.
751
752 2020-04-08 Tom Tromey <tromey@adacore.com>
753
754 * win32-low.c (current_process_handle, current_process_id)
755 (main_thread_id, last_sig, current_event, siginfo_er): Move to
756 nat/windows-nat.c.
757
758 2020-04-08 Tom Tromey <tromey@adacore.com>
759
760 * win32-low.c (get_image_name): Remove.
761 (handle_load_dll): Update.
762
763 2020-04-08 Tom Tromey <tromey@adacore.com>
764
765 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
766 No longer static. Change parameters.
767 (child_add_thread, child_fetch_inferior_registers)
768 (child_store_inferior_registers, win32_resume)
769 (win32_get_tib_address): Update.
770
771 2020-04-08 Tom Tromey <tromey@adacore.com>
772
773 * win32-low.h (struct win32_target_ops): Use qualified names where
774 needed.
775 * win32-i386-low.c: Add "using namespace".
776 * win32-low.c: Add "using namespace".
777 * win32-arm-low.c: Add "using namespace".
778
779 2020-04-08 Tom Tromey <tromey@adacore.com>
780
781 * win32-low.c (delete_thread_info): Don't call CloseHandle.
782
783 2020-04-08 Tom Tromey <tromey@adacore.com>
784
785 * win32-low.c (win32_require_context, suspend_one_thread): Use
786 windows_thread_info::suspend.
787 (continue_one_thread): Use windows_thread_info::resume.
788 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
789
790 2020-04-08 Tom Tromey <tromey@adacore.com>
791
792 * win32-i386-low.c (update_debug_registers)
793 (i386_prepare_to_resume, i386_thread_added): Update.
794
795 2020-04-08 Tom Tromey <tromey@adacore.com>
796
797 * win32-low.c (child_add_thread): Use new.
798 (delete_thread_info): Use delete.
799
800 2020-04-08 Tom Tromey <tromey@adacore.com>
801
802 * win32-low.h (struct windows_thread_info): Remove.
803
804 2020-04-08 Tom Tromey <tromey@adacore.com>
805
806 * win32-low.h (struct windows_thread_info): Rename from
807 win32_thread_info. Remove typedef.
808 (struct win32_target_ops, win32_require_context): Update.
809 * win32-low.c (win32_get_thread_context)
810 (win32_set_thread_context, win32_prepare_to_resume)
811 (win32_require_context, thread_rec, child_add_thread)
812 (delete_thread_info, continue_one_thread)
813 (child_fetch_inferior_registers, child_store_inferior_registers)
814 (win32_resume, suspend_one_thread, win32_get_tib_address):
815 Update.
816 * win32-i386-low.c (update_debug_registers)
817 (win32_get_current_dr, i386_get_thread_context)
818 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
819 (i386_fetch_inferior_register, i386_store_inferior_register):
820 Update.
821 * win32-arm-low.c (arm_get_thread_context)
822 (arm_fetch_inferior_register, arm_store_inferior_register):
823 Update.
824
825 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
826
827 * linux-low.h (struct linux_target_ops): Remove.
828 (the_low_target): Remove.
829 * linux-x86-low.cc (the_low_target): Remove.
830 * linux-aarch64-low.cc (the_low_target): Ditto.
831 * linux-arm-low.cc (the_low_target): Ditto.
832 * linux-bfin-low.cc (the_low_target): Ditto.
833 * linux-cris-low.cc (the_low_target): Ditto.
834 * linux-crisv32-low.cc (the_low_target): Ditto.
835 * linux-ia64-low.cc (the_low_target): Ditto.
836 * linux-m32r-low.cc (the_low_target): Ditto.
837 * linux-m68k-low.cc (the_low_target): Ditto.
838 * linux-mips-low.cc (the_low_target): Ditto.
839 * linux-nios2-low.cc (the_low_target): Ditto.
840 * linux-ppc-low.cc (the_low_target): Ditto.
841 * linux-riscv-low.cc (the_low_target): Ditto.
842 * linux-s390-low.cc (the_low_target): Ditto.
843 * linux-sh-low.cc (the_low_target): Ditto.
844 * linux-sparc-low.cc (the_low_target): Ditto.
845 * linux-tic6x-low.cc (the_low_target): Ditto.
846 * linux-tile-low.cc (the_low_target): Ditto.
847 * linux-xtensa-low.cc (the_low_target): Ditto.
848
849 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
850
851 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
852 linux target define the op by overriding the declaration in
853 process_stratum_target.
854
855 * linux-low.h (struct linux_target_ops): Remove the op.
856 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
857 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
858 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
859 (x86_get_ipa_tdesc_idx): Turn into...
860 (x86_target::get_ipa_tdesc_idx): ...this.
861 (the_low_target): Remove the op field.
862 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
863 (ppc_get_ipa_tdesc_idx): Turn into...
864 (ppc_target::get_ipa_tdesc_idx): ...this.
865 (the_low_target): Remove the op field.
866 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
867 (s390_get_ipa_tdesc_idx): Turn into...
868 (s390_target::get_ipa_tdesc_idx): ...this.
869 (the_low_target): Remove the op field.
870
871 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
872
873 Turn the 'get_syscall_trapinfo' linux target op into a method
874 of process_stratum_target.
875
876 * linux-low.h (struct linux_target_ops): Remove the op.
877 (class linux_process_target) <get_syscall_trapinfo>
878 <gdb_catch_this_syscall>
879 <low_supports_catch_syscall>
880 <low_get_syscall_trapinfo>: Declare.
881 * linux-low.cc (get_syscall_trapinfo): Turn into...
882 (linux_process_target::get_syscall_trapinfo): ...this.
883 (linux_process_target::low_get_syscall_trapinfo): Define.
884 (gdb_catch_this_syscall_p): Turn into...
885 (linux_process_target::gdb_catch_this_syscall): ...this.
886 (linux_process_target::low_supports_catch_syscall): Define.
887
888 Update the callers below.
889
890 (linux_process_target::wait_1)
891 (linux_process_target::supports_catch_syscall)
892
893 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
894 <low_get_syscall_trapinfo>: Declare.
895 (x86_target::low_supports_catch_syscall): Define.
896 (x86_get_syscall_trapinfo): Turn into...
897 (x86_target::low_get_syscall_trapinfo): ...this.
898 (the_low_target): Remove the op field.
899 * linux-aarch64-low.cc (class aarch64_target)
900 <low_supports_catch_syscall>
901 <low_get_syscall_trapinfo>: Declare.
902 (aarch64_target::low_supports_catch_syscall): Define.
903 (aarch64_get_syscall_trapinfo): Turn into...
904 (aarch64_target::low_get_syscall_trapinfo): ...this.
905 (the_low_target): Remove the op field.
906 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
907 <low_get_syscall_trapinfo>: Declare.
908 (arm_target::low_supports_catch_syscall): Define.
909 (arm_get_syscall_trapinfo): Turn into...
910 (arm_target::low_get_syscall_trapinfo): ...this.
911 (the_low_target): Remove the op field.
912 * linux-ppc-low.cc (the_low_target): Remove the op field.
913 * linux-s390-low.cc (the_low_target): Remove the op field.
914
915 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
916
917 Remove the 'supports_hardware_single_step' linux target op and
918 override the process_stratum_target's op definition in
919 linux_process_target to return true.
920
921 * linux-low.h (struct linux_target_ops): Remove the op.
922 (class linux_process_target) <finish_step_over>
923 <maybe_hw_step>: Declare.
924 * linux-low.cc (can_hardware_single_step): Remove.
925 (maybe_hw_step): Turn into...
926 (linux_process_target::maybe_hw_step): ...this.
927 (finish_step_over): Turn into...
928 (linux_process_target::finish_step_over): ...this.
929 (linux_process_target::supports_hardware_single_step): Update
930 to return true.
931
932 Update the callers below.
933
934 (linux_process_target::single_step)
935 (linux_process_target::resume_one_lwp_throw)
936
937 * linux-arm-low.cc (class arm_target)
938 <supports_hardware_single_step>: Declare.
939 (arm_supports_hardware_single_step): Turn into...
940 (arm_target::supports_hardware_single_step): ...this.
941 (the_low_target): Remove the op field.
942 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
943 (the_low_target): Remove the op field.
944 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
945 Remove.
946 (the_low_target): Remove the op field.
947 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
948 (the_low_target): Remove the op field.
949 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
950 (the_low_target): Remove the op field.
951 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
952 (the_low_target): Remove the op field.
953 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
954 (the_low_target): Remove the op field.
955 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
956 (the_low_target): Remove the op field.
957 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
958 (the_low_target): Remove the op field.
959 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
960 (the_low_target): Remove the op field.
961 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
962 (the_low_target): Remove the op field.
963 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
964 (the_low_target): Remove the op field.
965 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
966 Remove.
967 (the_low_target): Remove the op field.
968
969 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
970
971 Turn the 'supports_range_stepping' linux target op into a method
972 of linux_process_target.
973
974 * linux-low.h (struct linux_target_ops): Remove the op.
975 (class linux_process_target) <low_supports_range_stepping>: Declare.
976 * linux-low.cc (linux_process_target::low_supports_range_stepping):
977 Define.
978 (linux_process_target::supports_range_stepping): Update the call
979 site.
980 * linux-x86-low.cc (class x86_target)
981 <low_supports_range_stepping>: Declare.
982 (x86_supports_range_stepping): Turn into...
983 (x86_target::low_supports_range_stepping): ...this.
984 (the_low_target): Remove the op field.
985 * linux-aarch64-low.cc (class aarch64_target)
986 <low_supports_range_stepping>: Declare.
987 (aarch64_supports_range_stepping): Turn into...
988 (aarch64_target::low_supports_range_stepping): ...this.
989 (the_low_target): Remove the op field.
990 * linux-arm-low.cc (the_low_target): Remove the op field.
991 * linux-bfin-low.cc (the_low_target): Ditto.
992 * linux-crisv32-low.cc (the_low_target): Ditto.
993 * linux-m32r-low.cc (the_low_target): Ditto.
994 * linux-m68k-low.cc (the_low_target): Ditto.
995 * linux-ppc-low.cc (the_low_target): Ditto.
996 * linux-s390-low.cc (the_low_target): Ditto.
997 * linux-sh-low.cc (the_low_target): Ditto.
998 * linux-tic6x-low.cc (the_low_target): Ditto.
999 * linux-tile-low.cc (the_low_target): Ditto.
1000 * linux-xtensa-low.cc (the_low_target): Ditto.
1001
1002 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1003
1004 Remove the 'emit_ops' linux target ops and let the concrete
1005 linux target define the op by overriding the declaration of
1006 process_stratum_target.
1007
1008 * linux-low.h (struct linux_target_ops): Remove the op.
1009 (class linux_process_target) <emit_ops>: Remove.
1010 * linux-low.cc (linux_process_target::emit_ops): Remove.
1011 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
1012 (x86_emit_ops): Turn into...
1013 (x86_target::emit_ops): ...this.
1014 (the_low_target): Remove the op field.
1015 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
1016 (aarch64_emit_ops): Turn into...
1017 (aarch64_target::emit_ops): ...this.
1018 (the_low_target): Remove the op field.
1019 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
1020 (ppc_emit_ops): Turn into...
1021 (ppc_target::emit_ops): ...this.
1022 (the_low_target): Remove the op field.
1023 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
1024 (s390_emit_ops): Turn into...
1025 (s390_target::emit_ops): ...this.
1026 (the_low_target): Remove the op field.
1027 * linux-arm-low.cc (the_low_target): Remove the op field.
1028 * linux-bfin-low.cc (the_low_target): Ditto.
1029 * linux-crisv32-low.cc (the_low_target): Ditto.
1030 * linux-m32r-low.cc (the_low_target): Ditto.
1031 * linux-m68k-low.cc (the_low_target): Ditto.
1032 * linux-sh-low.cc (the_low_target): Ditto.
1033 * linux-tic6x-low.cc (the_low_target): Ditto.
1034 * linux-tile-low.cc (the_low_target): Ditto.
1035 * linux-xtensa-low.cc (the_low_target): Ditto.
1036
1037 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1038
1039 Remove the 'install_fast_tracepoint_jump_pad' and
1040 'get_min_fast_tracepoint_insn_len' linux target ops to let the
1041 concrete linux target define the ops by overriding the declarations
1042 of process_stratum_target.
1043
1044 * linux-low.h (struct linux_target_ops): Remove the ops.
1045 (class linux_process_target) <supports_fast_tracepoints>
1046 <install_fast_tracepoint_jump_pad>
1047 <get_min_fast_tracepoint_insn_len>: Remove.
1048 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
1049 (linux_process_target::install_fast_tracepoint_jump_pad)
1050 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
1051 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
1052 <install_fast_tracepoint_jump_pad>
1053 <get_min_fast_tracepoint_insn_len>: Declare.
1054 (x86_target::supports_fast_tracepoints): Define.
1055 (x86_install_fast_tracepoint_jump_pad): Turn into...
1056 (x86_target::install_fast_tracepoint_jump_pad): ...this.
1057 (x86_get_min_fast_tracepoint_insn_len): Turn into...
1058 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
1059 (the_low_target): Remove the op fields.
1060 * linux-aarch64-low.cc (class aarch64_target)
1061 <supports_fast_tracepoints>
1062 <install_fast_tracepoint_jump_pad>
1063 <get_min_fast_tracepoint_insn_len>: Declare.
1064 (aarch64_target::supports_fast_tracepoints): Define.
1065 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
1066 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
1067 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
1068 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
1069 (the_low_target): Remove the op fields.
1070 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
1071 <install_fast_tracepoint_jump_pad>
1072 <get_min_fast_tracepoint_insn_len>: Declare.
1073 (ppc_target::supports_fast_tracepoints): Define.
1074 (ppc_install_fast_tracepoint_jump_pad): Turn into...
1075 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
1076 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
1077 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
1078 (the_low_target): Remove the op fields.
1079 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
1080 <install_fast_tracepoint_jump_pad>
1081 <get_min_fast_tracepoint_insn_len>: Declare.
1082 (s390_target::supports_fast_tracepoints): Define.
1083 (s390_install_fast_tracepoint_jump_pad): Turn into...
1084 (s390_target::install_fast_tracepoint_jump_pad): ...this.
1085 (s390_get_min_fast_tracepoint_insn_len): Turn into...
1086 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
1087 (the_low_target): Remove the op fields.
1088 * linux-arm-low.cc (the_low_target): Remove the op fields.
1089 * linux-bfin-low.cc (the_low_target): Ditto.
1090 * linux-crisv32-low.cc (the_low_target): Ditto.
1091 * linux-m32r-low.cc (the_low_target): Ditto.
1092 * linux-m68k-low.cc (the_low_target): Ditto.
1093 * linux-sh-low.cc (the_low_target): Ditto.
1094 * linux-tic6x-low.cc (the_low_target): Ditto.
1095 * linux-tile-low.cc (the_low_target): Ditto.
1096 * linux-xtensa-low.cc (the_low_target): Ditto.
1097
1098 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1099
1100 Turn the 'get_thread_area' linux target op into a method of
1101 process_stratum_target.
1102
1103 * linux-low.h (struct linux_target_ops): Remove the op.
1104 (class linux_process_target) <stuck_in_jump_pad>
1105 <linux_fast_tracepoint_collecting>
1106 <low_get_thread_area>: Declare.
1107 * linux-low.cc (supports_fast_tracepoints): Remove.
1108 (linux_fast_tracepoint_collecting): Turn into...
1109 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
1110 (linux_process_target::low_get_thread_area): Define.
1111 (stuck_in_jump_pad_callback): Turn into...
1112 (linux_process_target::stuck_in_jump_pad): ...this.
1113
1114 Update the caller below.
1115
1116 (linux_process_target::stabilize_threads)
1117
1118 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
1119 Declare.
1120 (x86_get_thread_area): Turn into...
1121 (x86_target::low_get_thread_area): ...this.
1122 (the_low_target): Remove the op field.
1123 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
1124 Declare.
1125 (aarch64_get_thread_area): Turn into...
1126 (aarch64_target::low_get_thread_area): ...this.
1127 (the_low_target): Remove the op field.
1128 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
1129 Declare.
1130 (ppc_get_thread_area): Turn into...
1131 (ppc_target::low_get_thread_area): ...this.
1132 (the_low_target): Remove the op field.
1133 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
1134 Declare.
1135 (s390_get_thread_area): Turn into...
1136 (s390_target::low_get_thread_area): ...this.
1137 (the_low_target): Remove the op field.
1138 * linux-arm-low.cc (the_low_target): Remove the op field.
1139 * linux-bfin-low.cc (the_low_target): Ditto.
1140 * linux-crisv32-low.cc (the_low_target): Ditto.
1141 * linux-m32r-low.cc (the_low_target): Ditto.
1142 * linux-m68k-low.cc (the_low_target): Ditto.
1143 * linux-sh-low.cc (the_low_target): Ditto.
1144 * linux-tic6x-low.cc (the_low_target): Ditto.
1145 * linux-tile-low.cc (the_low_target): Ditto.
1146 * linux-xtensa-low.cc (the_low_target): Ditto.
1147
1148 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1149
1150 Remote the 'supports_tracepoints' linux target op and let the
1151 concrete linux target define it by overriding the op declared in
1152 process_stratum_target.
1153
1154 * linux-low.h (struct linux_target_ops): Remove the op.
1155 (class linux_process_target) <supports_tracepoints>: Remove.
1156 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
1157 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
1158 Declare.
1159 (x86_supports_tracepoints): Turn into...
1160 (x86_target::supports_tracepoints): ...this.
1161 (the_low_target): Remove the op field.
1162 * linux-aarch64-low.cc (class aarch64_target)
1163 <supports_tracepoints>: Declare.
1164 (aarch64_supports_tracepoints): Turn into...
1165 (aarch64_target::supports_tracepoints): ...this.
1166 (the_low_target): Remove the op field.
1167 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
1168 Declare.
1169 (ppc_supports_tracepoints): Turn into...
1170 (ppc_target::supports_tracepoints): ...this.
1171 (the_low_target): Remove the op field.
1172 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
1173 Declare.
1174 (s390_supports_tracepoints): Turn into...
1175 (s390_target::supports_tracepoints): ...this.
1176 (the_low_target): Remove the op field.
1177 * linux-arm-low.cc (the_low_target): Remove the op field.
1178 * linux-bfin-low.cc (the_low_target): Ditto.
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-sh-low.cc (the_low_target): Ditto.
1183 * linux-tic6x-low.cc (the_low_target): Ditto.
1184 * linux-tile-low.cc (the_low_target): Ditto.
1185 * linux-xtensa-low.cc (the_low_target): Ditto.
1186
1187 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1188
1189 Remove the 'process_qsupported' linux target op and let a concrete
1190 linux target define the op by overriding the op declaration in
1191 process_stratum_target.
1192
1193 * linux-low.h (struct linux_target_ops): Remove the op.
1194 (class linux_process_target) <process_qsupported>: Remove.
1195 * linux-low.cc (linux_process_target::process_qsupported): Remove.
1196 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
1197 (x86_linux_process_qsupported): Turn into...
1198 (x86_target::process_qsupported): ...this.
1199 (the_low_target): Remove the op field.
1200 * linux-aarch64-low.cc (the_low_target): Remove the op
1201 field.
1202 * linux-arm-low.cc (the_low_target): Ditto.
1203 * linux-bfin-low.cc (the_low_target): Ditto.
1204 * linux-crisv32-low.cc (the_low_target): Ditto.
1205 * linux-m32r-low.cc (the_low_target): Ditto.
1206 * linux-m68k-low.cc (the_low_target): Ditto.
1207 * linux-ppc-low.cc (the_low_target): Ditto.
1208 * linux-s390-low.cc (the_low_target): Ditto.
1209 * linux-sh-low.cc (the_low_target): Ditto.
1210 * linux-tic6x-low.cc (the_low_target): Ditto.
1211 * linux-tile-low.cc (the_low_target): Ditto.
1212 * linux-xtensa-low.cc (the_low_target): Ditto.
1213
1214 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1215
1216 Turn the 'prepare_to_resume' linux target op into a method of
1217 linux_process_target.
1218
1219 * linux-low.h (struct linux_target_ops): Remove the op.
1220 (class linux_process_target) <low_prepare_to_resume>: Declare.
1221 * linux-low.cc (linux_process_target::low_prepare_to_resume):
1222 Define.
1223
1224 Update the callers below:
1225
1226 (linux_process_target::resume_one_lwp_throw)
1227 (linux_process_target::low_prepare_to_resume)
1228
1229 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
1230 Declare.
1231 (x86_target::low_prepare_to_resume): Define.
1232 (the_low_target): Remove the op field.
1233 * linux-aarch64-low.cc (class aarch64_target)
1234 <low_prepare_to_resume>: Declare.
1235 (aarch64_target::low_prepare_to_resume): Define.
1236 (the_low_target): Remove the op field.
1237 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
1238 Declare.
1239 (arm_prepare_to_resume): Turn into...
1240 (arm_target::low_prepare_to_resume): ...this.
1241 (the_low_target): Remove the op field.
1242 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
1243 Declare.
1244 (mips_linux_prepare_to_resume): Turn into...
1245 (mips_target::low_prepare_to_resume): ...this.
1246 (the_low_target): Remove the op field.
1247 * linux-bfin-low.cc (the_low_target): Remove the op field.
1248 * linux-crisv32-low.cc (the_low_target): Ditto.
1249 * linux-m32r-low.cc (the_low_target): Ditto.
1250 * linux-m68k-low.cc (the_low_target): Ditto.
1251 * linux-ppc-low.cc (the_low_target): Ditto.
1252 * linux-s390-low.cc (the_low_target): Ditto.
1253 * linux-sh-low.cc (the_low_target): Ditto.
1254 * linux-tic6x-low.cc (the_low_target): Ditto.
1255 * linux-tile-low.cc (the_low_target): Ditto.
1256 * linux-xtensa-low.cc (the_low_target): Ditto.
1257
1258 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1259
1260 Turn the 'new_process', 'delete_process', 'new_thread',
1261 'delete_thread', and 'new_fork' linux target ops into methods
1262 of linux_process_target.
1263
1264 * linux-low.h (struct linux_target_ops): Remove the ops.
1265 (class linux_process_target) <add_linux_process>
1266 <add_lwp>
1267 <delete_lwp>
1268 <attach_lwp>
1269 <detach_one_lwp>
1270 <check_zombie_leaders>
1271 <filter_exit_event>
1272 <low_new_process>
1273 <low_delete_process>
1274 <low_new_thread>
1275 <low_delete_thread>
1276 <low_new_fork>: Declare.
1277 * linux-low.cc (delete_lwp): Turn into...
1278 (linux_process_target::delete_lwp): ...this.
1279 (linux_process_target::low_delete_thread): Define.
1280 (linux_add_process): Turn into...
1281 (linux_process_target::add_linux_process): ...this.
1282 (linux_process_target::low_new_process): Define.
1283 (linux_process_target::low_delete_process): Define.
1284 (linux_process_target::low_new_fork): Define.
1285 (add_lwp): Turn into...
1286 (linux_process_target::add_lwp): ...this.
1287 (linux_process_target::low_new_thread): Define.
1288 (linux_attach_lwp): Turn into...
1289 (linux_process_target::attach_lwp): ...this.
1290 (linux_detach_one_lwp): Turn into...
1291 (linux_process_target::detach_one_lwp): ...this.
1292 (linux_detach_lwp_callback): Remove and inline...
1293 (linux_process_target::detach): ...here.
1294 (check_zombie_leaders): Turn into...
1295 (linux_process_target::check_zombie_leaders): ...this.
1296 (filter_exit_event): Turn into...
1297 (linux_process_target::filter_exit_event): ...this.
1298
1299 Update the callers below.
1300
1301 (linux_process_target::handle_extended_wait)
1302 (linux_process_target::create_inferior)
1303 (attach_proc_task_lwp_callback)
1304 (linux_process_target::attach)
1305 (linux_process_target::detach)
1306 (linux_process_target::mourn)
1307 * thread-db.cc (attach_thread)
1308
1309 * linux-x86-low.cc (class x86_target) <low_new_process>
1310 <low_delete_process>
1311 <low_new_thread>
1312 <low_delete_thread>
1313 <low_new_fork>: Declare.
1314 (x86_linux_new_process): Turn into...
1315 (x86_target::low_new_process): ...this.
1316 (x86_linux_delete_process): Turn into...
1317 (x86_target::low_delete_process): ...this.
1318 (x86_target::low_new_thread): Define.
1319 (x86_target::low_delete_thread): Define.
1320 (x86_linux_new_fork): Turn into...
1321 (x86_target::low_new_fork): ...this.
1322 (the_low_target): Remove the op fields.
1323 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
1324 <low_delete_process>
1325 <low_new_thread>
1326 <low_delete_thread>
1327 <low_new_fork>: Declare.
1328 (aarch64_linux_new_process): Turn into...
1329 (aarch64_target::low_new_process): ...this.
1330 (aarch64_linux_delete_process): Turn into...
1331 (aarch64_target::low_delete_process): ...this.
1332 (aarch64_target::low_new_thread): Define.
1333 (aarch64_target::low_delete_thread): Define.
1334 (aarch64_linux_new_fork): Turn into...
1335 (aarch64_target::low_new_fork): ...this.
1336 (the_low_target): Remove the op fields.
1337 * linux-arm-low.cc (class arm_target) <low_new_process>
1338 <low_delete_process>
1339 <low_new_thread>
1340 <low_delete_thread>
1341 <low_new_fork>: Declare.
1342 (arm_new_process): Turn into...
1343 (arm_target::low_new_process): ...this.
1344 (arm_delete_process): Turn into...
1345 (arm_target::low_delete_process): ...this.
1346 (arm_new_thread): Turn into...
1347 (arm_target::low_new_thread): ...this.
1348 (arm_delete_thread): Turn into...
1349 (arm_target::low_delete_thread): ...this.
1350 (arm_new_fork): Turn into...
1351 (arm_target::low_new_fork): ...this.
1352 (the_low_target): Remove the op fields.
1353 * linux-mips-low.cc (class mips_target) <low_new_process>
1354 <low_delete_process>
1355 <low_new_thread>
1356 <low_delete_thread>
1357 <low_new_fork>: Declare.
1358 (mips_linux_new_process): Turn into...
1359 (mips_target::low_new_process): ...this.
1360 (mips_linux_delete_process): Turn into...
1361 (mips_target::low_delete_process): ...this.
1362 (mips_linux_new_thread): Turn into...
1363 (mips_target::low_new_thread): ...this.
1364 (mips_linux_delete_thread): Turn into...
1365 (mips_target::low_delete_thread): ...this.
1366 (mips_linux_new_fork): Turn into...
1367 (mips_target::low_new_fork): ...this.
1368 (the_low_target): Remove the op fields.
1369 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1370 * linux-crisv32-low.cc (the_low_target): Ditto.
1371 * linux-m32r-low.cc (the_low_target): Ditto.
1372 * linux-m68k-low.cc (the_low_target): Ditto.
1373 * linux-ppc-low.cc (the_low_target): Ditto.
1374 * linux-s390-low.cc (the_low_target): Ditto.
1375 * linux-sh-low.cc (the_low_target): Ditto.
1376 * linux-tic6x-low.cc (the_low_target): Ditto.
1377 * linux-tile-low.cc (the_low_target): Ditto.
1378 * linux-xtensa-low.cc (the_low_target): Ditto.
1379
1380 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1381
1382 Turn the 'siginfo_fixup' linux target op into a method of
1383 linux_process_target.
1384
1385 * linux-low.h (struct linux_target_ops): Remove the op.
1386 (class linux_process_target) <siginfo_fixup>
1387 <low_siginfo_fixup>: Declare.
1388 * linux-low.cc (siginfo_fixup): Turn into...
1389 (linux_process_target::siginfo_fixup): ...this.
1390 (linux_process_target::low_siginfo_fixup): Define.
1391 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1392 (x86_siginfo_fixup): Turn into...
1393 (x86_target::low_siginfo_fixup): ...this.
1394 (the_low_target): Remove the op field.
1395 * linux-aarch64-low.cc (class aarch64_target):
1396 <low_siginfo_fixup>: Declare.
1397 (aarch64_linux_siginfo_fixup): Turn into...
1398 (aarch64_target::low_siginfo_fixup): ...this.
1399 (the_low_target): Remove the op field.
1400 * linux-arm-low.cc (the_low_target): Remove the op field.
1401 * linux-bfin-low.cc (the_low_target): Ditto.
1402 * linux-crisv32-low.cc (the_low_target): Ditto.
1403 * linux-m32r-low.cc (the_low_target): Ditto.
1404 * linux-m68k-low.cc (the_low_target): Ditto.
1405 * linux-mips-low.cc (the_low_target): Ditto.
1406 * linux-ppc-low.cc (the_low_target): Ditto.
1407 * linux-s390-low.cc (the_low_target): Ditto.
1408 * linux-sh-low.cc (the_low_target): Ditto.
1409 * linux-tic6x-low.cc (the_low_target): Ditto.
1410 * linux-tile-low.cc (the_low_target): Ditto.
1411 * linux-xtensa-low.cc (the_low_target): Ditto.
1412
1413 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1414
1415 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1416 linux target ops into methods of linux_process_target.
1417
1418 * linux-low.h (struct linux_target_ops): Remove the ops.
1419 (class linux_process_target) <low_collect_ptrace_register>
1420 <low_store_ptrace_register>: Declare.
1421 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1422 (linux_process_target::low_supply_ptrace_register): Define.
1423
1424 Update the callers below.
1425
1426 (linux_process_target::fetch_register)
1427 (linux_process_target::store_register)
1428
1429 * linux-x86-low.cc (the_low_target): Remove the op fields.
1430 * linux-aarch64-low.cc (the_low_target): Ditto.
1431 * linux-arm-low.cc (the_low_target): Ditto.
1432 * linux-bfin-low.cc (the_low_target): Ditto.
1433 * linux-crisv32-low.cc (the_low_target): Ditto.
1434 * linux-m32r-low.cc (the_low_target): Ditto.
1435 * linux-m68k-low.cc (the_low_target): Ditto.
1436 * linux-sh-low.cc (the_low_target): Ditto.
1437 * linux-sparc-low.cc (the_low_target): Ditto.
1438 * linux-tic6x-low.cc (the_low_target): Ditto.
1439 * linux-tile-low.cc (the_low_target): Ditto.
1440 * linux-xtensa-low.cc (the_low_target): Ditto.
1441 * linux-mips-low.cc (class mips_target)
1442 <low_collect_ptrace_register>
1443 <low_supply_ptrace_register>: Declare.
1444 (mips_collect_ptrace_register): Turn into ...
1445 (mips_target::low_collect_ptrace_register): ...this.
1446 (mips_supply_ptrace_register): Turn into...
1447 (mips_target::low_supply_ptrace_register): ...this.
1448 (the_low_target): Remove the op fields.
1449 * linux-ppc-low.cc (class ppc_target)
1450 <low_collect_ptrace_register>
1451 <low_supply_ptrace_register>: Declare.
1452 (ppc_collect_ptrace_register): Turn into ...
1453 (ppc_target::low_collect_ptrace_register): ...this.
1454 (ppc_supply_ptrace_register): Turn into ...
1455 (ppc_target::low_supply_ptrace_register): ...this.
1456 (ppc_fill_gregset): Update for the calls to
1457 low_collect_ptrace_register.
1458 (the_low_target): Remove the op fields.
1459 * linux-s390-low.cc (class s390_target)
1460 <low_collect_ptrace_register>
1461 <low_supply_ptrace_register>: Declare.
1462 (s390_collect_ptrace_register): Turn into ...
1463 (s390_target::low_collect_ptrace_register): ...this.
1464 (s390_supply_ptrace_register): Turn into ...
1465 (s390_target::low_supply_ptrace_register): ...this.
1466 (s390_fill_gregset): Update for the calls to
1467 low_collect_ptrace_register.
1468 (the_low_target): Remove the op fields.
1469
1470 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1471
1472 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1473 target ops into methods of linux_process_target.
1474
1475 * linux-low.h (struct linux_target_ops): Remove the ops.
1476 (class linux_process_target) <check_stopped_by_watchpoint>
1477 <low_stopped_by_watchpoint>
1478 <low_stopped_data_address>: Declare.
1479 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1480 (linux_process_target::check_stopped_by_watchpoint): ...this.
1481 (linux_process_target::low_stopped_by_watchpoint): Define.
1482 (linux_process_target::low_stopped_data_address): Define.
1483 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1484 <low_stopped_data_address>: Declare.
1485 (x86_stopped_by_watchpoint): Turn into...
1486 (x86_target::low_stopped_by_watchpoint): ...this.
1487 (x86_stopped_data_address): Turn into...
1488 (x86_target::low_stopped_data_address): ...this.
1489 (the_low_target): Remove the op fields.
1490 * linux-aarch64-low.cc (class aarch64_target)
1491 <low_stopped_by_watchpoint>
1492 <low_stopped_data_address>: Declare.
1493 (aarch64_stopped_by_watchpoint): Turn into...
1494 (aarch64_target::low_stopped_by_watchpoint): ...this.
1495 (aarch64_stopped_data_address): Turn into...
1496 (aarch64_target::low_stopped_data_address): ...this.
1497 (the_low_target): Remove the op fields.
1498 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1499 <low_stopped_data_address>: Declare.
1500 (arm_stopped_by_watchpoint): Turn into...
1501 (arm_target::low_stopped_by_watchpoint): ...this.
1502 (arm_stopped_data_address): Turn into...
1503 (arm_target::low_stopped_data_address): ...this.
1504 (the_low_target): Remove the op fields.
1505 * linux-crisv32-low.cc (class crisv32_target)
1506 <low_stopped_by_watchpoint>
1507 <low_stopped_data_address>: Declare.
1508 (cris_stopped_by_watchpoint): Turn into...
1509 (crisv32_target::low_stopped_by_watchpoint): ...this.
1510 (cris_stopped_data_address): Turn into...
1511 (crisv32_target::low_stopped_data_address): ...this.
1512 (the_low_target): Remove the op fields.
1513 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1514 <low_stopped_data_address>: Declare.
1515 (mips_stopped_by_watchpoint): Turn into...
1516 (mips_target::low_stopped_by_watchpoint): ...this.
1517 (mips_stopped_data_address): Turn into...
1518 (mips_target::low_stopped_data_address): ...this.
1519 (the_low_target): Remove the op fields.
1520 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1521 * linux-m32r-low.cc (the_low_target): Ditto.
1522 * linux-m68k-low.cc (the_low_target): Ditto.
1523 * linux-ppc-low.cc (the_low_target): Ditto.
1524 * linux-s390-low.cc (the_low_target): Ditto.
1525 * linux-sh-low.cc (the_low_target): Ditto.
1526 * linux-sparc-low.cc (the_low_target): Ditto.
1527 * linux-tic6x-low.cc (the_low_target): Ditto.
1528 * linux-tile-low.cc (the_low_target): Ditto.
1529 * linux-xtensa-low.cc (the_low_target): Ditto.
1530
1531 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1532
1533 Turn the 'insert_point' and 'remove_point' linux target ops into
1534 methods of linux_process_target.
1535
1536 * linux-low.h (struct linux_target_ops): Remove the ops.
1537 (class linux_process_target) <low_insert_point>
1538 <low_remove_point>: Declare.
1539 * linux-low.cc (linux_process_target::low_insert_point)
1540 (linux_process_target::low_remove_point): Define.
1541 (linux_process_target::insert_point)
1542 (linux_process_target::remove_point): Update for calls to
1543 low_insert_point and low_remove_point.
1544 * linux-x86-low.cc (class x86_target) <low_insert_point>
1545 <low_remove_point>: Declare.
1546 (x86_insert_point): Turn into...
1547 (x86_target::low_insert_point): ...this.
1548 (x86_remove_point): Turn into...
1549 (x86_target::low_remove_point): ...this.
1550 (the_low_target): Remove the op fields.
1551 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1552 <low_remove_point>: Declare.
1553 (aarch64_insert_point): Turn into...
1554 (aarch64_target::low_insert_point): ...this.
1555 (aarch64_remove_point): Turn into...
1556 (aarch64_target::low_remove_point): ...this.
1557 (the_low_target): Remove the op fields.
1558 * linux-arm-low.cc (class arm_target) <low_insert_point>
1559 <low_remove_point>: Declare.
1560 (arm_insert_point): Turn into...
1561 (arm_target::low_insert_point): ...this.
1562 (arm_remove_point): Turn into...
1563 (arm_target::low_remove_point): ...this.
1564 (the_low_target): Remove the op fields.
1565 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1566 <low_remove_point>: Declare.
1567 (crisv32_insert_point): Turn into...
1568 (crisv32_target::low_insert_point): ...this.
1569 (crisv32_remove_point): Turn into...
1570 (crisv32_target::low_remove_point): ...this.
1571 (the_low_target): Remove the op fields.
1572 * linux-mips-low.cc (class mips_target) <low_insert_point>
1573 <low_remove_point>: Declare.
1574 (mips_insert_point): Turn into...
1575 (mips_target::low_insert_point): ...this.
1576 (mips_remove_point): Turn into...
1577 (mips_target::low_remove_point): ...this.
1578 (the_low_target): Remove the op fields.
1579 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1580 <low_remove_point>: Declare.
1581 (ppc_insert_point): Turn into...
1582 (ppc_target::low_insert_point): ...this.
1583 (ppc_remove_point): Turn into...
1584 (ppc_target::low_remove_point): ...this.
1585 (the_low_target): Remove the op fields.
1586 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1587 * linux-m32r-low.cc (the_low_target): Ditto.
1588 * linux-m68k-low.cc (the_low_target): Ditto.
1589 * linux-s390-low.cc (the_low_target): Ditto.
1590 * linux-sh-low.cc (the_low_target): Ditto.
1591 * linux-sparc-low.cc (the_low_target): Ditto.
1592 * linux-tic6x-low.cc (the_low_target): Ditto.
1593 * linux-tile-low.cc (the_low_target): Ditto.
1594 * linux-xtensa-low.cc (the_low_target): Ditto.
1595
1596 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1597
1598 Remove the 'supports_z_point_type' linux target op and let the
1599 concrete linux target define it by overriding the op declared in
1600 process_stratum_target.
1601
1602 * linux-low.cc (linux_process_target::supports_z_point_type):
1603 Remove.
1604 * linux-low.h (struct linux_target_ops): Remove the op.
1605 (class linux_process_target) <supports_z_point_type>: Remove.
1606 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1607 Declare.
1608 (x86_supports_z_point_type): Turn into...
1609 (x86_target::supports_z_point_type): ...this.
1610 (the_low_target): Remove the op field.
1611 * linux-aarch64-low.cc (class aarch64_target)
1612 <supports_z_point_type>: Declare.
1613 (aarch64_supports_z_point_type): Turn into...
1614 (aarch64_target::supports_z_point_type): ...this.
1615 (the_low_target): Remove the op field.
1616 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1617 Declare.
1618 (arm_supports_z_point_type): Turn into...
1619 (arm_target::supports_z_point_type): ...this.
1620 (the_low_target): Remove the op field.
1621 * linux-crisv32-low.cc (class crisv32_target)
1622 <supports_z_point_type>: Declare.
1623 (cris_supports_z_point_type): Turn into...
1624 (crisv32_target::supports_z_point_type): ...this.
1625 (the_low_target): Remove the op field.
1626 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1627 Declare.
1628 (mips_supports_z_point_type): Turn into...
1629 (mips_target::supports_z_point_type): ...this.
1630 (the_low_target): Remove the op field.
1631 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1632 Declare.
1633 (ppc_supports_z_point_type): Turn into...
1634 (ppc_target::supports_z_point_type): ...this.
1635 (the_low_target): Remove the op field.
1636 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1637 Declare.
1638 (s390_supports_z_point_type): Turn into...
1639 (s390_target::supports_z_point_type): ...this.
1640 (the_low_target): Remove the op field.
1641 * linux-bfin-low.cc (the_low_target): Remove the op field.
1642 * linux-m32r-low.cc (the_low_target): Ditto.
1643 * linux-m68k-low.cc (the_low_target): Ditto.
1644 * linux-sh-low.cc (the_low_target): Ditto.
1645 * linux-sparc-low.cc (the_low_target): Ditto.
1646 * linux-tic6x-low.cc (the_low_target): Ditto.
1647 * linux-tile-low.cc (the_low_target): Ditto.
1648 * linux-xtensa-low.cc (the_low_target): Ditto.
1649
1650 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1651
1652 Turn the 'breakpoint_at' linux target op into a method of
1653 linux_process_target.
1654
1655 * linux-low.h (struct linux_target_ops): Remove the op.
1656 (class linux_process_target) <low_breakpoint_at>: Declare.
1657
1658 Update the callers below:
1659
1660 * linux-low.cc (linux_process_target::save_stop_reason)
1661 (linux_process_target::thread_still_has_status_pending)
1662 (linux_process_target::wait_1)
1663
1664 * linux-x86-low.cc (class x86_target)
1665 <low_breakpoint_at>: Declare.
1666 (x86_breakpoint_at): Turn into...
1667 (x86_target::low_breakpoint_at): ...this.
1668 (the_low_target): Remove the op field.
1669 * linux-aarch64-low.cc (class aarch64_target)
1670 <low_breakpoint_at>: Declare.
1671 (aarch64_breakpoint_at): Turn into...
1672 (aarch64_target::low_breakpoint_at): ...this.
1673 (the_low_target): Remove the op field.
1674 * linux-arm-low.cc (class arm_target)
1675 <low_breakpoint_at>: Declare.
1676 (arm_target::low_breakpoint_at): Define.
1677 (the_low_target): Remove the op field.
1678 * linux-bfin-low.cc (class bfin_target)
1679 <low_breakpoint_at>: Declare.
1680 (bfin_breakpoint_at): Turn into...
1681 (bfin_target::low_breakpoint_at): ...this.
1682 (the_low_target): Remove the op field.
1683 * linux-cris-low.cc (class cris_target)
1684 <low_breakpoint_at>: Declare.
1685 (cris_breakpoint_at): Turn into...
1686 (cris_target::low_breakpoint_at): ...this.
1687 (the_low_target): Remove the op field.
1688 * linux-crisv32-low.cc (class crisv32_target)
1689 <low_breakpoint_at>: Declare.
1690 (crisv32_breakpoint_at): Turn into...
1691 (crisv32_target::low_breakpoint_at): ...this.
1692 (the_low_target): Remove the op field.
1693 * linux-ia64-low.cc (class ia64_target)
1694 <low_breakpoint_at>: Declare.
1695 (ia64_target::low_breakpoint_at): Define.
1696 * linux-m32r-low.cc (class m32r_target)
1697 <low_breakpoint_at>: Declare.
1698 (m32r_breakpoint_at): Turn into...
1699 (m32r_target::low_breakpoint_at): ...this.
1700 (the_low_target): Remove the op field.
1701 * linux-m68k-low.cc (class m68k_target)
1702 <low_breakpoint_at>: Declare.
1703 (m68k_breakpoint_at): Turn into...
1704 (m68k_target::low_breakpoint_at): ...this.
1705 (the_low_target): Remove the op field.
1706 * linux-mips-low.cc (class mips_target)
1707 <low_breakpoint_at>: Declare.
1708 (mips_breakpoint_at): Turn into...
1709 (mips_target::low_breakpoint_at): ...this.
1710 (the_low_target): Remove the op field.
1711 * linux-nios2-low.cc (class nios2_target)
1712 <low_breakpoint_at>: Declare.
1713 (nios2_breakpoint_at): Turn into...
1714 (nios2_target::low_breakpoint_at): ...this.
1715 (the_low_target): Remove the op field.
1716 * linux-ppc-low.cc (class ppc_target)
1717 <low_breakpoint_at>: Declare.
1718 (ppc_breakpoint_at): Turn into...
1719 (ppc_target::low_breakpoint_at): ...this.
1720 (the_low_target): Remove the op field.
1721 * linux-riscv-low.cc (class riscv_target)
1722 <low_breakpoint_at>: Declare.
1723 (riscv_breakpoint_at): Turn into...
1724 (riscv_target::low_breakpoint_at): ...this.
1725 (the_low_target): Remove the op field.
1726 * linux-s390-low.cc (class s390_target)
1727 <low_breakpoint_at>: Declare.
1728 (s390_breakpoint_at): Turn into...
1729 (s390_target::low_breakpoint_at): ...this.
1730 (the_low_target): Remove the op field.
1731 * linux-sh-low.cc (class sh_target)
1732 <low_breakpoint_at>: Declare.
1733 (sh_breakpoint_at): Turn into...
1734 (sh_target::low_breakpoint_at): ...this.
1735 (the_low_target): Remove the op field.
1736 * linux-sparc-low.cc (class sparc_target)
1737 <low_breakpoint_at>: Declare.
1738 (sparc_breakpoint_at): Turn into...
1739 (sparc_target::low_breakpoint_at): ...this.
1740 (the_low_target): Remove the op field.
1741 * linux-tic6x-low.cc (class tic6x_target)
1742 <low_breakpoint_at>: Declare.
1743 (tic6x_breakpoint_at): Turn into...
1744 (tic6x_target::low_breakpoint_at): ...this.
1745 (the_low_target): Remove the op field.
1746 * linux-tile-low.cc (class tile_target)
1747 <low_breakpoint_at>: Declare.
1748 (tile_breakpoint_at): Turn into...
1749 (tile_target::low_breakpoint_at): ...this.
1750 (the_low_target): Remove the op field.
1751 * linux-xtensa-low.cc (class xtensa_target)
1752 <low_breakpoint_at>: Declare.
1753 (xtensa_breakpoint_at): Turn into...
1754 (xtensa_target::low_breakpoint_at): ...this.
1755 (the_low_target): Remove the op field.
1756
1757 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1758
1759 Turn the 'decr_pc_after_break' linux_target_ops field into
1760 a method of linux_process_target.
1761
1762 * linux-low.h (struct linux_target_ops)
1763 <decr_pc_after_break>: Remove.
1764 (class linux_process_target) <low_decr_pc_after_break>: New method
1765 declaration.
1766 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1767 New method implementation.
1768
1769 Update the users below.
1770
1771 (linux_process_target::save_stop_reason)
1772 (linux_process_target::wait_1)
1773 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1774 New declaration.
1775 (x86_target::low_decr_pc_after_break): New method implementation.
1776 (the_low_target): Remove the field.
1777 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1778 New declaration.
1779 (bfin_target::low_decr_pc_after_break): New method implementation.
1780 (the_low_target): Remove the field.
1781 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1782 New declaration.
1783 (m68k_target::low_decr_pc_after_break): New method implementation.
1784 (the_low_target): Remove the field.
1785 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1786 New declaration.
1787 (s390_target::low_decr_pc_after_break): New method implementation.
1788 (the_low_target): Remove the field.
1789 * linux-aarch64-low.cc (the_low_target): Remove the field.
1790 * linux-arm-low.cc (the_low_target): Remove the field.
1791 * linux-cris-low.cc (the_low_target): Remove the field.
1792 * linux-crisv32-low.cc (the_low_target): Remove the field.
1793 * linux-m32r-low.cc (the_low_target): Remove the field.
1794 * linux-mips-low.cc (the_low_target): Remove the field.
1795 * linux-nios2-low.cc (the_low_target): Remove the field.
1796 * linux-ppc-low.cc (the_low_target): Remove the field.
1797 * linux-riscv-low.cc (the_low_target): Remove the field.
1798 * linux-sh-low.cc (the_low_target): Remove the field.
1799 * linux-sparc-low.cc (the_low_target): Remove the field.
1800 * linux-tic6x-low.cc (the_low_target): Remove the field.
1801 * linux-tile-low.cc (the_low_target): Remove the field.
1802 * linux-xtensa-low.cc (the_low_target): Remove the field.
1803
1804 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1805
1806 Remove the 'supports_software_single_step' linux target op and let
1807 the concrete linux target define it by overriding the op in
1808 process_stratum_target.
1809 Turn the 'get_next_pcs' linux target op into a method of
1810 linux_process_target.
1811
1812 * linux-low.h (struct linux_target_ops): Remove the ops.
1813 (class linux_process_target) <supports_software_single_step>:
1814 Remove.
1815 <low_get_next_pcs>: Declare.
1816 * linux-low.cc (can_software_single_step): Remove.
1817 (linux_process_target::low_get_next_pcs): Define.
1818 (linux_process_target::supports_software_single_step): Remove.
1819
1820 Update the callers below.
1821
1822 (linux_process_target::handle_extended_wait)
1823 (linux_process_target::wait_1)
1824 (linux_process_target::install_software_single_step_breakpoints)
1825 (linux_process_target::single_step)
1826 (linux_process_target::thread_needs_step_over)
1827 (linux_process_target::proceed_one_lwp)
1828 (linux_process_target::supports_range_stepping)
1829
1830 * linux-x86-low.cc (the_low_target): Remove the op field.
1831 * linux-aarch64-low.cc (the_low_target): Ditto.
1832 * linux-bfin-low.cc (the_low_target): Ditto.
1833 * linux-cris-low.cc (the_low_target): Ditto.
1834 * linux-crisv32-low.cc (the_low_target): Ditto.
1835 * linux-m32r-low.cc (the_low_target): Ditto.
1836 * linux-m68k-low.cc (the_low_target): Ditto.
1837 * linux-mips-low.cc (the_low_target): Ditto.
1838 * linux-nios2-low.cc (the_low_target): Ditto.
1839 * linux-ppc-low.cc (the_low_target): Ditto.
1840 * linux-riscv-low.cc (the_low_target): Ditto.
1841 * linux-s390-low.cc (the_low_target): Ditto.
1842 * linux-sh-low.cc (the_low_target): Ditto.
1843 * linux-sparc-low.cc (the_low_target): Ditto.
1844 * linux-tic6x-low.cc (the_low_target): Ditto.
1845 * linux-tile-low.cc (the_low_target): Ditto.
1846 * linux-xtensa-low.cc (the_low_target): Ditto.
1847 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1848 <supports_software_single_step>: Declare.
1849 (arm_target::supports_software_single_step): Define.
1850 (arm_gdbserver_get_next_pcs): Turn into...
1851 (arm_target::low_get_next_pcs): ...this.
1852 (the_low_target): Remove the op field.
1853
1854 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1855
1856 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1857 the concrete linux target define it by overriding the op
1858 in process_stratum_target.
1859
1860 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1861 Remove.
1862 * linux-low.h (struct linux_target_ops): Remove the op.
1863 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1864 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1865 Declare.
1866 (x86_sw_breakpoint_from_kind): Turn into...
1867 (x86_target::sw_breakpoint_from_kind): ...this.
1868 (the_low_target): Remove the op field.
1869 * linux-aarch64-low.cc (class aarch64_target)
1870 <sw_breakpoint_from_kind>: Declare.
1871 (aarch64_sw_breakpoint_from_kind): Turn into...
1872 (aarch64_target::sw_breakpoint_from_kind): ...this.
1873 (the_low_target): Remove the op field.
1874 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1875 Declare.
1876 (arm_target::sw_breakpoint_from_kind): Define.
1877 (the_low_target): Remove the op field.
1878 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1879 Declare.
1880 (bfin_sw_breakpoint_from_kind): Turn into...
1881 (bfin_target::sw_breakpoint_from_kind): ...this.
1882 (the_low_target): Remove the op field.
1883 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1884 Declare.
1885 (cris_sw_breakpoint_from_kind): Turn into...
1886 (cris_target::sw_breakpoint_from_kind): ...this.
1887 (the_low_target): Remove the op field.
1888 * linux-crisv32-low.cc (class crisv32_target)
1889 <sw_breakpoint_from_kind>: Declare.
1890 (cris_sw_breakpoint_from_kind): Turn into...
1891 (crisv32_target::sw_breakpoint_from_kind): ...this.
1892 (the_low_target): Remove the op field.
1893 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1894 Declare.
1895 (ia64_target::sw_breakpoint_from_kind): Define.
1896 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1897 Declare.
1898 (m32r_sw_breakpoint_from_kind): Turn into...
1899 (m32r_target::sw_breakpoint_from_kind): ...this.
1900 (the_low_target): Remove the op field.
1901 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1902 Declare.
1903 (m68k_sw_breakpoint_from_kind): Turn into...
1904 (m68k_target::sw_breakpoint_from_kind): ...this.
1905 (the_low_target): Remove the op field.
1906 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1907 Declare.
1908 (mips_sw_breakpoint_from_kind): Turn into...
1909 (mips_target::sw_breakpoint_from_kind): ...this.
1910 (the_low_target): Remove the op field.
1911 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1912 Declare.
1913 (nios2_sw_breakpoint_from_kind): Turn into...
1914 (nios2_target::sw_breakpoint_from_kind): ...this.
1915 (the_low_target): Remove the op field.
1916 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1917 Declare.
1918 (ppc_sw_breakpoint_from_kind): Turn into...
1919 (ppc_target::sw_breakpoint_from_kind): ...this.
1920 (the_low_target): Remove the op field.
1921 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1922 Declare.
1923 (riscv_sw_breakpoint_from_kind): Turn into...
1924 (riscv_target::sw_breakpoint_from_kind): ...this.
1925 (the_low_target): Remove the op field.
1926 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1927 Declare.
1928 (s390_sw_breakpoint_from_kind): Turn into...
1929 (s390_target::sw_breakpoint_from_kind): ...this.
1930 (the_low_target): Remove the op field.
1931 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1932 Declare.
1933 (sh_sw_breakpoint_from_kind): Turn into...
1934 (sh_target::sw_breakpoint_from_kind): ...this.
1935 (the_low_target): Remove the op field.
1936 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1937 Declare.
1938 (sparc_sw_breakpoint_from_kind): Turn into...
1939 (sparc_target::sw_breakpoint_from_kind): ...this.
1940 (the_low_target): Remove the op field.
1941 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1942 Declare.
1943 (tic6x_sw_breakpoint_from_kind): Turn into...
1944 (tic6x_target::sw_breakpoint_from_kind): ...this.
1945 (the_low_target): Remove the op field.
1946 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1947 Declare.
1948 (tile_sw_breakpoint_from_kind): Turn into...
1949 (tile_target::sw_breakpoint_from_kind): ...this.
1950 (the_low_target): Remove the op field.
1951 * linux-xtensa-low.cc (class xtensa_target)
1952 <sw_breakpoint_from_kind>: Declare.
1953 (xtensa_sw_breakpoint_from_kind): Turn into...
1954 (xtensa_target::sw_breakpoint_from_kind): ...this.
1955 (the_low_target): Remove the op field.
1956
1957 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1958
1959 Remove the 'breakpoint_kind_from_pc' and
1960 'breakpoint_kind_from_current_state' linux target ops, and let the
1961 concrete linux target define them by overriding the ops of
1962 process_stratum_target.
1963
1964 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1965 Remove.
1966 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1967 * linux-low.h (struct linux_target_ops): Remove ops.
1968 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1969 <breakpoint_kind_from_current_state>: Remove.
1970 * linux-x86-low.cc (the_low_target): Remove the op fields.
1971 * linux-bfin-low.cc (the_low_target): Ditto.
1972 * linux-cris-low.cc (the_low_target): Ditto.
1973 * linux-crisv32-low.cc (the_low_target): Ditto.
1974 * linux-m32r-low.cc (the_low_target): Ditto.
1975 * linux-m68k-low.cc (the_low_target): Ditto.
1976 * linux-mips-low.cc (the_low_target): Ditto.
1977 * linux-nios2-low.cc (the_low_target): Ditto.
1978 * linux-ppc-low.cc (the_low_target): Ditto.
1979 * linux-s390-low.cc (the_low_target): Ditto.
1980 * linux-sh-low.cc (the_low_target): Ditto.
1981 * linux-sparc-low.cc (the_low_target): Ditto.
1982 * linux-tic6x-low.cc (the_low_target): Ditto.
1983 * linux-tile-low.cc (the_low_target): Ditto.
1984 * linux-xtensa-low.cc (the_low_target): Ditto.
1985 * linux-aarch64-low.cc (class aarch64_target)
1986 <breakpoint_kind_from_pc>
1987 <breakpoint_kind_from_current_state>: Declare.
1988 (aarch64_breakpoint_kind_from_pc): Turn into...
1989 (aarch64_target::breakpoint_kind_from_pc): ...this.
1990 (aarch64_breakpoint_kind_from_current_state): Turn into...
1991 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1992 (the_low_target): Remove the op fields.
1993 * linux-arm-low.cc (class arm_target):
1994 <breakpoint_kind_from_pc>
1995 <breakpoint_kind_from_current_state>: Declare.
1996 (arm_target::breakpoint_kind_from_pc): Define.
1997 (arm_target::breakpoint_kind_from_current_state): Define.
1998 (the_low_target): Remove the op fields.
1999 * linux-riscv-low.cc (class riscv_target):
2000 <breakpoint_kind_from_pc>: Declare.
2001 (riscv_breakpoint_kind_from_pc): Turn into...
2002 (riscv_target::breakpoint_kind_from_pc): ...this.
2003 (the_low_target): Remove the op fields.
2004
2005 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2006
2007 Turn the 'get_pc' and 'set_pc' linux target ops into methods
2008 of linux_process_target.
2009
2010 * linux-low.h (struct linux_target_ops): Remove the ops.
2011 (class linux_process_target) <low_supports_breakpoints>
2012 <low_get_pc>
2013 <low_set_pc>: Declare.
2014 * linux-low.cc (supports_breakpoints): Turn into...
2015 (linux_process_target::low_supports_breakpoints): ...this.
2016 (linux_process_target::low_get_pc): Define.
2017 (linux_process_target::low_set_pc): Define.
2018
2019 Update the callers below.
2020
2021 (linux_process_target::get_pc)
2022 (linux_process_target::save_stop_reason)
2023 (linux_process_target::maybe_move_out_of_jump_pad)
2024 (linux_process_target::wait_1)
2025 (linux_process_target::resume_one_lwp_throw)
2026 (linux_process_target::resume)
2027 (linux_process_target::proceed_all_lwps)
2028 (linux_process_target::read_pc)
2029 (linux_process_target::write_pc)
2030
2031 * linux-x86-low.cc (class linux_process_target)
2032 <low_supports_breakpoints>
2033 <low_get_pc>
2034 <low_set_pc>: Declare.
2035 (x86_target::low_supports_breakpoints): Define.
2036 (x86_get_pc): Turn into...
2037 (x86_target::low_get_pc): ...this.
2038 (x86_set_pc): Turn into...
2039 (x86_target::low_set_pc): ...this.
2040 (the_low_target): Remove the op fields.
2041 * linux-arm-low.cc (class arm_target)
2042 <low_supports_breakpoints>
2043 <low_get_pc>
2044 <low_set_pc>: Declare.
2045 (arm_target::low_supports_breakpoints)
2046 (arm_target::low_get_pc)
2047 (arm_target::low_set_pc): Define.
2048 (the_low_target): Remove the op fields.
2049 * linux-bfin-low.cc (class bfin_target)
2050 <low_supports_breakpoints>
2051 <low_get_pc>
2052 <low_set_pc>: Declare.
2053 (bfin_target::low_supports_breakpoints)
2054 (bfin_target::low_get_pc)
2055 (bfin_target::low_set_pc): Define.
2056 (the_low_target): Remove the op fields.
2057 * linux-cris-low.cc (class cris_target)
2058 <low_supports_breakpoints>
2059 <low_get_pc>
2060 <low_set_pc>: Declare.
2061 (cris_target::low_supports_breakpoints)
2062 (cris_target::low_get_pc)
2063 (cris_target::low_set_pc): Define.
2064 (the_low_target): Remove the op fields.
2065 * linux-crisv32-low.cc (class crisv32_target)
2066 <low_supports_breakpoints>
2067 <low_get_pc>
2068 <low_set_pc>: Declare.
2069 (crisv32_target::low_supports_breakpoints)
2070 (crisv32_target::low_get_pc)
2071 (crisv32_target::low_set_pc): Define.
2072 (the_low_target): Remove the op fields.
2073 * linux-m32r-low.cc (class m32r_target)
2074 <low_supports_breakpoints>
2075 <low_get_pc>
2076 <low_set_pc>: Declare.
2077 (m32r_target::low_supports_breakpoints)
2078 (m32r_target::low_get_pc)
2079 (m32r_target::low_set_pc): Define.
2080 (the_low_target): Remove the op fields.
2081 * linux-m68k-low.cc (class m68k_target)
2082 <low_supports_breakpoints>
2083 <low_get_pc>
2084 <low_set_pc>: Declare.
2085 (m68k_target::low_supports_breakpoints)
2086 (m68k_target::low_get_pc)
2087 (m68k_target::low_set_pc): Define.
2088 (the_low_target): Remove the op fields.
2089 * linux-nios2-low.cc (class nios2_target)
2090 <low_supports_breakpoints>
2091 <low_get_pc>
2092 <low_set_pc>: Declare.
2093 (nios2_target::low_supports_breakpoints)
2094 (nios2_target::low_get_pc)
2095 (nios2_target::low_set_pc): Define.
2096 (the_low_target): Remove the op fields.
2097 * linux-sh-low.cc (class sh_target)
2098 <low_supports_breakpoints>
2099 <low_get_pc>
2100 <low_set_pc>: Declare.
2101 (sh_target::low_supports_breakpoints)
2102 (sh_target::low_get_pc)
2103 (sh_target::low_set_pc): Define.
2104 (the_low_target): Remove the op fields.
2105 * linux-xtensa-low.cc (class xtensa_target)
2106 <low_supports_breakpoints>
2107 <low_get_pc>
2108 <low_set_pc>: Declare.
2109 (xtensa_target::low_supports_breakpoints)
2110 (xtensa_target::low_get_pc)
2111 (xtensa_target::low_set_pc): Define.
2112 (the_low_target): Remove the op fields.
2113 * linux-sparc-low.cc (class sparc_target)
2114 <low_supports_breakpoints>
2115 <low_get_pc>: Declare.
2116 (sparc_target::low_supports_breakpoints)
2117 (sparc_target::low_get_pc): Define.
2118 (the_low_target): Remove the op fields.
2119 * linux-tile-low.cc (class tile_target)
2120 <low_supports_breakpoints>
2121 <low_get_pc>
2122 <low_set_pc>: Declare.
2123 (tile_target::low_supports_breakpoints)
2124 (tile_target::low_get_pc)
2125 (tile_target::low_set_pc): Define.
2126 (the_low_target): Remove the op fields.
2127 * linux-aarch64-low.cc (class aarch64_target)
2128 <low_supports_breakpoints>
2129 <low_get_pc>
2130 <low_set_pc>: Declare.
2131 (aarch64_target::low_supports_breakpoints): Define.
2132 (aarch64_get_pc): Turn into...
2133 (aarch64_target::low_get_pc): ...this.
2134 (aarch64_set_pc): Turn into...
2135 (aarch64_target::low_set_pc): ...this.
2136 (the_low_target): Remove the op fields.
2137 * linux-mips-low.cc (class mips_target)
2138 <low_supports_breakpoints>
2139 <low_get_pc>
2140 <low_set_pc>: Declare.
2141 (mips_target::low_supports_breakpoints): Define.
2142 (mips_get_pc): Turn into...
2143 (mips_target::low_get_pc): ...this.
2144 (mips_set_pc): Turn into...
2145 (mips_target::low_set_pc): ...this.
2146 (the_low_target): Remove the op fields.
2147 * linux-ppc-low.cc (class ppc_target)
2148 <low_supports_breakpoints>
2149 <low_get_pc>
2150 <low_set_pc>: Declare.
2151 (ppc_target::low_supports_breakpoints): Define.
2152 (ppc_get_pc): Turn into...
2153 (ppc_target::low_get_pc): ...this.
2154 (ppc_set_pc): Turn into...
2155 (ppc_target::low_set_pc): ...this.
2156 (the_low_target): Remove the op fields.
2157 * linux-riscv-low.cc (class riscv_target)
2158 <low_supports_breakpoints>
2159 <low_get_pc>
2160 <low_set_pc>: Declare.
2161 (riscv_target::low_supports_breakpoints): Define.
2162 (riscv_get_pc): Turn into...
2163 (riscv_target::low_get_pc): ...this.
2164 (riscv_set_pc): Turn into...
2165 (riscv_target::low_set_pc): ...this.
2166 (the_low_target): Remove the op fields.
2167 * linux-s390-low.cc (class s390_target)
2168 <low_supports_breakpoints>
2169 <low_get_pc>
2170 <low_set_pc>: Declare.
2171 (s390_target::low_supports_breakpoints): Define.
2172 (s390_get_pc): Turn into...
2173 (s390_target::low_get_pc): ...this.
2174 (s390_set_pc): Turn into...
2175 (s390_target::low_set_pc): ...this.
2176 (the_low_target): Remove the op fields.
2177 * linux-tic6x-low.cc (class tic6x_target)
2178 <low_supports_breakpoints>
2179 <low_get_pc>
2180 <low_set_pc>: Declare.
2181 (tic6x_target::low_supports_breakpoints): Define.
2182 (tic6x_get_pc): Turn into...
2183 (tic6x_target::low_get_pc): ...this.
2184 (tic6x_set_pc): Turn into...
2185 (tic6x_target::low_set_pc): ...this.
2186 (the_low_target): Remove the op fields.
2187
2188 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2189
2190 Turn some more static methods in linux-low into private methods
2191 of linux_process_target.
2192
2193 * linux-low.cc (get_pc): Turn into...
2194 (linux_process_target::get_pc): ...this.
2195 (save_stop_reason): Turn into...
2196 (linux_process_target::save_stop_reason): ...this.
2197 (thread_still_has_status_pending_p): Turn into...
2198 (linux_process_target::thread_still_has_status_pending): ...this.
2199 (status_pending_p_callback): Turn into...
2200 (linux_process_target::status_pending_p_callback): ...this.
2201 (resume_stopped_resumed_lwps): Turn into...
2202 (linux_process_target::resume_stopped_resumed_lwps): ...this.
2203 (install_software_single_step_breakpoints): Turn into...
2204 (linux_process_target::install_software_single_step_breakpoints):
2205 ...this.
2206 (single_step): Turn into...
2207 (linux_process_target::single_step): ...this.
2208 (linux_resume_one_lwp_throw): Turn into...
2209 (linux_process_target::resume_one_lwp_throw): ...this.
2210 (linux_resume_one_lwp): Turn into...
2211 (linux_process_target::resume_one_lwp): ...this.
2212 (resume_status_pending_p): Turn into...
2213 (linux_process_target::resume_status_pending): ...this.
2214 (need_step_over_p): Turn into...
2215 (linux_process_target::thread_needs_step_over): ...this.
2216 (linux_resume_one_thread): Turn into...
2217 (linux_process_target::resume_one_thread): ...this.
2218 (proceed_one_lwp): Turn into...
2219 (linux_process_target::proceed_one_lwp): ...this.
2220 (unsuspend_and_proceed_one_lwp): Turn into...
2221 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
2222
2223 Update the calls/references to the above functions below.
2224
2225 (linux_process_target::handle_extended_wait)
2226 (linux_process_target::filter_event)
2227 (linux_process_target::wait_for_event_filtered)
2228 (linux_process_target::wait_1)
2229 (linux_process_target::move_out_of_jump_pad)
2230 (linux_process_target::start_step_over)
2231 (linux_process_target::resume)
2232 (linux_process_target::proceed_all_lwps)
2233 (regsets_store_inferior_registers)
2234 (linux_process_target::store_register)
2235
2236 * linux-low.h (class linux_process_target)
2237 <get_pc>
2238 <save_stop_reason>
2239 <thread_still_has_status_pending>
2240 <status_pending_p_callback>
2241 <resume_stopped_resumed_lwps>
2242 <install_software_single_step_breakpoints>
2243 <single_step>
2244 <resume_one_lwp_throw>
2245 <resume_one_lwp>
2246 <resume_status_pending>
2247 <thread_needs_step_over>
2248 <resume_one_thread>
2249 <proceed_one_lwp>
2250 <unsuspend_and_proceed_one_lwp>: Declare.
2251
2252 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2253
2254 Turn the 'fetch_register' linux target op into a method of
2255 linux_process_target.
2256
2257 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
2258 (class linux_process_target) <low_fetch_register>: Declare.
2259 * linux-x86-low.cc (the_low_target)
2260 * linux-aarch64-low.cc (the_low_target)
2261 * linux-arm-low.cc (the_low_target)
2262 * linux-bfin-low.cc (the_low_target)
2263 * linux-cris-low.cc (the_low_target)
2264 * linux-crisv32-low.cc (the_low_target)
2265 * linux-m32r-low.cc (the_low_target)
2266 * linux-m68k-low.cc (the_low_target)
2267 * linux-nios2-low.cc (the_low_target)
2268 * linux-ppc-low.cc (the_low_target)
2269 * linux-s390-low.cc (the_low_target)
2270 * linux-sh-low.cc (the_low_target)
2271 * linux-sparc-low.cc (the_low_target)
2272 * linux-tic6x-low.cc (the_low_target)
2273 * linux-tile-low.cc (the_low_target)
2274 * linux-xtensa-low.cc (the_low_target): Remove the op field.
2275 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
2276 Declare.
2277 (ia64_fetch_register): Turn into...
2278 (ia64_target::low_fetch_register): ...this.
2279 (the_low_target): Remove the op field.
2280 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
2281 Declare.
2282 (mips_fetch_register): Turn into...
2283 (mips_target::low_fetch_register): ...this.
2284 (the_low_target): Remove the op field.
2285 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
2286 Declare.
2287 (riscv_fetch_register): Turn into...
2288 (riscv_target::low_fetch_register): ...this.
2289 (the_low_target): Remove the op field.
2290
2291 Update the callers below.
2292
2293 * linux-low.cc (linux_process_target::fetch_registers)
2294 (linux_process_target::low_fetch_register)
2295
2296 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2297
2298 Turn the 'cannot_fetch_register' and 'cannot_store_register'
2299 linux target ops into methods of linux_process_target.
2300
2301 * linux-low.h (struct linux_target_ops): Remove the low target ops.
2302 (class linux_process_target) <fetch_register>
2303 <store_register>
2304 <usr_fetch_inferior_registers>
2305 <usr_store_inferior_registers>
2306 <low_cannot_fetch_register>
2307 <low_cannot_fetch_register> Declare.
2308 * linux-low.cc (fetch_register): Turn into...
2309 (linux_process_target::fetch_register): ...this.
2310 (store_register): Turn into ...
2311 (linux_process_target::store_register): ...this.
2312 (usr_fetch_inferior_registers): Turn into...
2313 (linux_process_target::usr_fetch_inferior_registers): ...this.
2314 (usr_store_inferior_registers): Turn into...
2315 (linux_process_target::usr_store_inferior_registers): ...this.
2316 * linux-x86-low.cc (class x86_target)
2317 <low_cannot_fetch_register>
2318 <low_cannot_store_register>: Declare.
2319 (x86_cannot_store_register): Turn into...
2320 (x86_target::low_cannot_store_register): ...this.
2321 (x86_cannot_fetch_register): Turn into...
2322 (x86_target::low_cannot_fetch_register): ...this.
2323 (the_low_target): Remove the target op fields.
2324 * linux-aarch64-low.cc (class aarch64_target)
2325 <low_cannot_fetch_register>
2326 <low_cannot_store_register>: Declare.
2327 (aarch64_target::low_cannot_fetch_register)
2328 (aarch64_target::low_cannot_store_register): Define.
2329 (the_low_target): Remove the op fields.
2330 * linux-arm-low.cc (class arm_target)
2331 <low_cannot_fetch_register>
2332 <low_cannot_store_register>: Declare.
2333 (arm_cannot_fetch_register): Turn into...
2334 (arm_target::low_cannot_fetch_register): ...this.
2335 (arm_cannot_store_register): Turn into...
2336 (arm_target::low_cannot_store_register): ...this.
2337 (the_low_target): Remove the op fields.
2338 * linux-bfin-low.cc (class bfin_target)
2339 <low_cannot_fetch_register>
2340 <low_cannot_store_register>: Declare.
2341 (bfin_cannot_fetch_register): Turn into...
2342 (bfin_target::low_cannot_fetch_register): ...this.
2343 (bfin_cannot_store_register): Turn into...
2344 (bfin_target::low_cannot_store_register): ...this.
2345 (the_low_target): Remove the op fields.
2346 * linux-cris-low.cc (class cris_target)
2347 <low_cannot_fetch_register>
2348 <low_cannot_store_register>: Declare.
2349 (cris_cannot_fetch_register): Turn into...
2350 (cris_target::low_cannot_fetch_register): ...this.
2351 (cris_cannot_store_register): Turn into...
2352 (cris_target::low_cannot_store_register): ...this.
2353 (the_low_target): Remove the op fields.
2354 * linux-crisv32-low.cc (class crisv32_target)
2355 <low_cannot_fetch_register>
2356 <low_cannot_store_register>: Declare.
2357 (crisv32_target::low_cannot_fetch_register)
2358 (crisv32_target::low_cannot_store_register): Define.
2359 (the_low_target): Remove the op fields.
2360 * linux-ia64-low.cc (class ia64_target)
2361 <low_cannot_fetch_register>
2362 <low_cannot_store_register>: Declare.
2363 (ia64_cannot_fetch_register): Turn into...
2364 (ia64_target::low_cannot_fetch_register): ...this.
2365 (ia64_cannot_store_register): Turn into...
2366 (ia64_target::low_cannot_store_register): ...this.
2367 (the_low_target): Remove the op fields.
2368 * linux-m32r-low.cc (class m32r_target)
2369 <low_cannot_fetch_register>
2370 <low_cannot_store_register>: Declare.
2371 (m32r_cannot_fetch_register): Turn into...
2372 (m32r_target::low_cannot_fetch_register): ...this.
2373 (m32r_cannot_store_register): Turn into...
2374 (m32r_target::low_cannot_store_register): ...this.
2375 (the_low_target): Remove the op fields.
2376 * linux-m68k-low.cc (class m68k_target)
2377 <low_cannot_fetch_register>
2378 <low_cannot_store_register>: Declare.
2379 (m68k_cannot_fetch_register): Turn into...
2380 (m68k_target::low_cannot_fetch_register): ...this.
2381 (m68k_cannot_store_register): Turn into...
2382 (m68k_target::low_cannot_store_register): ...this.
2383 (the_low_target): Remove the op fields.
2384 * linux-mips-low.cc (class mips_target)
2385 <low_cannot_fetch_register>
2386 <low_cannot_store_register>: Declare.
2387 (mips_cannot_fetch_register): Turn into...
2388 (mips_target::low_cannot_fetch_register): ...this.
2389 (mips_cannot_store_register): Turn into...
2390 (mips_target::low_cannot_store_register): ...this.
2391 (get_usrregs_info): Inline at the call sites in
2392 low_cannot_fetch_register and low_cannot_store_register,
2393 and remove.
2394 (the_low_target): Remove the op fields.
2395 * linux-nios2-low.cc (class nios2_target)
2396 <low_cannot_fetch_register>
2397 <low_cannot_store_register>: Declare.
2398 (nios2_cannot_fetch_register): Turn into...
2399 (nios2_target::low_cannot_fetch_register): ...this.
2400 (nios2_cannot_store_register): Turn into...
2401 (nios2_target::low_cannot_store_register): ...this.
2402 (the_low_target): Remove the op fields.
2403 * linux-ppc-low.cc (class ppc_target)
2404 <low_cannot_fetch_register>
2405 <low_cannot_store_register>: Declare.
2406 (ppc_cannot_fetch_register): Turn into...
2407 (ppc_target::low_cannot_fetch_register): ...this.
2408 (ppc_cannot_store_register): Turn into...
2409 (ppc_target::low_cannot_store_register): ...this.
2410 (the_low_target): Remove the op fields.
2411 * linux-riscv-low.cc (class riscv_target)
2412 <low_cannot_fetch_register>
2413 <low_cannot_store_register>: Declare.
2414 (riscv_target::low_cannot_fetch_register)
2415 (riscv_target::low_cannot_store_register): Define.
2416 (the_low_target): Remove the op fields.
2417 * linux-s390-low.cc (class s390_target)
2418 <low_cannot_fetch_register>
2419 <low_cannot_store_register>: Declare.
2420 (s390_cannot_fetch_register): Turn into...
2421 (s390_target::low_cannot_fetch_register): ...this.
2422 (s390_cannot_store_register): Turn into...
2423 (s390_target::low_cannot_store_register): ...this.
2424 (the_low_target): Remove the op fields.
2425 * linux-sh-low.cc (class sh_target)
2426 <low_cannot_fetch_register>
2427 <low_cannot_store_register>: Declare.
2428 (sh_cannot_fetch_register): Turn into...
2429 (sh_target::low_cannot_fetch_register): ...this.
2430 (sh_cannot_store_register): Turn into...
2431 (sh_target::low_cannot_store_register): ...this.
2432 (the_low_target): Remove the op fields.
2433 * linux-sparc-low.cc (class sparc_target)
2434 <low_cannot_fetch_register>
2435 <low_cannot_store_register>: Declare.
2436 (sparc_cannot_fetch_register): Turn into...
2437 (sparc_target::low_cannot_fetch_register): ...this.
2438 (sparc_cannot_store_register): Turn into...
2439 (sparc_target::low_cannot_store_register): ...this.
2440 (the_low_target): Remove the op fields.
2441 * linux-tic6x-low.cc (class tic6x_target)
2442 <low_cannot_fetch_register>
2443 <low_cannot_store_register>: Declare.
2444 (tic6x_cannot_fetch_register): Turn into...
2445 (tic6x_target::low_cannot_fetch_register): ...this.
2446 (tic6x_cannot_store_register): Turn into...
2447 (tic6x_target::low_cannot_store_register): ...this.
2448 (the_low_target): Remove the op fields.
2449 * linux-tile-low.cc (class tile_target)
2450 <low_cannot_fetch_register>
2451 <low_cannot_store_register>: Declare.
2452 (tile_cannot_fetch_register): Turn into...
2453 (tile_target::low_cannot_fetch_register): ...this.
2454 (tile_cannot_store_register): Turn into...
2455 (tile_target::low_cannot_store_register): ...this.
2456 (the_low_target): Remove the op fields.
2457 * linux-xtensa-low.cc (class xtensa_target)
2458 <low_cannot_fetch_register>
2459 <low_cannot_store_register>: Declare.
2460 (xtensa_target::low_cannot_fetch_register)
2461 (xtensa_target::low_cannot_store_register): Define.
2462 (the_low_target): Remove the op fields.
2463
2464 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2465
2466 Turn the 'regs_info' linux target op into a method of
2467 linux_process_target.
2468
2469 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2470 (class linux_process_target) <get_regs_info>: Define.
2471
2472 Update the callers below.
2473
2474 * linux-low.cc (linux_process_target::fetch_registers)
2475 (linux_process_target::store_registers)
2476 * proc-service.cc (gregset_info)
2477
2478 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2479 (x86_linux_regs_info): Turn into ...
2480 (x86_target::get_regs_info): ...this.
2481 (the_low_target): Remove the op field.
2482 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2483 Declare.
2484 (aarch64_regs_info): Turn into ...
2485 (aarch64_target::get_regs_info): ...this.
2486 (the_low_target): Remove the op field.
2487 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2488 (arm_regs_info): Turn into ...
2489 (arm_target::get_regs_info): ...this.
2490 (the_low_target): Remove the op field.
2491 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2492 (bfin_regs_info): Turn into ...
2493 (bfin_target::get_regs_info): ...this.
2494 (the_low_target): Remove the op field.
2495 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2496 (cris_regs_info): Turn into ...
2497 (cris_target::get_regs_info): ...this.
2498 (the_low_target): Remove the op field.
2499 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2500 Declare.
2501 (crisv32_regs_info): Turn into ...
2502 (crisv32_target::get_regs_info): ...this.
2503 (the_low_target): Remove the op field.
2504 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2505 (ia64_regs_info): Turn into ...
2506 (ia64_target::get_regs_info): ...this.
2507 (the_low_target): Remove the op field.
2508 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2509 (m32r_regs_info): Turn into ...
2510 (m32r_target::get_regs_info): ...this.
2511 (the_low_target): Remove the op field.
2512 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2513 (m68k_regs_info): Turn into ...
2514 (m68k_target::get_regs_info): ...this.
2515 (the_low_target): Remove the op field.
2516 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2517 (mips_regs_info): Turn into ...
2518 (mips_target::get_regs_info): ...this.
2519 (the_low_target): Remove the op field.
2520 (get_usrregs_info): Update the call to the op.
2521 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2522 (nios2_regs_info): Turn into ...
2523 (nios2_target::get_regs_info): ...this.
2524 (the_low_target): Remove the op field.
2525 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2526 (ppc_regs_info): Turn into ...
2527 (ppc_target::get_regs_info): ...this.
2528 (the_low_target): Remove the op field.
2529 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2530 (riscv_regs_info): Turn into ...
2531 (riscv_target::get_regs_info): ...this.
2532 (the_low_target): Remove the op field.
2533 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2534 (s390_regs_info): Turn into ...
2535 (s390_target::get_regs_info): ...this.
2536 (the_low_target): Remove the op field.
2537 (s390_collect_ptrace_register)
2538 (s390_supply_ptrace_register)
2539 (s390_fill_gregset): Update the call to the op.
2540 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2541 (sh_regs_info): Turn into ...
2542 (sh_target::get_regs_info): ...this.
2543 (the_low_target): Remove the op field.
2544 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2545 (sparc_regs_info): Turn into ...
2546 (sparc_target::get_regs_info): ...this.
2547 (the_low_target): Remove the op field.
2548 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2549 (tic6x_regs_info): Turn into ...
2550 (tic6x_target::get_regs_info): ...this.
2551 (the_low_target): Remove the op field.
2552 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2553 (tile_regs_info): Turn into ...
2554 (tile_target::get_regs_info): ...this.
2555 (the_low_target): Remove the op field.
2556 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2557 Declare.
2558 (xtensa_regs_info): Turn into ...
2559 (xtensa_target::get_regs_info): ...this.
2560 (the_low_target): Remove the op field.
2561
2562 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2563
2564 Turn the 'arch_setup' linux target op into a method of
2565 linux_process_target.
2566
2567 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2568 (class linux_process_target) <arch_setup_thread>
2569 <low_arch_setup>: New declarations.
2570 * linux-low.cc (linux_arch_setup): Delete.
2571 (linux_arch_setup_thread): Turn into...
2572 (linux_process_target::arch_setup_thread): ... this.
2573
2574 Update the callers below.
2575
2576 (linux_process_target::handle_extended_wait)
2577 (linux_process_target::post_create_inferior)
2578 (linux_process_target::filter_event)
2579
2580 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2581 declaration.
2582 (x86_linux_update_xmltarget): Turn into...
2583 (x86_target::update_xmltarget): ...this.
2584 (x86_linux_process_qsupported): Update the call to
2585 x86_linux_update_xmltarget.
2586 (x86_arch_setup): Turn into ...
2587 (x86_target::low_arch_setup): ...this.
2588 (the_low_target): Remove the op field.
2589 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2590 declaration.
2591 (aarch64_arch_setup): Turn into ...
2592 (aarch64_target::low_arch_setup): ...this.
2593 (the_low_target): Remove the op field.
2594 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2595 declaration.
2596 (arm_arch_setup): Turn into ...
2597 (arm_target::low_arch_setup): ...this.
2598 (the_low_target): Remove the op field.
2599 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2600 declaration.
2601 (bfin_arch_setup): Turn into ...
2602 (bfin_target::low_arch_setup): ...this.
2603 (the_low_target): Remove the op field.
2604 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2605 declaration.
2606 (cris_arch_setup): Turn into ...
2607 (cris_target::low_arch_setup): ...this.
2608 (the_low_target): Remove the op field.
2609 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2610 declaration.
2611 (crisv32_arch_setup): Turn into ...
2612 (crisv32_target::low_arch_setup): ...this.
2613 (the_low_target): Remove the op field.
2614 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2615 declaration.
2616 (ia64_arch_setup): Turn into ...
2617 (ia64_target::low_arch_setup): ...this.
2618 (the_low_target): Remove the op field.
2619 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2620 declaration.
2621 (m32r_arch_setup): Turn into ...
2622 (m32r_target::low_arch_setup): ...this.
2623 (the_low_target): Remove the op field.
2624 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2625 declaration.
2626 (m68k_arch_setup): Turn into ...
2627 (m68k_target::low_arch_setup): ...this.
2628 (the_low_target): Remove the op field.
2629 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2630 declaration.
2631 (mips_arch_setup): Turn into ...
2632 (mips_target::low_arch_setup): ...this.
2633 (the_low_target): Remove the op field.
2634 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2635 declaration.
2636 (nios2_arch_setup): Turn into ...
2637 (nios2_target::low_arch_setup): ...this.
2638 (the_low_target): Remove the op field.
2639 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2640 declaration.
2641 (ppc_arch_setup): Turn into ...
2642 (ppc_target::low_arch_setup): ...this.
2643 (the_low_target): Remove the op field.
2644 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2645 declaration.
2646 (riscv_arch_setup): Turn into ...
2647 (riscv_target::low_arch_setup): ...this.
2648 (the_low_target): Remove the op field.
2649 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2650 declaration.
2651 (s390_arch_setup): Turn into ...
2652 (s390_target::low_arch_setup): ...this.
2653 (the_low_target): Remove the op field.
2654 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2655 declaration.
2656 (sh_arch_setup): Turn into ...
2657 (sh_target::low_arch_setup): ...this.
2658 (the_low_target): Remove the op field.
2659 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2660 declaration.
2661 (sparc_arch_setup): Turn into ...
2662 (sparc_target::low_arch_setup): ...this.
2663 (the_low_target): Remove the op field.
2664 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2665 declaration.
2666 (tic6x_arch_setup): Turn into ...
2667 (tic6x_target::low_arch_setup): ...this.
2668 (the_low_target): Remove the op field.
2669 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2670 declaration.
2671 (tile_arch_setup): Turn into ...
2672 (tile_target::low_arch_setup): ...this.
2673 (the_low_target): Remove the op field.
2674 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2675 declaration.
2676 (xtensa_arch_setup): Turn into ...
2677 (xtensa_target::low_arch_setup): ...this.
2678 (the_low_target): Remove the op field.
2679
2680 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2681
2682 * linux-low.h (the_linux_target): New extern declaration.
2683 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2684 'the_target'.
2685 (the_linux_target): Remove.
2686 * linux-x86-low.cc (class x86_target): New class.
2687 (the_x86_target): New static object.
2688 (the_linux_target): Define as pointer to the_x86_target.
2689 * linux-aarch64-low.cc (class aarch64_target): New class.
2690 (the_aarch64_target): New static object.
2691 (the_linux_target): Define as pointer to the_aarch64_target.
2692 * linux-arm-low.cc (class arm_target): New class.
2693 (the_arm_target): New static object.
2694 (the_linux_target): Define as pointer to the_arm_target.
2695 * linux-bfin-low.cc (class bfin_target): New class.
2696 (the_bfin_target): New static object.
2697 (the_linux_target): Define as pointer to the_bfin_target.
2698 * linux-cris-low.cc (class cris_target): New class.
2699 (the_cris_target): New static object.
2700 (the_linux_target): Define as pointer to the_cris_target.
2701 * linux-crisv32-low.cc (class crisv32_target): New class.
2702 (the_crisv32_target): New static object.
2703 (the_linux_target): Define as pointer to the_crisv32_target.
2704 * linux-ia64-low.cc (class ia64_target): New class.
2705 (the_ia64_target): New static object.
2706 (the_linux_target): Define as pointer to the_ia64_target.
2707 * linux-m32r-low.cc (class m32r_target): New class.
2708 (the_m32r_target): New static object.
2709 (the_linux_target): Define as pointer to the_m32r_target.
2710 * linux-m68k-low.cc (class m68k_target): New class.
2711 (the_m68k_target): New static object.
2712 (the_linux_target): Define as pointer to the_m68k_target.
2713 * linux-mips-low.cc (class mips_target): New class.
2714 (the_mips_target): New static object.
2715 (the_linux_target): Define as pointer to the_mips_target.
2716 * linux-nios2-low.cc (class nios2_target): New class.
2717 (the_nios2_target): New static object.
2718 (the_linux_target): Define as pointer to the_nios2_target.
2719 * linux-ppc-low.cc (class ppc_target): New class.
2720 (the_ppc_target): New static object.
2721 (the_linux_target): Define as pointer to the_ppc_target.
2722 * linux-riscv-low.cc (class riscv_target): New class.
2723 (the_riscv_target): New static object.
2724 (the_linux_target): Define as pointer to the_riscv_target.
2725 * linux-s390-low.cc (class s390_target): New class.
2726 (the_s390_target): New static object.
2727 (the_linux_target): Define as pointer to the_s390_target.
2728 * linux-sh-low.cc (class sh_target): New class.
2729 (the_sh_target): New static object.
2730 (the_linux_target): Define as pointer to the_sh_target.
2731 * linux-sparc-low.cc (class sparc_target): New class.
2732 (the_sparc_target): New static object.
2733 (the_linux_target): Define as pointer to the_sparc_target.
2734 * linux-tic6x-low.cc (class tic6x_target): New class.
2735 (the_tic6x_target): New static object.
2736 (the_linux_target): Define as pointer to the_tic6x_target.
2737 * linux-tile-low.cc (class tile_target): New class.
2738 (the_tile_target): New static object.
2739 (the_linux_target): Define as pointer to the_tile_target.
2740 * linux-xtensa-low.cc (class xtensa_target): New class.
2741 (the_xtensa_target): New static object.
2742 (the_linux_target): Define as pointer to the_xtensa_target.
2743
2744 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2745
2746 Turn some static functions in linux-low.cc into private methods of
2747 linux_process_target.
2748
2749 * linux-low.cc (handle_extended_wait): Turn into ...
2750 (linux_process_target::handle_extended_wait): ...this. Call
2751 'mourn' on 'this' object instead of 'the_target'.
2752 (maybe_move_out_of_jump_pad): Turn into...
2753 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2754 (linux_low_filter_event): Turn into...
2755 (linux_process_target::filter_event): ...this.
2756 (linux_wait_for_event_filtered): Turn into...
2757 (linux_process_target::wait_for_event_filtered): ...this.
2758 (linux_wait_for_event): Turn into...
2759 (linux_process_target::wait_for_event): ...this.
2760 (linux_wait_1): Turn into...
2761 (linux_process_target::wait_1): ...this.
2762 (wait_for_sigstop): Turn into...
2763 (linux_process_target::wait_for_sigstop): ...this.
2764 (move_out_of_jump_pad_callback): Turn into...
2765 (linux_process_target::move_out_of_jump_pad): ...this.
2766 (stop_all_lwps): Turn into...
2767 (linux_process_target::stop_all_lwps): ...this.
2768 (start_step_over): Turn into...
2769 (linux_process_target::start_step_over): ...this.
2770 (complete_ongoing_step_over): Turn into...
2771 (linux_process_target::complete_ongoing_step_over): ...this.
2772 (proceed_all_lwps): Turn into...
2773 (linux_process_target::proceed_all_lwps): ...this.
2774 (unstop_all_lwps): Turn into...
2775 (linux_process_target::unstop_all_lwps): ...this.
2776
2777 * linux-low.h (class linux_process_target)
2778 <handle_extended_wait>
2779 <maybe_move_out_of_jump_pad>
2780 filter_event>
2781 <wait_for_event_filtered>
2782 <wait_for_event>
2783 <wait_1>
2784 <wait_for_sigstop>
2785 <move_out_of_jump_pad>
2786 <stop_all_lwps>
2787 <start_step_over>
2788 <complete_ongoing_step_over>
2789 <proceed_all_lwps>
2790 <unstop_all_lwps>: Declare.
2791
2792 Update the callers below.
2793
2794 * linux-low.cc (linux_process_target::attach): Update.
2795 (linux_process_target::stabilize_threads): Ditto.
2796 (linux_process_target::wait): Ditto.
2797
2798 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2799
2800 * linux-low.h (struct linux_target_ops): Update the comment for
2801 'cannot_store_register' to return 0 or 1.
2802 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2803 of 2.
2804
2805 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2806
2807 * config.in: Re-generate.
2808 * configure: Re-generate.
2809
2810 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2811
2812 * regcache.cc (find_register_by_number): Update.
2813 * tdesc.cc (init_target_desc): Likewise.
2814 * tdesc.h (target_desc::reg_defs): Likewise.
2815
2816 2020-03-12 Tom Tromey <tom@tromey.com>
2817
2818 * configure: Rebuild.
2819 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2820 (WIN32APILIBS): New subst.
2821 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2822 gdbsupport files.
2823 (gdbsupport/%.o): Remove target.
2824 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2825 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2826 (WIN32APILIBS): New variable.
2827 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2828 (gdbreplay$(EXEEXT)): Likewise.
2829
2830 2020-03-12 Tom Tromey <tom@tromey.com>
2831
2832 * config.in, configure: Rebuild.
2833 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2834 * acinclude.m4: Include gettext-sister.m4.
2835 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2836 variables.
2837 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2838 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2839
2840 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2841
2842 * acinclude.m4: Update path to selftest.m4.
2843
2844 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2845
2846 * configure.ac: Don't source bfd/development.sh, move
2847 GDB_AC_COMMON higher.
2848 * configure: Re-generate.
2849
2850 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2851
2852 * configure: Re-generate.
2853
2854 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2855
2856 * configure: Re-generate.
2857
2858 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2859
2860 * .dir-locals.el: New file.
2861
2862 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2863
2864 * .gitattributes: New file.
2865
2866 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2867
2868 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2869 reply into an S reply.
2870 * server.cc (disable_packet_T): New global.
2871 (captured_main): Set new global when appropriate.
2872 * server.h (disable_packet_T): Declare.
2873
2874 2020-02-21 Tom Tromey <tom@tromey.com>
2875
2876 * Makefile.in (mostlyclean): New target.
2877
2878 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2879
2880 * target.h (struct process_stratum_target): Remove.
2881 (class process_target): Rename to ...
2882 (class process_stratum_target): ... this.
2883 * linux-low.h (class linux_process_target): Derive from
2884 'process_stratum_target'.
2885 * linux-low.cc (linux_target_ops): Remove.
2886 (initialize_low): Set the_target to the singleton instance of
2887 linux_process_target.
2888 * lynx-low.h (class lynx_process_target): Derive from
2889 'process_stratum_target'.
2890 * lynx-low.cc (lynx_target_ops): Remove.
2891 (initialize_low): Set the_target to the singleton instance of
2892 lynx_process_target.
2893 * nto-low.h (class nto_process_target): Derive from
2894 'process_stratum_target'.
2895 * nto-low.cc (nto_target_ops): Remove.
2896 (initialize_low): Set the_target to the singleton instance of
2897 nto_process_target.
2898 * win32-low.h (class win32_process_target): Derive from
2899 'process_stratum_target'.
2900 * win32-low.cc (win32_target_ops): Remove.
2901 (initialize_low): Set the_target to the singleton instance of
2902 win32_process_target.
2903
2904 Replace 'the_target->pt' with 'the_target' in the uses below.
2905
2906 * hostio.cc (hostio_error)
2907 (handle_setfs)
2908 (handle_open)
2909 (handle_unlink)
2910 (handle_readlink)
2911 * linux-aarch32-low.cc (arm_breakpoint_at)
2912 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2913 * linux-arm-low.cc (arm_sigreturn_next_pc)
2914 (arm_get_hwcap)
2915 (arm_get_syscall_trapinfo)
2916 * linux-cris-low.cc (cris_breakpoint_at)
2917 * linux-crisv32-low.cc (cris_breakpoint_at)
2918 * linux-low.cc (handle_extended_wait)
2919 (linux_wait_1)
2920 (linux_read_memory)
2921 (linux_process_target::breakpoint_kind_from_pc)
2922 (linux_get_auxv)
2923 * linux-m32r-low.cc (m32r_breakpoint_at)
2924 * linux-mips-low.cc (mips_breakpoint_at)
2925 * linux-nios2-low.cc (nios2_breakpoint_at)
2926 * linux-ppc-low.cc (ppc_breakpoint_at)
2927 * linux-s390-low.cc (s390_get_hwcap)
2928 * linux-sh-low.cc (sh_breakpoint_at)
2929 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2930 (sparc_store_gregset_from_stack)
2931 (sparc_breakpoint_at)
2932 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2933 * linux-tile-low.cc (tile_breakpoint_at)
2934 * linux-x86-low.cc (x86_breakpoint_at)
2935 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2936 * mem-break.cc (bp_size)
2937 (bp_opcode)
2938 (insert_memory_breakpoint)
2939 (set_raw_breakpoint_at)
2940 (delete_raw_breakpoint)
2941 (z_type_supported)
2942 (uninsert_raw_breakpoint)
2943 (reinsert_raw_breakpoint)
2944 (validate_inserted_breakpoint)
2945 * regcache.cc (regcache_read_pc)
2946 (regcache_write_pc)
2947 * remote-utils.cc (putpkt_binary_1)
2948 (input_interrupt)
2949 (getpkt)
2950 (prepare_resume_reply)
2951 * server.cc (handle_general_set)
2952 (handle_detach)
2953 (handle_qxfer_auxv)
2954 (handle_qxfer_exec_file)
2955 (handle_qxfer_libraries_svr4)
2956 (handle_qxfer_osdata)
2957 (handle_qxfer_siginfo)
2958 (handle_qxfer_fdpic)
2959 (handle_query)
2960 (resume)
2961 (handle_v_requests)
2962 (queue_stop_reply_callback)
2963 (captured_main)
2964 * target.cc (prepare_to_access_memory)
2965 (done_accessing_memory)
2966 (read_inferior_memory)
2967 (target_write_memory)
2968 (target_stop_and_wait)
2969 (target_wait)
2970 (target_mourn_inferior)
2971 (target_continue_no_signal)
2972 (target_continue)
2973 (target_supports_multi_process)
2974 (kill_inferior)
2975 * target.h
2976 (target_create_inferior)
2977 (target_post_create_inferior)
2978 (myattach)
2979 (target_supports_fork_events)
2980 (target_supports_vfork_events)
2981 (target_supports_exec_events)
2982 (target_handle_new_gdb_connection)
2983 (detach_inferior)
2984 (mythread_alive)
2985 (fetch_inferior_registers)
2986 (store_inferior_registers)
2987 (join_inferior)
2988 (target_supports_non_stop)
2989 (target_async)
2990 (target_process_qsupported)
2991 (target_supports_catch_syscall)
2992 (target_get_ipa_tdesc_idx)
2993 (target_supports_tracepoints)
2994 (target_supports_fast_tracepoints)
2995 (target_get_min_fast_tracepoint_insn_len)
2996 (target_thread_stopped)
2997 (target_pause_all)
2998 (target_unpause_all)
2999 (target_stabilize_threads)
3000 (target_install_fast_tracepoint_jump_pad)
3001 (target_emit_ops)
3002 (target_supports_disable_randomization)
3003 (target_supports_agent)
3004 (target_enable_btrace)
3005 (target_disable_btrace)
3006 (target_read_btrace)
3007 (target_read_btrace_conf)
3008 (target_supports_range_stepping)
3009 (target_supports_stopped_by_sw_breakpoint)
3010 (target_stopped_by_sw_breakpoint)
3011 (target_supports_stopped_by_hw_breakpoint)
3012 (target_supports_hardware_single_step)
3013 (target_stopped_by_hw_breakpoint)
3014 (target_breakpoint_kind_from_pc)
3015 (target_breakpoint_kind_from_current_state)
3016 (target_supports_software_single_step)
3017 (target_core_of_thread)
3018 (target_thread_name)
3019 (target_thread_handle)
3020 * win32-low.cc (do_initial_child_stuff)
3021
3022 Rename target op default definitions listed below.
3023
3024 * target.cc (process_target::post_create_inferior): Rename as ...
3025 (process_stratum_target::post_create_inferior): ... this.
3026 (process_target::prepare_to_access_memory): Rename as ...
3027 (process_stratum_target::prepare_to_access_memory): ... this.
3028 (process_target::done_accessing_memory): Rename as ...
3029 (process_stratum_target::done_accessing_memory): ... this.
3030 (process_target::look_up_symbols): Rename as ...
3031 (process_stratum_target::look_up_symbols): ... this.
3032 (process_target::supports_read_auxv): Rename as ...
3033 (process_stratum_target::supports_read_auxv): ... this.
3034 (process_target::read_auxv): Rename as ...
3035 (process_stratum_target::read_auxv): ... this.
3036 (process_target::supports_z_point_type): Rename as ...
3037 (process_stratum_target::supports_z_point_type): ... this.
3038 (process_target::insert_point): Rename as ...
3039 (process_stratum_target::insert_point): ... this.
3040 (process_target::remove_point): Rename as ...
3041 (process_stratum_target::remove_point): ... this.
3042 (process_target::stopped_by_sw_breakpoint): Rename as ...
3043 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
3044 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
3045 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
3046 (process_target::stopped_by_hw_breakpoint): Rename as ...
3047 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
3048 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
3049 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
3050 (process_target::supports_hardware_single_step): Rename as ...
3051 (process_stratum_target::supports_hardware_single_step): ... this.
3052 (process_target::stopped_by_watchpoint): Rename as ...
3053 (process_stratum_target::stopped_by_watchpoint): ... this.
3054 (process_target::stopped_data_address): Rename as ...
3055 (process_stratum_target::stopped_data_address): ... this.
3056 (process_target::supports_read_offsets): Rename as ...
3057 (process_stratum_target::supports_read_offsets): ... this.
3058 (process_target::read_offsets): Rename as ...
3059 (process_stratum_target::read_offsets): ... this.
3060 (process_target::supports_get_tls_address): Rename as ...
3061 (process_stratum_target::supports_get_tls_address): ... this.
3062 (process_target::get_tls_address): Rename as ...
3063 (process_stratum_target::get_tls_address): ... this.
3064 (process_target::hostio_last_error): Rename as ...
3065 (process_stratum_target::hostio_last_error): ... this.
3066 (process_target::supports_qxfer_osdata): Rename as ...
3067 (process_stratum_target::supports_qxfer_osdata): ... this.
3068 (process_target::qxfer_osdata): Rename as ...
3069 (process_stratum_target::qxfer_osdata): ... this.
3070 (process_target::supports_qxfer_siginfo): Rename as ...
3071 (process_stratum_target::supports_qxfer_siginfo): ... this.
3072 (process_target::qxfer_siginfo): Rename as ...
3073 (process_stratum_target::qxfer_siginfo): ... this.
3074 (process_target::supports_non_stop): Rename as ...
3075 (process_stratum_target::supports_non_stop): ... this.
3076 (process_target::async): Rename as ...
3077 (process_stratum_target::async): ... this.
3078 (process_target::start_non_stop): Rename as ...
3079 (process_stratum_target::start_non_stop): ... this.
3080 (process_target::supports_multi_process): Rename as ...
3081 (process_stratum_target::supports_multi_process): ... this.
3082 (process_target::supports_fork_events): Rename as ...
3083 (process_stratum_target::supports_fork_events): ... this.
3084 (process_target::supports_vfork_events): Rename as ...
3085 (process_stratum_target::supports_vfork_events): ... this.
3086 (process_target::supports_exec_events): Rename as ...
3087 (process_stratum_target::supports_exec_events): ... this.
3088 (process_target::handle_new_gdb_connection): Rename as ...
3089 (process_stratum_target::handle_new_gdb_connection): ... this.
3090 (process_target::handle_monitor_command): Rename as ...
3091 (process_stratum_target::handle_monitor_command): ... this.
3092 (process_target::core_of_thread): Rename as ...
3093 (process_stratum_target::core_of_thread): ... this.
3094 (process_target::supports_read_loadmap): Rename as ...
3095 (process_stratum_target::supports_read_loadmap): ... this.
3096 (process_target::read_loadmap): Rename as ...
3097 (process_stratum_target::read_loadmap): ... this.
3098 (process_target::process_qsupported): Rename as ...
3099 (process_stratum_target::process_qsupported): ... this.
3100 (process_target::supports_tracepoints): Rename as ...
3101 (process_stratum_target::supports_tracepoints): ... this.
3102 (process_target::read_pc): Rename as ...
3103 (process_stratum_target::read_pc): ... this.
3104 (process_target::write_pc): Rename as ...
3105 (process_stratum_target::write_pc): ... this.
3106 (process_target::supports_thread_stopped): Rename as ...
3107 (process_stratum_target::supports_thread_stopped): ... this.
3108 (process_target::thread_stopped): Rename as ...
3109 (process_stratum_target::thread_stopped): ... this.
3110 (process_target::supports_get_tib_address): Rename as ...
3111 (process_stratum_target::supports_get_tib_address): ... this.
3112 (process_target::get_tib_address): Rename as ...
3113 (process_stratum_target::get_tib_address): ... this.
3114 (process_target::pause_all): Rename as ...
3115 (process_stratum_target::pause_all): ... this.
3116 (process_target::unpause_all): Rename as ...
3117 (process_stratum_target::unpause_all): ... this.
3118 (process_target::stabilize_threads): Rename as ...
3119 (process_stratum_target::stabilize_threads): ... this.
3120 (process_target::supports_fast_tracepoints): Rename as ...
3121 (process_stratum_target::supports_fast_tracepoints): ... this.
3122 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
3123 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
3124 (process_target::emit_ops): Rename as ...
3125 (process_stratum_target::emit_ops): ... this.
3126 (process_target::supports_disable_randomization): Rename as ...
3127 (process_stratum_target::supports_disable_randomization): ... this.
3128 (process_target::supports_qxfer_libraries_svr4): Rename as ...
3129 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
3130 (process_target::qxfer_libraries_svr4): Rename as ...
3131 (process_stratum_target::qxfer_libraries_svr4): ... this.
3132 (process_target::supports_agent): Rename as ...
3133 (process_stratum_target::supports_agent): ... this.
3134 (process_target::enable_btrace): Rename as ...
3135 (process_stratum_target::enable_btrace): ... this.
3136 (process_target::disable_btrace): Rename as ...
3137 (process_stratum_target::disable_btrace): ... this.
3138 (process_target::read_btrace): Rename as ...
3139 (process_stratum_target::read_btrace): ... this.
3140 (process_target::read_btrace_conf): Rename as ...
3141 (process_stratum_target::read_btrace_conf): ... this.
3142 (process_target::supports_range_stepping): Rename as ...
3143 (process_stratum_target::supports_range_stepping): ... this.
3144 (process_target::supports_pid_to_exec_file): Rename as ...
3145 (process_stratum_target::supports_pid_to_exec_file): ... this.
3146 (process_target::pid_to_exec_file): Rename as ...
3147 (process_stratum_target::pid_to_exec_file): ... this.
3148 (process_target::supports_multifs): Rename as ...
3149 (process_stratum_target::supports_multifs): ... this.
3150 (process_target::multifs_open): Rename as ...
3151 (process_stratum_target::multifs_open): ... this.
3152 (process_target::multifs_unlink): Rename as ...
3153 (process_stratum_target::multifs_unlink): ... this.
3154 (process_target::multifs_readlink): Rename as ...
3155 (process_stratum_target::multifs_readlink): ... this.
3156 (process_target::breakpoint_kind_from_pc): Rename as ...
3157 (process_stratum_target::breakpoint_kind_from_pc): ... this.
3158 (process_target::breakpoint_kind_from_current_state): Rename as ...
3159 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
3160 (process_target::thread_name): Rename as ...
3161 (process_stratum_target::thread_name): ... this.
3162 (process_target::thread_handle): Rename as ...
3163 (process_stratum_target::thread_handle): ... this.
3164 (process_target::supports_software_single_step): Rename as ...
3165 (process_stratum_target::supports_software_single_step): ... this.
3166 (process_target::supports_catch_syscall): Rename as ...
3167 (process_stratum_target::supports_catch_syscall): ... this.
3168 (process_target::get_ipa_tdesc_idx): Rename as ...
3169 (process_stratum_target::get_ipa_tdesc_idx): ... this.
3170
3171 2020-02-20 Pedro Alves <palves@redhat.com>
3172
3173 * target.cc (set_target_ops): Simply copy the given target pointer
3174 instead of creating a copy of the pointed object.
3175
3176 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3177
3178 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
3179 of process_target.
3180
3181 * target.h (struct process_stratum_target): Remove the target op.
3182 (class process_target): Add the target op.
3183 (target_get_ipa_tdesc_idx): Update the macro.
3184 * target.cc (process_target::get_ipa_tdesc_idx): Define.
3185
3186 Update the derived classes and callers below.
3187
3188 * linux-low.cc (linux_target_ops): Update.
3189 (linux_get_ipa_tdesc_idx): Turn into ...
3190 (linux_process_target::get_ipa_tdesc_idx): ... this.
3191 * linux-low.h (class linux_process_target): Update.
3192 * lynx-low.cc (lynx_target_ops): Update.
3193 * nto-low.cc (nto_target_ops): Update.
3194 * win32-low.cc (win32_target_ops): Update.
3195
3196 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3197
3198 Turn process_stratum_target's supports_catch_syscall op into a
3199 method of process_target.
3200
3201 * target.h (struct process_stratum_target): Remove the target op.
3202 (class process_target): Add the target op.
3203 (target_supports_catch_syscall): Update the macro.
3204 * target.cc (process_target::supports_catch_syscall): Define.
3205
3206 Update the derived classes and callers below.
3207
3208 * linux-low.cc (linux_target_ops): Update.
3209 (linux_supports_catch_syscall): Turn into ...
3210 (linux_process_target::supports_catch_syscall): ... this.
3211 * linux-low.h (class linux_process_target): Update.
3212 * lynx-low.cc (lynx_target_ops): Update.
3213 * nto-low.cc (nto_target_ops): Update.
3214 * win32-low.cc (win32_target_ops): Update.
3215
3216 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3217
3218 Turn process_stratum_target's supports_software_single_step op
3219 into a method of process_target.
3220
3221 * target.h (struct process_stratum_target): Remove the target op.
3222 (class process_target): Add the target op.
3223 (target_supports_software_single_step): Update the macro.
3224 * target.cc (process_target::supports_software_single_step): Define.
3225
3226 Update the derived classes and callers below.
3227
3228 * linux-low.cc (linux_target_ops): Update.
3229 (linux_supports_software_single_step): Turn into ...
3230 (linux_process_target::supports_software_single_step): ... this.
3231 * linux-low.h (class linux_process_target): Update.
3232 * lynx-low.cc (lynx_target_ops): Update.
3233 * nto-low.cc (nto_target_ops): Update.
3234 * win32-low.cc (win32_target_ops): Update.
3235
3236 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3237
3238 Turn process_stratum_target's thread_name and thread_handle ops
3239 into methods of process_target.
3240
3241 * target.h (struct process_stratum_target): Remove the target ops.
3242 (class process_target): Add the target ops.
3243 (target_thread_name): Update the macro.
3244 (target_thread_handle): Update the macro.
3245 * target.cc (process_target::thread_name): Define.
3246 (process_target::thread_handle): Define.
3247
3248 Update the derived classes and callers below.
3249
3250 * linux-low.cc (linux_target_ops): Update.
3251 (linux_process_target::thread_name): Define.
3252 (linux_process_target::thread_handle): Define.
3253 * linux-low.h (class linux_process_target): Update.
3254 * lynx-low.cc (lynx_target_ops): Update.
3255 * nto-low.cc (nto_target_ops): Update.
3256 * win32-low.cc (win32_target_ops): Update.
3257
3258 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3259
3260 Turn process_stratum_target's breakpoint_kind_from_pc,
3261 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
3262 ops into methods of process_target.
3263
3264 * target.h (struct process_stratum_target): Remove the target op.
3265 (class process_target): Add the target op.
3266 (target_breakpoint_kind_from_pc): Update the macro.
3267 (target_breakpoint_kind_from_current_state): Update the macro.
3268 (default_breakpoint_kind_from_pc): Remove declaration.
3269 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
3270 (process_target::breakpoint_kind_from_pc): ... this.
3271 (process_target::breakpoint_kind_from_current_state): Define.
3272
3273 Update the derived classes and callers below.
3274
3275 * mem-break.cc (bp_size): Update.
3276 (bp_opcode): Update.
3277 * linux-low.cc (linux_target_ops): Update.
3278 (linux_wait_1): Update.
3279 (linux_breakpoint_kind_from_pc): Turn into ...
3280 (linux_process_target::breakpoint_kind_from_pc): ... this.
3281 (linux_sw_breakpoint_from_kind): Turn into ...
3282 (linux_process_target::sw_breakpoint_from_kind): ... this.
3283 (linux_breakpoint_kind_from_current_state): Turn into ...
3284 (linux_process_target::breakpoint_kind_from_current_state): ... this.
3285 * linux-low.h (class linux_process_target): Update.
3286 * lynx-low.cc (lynx_target_ops): Update.
3287 (lynx_process_target::sw_breakpoint_from_kind): Define.
3288 * lynx-low.h (class lynx_process_target): Update.
3289 * nto-low.cc (nto_target_ops): Update.
3290 (nto_sw_breakpoint_from_kind): Turn into ...
3291 (nto_process_target::sw_breakpoint_from_kind): ... this.
3292 * nto-low.h (class nto_process_target): Update.
3293 * win32-low.cc (win32_target_ops): Update.
3294 (win32_sw_breakpoint_from_kind): Turn into ...
3295 (win32_process_target::sw_breakpoint_from_kind): ... this.
3296 * win32-low.h (class win32_process_target): Update.
3297
3298 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3299
3300 Turn process_stratum_target's multifs_open, multifs_readlink,
3301 multifs_unlink ops into methods of process_target.
3302
3303 * target.h (struct process_stratum_target): Remove the target ops.
3304 (class process_target): Add the target ops. Also add
3305 'supports_multifs'.
3306 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
3307 "sys/stat.h".
3308 (process_target::supports_multifs): Define.
3309 (process_target::multifs_open): Define.
3310 (process_target::multifs_readlink): Define.
3311 (process_target::multifs_unlink): Define.
3312
3313 Update the derived classes and callers below.
3314
3315 * hostio.cc (handle_setfs): Update.
3316 (handle_open): Update.
3317 (handle_unlink): Update.
3318 (handle_readlink): Update.
3319 * linux-low.cc (linux_target_ops): Update.
3320 (linux_process_target::supports_multifs): Define.
3321 (linux_process_target::multifs_open): Define.
3322 (linux_process_target::multifs_readlink): Define.
3323 (linux_process_target::multifs_unlink): Define.
3324 * linux-low.h (class linux_process_target): Update.
3325 * lynx-low.cc (lynx_target_ops): Update.
3326 * nto-low.cc (nto_target_ops): Update.
3327 * win32-low.cc (win32_target_ops): Update.
3328
3329 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3330
3331 Turn process_stratum_target's pid_to_exec_file op into a method
3332 of process_target.
3333
3334 * target.h (struct process_stratum_target): Remove the target op.
3335 (class process_target): Add the target op. Also add
3336 'supports_pid_to_exec_file'.
3337 * target.cc (process_target::pid_to_exec_file): Define.
3338 (process_target::supports_pid_to_exec_file): Define.
3339
3340 Update the derived classes and callers below.
3341
3342 * server.cc (handle_qxfer_exec_file): Update.
3343 (handle_query): Update.
3344 * linux-low.cc (linux_target_ops): Update.
3345 (linux_process_target::supports_pid_to_exec_file): Define.
3346 (linux_process_target::pid_to_exec_file): Define.
3347 * linux-low.h (class linux_process_target): Update.
3348 * lynx-low.cc (lynx_target_ops): Update.
3349 * nto-low.cc (nto_target_ops): Update.
3350 * win32-low.cc (win32_target_ops): Update.
3351
3352 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3353
3354 Turn process_stratum_target's supports_range_stepping op into a
3355 method of process_target.
3356
3357 * target.h (struct process_stratum_target): Remove the target op.
3358 (class process_target): Add the target op.
3359 (target_supports_range_stepping): Update the macro.
3360 * target.cc (process_target::supports_range_stepping): Define.
3361
3362 Update the derived classes and callers below.
3363
3364 * linux-low.cc (linux_target_ops): Update.
3365 (linux_supports_range_stepping): Turn into ...
3366 (linux_process_target::supports_range_stepping): ... this.
3367 * linux-low.h (class linux_process_target): Update.
3368 * lynx-low.cc (lynx_target_ops): Update.
3369 * nto-low.cc (nto_target_ops): Update.
3370 * win32-low.cc (win32_target_ops): Update.
3371
3372 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3373
3374 Turn process_stratum_target's btrace-related ops (enable_btrace,
3375 disable_btrace, read_btrace, read_btrace_conf) into methods of
3376 process_target.
3377
3378 * target.h (struct process_stratum_target): Remove the target ops.
3379 (class process_target): Add the target ops.
3380 (target_enable_btrace): Update.
3381 (target_disable_btrace): Update.
3382 (target_read_btrace): Update.
3383 (target_read_btrace_conf): Update.
3384 * target.cc (process_target::enable_btrace): Define.
3385 (process_target::disable_btrace): Define.
3386 (process_target::read_btrace): Define.
3387 (process_target::read_btrace_conf): Define.
3388
3389 Update the derived classes and callers below.
3390
3391 * linux-low.cc (linux_target_ops): Update.
3392 (linux_process_target:enable_btrace): Define as a wrapper around
3393 linux_enable_btrace.
3394 (linux_low_disable_btrace): Turn into ...
3395 (linux_process_target::disable_btrace): ... this.
3396 (linux_low_read_btrace): Turn into ...
3397 (linux_process_target::read_btrace): ... this.
3398 (linux_low_btrace_conf): Turn into ...
3399 (linux_process_target::read_btrace_conf): ... this.
3400 * linux-low.h (class linux_process_target): Update.
3401 * lynx-low.cc (lynx_target_ops): Update.
3402 * nto-low.cc (nto_target_ops): Update.
3403 * win32-low.cc (win32_target_ops): Update.
3404
3405 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3406
3407 Turn process_stratum_target's supports_agent op into a method of
3408 process_target.
3409
3410 * target.h (struct process_stratum_target): Remove the target op.
3411 (class process_target): Add the target op.
3412 (target_supports_agent): Update the macro.
3413 * target.cc (process_target::supports_agent): Define.
3414
3415 Update the derived classes and callers below.
3416
3417 * linux-low.cc (linux_target_ops): Update.
3418 (linux_supports_agent): Turn into ...
3419 (linux_process_target::supports_agent): ... this.
3420 * linux-low.h (class linux_process_target): Update.
3421 * lynx-low.cc (lynx_target_ops): Update.
3422 * nto-low.cc (nto_target_ops): Update.
3423 * win32-low.cc (win32_target_ops): Update.
3424
3425 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3426
3427 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3428 method of process_target.
3429
3430 * target.h (struct process_stratum_target): Remove the target op.
3431 (class process_target): Add the target op. Also add
3432 'supports_qxfer_libraries_svr4'.
3433 * target.cc (process_target::qxfer_libraries_svr4): Define.
3434 (process_target::supports_qxfer_libraries_svr4): Define.
3435
3436 Update the derived classes and callers below.
3437
3438 * server.cc (handle_qxfer_libraries_svr4): Update.
3439 (handle_query): Update.
3440 * linux-low.cc (linux_target_ops): Update.
3441 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3442 (linux_qxfer_libraries_svr4): Turn into ...
3443 (linux_process_target::qxfer_libraries_svr4): ... this.
3444 * linux-low.h (class linux_process_target): Update.
3445 * lynx-low.cc (lynx_target_ops): Update.
3446 * nto-low.cc (nto_target_ops): Update.
3447 * win32-low.cc (win32_target_ops): Update.
3448
3449 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3450
3451 Turn process_stratum_target's supports_disable_randomization op
3452 into a method of process_target.
3453
3454 * target.h (struct process_stratum_target): Remove the target op.
3455 (class process_target): Add the target op.
3456 (target_supports_disable_randomization): Update the macro.
3457 * target.cc (process_target::supports_disable_randomization): Define.
3458
3459 Update the derived classes and callers below.
3460
3461 * linux-low.cc (linux_target_ops): Update.
3462 (linux_supports_disable_randomization): Turn into ...
3463 (linux_process_target::supports_disable_randomization): ... this.
3464 * linux-low.h (class linux_process_target): Update.
3465 * lynx-low.cc (lynx_target_ops): Update.
3466 * nto-low.cc (nto_target_ops): Update.
3467 * win32-low.cc (win32_target_ops): Update.
3468
3469 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3470
3471 Turn process_stratum_target's emit_ops op into a method of
3472 process_target.
3473
3474 * target.h (struct process_stratum_target): Remove the target op.
3475 (class process_target): Add the target op.
3476 (target_emit_ops): Update the macro.
3477 * target.cc (process_target::emit_ops): Define.
3478
3479 Update the derived classes and callers below.
3480
3481 * linux-low.cc (linux_target_ops): Update.
3482 (linux_emit_ops): Turn into ...
3483 (linux_process_target::emit_ops): ... this.
3484 * linux-low.h (class linux_process_target): Update.
3485 * lynx-low.cc (lynx_target_ops): Update.
3486 * nto-low.cc (nto_target_ops): Update.
3487 * win32-low.cc (win32_target_ops): Update.
3488
3489 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3490
3491 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3492 and get_min_fast_tracepoint_insn_len ops into methods of
3493 process_target.
3494
3495 * target.h (struct process_stratum_target): Remove the target ops.
3496 (class process_target): Add the target ops. Also add
3497 'supports_fast_tracepoints'.
3498 (target_supports_fast_tracepoints): Update the macro.
3499 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3500 (install_fast_tracepoint_jump_pad): Update and rename the macro
3501 to ...
3502 (target_install_fast_tracepoint_jump_pad): ... this.
3503 * target.cc (process_target::supports_fast_tracepoints): Define.
3504 (process_target::install_fast_tracepoint_jump_pad): Define.
3505 (process_target::get_min_fast_tracepoint_insn_len): Define.
3506
3507 Update the derived classes and callers below.
3508
3509 * tracepoint.cc (install_fast_tracepoint): Update.
3510 * linux-low.cc (linux_target_ops): Update.
3511 (linux_process_target::supports_fast_tracepoints): Define.
3512 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3513 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3514 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3515 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3516 * linux-low.h (class linux_process_target): Update.
3517 * lynx-low.cc (lynx_target_ops): Update.
3518 * nto-low.cc (nto_target_ops): Update.
3519 * win32-low.cc (win32_target_ops): Update.
3520
3521 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3522
3523 Turn process_stratum_target's stabilize_threads op into a
3524 method of process_target.
3525
3526 * target.h (struct process_stratum_target): Remove the target op.
3527 (class process_target): Add the target op.
3528 (target_stabilize_threads): Update the macro.
3529 * target.cc (process_target::stabilize_threads): Define.
3530
3531 Update the derived classes and callers below.
3532
3533 * server.cc (handle_status): Update.
3534 * tracepoint.cc (cmd_qtdp): Update.
3535 (cmd_qtstart): Update.
3536 * linux-low.cc (linux_target_ops): Update.
3537 (linux_stabilize_threads): Turn into ...
3538 (linux_process_target::stabilize_threads): ... this.
3539 (linux_wait_1): Update.
3540 * linux-low.h (class linux_process_target): Update.
3541 * lynx-low.cc (lynx_target_ops): Update.
3542 * nto-low.cc (nto_target_ops): Update.
3543 * win32-low.cc (win32_target_ops): Update.
3544
3545 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3546
3547 Turn process_stratum_target's pause_all and unpause_all ops
3548 into methods of process_target.
3549
3550 * target.h (struct process_stratum_target): Remove the target ops.
3551 (class process_target): Add the target ops.
3552 (pause_all): Update the macro and rename to...
3553 (target_pause_all): ... this.
3554 (unpause_all): Update the macro and rename to...
3555 (target_unpause_all): ... this.
3556 * target.cc (process_target::pause_all): Define.
3557 (process_target::unpause_all): Define.
3558
3559 Update the derived classes and callers below.
3560
3561 * server.cc (handle_status): Update.
3562 * tracepoint.cc (clear_installed_tracepoints): Update.
3563 (cmd_qtdp): Update.
3564 (cmd_qtstart): Update.
3565 (stop_tracing): Update.
3566 (cmd_qtstatus): Update.
3567 (upload_fast_traceframes): Update.
3568 (run_inferior_command): Update.
3569 * linux-low.cc (linux_target_ops): Update.
3570 (linux_pause_all): Turn into ...
3571 (linux_process_target::pause_all): ... this.
3572 (linux_unpause_all): Turn into ...
3573 (linux_process_target::unpause_all): ... this.
3574 (linux_process_target::prepare_to_access_memory): Update.
3575 (linux_process_target::done_accessing_memory): Update.
3576 * linux-low.h (class linux_process_target): Update.
3577 * lynx-low.cc (lynx_target_ops): Update.
3578 * nto-low.cc (nto_target_ops): Update.
3579 * win32-low.cc (win32_target_ops): Update.
3580
3581 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3582
3583 Turn process_stratum_target's get_tib_address op into a method of
3584 process_target.
3585
3586 * target.h (struct process_stratum_target): Remove the target op.
3587 (class process_target): Add the target op. Also add
3588 'supports_get_tib_address'.
3589 * target.cc (process_target::get_tib_address): Define.
3590 (process_target::supports_get_tib_address): Define.
3591
3592 Update the derived classes and callers below.
3593
3594 * server.cc (handle_query): Update.
3595 * linux-low.cc (win32_target_ops): Update.
3596 * lynx-low.cc (lynx_target_ops): Update.
3597 * nto-low.cc (nto_target_ops): Update.
3598 * win32-low.cc (win32_target_ops): Update.
3599 (win32_process_target::supports_get_tib_address): Define.
3600 (win32_get_tib_address): Turn into ...
3601 (win32_process_target::get_tib_address): ... this.
3602 * win32-low.h (class win32_process_target): Update.
3603
3604 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3605
3606 Turn process_stratum_target's thread_stopped op into a method of
3607 process_target.
3608
3609 * target.h (struct process_stratum_target): Remove the target op.
3610 (class process_target): Add the target op. Also add
3611 'supports_thread_stopped'.
3612 (target_thread_stopped): Update the macro.
3613 * target.cc (process_target::thread_stopped): Define.
3614 (process_target::supports_thread_stopped): Define.
3615 (prepare_to_access_memory): Update.
3616
3617 Update the derived classes and callers below.
3618
3619 * server.cc (queue_stop_reply_callback): Update.
3620 * linux-low.cc (linux_target_ops): Update.
3621 (linux_process_target::supports_thread_stopped): Define.
3622 (linux_thread_stopped): Turn into ...
3623 (linux_process_target::thread_stopped): ... this.
3624 * linux-low.h (class linux_process_target): Update.
3625 * lynx-low.cc (lynx_target_ops): Update.
3626 * nto-low.cc (nto_target_ops): Update.
3627 * win32-low.cc (win32_target_ops): Update.
3628
3629 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3630
3631 Turn process_stratum_target's read_pc and write_pc ops into
3632 methods of process_target.
3633
3634 * target.h (struct process_stratum_target): Remove the target ops.
3635 (class process_target): Add the target ops.
3636 * target.cc (process_target::read_pc): Define.
3637 (process_target::write_pc): Define.
3638
3639 Update the derived classes and callers below.
3640
3641 * regcache.cc (regcache_read_pc): Update.
3642 (regcache_write_pc): Update.
3643 * linux-low.cc (linux_target_ops): Update.
3644 (linux_read_pc): Turn into ...
3645 (linux_process_target::read_pc): ... this.
3646 (linux_write_pc): Turn into ...
3647 (linux_process_target::write_pc): ... this.
3648 * linux-low.h (class linux_process_target): Update.
3649 * lynx-low.cc (lynx_target_ops): Update.
3650 * nto-low.cc (nto_target_ops): Update.
3651 * win32-low.cc (win32_target_ops): Update.
3652
3653 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3654
3655 Turn process_stratum_target's supports_tracepoints op into a
3656 method of process_target.
3657
3658 * target.h (struct process_stratum_target): Remove the target op.
3659 (class process_target): Add the target op.
3660 (target_supports_tracepoints): Update the macro.
3661 * target.cc (process_target::supports_tracepoints): Define.
3662
3663 Update the derived classes and callers below.
3664
3665 * linux-low.cc (linux_target_ops): Update.
3666 (linux_supports_tracepoints): Turn into ...
3667 (linux_process_target::supports_tracepoints): ... this.
3668 * linux-low.h (class linux_process_target): Update.
3669 * lynx-low.cc (lynx_target_ops): Update.
3670 * nto-low.cc (nto_target_ops): Update.
3671 * win32-low.cc (win32_target_ops): Update.
3672
3673 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3674
3675 Turn process_stratum_target's process_qsupported op into a method
3676 of process_target.
3677
3678 * target.h (struct process_stratum_target): Remove the target op.
3679 (class process_target): Add the target op.
3680 (target_process_qsupported): Update the macro.
3681 * target.cc (process_target::process_qsupported): Define.
3682
3683 Update the derived classes and callers below.
3684
3685 * linux-low.cc (linux_target_ops): Update.
3686 (linux_process_qsupported): Turn into ...
3687 (linux_process_target::process_qsupported): ... this.
3688 * linux-low.h (class linux_process_target): Update.
3689 * lynx-low.cc (lynx_target_ops): Update.
3690 * nto-low.cc (nto_target_ops): Update.
3691 * win32-low.cc (win32_target_ops): Update.
3692
3693 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3694
3695 Turn process_stratum_target's read_loadmap op into a method of
3696 process_target.
3697
3698 * target.h (struct process_stratum_target): Remove the target op.
3699 (class process_target): Add the target op. Also add
3700 'supports_read_loadmap'.
3701 * target.cc (process_target::read_loadmap): Define.
3702 (process_target::supports_read_loadmap): Define.
3703
3704 Update the derived classes and callers below.
3705
3706 * server.cc (handle_qxfer_fdpic): Update.
3707 (handle_query): Update.
3708 * linux-low.cc (linux_target_ops): Update.
3709 (linux_process_target::supports_read_loadmap): Define.
3710 (linux_read_loadmap): Turn into ...
3711 (linux_process_target::read_loadmap): ... this.
3712 * linux-low.h (class linux_process_target): Update.
3713 * lynx-low.cc (lynx_target_ops): Update.
3714 * nto-low.cc (nto_target_ops): Update.
3715 * win32-low.cc (win32_target_ops): Update.
3716
3717 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3718
3719 Turn process_stratum_target's core_of_thread op into a method of
3720 process_target.
3721
3722 * target.h (struct process_stratum_target): Remove the target op.
3723 (class process_target): Add the target op.
3724 (target_core_of_thread): Update the macro.
3725 * target.cc (process_target::core_of_thread): Define.
3726
3727 Update the derived classes and callers below.
3728
3729 * linux-low.cc (linux_target_ops): Update.
3730 (linux_process_target::core_of_thread): Define.
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 handle_monitor_command 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_handle_monitor_command): Update the macro.
3744 * target.cc (process_target::handle_monitor_command): Define.
3745
3746 Update the derived classes and callers below.
3747
3748 * server.cc (handle_query): Update.
3749 * linux-low.cc (linux_target_ops): Update.
3750 (linux_process_target::handle_monitor_command): Define.
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 handle_new_gdb_connection op into a
3759 method of process_target.
3760
3761 * target.h (struct process_stratum_target): Remove the target op.
3762 (class process_target): Add the target op.
3763 (target_handle_new_gdb_connection): Update the macro.
3764 * target.cc (process_target::handle_new_gdb_connection): Define.
3765
3766 Update the derived classes and callers below.
3767
3768 * linux-low.cc (linux_target_ops): Update.
3769 (linux_handle_new_gdb_connection): Turn into ...
3770 (linux_process_target::handle_new_gdb_connection): ... this.
3771 * linux-low.h (class linux_process_target): Update.
3772 * lynx-low.cc (lynx_target_ops): Update.
3773 * nto-low.cc (nto_target_ops): Update.
3774 * win32-low.cc (win32_target_ops): Update.
3775
3776 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3777
3778 Turn process_stratum_target's supports_fork_events,
3779 supports_vfork_events, and supports_exec_events ops into methods
3780 of process_target.
3781
3782 * target.h (struct process_stratum_target): Remove the target ops.
3783 (class process_target): Add the target ops.
3784 (target_supports_fork_events): Update the macro.
3785 (target_supports_vfork_events): Update the macro.
3786 (target_supports_exec_events): Update the macro.
3787 * target.cc (process_target::supports_fork_events): Define.
3788 (process_target::supports_vfork_events): Define.
3789 (process_target::supports_exec_events): Define.
3790
3791 Update the derived classes and callers below.
3792
3793 * linux-low.cc (linux_target_ops): Update.
3794 (linux_supports_fork_events): Turn into ...
3795 (linux_process_target::supports_fork_events): ... this.
3796 (linux_supports_vfork_events): Turn into ...
3797 (linux_process_target::supports_vfork_events): ... this.
3798 (linux_supports_exec_events): Turn into ...
3799 (linux_process_target::supports_exec_events): ... this.
3800 * linux-low.h (class linux_process_target): Update.
3801 * lynx-low.cc (lynx_target_ops): Update.
3802 * nto-low.cc (nto_target_ops): Update.
3803 * win32-low.cc (win32_target_ops): Update.
3804
3805 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3806
3807 Turn process_stratum_target's supports_multi_process op into a
3808 method of process_target.
3809
3810 * target.h (struct process_stratum_target): Remove the target op.
3811 (class process_target): Add the target op.
3812 * target.cc (process_target::supports_multi_process): Define.
3813 (target_supports_multi_process): Update.
3814
3815 Update the derived classes and callers below.
3816
3817 * linux-low.cc (linux_target_ops): Update.
3818 (linux_supports_multi_process): Turn into ...
3819 (linux_process_target::supports_multi_process): ... this.
3820 * linux-low.h (class linux_process_target): Update.
3821 * lynx-low.cc (lynx_target_ops): Update.
3822 * nto-low.cc (nto_target_ops): Update.
3823 * win32-low.cc (win32_target_ops): Update.
3824
3825 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3826
3827 Turn process_stratum_target's supports_non_stop, async, and
3828 start_non_stop ops into methods of process_target.
3829
3830 * target.h (struct process_stratum_target): Remove the target ops.
3831 (class process_target): Add the target ops.
3832 (target_supports_non_stop): Update the macro.
3833 (target_async): Update the macro.
3834 (start_non_stop): Remove declaration.
3835 * target.cc (process_target::supports_non_stop): Define.
3836 (process_target::async): Define.
3837 (process_target::start_non_stop): Define.
3838 (start_non_stop): Remove.
3839
3840 Update the derived classes and callers below.
3841
3842 * server.cc (handle_qxfer_siginfo): Update.
3843 (handle_query): Update.
3844 * linux-low.cc (linux_target_ops): Update.
3845 (linux_supports_non_stop): Turn into ...
3846 (linux_process_target::supports_non_stop): ... this.
3847 (linux_async): Turn into ...
3848 (linux_process_target::async): ... this.
3849 (linux_start_non_stop): Turn into ...
3850 (linux_process_target::start_non_stop): ... this.
3851 * linux-low.h (class linux_process_target): Update.
3852 * lynx-low.cc (lynx_target_ops): Update.
3853 * nto-low.cc (nto_target_ops): Update.
3854 (nto_supports_non_stop): Remove; rely on the default behavior
3855 instead.
3856 * win32-low.cc (win32_target_ops): Update.
3857
3858 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3859
3860 Turn process_stratum_target's qxfer_siginfo op into a method of
3861 process_target.
3862
3863 * target.h (struct process_stratum_target): Remove the target op.
3864 (class process_target): Add the target op. Also add
3865 'supports_qxfer_siginfo'.
3866 * target.cc (process_target::qxfer_siginfo): Define.
3867 (process_target::supports_qxfer_siginfo): Define.
3868
3869 Update the derived classes and callers below.
3870
3871 * server.cc (handle_qxfer_siginfo): Update.
3872 (handle_query): Update.
3873 * linux-low.cc (linux_target_ops): Update.
3874 (linux_process_target::supports_qxfer_siginfo): Define.
3875 (linux_xfer_siginfo): Turn into ...
3876 (linux_process_target::qxfer_siginfo): ... this.
3877 * linux-low.h (class linux_process_target): Update.
3878 * lynx-low.cc (lynx_target_ops): Update.
3879 * nto-low.cc (nto_target_ops): Update.
3880 * win32-low.cc (win32_target_ops): Update.
3881
3882 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3883
3884 Turn process_stratum_target's qxfer_osdata op into a method of
3885 process_target.
3886
3887 * target.h (struct process_stratum_target): Remove the target op.
3888 (class process_target): Add the target op. Also add
3889 'supports_qxfer_osdata'.
3890 * target.cc (process_target::qxfer_osdata): Define.
3891 (process_target::supports_qxfer_osdata): Define.
3892
3893 Update the derived classes and callers below.
3894
3895 * server.cc (handle_qxfer_osdata): Update.
3896 (handle_query): Update.
3897 * linux-low.cc (linux_target_ops): Update.
3898 (linux_process_target::supports_qxfer_osdata): Define.
3899 (linux_qxfer_osdata): Turn into ...
3900 (linux_process_target::qxfer_osdata): ... this.
3901 * linux-low.h (class linux_process_target): Update.
3902 * lynx-low.cc (lynx_target_ops): Update.
3903 * nto-low.cc (nto_target_ops): Update.
3904 * win32-low.cc (win32_target_ops): Update.
3905
3906 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3907
3908 Turn process_stratum_target's hostio_last_error op into a
3909 method of process_target.
3910
3911 * target.h (struct process_stratum_target): Remove the target op.
3912 (class process_target): Add the target op.
3913 * target.cc: Add "hostio.h" to includes.
3914 (process_target::hostio_last_error): Define.
3915
3916 Update the derived classes and callers below.
3917
3918 * hostio.cc (hostio_error): Update.
3919 * linux-low.cc: Remove "hostio.h" from includes.
3920 (linux_target_ops): Update.
3921 * lynx-low.cc (lynx_target_ops): Update.
3922 * nto-low.cc (nto_target_ops): Update.
3923 * win32-low.h (class win32_process_target): Update.
3924 * win32-low.cc (win32_target_ops): Update.
3925 (wince_hostio_last_error): Turn into ...
3926 (win32_process_target::hostio_last_error): ... this.
3927
3928 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3929
3930 Turn process_stratum_target's get_tls_address op into a method of
3931 process_target.
3932
3933 * target.h (struct process_stratum_target): Remove the target op.
3934 (class process_target): Add the target op. Also add
3935 'supports_get_tls_address'.
3936 * target.cc (process_target::get_tls_address): Define.
3937 (process_target::supports_get_tls_address): Define.
3938
3939 Update the derived classes and callers below.
3940
3941 * server.cc (handle_query): Update.
3942 * linux-low.cc (linux_target_ops): Update.
3943 (linux_process_target::supports_get_tls_address): Define.
3944 (linux_process_target::get_tls_address): Define.
3945 * linux-low.h (class linux_process_target): Update.
3946 * lynx-low.cc (lynx_target_ops): Update.
3947 * nto-low.cc (nto_target_ops): Update.
3948 * win32-low.cc (win32_target_ops): Update.
3949
3950 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3951
3952 Turn process_stratum_target's read_offsets op into a method of
3953 process_target.
3954
3955 * target.h (struct process_stratum_target): Remove the target op.
3956 (class process_target): Add the target op. Also add
3957 'supports_read_offsets'.
3958 * target.cc (process_target::read_offsets): Define.
3959 (process_target::supports_read_offsets): Define.
3960
3961 Update the derived classes and callers below.
3962
3963 * server.cc (handle_query): Update.
3964 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3965 (linux_target_ops): Update.
3966 (linux_process_target::supports_read_offsets): Define.
3967 (linux_read_offsets): Turn into ...
3968 (linux_process_target::read_offsets): ... this.
3969 * linux-low.h (class linux_process_target): Update.
3970 * lynx-low.cc (lynx_target_ops): Update.
3971 * nto-low.cc (nto_target_ops): Update.
3972 * win32-low.cc (win32_target_ops): Update.
3973
3974 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3975
3976 Turn process_stratum_target's stopped_by_watchpoint and
3977 stopped_data_address ops into methods of process_target.
3978
3979 * target.h (struct process_stratum_target): Remove the target ops.
3980 (class process_target): Add the target ops.
3981 * target.cc (process_target::stopped_by_watchpoint): Define.
3982 (process_target::stopped_data_address): Define.
3983
3984 Update the derived classes and callers below.
3985
3986 * remote-utils.cc (prepare_resume_reply): Update.
3987 * linux-low.cc (linux_target_ops): Update.
3988 (linux_stopped_by_watchpoint): Turn into ...
3989 (linux_process_target::stopped_by_watchpoint): ... this.
3990 (linux_stopped_data_address): Turn into ...
3991 (linux_process_target::stopped_data_address): ... this.
3992 * linux-low.h (class linux_process_target): Update.
3993 * lynx-low.cc (lynx_target_ops): Update.
3994 * nto-low.cc (nto_target_ops): Update.
3995 (nto_stopped_by_watchpoint): Turn into ...
3996 (nto_process_target::stopped_by_watchpoint): ... this.
3997 (nto_stopped_data_address): Turn into ...
3998 (nto_process_target::stopped_data_address): ... this.
3999 * nto-low.h (class nto_process_target): Update.
4000 * win32-low.cc (win32_target_ops): Update.
4001 (win32_stopped_by_watchpoint): Turn into ...
4002 (win32_process_target::stopped_by_watchpoint): ... this.
4003 (win32_stopped_data_address): Turn into ...
4004 (win32_process_target::stopped_data_address): ... this.
4005 * win32-low.h (class win32_process_target): Update.
4006
4007 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4008
4009 Turn process_stratum_target's supports_hardware_single_step op into
4010 a method of process_target.
4011
4012 * target.h (struct process_stratum_target): Remove the target op.
4013 (class process_target): Add the target op.
4014 (target_supports_hardware_single_step): Update the macro.
4015 (target_can_do_hardware_single_step): Remove declaration.
4016 * target.cc (process_target::supports_hardware_single_step): Define.
4017 (target_can_do_hardware_single_step): Remove.
4018
4019 Update the derived classes and callers below.
4020
4021 * linux-low.h (class linux_process_target): Update.
4022 * linux-low.cc (linux_target_ops): Update.
4023 (linux_supports_hardware_single_step): Turn into ...
4024 (linux_process_target::supports_hardware_single_step): ... this.
4025 * lynx-low.h (class lynx_process_target): Update.
4026 * lynx-low.cc (lynx_target_ops): Update.
4027 (lynx_process_target::supports_hardware_single_step): Define.
4028 * nto-low.h (class nto_process_target): Update.
4029 * nto-low.cc (nto_target_ops): Update.
4030 (nto_process_target::supports_hardware_single_step): Define.
4031 * win32-low.h (class win32_process_target): Update.
4032 * win32-low.cc (win32_target_ops): Update.
4033 (win32_process_target::supports_hardware_single_step): Define.
4034
4035 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4036
4037 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
4038 ops into methods of process_target.
4039
4040 * target.h (struct process_stratum_target): Remove the target ops.
4041 (class process_target): Add the target ops.
4042 (target_stopped_by_hw_breakpoint): Update the macro.
4043 (target_supports_stopped_by_hw_breakpoint): Update the macro.
4044 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
4045 (process_target::supports_stopped_by_hw_breakpoint): Define.
4046
4047 Update the derived classes and callers below.
4048
4049 * linux-low.cc (linux_target_ops): Update.
4050 (linux_stopped_by_hw_breakpoint): Turn into ...
4051 (linux_process_target::stopped_by_hw_breakpoint): ... this.
4052 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
4053 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
4054 * linux-low.h (class linux_process_target): Update.
4055 * lynx-low.cc (lynx_target_ops): Update.
4056 * nto-low.cc (nto_target_ops): Update.
4057 * win32-low.cc (win32_target_ops): Update.
4058
4059 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4060
4061 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
4062 ops into methods of process_target.
4063
4064 * target.h (struct process_stratum_target): Remove the target ops.
4065 (class process_target): Add the target ops.
4066 (target_stopped_by_sw_breakpoint): Update the macro.
4067 (target_supports_stopped_by_sw_breakpoint): Update the macro.
4068 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
4069 (process_target::supports_stopped_by_sw_breakpoint): Define.
4070
4071 Update the derived classes and callers below.
4072
4073 * linux-low.cc (linux_target_ops): Update.
4074 (linux_stopped_by_sw_breakpoint): Turn into ...
4075 (linux_process_target::stopped_by_sw_breakpoint): ... this.
4076 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
4077 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
4078 * linux-low.h (class linux_process_target): Update.
4079 * lynx-low.cc (lynx_target_ops): Update.
4080 * nto-low.cc (nto_target_ops): Update.
4081 * win32-low.cc (win32_target_ops): Update.
4082
4083 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4084
4085 Turn process_stratum_target's insert_point and remove_point ops
4086 into methods of process_target.
4087
4088 * target.h (struct process_stratum_target): Remove the target ops.
4089 (class process_target): Add the target ops.
4090 * target.cc (process_target::insert_point): Define.
4091 (process_target::remove_point): Define.
4092
4093 Update the derived classes and callers below.
4094
4095 * mem-break.cc (set_raw_breakpoint_at): Update.
4096 (delete_raw_breakpoint): Update.
4097 (uninsert_raw_breakpoint): Update.
4098 (reinsert_raw_breakpoint): Update.
4099 * linux-low.cc (linux_target_ops): Update.
4100 (linux_insert_point): Turn into ...
4101 (linux_process_target::insert_point): ... this.
4102 (linux_remove_point): Turn into ...
4103 (linux_process_target::remove_point): ... this.
4104 * linux-low.h (class linux_process_target): Update.
4105 * lynx-low.cc (lynx_target_ops): Update.
4106 * nto-low.cc (nto_target_ops): Update.
4107 (nto_insert_point): Turn into ...
4108 (nto_process_target::insert_point): ... this.
4109 (nto_remove_point): Turn into ...
4110 (nto_process_target::remove_point): ... this.
4111 * nto-low.h (class nto_process_target): Update.
4112 * win32-low.cc (win32_target_ops): Update.
4113 (win32_insert_point): Turn into ...
4114 (win32_process_target::insert_point): ... this.
4115 (win32_remove_point): Turn into ...
4116 (win32_process_target::remove_point): ... this.
4117 * win32-low.h (class win32_process_target): Update.
4118
4119 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4120
4121 Turn process_stratum_target's supports_z_point_type op into a
4122 method of process_target.
4123
4124 * target.h (struct process_stratum_target): Remove the target op.
4125 (class process_target): Add the target op.
4126 * target.cc (process_target::supports_z_point_type): Define.
4127
4128 Update the derived classes and callers below.
4129
4130 * mem-break.cc (z_type_supported): Update.
4131 * linux-low.cc (linux_target_ops): Update.
4132 (linux_supports_z_point_type): Turn into ...
4133 (linux_process_target::supports_z_point_type): ... this.
4134 * linux-low.h (class linux_process_target): Update.
4135 * lynx-low.cc (lynx_target_ops): Update.
4136 * nto-low.cc (nto_target_ops): Update.
4137 (nto_supports_z_point_type): Turn into ...
4138 (nto_process_target::supports_z_point_type): ... this.
4139 * nto-low.h (class nto_process_target): Update.
4140 * win32-low.cc (win32_target_ops): Update.
4141 (win32_supports_z_point_type): Turn into ...
4142 (win32_process_target::supports_z_point_type): ... this.
4143 * win32-low.h (class win32_process_target): Update.
4144
4145 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4146
4147 Turn process_stratum_target's read_auxv op into a method of
4148 process_target.
4149
4150 * target.h (class process_stratum_target): Remove the target op.
4151 (struct process_target): Add the target op. Also add
4152 'supports_read_auxv'.
4153 * target.cc (process_target::read_auxv): Define.
4154 (process_target::supports_read_auxv): Define.
4155
4156 Update the derived classes and callers below.
4157
4158 * server.cc (handle_qxfer_auxv): Update.
4159 (handle_query): Update.
4160 * linux-low.cc (linux_target_ops): Update.
4161 (linux_process_target::supports_read_auxv): Define.
4162 (linux_read_auxv): Turn into ...
4163 (linux_process_target::read_auxv): ... this.
4164 * linux-low.h (class linux_process_target): Update.
4165 * lynx-low.cc (lynx_target_ops): Update.
4166 * nto-low.cc (nto_target_ops): Update.
4167 (nto_process_target::supports_read_auxv): Define.
4168 (nto_read_auxv): Turn into ...
4169 (nto_process_target::read_auxv): ... this.
4170 * nto-low.h (class nto_process_target): Update.
4171 * win32-low.cc (win32_target_ops): Update.
4172
4173 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4174
4175 Turn process_stratum_target's request_interrupt op into a method of
4176 process_target.
4177
4178 * target.h (struct process_stratum_target): Remove the target op.
4179 (class process_target): Add the target op.
4180
4181 Update the derived classes and callers below.
4182
4183 * remote-utils.cc (putpkt_binary_1): Update.
4184 (input_interrupt): Update.
4185 (getpkt): Update.
4186 * server.cc (handle_v_requests): Update.
4187 * linux-low.cc (linux_target_ops): Update.
4188 (linux_request_interrupt): Turn into ...
4189 (linux_process_target::request_interrupt): ... this.
4190 * linux-low.h (class linux_process_target): Update.
4191 * lynx-low.cc (lynx_target_ops): Update.
4192 (lynx_request_interrupt): Turn into ...
4193 (lynx_process_target::request_interrupt): ... this.
4194 * lynx-low.h (class lynx_process_target): Update.
4195 * nto-low.cc (nto_target_ops): Update.
4196 (nto_request_interrupt): Turn into ...
4197 (nto_process_target::request_interrupt): ... this.
4198 * nto-low.h (class nto_process_target): Update.
4199 * win32-low.cc (win32_target_ops): Update.
4200 (win32_request_interrupt): Turn into ...
4201 (win32_process_target::request_interrupt): ... this.
4202 * win32-low.h (class win32_process_target): Update.
4203
4204 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4205
4206 Turn process_stratum_target's look_up_symbols op into a method of
4207 process_target.
4208
4209 * target.h (struct process_stratum_target): Remove the target op.
4210 (class process_target): Add the target op.
4211 * target.cc (process_target::look_up_symbols): Define.
4212
4213 Update the derived classes and callers below.
4214
4215 * server.cc (handle_query): Update.
4216 * linux-low.cc (linux_target_ops): Update.
4217 (linux_look_up_symbols): Turn into ...
4218 (linux_process_target::look_up_symbols): ... this.
4219 * linux-low.h (class linux_process_target): Update.
4220 * lynx-low.cc (lynx_target_ops): Update.
4221 * nto-low.cc (nto_target_ops): Update.
4222 * win32-low.cc (win32_target_ops): Update.
4223
4224 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4225
4226 Turn process_stratum_target's read_memory and write_memory
4227 ops into methods of process_target.
4228
4229 * target.h (struct process_stratum_target): Remove the target ops.
4230 (class process_target): Add the target ops.
4231
4232 Update the derived classes and callers below.
4233
4234 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
4235 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
4236 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
4237 (arm_get_syscall_trapinfo): Update.
4238 * linux-cris-low.cc (cris_breakpoint_at): Update.
4239 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
4240 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
4241 * linux-mips-low.cc (mips_breakpoint_at): Update.
4242 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
4243 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
4244 * linux-sh-low.cc (sh_breakpoint_at): Update.
4245 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
4246 (sparc_store_gregset_from_stack): Update.
4247 (sparc_breakpoint_at): Update.
4248 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
4249 * linux-tile-low.cc (tile_breakpoint_at): Update.
4250 * linux-x86-low.cc (x86_breakpoint_at): Update.
4251 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
4252 * mem-brea.cc (insert_memory_breakpoint): Update.
4253 (validate_inserted_breakpoint): Update.
4254 * target.cc (read_inferior_memory): Update.
4255 (target_write_memory): Update.
4256 * linux-low.cc (linux_target_ops): Update.
4257 (linux_read_memory): Make a wrapper around the read_memory target
4258 op call.
4259 (linux_process_target::read_memory): Rename from linux_read_memory.
4260 (linux_write_memory): Turn into ...
4261 (linux_process_target::write_memory): ... this.
4262 * linux-low.h (class linux_process_target): Update.
4263 * lynx-low.cc (lynx_target_ops): Update.
4264 (lynx_read_memory): Turn into ...
4265 (lynx_process_target::read_memory): ... this.
4266 (lynx_write_memory): Turn into ...
4267 (lynx_process_target::write_memory): ... this.
4268 * lynx-low.h (class lynx_process_target): Update.
4269 * nto-low.cc (nto_target_ops): Update.
4270 (nto_read_memory): Turn into ...
4271 (nto_process_target::read_memory): ... this.
4272 (nto_write_memory): Turn into ...
4273 (nto_process_target::write_memory): ... this.
4274 * nto-low.h (class nto_process_target): Update.
4275 * win32-low.cc (win32_target_ops): Update.
4276 (win32_read_inferior_memory): Turn into ...
4277 (win32_process_target::read_memory): ... this.
4278 (win32_write_inferior_memory): Turn into ...
4279 (win32_process_target::write_memory): ... this.
4280 * win32-low.h (class win32_process_target): Update.
4281
4282 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4283
4284 Turn process_stratum_target's prepare_to_access_memory and
4285 done_accessing_memory ops into methods of process_target.
4286
4287 * target.h (struct process_stratum_target): Remove the target ops.
4288 (class process_target): Add the target ops.
4289 * target.cc (process_target::prepare_to_access_memory): Define.
4290 (process_target::done_accessing_memory): Define.
4291 (prepare_to_access_memory): Update.
4292 (done_accessing_memory): Update.
4293
4294 Update the derived classes and callers below.
4295
4296 * linux-low.cc (linux_target_ops): Update.
4297 (linux_prepare_to_access_memory): Turn into ...
4298 (linux_process_target::prepare_to_access_memory): ... this.
4299 (linux_done_accessing_memory): Turn into ...
4300 (linux_process_target::done_accessing_memory): ... this.
4301 * linux-low.h (class linux_process_target): Update.
4302 * lynx-low.cc (lynx_target_ops): Update.
4303 * nto-low.cc (nto_target_ops): Update.
4304 * win32-low.cc (win32_target_ops): Update.
4305
4306 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4307
4308 Turn process_stratum_target's fetch_registers and store_registers
4309 ops into methods of process_target.
4310
4311 * target.h (struct process_stratum_target): Remove the target ops.
4312 (class process_target): Add the target ops.
4313 (fetch_inferior_registers): Update the macro.
4314 (store_inferior_registers): Update the macro.
4315
4316 Update the derived classes and callers below.
4317
4318 * linux-low.cc (linux_target_ops): Update.
4319 (linux_fetch_registers): Turn into ...
4320 (linux_process_target::fetch_registers): ... this.
4321 (linux_store_registers): Turn into ...
4322 (linux_process_target::store_registers): ... this.
4323 * linux-low.h (class linux_process_target): Update.
4324 * lynx-low.cc (lynx_target_ops): Update.
4325 (lynx_fetch_registers): Turn into ...
4326 (lynx_process_target::fetch_registers): ... this.
4327 (lynx_store_registers): Turn into ...
4328 (lynx_process_target::store_registers): ... this.
4329 * lynx-low.h (class lynx_process_target): Update.
4330 * nto-low.cc (nto_target_ops): Update.
4331 (nto_fetch_registers): Turn into ...
4332 (nto_process_target::fetch_registers): ... this.
4333 (nto_store_registers): Turn into ...
4334 (nto_process_target::store_registers): ... this.
4335 * nto-low.h (class nto_process_target): Update.
4336 * win32-low.cc (win32_target_ops): Update.
4337 (win32_fetch_inferior_registers): Turn into ...
4338 (win32_process_target::fetch_registers): ... this.
4339 (win32_store_inferior_registers): Turn into ...
4340 (win32_process_target::store_registers): ... this.
4341 * win32-low.h (class win32_process_target): Update.
4342
4343 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4344
4345 Turn process_stratum_target's wait op into a method of
4346 process_target.
4347
4348 * target.h (struct process_stratum_target): Remove the target op.
4349 (class process_target): Add the target op.
4350
4351 Update the derived classes and callers below.
4352
4353 * target.cc (target_wait): Update.
4354 * linux-low.cc (linux_target_ops): Update.
4355 (linux_wait): Turn into ...
4356 (linux_process_target::wait): ... this.
4357 * linux-low.h (class linux_process_target): Update.
4358 * lynx-low.cc (lynx_target_ops): Update.
4359 (lynx_wait): Turn into ...
4360 (lynx_process_target::wait): ... this.
4361 * lynx-low.h (class lynx_process_target): Update.
4362 * nto-low.cc (nto_target_ops): Update.
4363 (nto_wait): Turn into ...
4364 (nto_process_target::wait): ... this.
4365 * nto-low.h (class nto_process_target): Update.
4366 * win32-low.cc (win32_target_ops): Update.
4367 (win32_wait): Turn into ...
4368 (win32_process_target::wait): ... this.
4369 (do_initial_child_stuff): Update.
4370 * win32-low.h (class win32_process_target): Update.
4371
4372 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4373
4374 Turn process_stratum_target's resume op into a method of
4375 process_target.
4376
4377 * target.h (struct process_stratum_target): Remove the target op.
4378 (class process_target): Add the target op.
4379
4380 Update the derived classes and callers below.
4381
4382 * server.cc (resume): Update.
4383 * target.cc (target_stop_and_wait): Update.
4384 (target_continue_no_signal): Update.
4385 (target_continue): Update.
4386 * linux-low.cc (linux_target_ops): Update.
4387 (linux_resume): Turn into ...
4388 (linux_process_target::resume): ... this.
4389 * linux-low.h (class linux_process_target): Update.
4390 * lynx-low.cc (lynx_target_ops): Update.
4391 (lynx_resume): Turn into ...
4392 (lynx_process_target::resume): ... this.
4393 * lynx-low.h (class lynx_process_target): Update.
4394 * nto-low.cc (nto_target_ops): Update.
4395 (nto_resume): Turn into ...
4396 (nto_process_target::resume): ... this.
4397 * nto-low.h (class nto_process_target): Update.
4398 * win32-low.cc (win32_target_ops): Update.
4399 (win32_resume): Turn into ...
4400 (win32_process_target::resume): ... this.
4401 (win32_process_target::detach): Update.
4402 (do_initial_child_stuff): Update.
4403 * win32-low.h (class win32_process_target): Update.
4404
4405 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4406
4407 Turn process_stratum_target's thread_alive op into a method of
4408 process_target.
4409
4410 * target.h (struct process_stratum_target): Remove the target op.
4411 (class process_target): Add the target op.
4412 (mythread_alive): Update the macro.
4413
4414 Update the derived classes and callers below.
4415
4416 * linux-low.cc (linux_target_ops): Update.
4417 (linux_thread_alive): Turn into ...
4418 (linux_process_target::thread_alive): ... this.
4419 (wait_for_sigstop): Update.
4420 * linux-low.h (class linux_process_target): Update.
4421 * lynx-low.cc (lynx_target_ops): Update.
4422 (lynx_thread_alive): Turn into ...
4423 (lynx_process_target::thread_alive): ... this.
4424 * lynx-low.h (class lynx_process_target): Update.
4425 * nto-low.cc (nto_target_ops): Update.
4426 (nto_thread_alive): Turn into ...
4427 (nto_process_target::thread_alive): ... this.
4428 * nto-low.h (class nto_process_target): Update.
4429 * win32-low.cc (win32_target_ops): Update.
4430 (win32_thread_alive): Turn into ...
4431 (win32_process_target::thread_alive): ... this.
4432 * win32-low.h (class win32_process_target): Update.
4433
4434 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4435
4436 Turn process_stratum_target's join op into a method of
4437 process_target.
4438
4439 * target.h (struct process_stratum_target): Remove the target op.
4440 (class process_target): Add the target op.
4441 (join_inferior): Update the macro.
4442
4443 Update the derived classes and callers below.
4444
4445 * linux-low.cc (linux_target_ops): Update.
4446 (linux_join): Turn into ...
4447 (linux_process_target::join): ... this.
4448 * linux-low.h (class linux_process_target): Update.
4449 * lynx-low.cc (lynx_target_ops): Update.
4450 (lynx_join): Turn into ...
4451 (lynx_process_target::join): ... this.
4452 * lynx-low.h (class lynx_process_target): Update.
4453 * nto-low.cc (nto_target_ops): Update.
4454 (nto_process_target::join): Define.
4455 * nto-low.h (class nto_process_target): Update.
4456 * win32-low.cc (win32_target_ops): Update.
4457 (win32_join): Turn into ...
4458 (win32_process_target::join): ... this.
4459 * win32-low.h (class win32_process_target): Update.
4460
4461 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4462
4463 Turn process_stratum_target's mourn op into a method of
4464 process_target.
4465
4466 * target.h (struct process_stratum_target): Remove the target op.
4467 (class process_target): Add the target op.
4468
4469 Update the derived classes and callers below.
4470
4471 * target.cc (target_mourn_inferior): Update.
4472 * linux-low.cc (linux_target_ops): Update.
4473 (linux_mourn): Turn into ...
4474 (linux_process_target::mourn): ... this.
4475 (handle_extended_wait): Update.
4476 (linux_process_target::kill): Update.
4477 (linux_process_target::detach): Update.
4478 * linux-low.h (class linux_process_target): Update.
4479 * lynx-low.cc (lynx_target_ops): Update.
4480 (lynx_mourn): Turn into ...
4481 (lynx_process_target::mourn): ... this.
4482 * lynx-low.h (class lynx_process_target): Update.
4483 * nto-low.cc (nto_target_ops): Update.
4484 (nto_mourn): Turn into ...
4485 (nto_process_target::mourn): ... this.
4486 * nto-low.h (class nto_process_target): Update.
4487 * win32-low.cc (win32_target_ops): Update.
4488 (win32_mourn): Turn into ...
4489 (win32_process_target::mourn): ... this.
4490 * win32-low.h (class win32_process_target): Update.
4491
4492 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4493
4494 Turn process_stratum_target's detach op into a method of
4495 process_target.
4496
4497 * target.h (struct process_stratum_target): Remove the target op.
4498 (class process_target): Add the target op.
4499 (detach_inferior): Update the macro.
4500
4501 Update the derived classes and callers below.
4502
4503 * linux-low.cc (linux_target_ops): Update.
4504 (linux_detach): Turn into ...
4505 (linux_process_target::detach): ... this.
4506 * linux-low.h (class linux_process_target): Update.
4507 * lynx-low.cc (lynx_target_ops): Update.
4508 (lynx_detach): Turn into ...
4509 (lynx_process_target::detach): ... this.
4510 * lynx-low.h (class lynx_process_target): Update.
4511 * nto-low.cc (nto_target_ops): Update.
4512 (nto_detach): Turn into ...
4513 (nto_process_target::detach): ... this.
4514 * nto-low.h (class nto_process_target): Update.
4515 * win32-low.cc (win32_target_ops): Update.
4516 (win32_detach): Turn into ...
4517 (win32_process_target::detach): ... this.
4518 * win32-low.h (class win32_process_target): Update.
4519
4520 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4521
4522 Turn process_stratum_target's kill op into a method of
4523 process_target.
4524
4525 * target.h (struct process_stratum_target): Remove the target op.
4526 (class process_target): Add the target op.
4527
4528 Update the derived classes and callers below.
4529
4530 * target.cc (kill_inferior): Update.
4531 * linux-low.cc (linux_target_ops): Update.
4532 (linux_kill): Turn into ...
4533 (linux_process_target::kill): ... this.
4534 * linux-low.h (class linux_process_target): Update.
4535 * lynx-low.cc (lynx_target_ops): Update.
4536 (lynx_kill): Turn into ...
4537 (lynx_process_target::kill): ... this.
4538 * lynx-low.h (class lynx_process_target): Update.
4539 * nto-low.cc (nto_target_ops): Update.
4540 (nto_kill): Turn into ...
4541 (nto_process_target::kill): ... this.
4542 * nto-low.h (class nto_process_target): Update.
4543 * win32-low.cc (win32_target_ops): Update.
4544 (win32_kill): Turn into ...
4545 (win32_process_target::kill): ... this.
4546 * win32-low.h (class win32_process_target): Update.
4547
4548 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4549
4550 Turn process_stratum_target's attach op into a method of
4551 process_target.
4552
4553 * target.h (struct process_stratum_target): Remove the target op.
4554 (class process_target): Add the target op.
4555 (myattach): Update the macro.
4556
4557 Update the derived classes and callers below.
4558
4559 * linux-low.cc (linux_target_ops): Update.
4560 (linux_attach): Turn into ...
4561 (linux_process_target::attach): ... this.
4562 * linux-low.h (class linux_process_target): Update.
4563 * lynx-low.cc (lynx_target_ops): Update.
4564 (lynx_attach): Turn into ...
4565 (lynx_process_target::attach): ... this.
4566 * lynx-low.h (class lynx_process_target): Update.
4567 * nto-low.cc (nto_target_ops): Update.
4568 (nto_attach): Turn into ...
4569 (nto_process_target::attach): ... this.
4570 * nto-low.h (class nto_process_target): Update.
4571 * win32-low.cc (win32_target_ops): Update.
4572 (win32_attach): Turn into ...
4573 (win32_process_target::attach): ... this.
4574 * win32-low.h (class win32_process_target): Update.
4575
4576 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4577
4578 Turn process_stratum_target's post_create_inferior op into a method
4579 of process_target.
4580
4581 * target.h (struct process_stratum_target): Remove the target op.
4582 (class process_target): Add the target op.
4583 (target_post_create_inferior): Update the macro.
4584 * target.cc (process_target::post_create_inferior): Define.
4585
4586 Update the derived classes and callers below.
4587
4588 * linux-low.cc (linux_target_ops): Update.
4589 (linux_post_create_inferior): Turn into ...
4590 (linux_process_target::post_create_inferior): ... this.
4591 * linux-low.h (class linux_process_target): Update.
4592 * lynx-low.cc (lynx_target_ops): Update.
4593 * nto-low.cc (nto_target_ops): Update.
4594 * win32-low.cc (win32_target_ops): Update.
4595
4596 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4597
4598 Turn process_stratum_target's create_inferior op into a method of
4599 process_target.
4600
4601 * target.h (struct process_stratum_target): Remove the target op.
4602 (class process_target): Add the target op.
4603 (create_inferior): Rename the macro to ...
4604 (target_create_inferior): ... this.
4605
4606 Update the derived classes and callers below.
4607
4608 * server.cc (handle_v_run): Update.
4609 (captured_main): Update.
4610 (process_serial_event): Update.
4611 * linux-low.cc (linux_target_ops): Update.
4612 (linux_create_inferior): Turn into ...
4613 (linux_process_target::create_inferior): ... this.
4614 * linux-low.h (class linux_process_target): Update.
4615 * lynx-low.cc (lynx_target_ops): Update.
4616 (lynx_create_inferior): Turn into ...
4617 (lynx_process_target::create_inferior): ... this.
4618 * lynx-low.h (class lynx_process_target): Update.
4619 * nto-low.cc (nto_target_ops): Update.
4620 (nto_create_inferior): Turn into ...
4621 (nto_process_target::create_inferior): ... this.
4622 * nto-low.h (class nto_process_target): Update.
4623 * win32-low.cc (win32_target_ops): Update.
4624 (win32_create_inferior): Turn into ...
4625 (win32_process_target::create_inferior): ... this.
4626 * win32-low.h (class win32_process_target): Update.
4627
4628 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4629
4630 * target.h (class process_target): New class definition.
4631 (struct process_stratum_target) <pt>: New field with type
4632 'process_target*'.
4633 * linux-low.h (class linux_process_target): Define as a derived
4634 class of 'process_target'.
4635 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4636 as the 'pt' field.
4637 * lynx-low.h (class lynx_process_target): Define as a derived
4638 class of 'process_target'.
4639 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4640 as the 'pt' field.
4641 * nto-low.h (class nto_process_target): Define as a derived
4642 class of 'process_target'.
4643 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4644 as the 'pt' field.
4645 * win32-low.h (class win32_process_target): Define as a derived
4646 class of 'process_target'.
4647 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4648 as the 'pt' field.
4649
4650 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4651
4652 * configure: Regenerate.
4653
4654 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4655 Andrew Burgess <andrew.burgess@embecosm.com>
4656
4657 * linux-riscv-low.cc: New file.
4658 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4659 and nat/riscv-linux-tdesc.c.
4660 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4661 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4662 Define.
4663
4664 2020-02-14 Tom Tromey <tom@tromey.com>
4665
4666 * acinclude.m4: Don't include acx_configure_dir.m4.
4667 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4668 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4669 (all, install-only, uninstall, clean-info, clean)
4670 (maintainer-clean): Don't recurse.
4671 (subdir_do, all-lib): Remove.
4672 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4673 (GNULIB_H): Remove.
4674 (generated_files): Update.
4675 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4676 * configure: Rebuild.
4677 * configure.ac: Don't configure gnulib or libiberty.
4678 (GNULIB): Update.
4679
4680 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4681
4682 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4683 preparing the command line for CreateProcess.
4684 (win32_create_inferior): Reflect the program name in debugging
4685 output that shows the process and its command line.
4686
4687 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4688
4689 * Makefile.in: Rename source files from .c to .cc.
4690 * %.c: Rename to %.cc.
4691 * configure.ac: Rename server.c to server.cc.
4692 * configure: Re-generate.
4693
4694 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4695
4696 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4697
4698 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4699
4700 * win32-low.c (win32_create_inferior): Set signal_pid.
4701
4702 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4703 Pedro Alves <palves@redhat.com>
4704
4705 Skip building gdbserver in a cross-configuration.
4706 * configure.srv: Set $gdbserver_host depending on whether $target
4707 is $host. Use $gdbserver_host instead of $host.
4708
4709 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4710
4711 * configure: Re-generate.
4712
4713 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4714
4715 * configure: Re-generate.
4716
4717 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4718
4719 * acinclude.m4: Update warning.m4 path.
4720
4721 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4722
4723 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4724 (handle_exception): Set siginfo_er.
4725 (win32_xfer_siginfo): New function.
4726
4727 2020-02-07 Tom Tromey <tom@tromey.com>
4728 Pedro Alves <palves@redhat.com>
4729
4730 * README: Update build documentation.
4731 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4732 host, not target.
4733 * configure.ac: Update paths.
4734 * configure: Rebuild.
4735 * acinclude.m4: Update paths.
4736 * Makefile.in: Update include paths.
4737 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4738 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4739 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4740 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4741 (%-generated.c): Update paths.
4742 * Move entire directory from ../gdb/gdbserver.
4743
4744 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4745
4746 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4747
4748 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4749
4750 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4751 assignment instead of srv_linux_obj.
4752
4753 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4754
4755 * server.c (handle_qxfer_libraries): Write segment-address with
4756 paddress.
4757
4758 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4759
4760 * Makefile.in (install-strip): New target.
4761 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4762 * aclocal.m4: Regenerate.
4763 * configure: Regenerate.
4764 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4765
4766 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4767
4768 * Makefile.in (SFILES): Adjust paths to point to real files.
4769 (OBS): Move waitstatus.o to target/waitstatus.o.
4770 (TAGS): Transform paths appropriately.
4771 (%.o): Rename to...
4772 (nat/%.o): ... this pattern rule.
4773 (%.o): Rename to...
4774 (target/%.o): ... this pattern rule.
4775 * configure.srv: Adjust paths throughout to include nat/ prefix
4776 with the revant files.
4777 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4778 * configure: Regenerate.
4779
4780 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4781
4782 * Makefile.in (TAGS): Remove config files from the recipe.
4783
4784 2020-01-14 Tom Tromey <tom@tromey.com>
4785
4786 * configure: Rebuild.
4787 * configure.ac: Remove any checks that were added to common.m4.
4788 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4789 lib-link.m4.
4790
4791 2020-01-14 Tom Tromey <tom@tromey.com>
4792
4793 * server.h: Include config.h.
4794 * gdbreplay.c: Include config.h.
4795 * configure: Rebuild.
4796 * configure.ac: Don't source common.host.
4797 * acinclude.m4: Update path.
4798 * Makefile.in (INCSUPPORT): New variable.
4799 (INCLUDE_CFLAGS): Add INCSUPPORT.
4800 (SFILES): Update paths.
4801 (version-generated.c): Update path to create-version.sh.
4802 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4803
4804 2020-01-14 Tom Tromey <tom@tromey.com>
4805
4806 * configure.ac (LIBS): Use WIN32APILIBS.
4807 (USE_WIN32API): Don't define.
4808 * configure: Rebuild.
4809
4810 2020-01-14 Tom Tromey <tom@tromey.com>
4811
4812 * configure: Rebuild.
4813
4814 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4815
4816 * Makefile.in (%-generated.c): Remove rule for files from
4817 regformats/i386.
4818
4819 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4820
4821 * configure: Re-generate.
4822
4823 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4824
4825 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4826 Define to static.
4827 * tracepoint.c (stop_tracing, flush_trace_buffer,
4828 about_to_request_buffer_space, get_trace_state_variable_value,
4829 set_trace_state_variable_value, gdb_collect): Add declaration.
4830
4831 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4832
4833 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4834 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4835 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4836 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4837 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4838 static.
4839
4840 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4841
4842 * inferiors.c: Include gdbsupport/common-inferior.h.
4843
4844 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4845
4846 * hostio-errno.c: Include hostio.h.
4847
4848 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4849
4850 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4851 prerequisite.
4852
4853 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4854
4855 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4856 * linux-arm-tdesc.h: Include arch/arm.h.
4857
4858 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4859
4860 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4861
4862 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4863
4864 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4865 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4866
4867 2020-01-10 Pedro Alves <palves@redhat.com>
4868
4869 * fork-child.c (post_fork_inferior): Pass target down to
4870 startup_inferior.
4871 * inferiors.c (switch_to_thread): Add process_stratum_target
4872 parameter.
4873 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4874 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4875 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4876 * remote-utils.c (prepare_resume_reply): Pass the target to
4877 switch_to_thread.
4878 * target.c (the_target): Now a process_stratum_target.
4879 (done_accessing_memory): Pass the target to switch_to_thread.
4880 (set_target_ops): Ajust to use process_stratum_target.
4881 * target.h (struct target_ops): Rename to ...
4882 (struct process_stratum_target): ... this.
4883 (the_target, set_target_ops): Adjust.
4884 (prepare_to_access_memory): Adjust comment.
4885 * win32-low.c (child_xfer_memory): Adjust to use
4886 process_stratum_target.
4887 (win32_target_ops): Now a process_stratum_target.
4888
4889 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4890 Pedro Alves <palves@redhat.com>
4891
4892 * win32-low.c (get_child_debug_event): Extract the fatal exception
4893 from the exit status and convert to the equivalent Posix signal
4894 number.
4895 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4896 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4897
4898 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4899
4900 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4901
4902 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4903
4904 * server.c (gdbserver_version): Change copyright year to 2020.
4905 * gdbreplay.c (gdbreplay_version): Likewise.
4906
4907 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4908
4909 * configure: Regenerate.
4910 * configure.ac: Quote variable arguments of test.
4911
4912 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4913
4914 * Makefile.in: Fix build with GNU Make 3.81
4915
4916 2019-12-16 Tom Tromey <tromey@adacore.com>
4917
4918 * server.c (get_exec_file): Constify result.
4919
4920 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4921
4922 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4923 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4924 * config.in: Regenerate.
4925 * configure: Regenerate.
4926 * configure.ac: Don't check for strerror.
4927 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4928 Call safe_strerror instead of strerror.
4929 * server.h (strerror): Remove this now-unnecessary declaration.
4930 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4931 strerror.
4932 (gdb_agent_helper_thread): Likewise.
4933 * utils.c (perror_with_name): Likewise.
4934
4935 2019-11-26 Tom Tromey <tom@tromey.com>
4936
4937 * configure, config.in: Rebuild.
4938
4939 2019-11-26 Tom Tromey <tom@tromey.com>
4940
4941 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4942 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4943 gdb_sigmask.
4944 * configure, config.in: Rebuild.
4945
4946 2019-11-26 Tom Tromey <tom@tromey.com>
4947
4948 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4949 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4950 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4951 * acinclude.m4: Include ax_pthread.m4.
4952 * config.in, configure: Rebuild.
4953
4954 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4955
4956 * debug.c (debug_set_output): Call safe_strerror instead of
4957 strerror.
4958 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4959 (linux_kill_one_lwp): Likewise.
4960 (linux_detach_one_lwp): Likewise.
4961 (linux_wait_for_event_filtered): Likewise.
4962 (store_register): Likewise.
4963 * lynx-low.c (lynx_attach): Likewise.
4964 * mem-break.c (insert_memory_breakpoint): Likewise.
4965 (remove_memory_breakpoint): Likewise.
4966 (delete_fast_tracepoint_jump): Likewise.
4967 (set_fast_tracepoint_jump): Likewise.
4968 (uninsert_fast_tracepoint_jumps_at): Likewise.
4969 (reinsert_fast_tracepoint_jumps_at): Likewise.
4970 * nto-low.c (nto_xfer_memory): Likewise.
4971 (nto_resume): Likewise.
4972
4973 2019-11-20 Luis Machado <luis.machado@linaro.org>
4974
4975 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4976 instead of register count.
4977 * tdesc.c (tdesc_contains_feature): New function.
4978 * tdesc.h (tdesc_contains_feature): New prototype.
4979
4980 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4981
4982 * Makefile.in: Add safe-strerror.c.
4983 * configure: Regenerate.
4984 * configure.ac: Don't source common.host.
4985
4986 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4987
4988 * config.in: Regenerate.
4989 * configure: Regenerate.
4990
4991 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4992
4993 * ax.c (ax_printf): Handle size_t_arg.
4994
4995 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4996
4997 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4998 * mi/mi-main.c (output_cores): Likewise.
4999 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
5000 (linux_xfer_osdata_modules): Likewise.
5001 * remote.c (register_remote_support_xml): Likewise.
5002 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
5003 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
5004
5005 2019-11-01 Christian Biesinger <cbiesinger@google.com>
5006
5007 * configure: Regenerate.
5008 * configure.ac: Remove check for strerror_r.
5009
5010 2019-10-31 Christian Biesinger <cbiesinger@google.com>
5011
5012 * config.in: Regenerate.
5013 * configure: Regenerate.
5014 * configure.ac: Also check for strerror_r.
5015
5016 2019-10-31 Christian Biesinger <cbiesinger@google.com>
5017
5018 * ax.h (debug_agent): Remove duplicate declaration.
5019
5020 2019-10-26 Tom de Vries <tdevries@suse.de>
5021
5022 * linux-aarch64-low.c: Fix typos in comments.
5023 * linux-arm-low.c: Same.
5024 * linux-low.c: Same.
5025 * linux-ppc-low.c: Same.
5026 * proc-service.c: Same.
5027 * regcache.h: Same.
5028 * server.c: Same.
5029 * tracepoint.c: Same.
5030 * win32-low.c: Same.
5031
5032 2019-10-25 Tom Tromey <tromey@adacore.com>
5033
5034 * utils.c (xstrdup): Remove.
5035
5036 2019-10-23 Tom Tromey <tom@tromey.com>
5037
5038 * configure, config.in: Rebuild.
5039
5040 2019-10-23 Tom Tromey <tom@tromey.com>
5041
5042 * configure: Rebuild.
5043 * acinclude.m4: Use m4_include, not sinclude.
5044
5045 2019-10-17 Tom Tromey <tromey@adacore.com>
5046
5047 * configure: Rebuild.
5048 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
5049 in AC_CONFIG_FILES invocation.
5050 * Makefile.in (stamp-h, Makefile): Use new-style config.status
5051 invocation.
5052
5053 2019-10-16 Christian Biesinger <cbiesinger@google.com>
5054
5055 * server.c: Include xml-builtin.h.
5056 (get_xml_features): Don't declare xml_builtins here.
5057
5058 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
5059
5060 * Makefile.in: Remove references to vec-ipa.o.
5061
5062 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
5063
5064 * Makefile.in: Remove references to vec.c.
5065
5066 2019-10-02 Christian Biesinger <cbiesinger@google.com>
5067
5068 * server.c (server_waiting): Change to bool.
5069 (extended_protocol): Likewise.
5070 (response_needed): Likewise.
5071 (exit_requested): Likewise.
5072 (run_once): Likewise.
5073 (report_no_resumed): Likewise.
5074 (non_stop): Likewise.
5075 (disable_packet_vCont): Likewise.
5076 (disable_packet_Tthread): Likewise.
5077 (disable_packet_qC): Likewise.
5078 (disable_packet_qfThreadInfo): Likewise.
5079 (handle_general_set): Update.
5080 (handle_detach): Update.
5081 (handle_monitor_command): Update.
5082 (handle_query): Update.
5083 (captured_main): Update.
5084 (process_serial_event): Update.
5085 * server.h (server_waiting): Change to bool.
5086 (disable_packet_vCont): Likewise.
5087 (disable_packet_Tthread): Likewise.
5088 (disable_packet_qC): Likewise.
5089 (disable_packet_qfThreadInfo): Likewise.
5090 (run_once): Likewise.
5091 (non_stop): Likewise.
5092 * target.c (target_stop_and_wait): Update.
5093
5094 2019-10-02 Tom Tromey <tromey@adacore.com>
5095
5096 * Makefile.in (SFILES): Add common-inferior.c.
5097 (OBS): Add common-inferior.o.
5098 * server.c (startup_with_shell): Don't define.
5099
5100 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
5101
5102 * linux-low.c (linux_low_read_btrace): Update for change to
5103 std::vector.
5104
5105 2019-09-20 Christian Biesinger <cbiesinger@google.com>
5106
5107 * debug.c (debug_threads): Remove comment in favor of the header.
5108 * debug.h (using_threads): Add declaration.
5109 (debug_threads): Add comment.
5110 * linux-aarch64-low.c: Include debug.h and remove declaration of
5111 debug_threads.
5112 * nto-low.c: Likewise.
5113 * remote-utils.c: Likewise.
5114 * thread-db.c: Likewise.
5115
5116 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
5117
5118 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
5119 and powerpc-cell64l-ipa.o.
5120 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
5121 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
5122 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
5123 (spu*-*-*): Remove.
5124
5125 * spu-low.c: Remove file.
5126
5127 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
5128 (parse_spufs_run): Remove.
5129 (ppc_get_pc): Remove Cell/B.E. support.
5130 (ppc_set_pc): Likewise.
5131 (ppc_breakpoint_at): Likewise.
5132 (ppc_arch_setup): Likewise.
5133 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
5134 tdesc_powerpc_cell32l.
5135 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
5136 or init_registers_powerpc_cell32l.
5137 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
5138 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
5139 or init_registers_powerpc_cell32l.
5140 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
5141 (init_registers_powerpc_cell32l): Remove prototype.
5142 (init_registers_powerpc_cell64l): Likewise.
5143
5144 * target.h (struct target_ops): Remove qxfer_spu member.
5145 * server.c (handle_qxfer_spu): Remove.
5146 (qxfer_packets): Remove entry for "spu".
5147 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
5148 * linux-low.c (SPUFS_MAGIC): Remove.
5149 (spu_enumerate_spu_ids): Remove.
5150 (linux_qxfer_spu): Remove.
5151 (linux_target_ops): Remove qxfer_spu member.
5152 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
5153 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
5154 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
5155
5156 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
5157
5158 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
5159 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
5160 * config.in: Regenerate.
5161 * configure: Regenerate.
5162
5163 2019-08-15 Tom Tromey <tromey@adacore.com>
5164
5165 * target.c (target_write_memory): Use gdb::byte_vector.
5166
5167 2019-08-15 Tom Tromey <tromey@adacore.com>
5168
5169 * tracepoint.c (write_inferior_data_pointer)
5170 (write_inferior_integer, write_inferior_int8)
5171 (write_inferior_uinteger, m_tracepoint_action_download)
5172 (r_tracepoint_action_download, x_tracepoint_action_download)
5173 (l_tracepoint_action_download, clear_inferior_trace_buffer)
5174 (download_agent_expr, download_tracepoint_1)
5175 (download_trace_state_variables, upload_fast_traceframes): Update.
5176 * server.c (gdb_write_memory): Update.
5177 * remote-utils.c (relocate_instruction): Update.
5178 * proc-service.c (ps_pdwrite): Update.
5179 * mem-break.c (remove_memory_breakpoint)
5180 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
5181 (uninsert_fast_tracepoint_jumps_at)
5182 (reinsert_fast_tracepoint_jumps_at): Update.
5183 * linux-x86-low.c (append_insns)
5184 (i386_install_fast_tracepoint_jump_pad)
5185 (amd64_write_goto_address, i386_write_goto_address): Update.
5186 * linux-s390-low.c (append_insns, s390_write_goto_address):
5187 Update.
5188 * linux-ppc-low.c (ppc_relocate_instruction)
5189 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
5190 (ppc_write_goto_address): Update.
5191 * linux-aarch64-low.c (append_insns): Update.
5192 * target.h (struct target_ops): Update.
5193 (write_inferior_memory): Don't declare.
5194 * target.c (target_write_memory): Rename from
5195 write_inferior_memory. Remove old target_write_memory.
5196
5197 2019-08-15 Tom Tromey <tromey@adacore.com>
5198
5199 * target.c (write_inferior_memory): Use std::vector.
5200
5201 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
5202
5203 PR build/24886
5204 * configure.ac: Drop enable-libmcheck support.
5205 * configure, config.in: Rebuild.
5206 * acinclude.m4: Don't include it.
5207
5208 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5209
5210 * configure.srv: Remove Arm xml files.
5211
5212 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5213
5214 * configure.srv: Add new files. Remove xml generated files.
5215 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
5216 registers.
5217 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
5218 * linux-aarch32-tdesc.c: New file.
5219 * linux-aarch32-tdesc.h: New file.
5220 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
5221 * linux-arm-low.c (init_registers_arm, tdesc_arm)
5222 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
5223 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
5224 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
5225 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5226 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
5227 (arm_read_description): Call arm_linux_read_description.
5228 (initialize_low_arch): Don't init registers.
5229 * linux-arm-tdesc.c: New file.
5230 * linux-arm-tdesc.h: New file.
5231
5232 2019-07-10 Alan Hayward <alan.hayward@arm.com>
5233
5234 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
5235 Move counter inside for.
5236 (arm_read_description): Check ptrace earlier.
5237 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
5238
5239 2019-07-09 Tom Tromey <tom@tromey.com>
5240
5241 * configure: Rebuild.
5242 * configure.ac: Change common to gdbsupport.
5243 * acinclude.m4: Change common to gdbsupport.
5244 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
5245 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
5246 common to gdbsupport.
5247 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
5248 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
5249 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
5250 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
5251 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
5252 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
5253 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
5254 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
5255 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
5256 common to gdbsupport.
5257
5258 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5259
5260 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
5261 defines.
5262 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
5263
5264 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5265
5266 * configure.srv: Remove legacy xml.
5267 * linux-aarch64-low.c (initialize_low_arch): Remove
5268 initialize_low_tdesc call.
5269 * linux-aarch64-tdesc-selftest.c: Remove file.
5270 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
5271 * linux-x86-low.c (initialize_low_arch): Remove
5272 initialize_low_tdesc call.
5273 * linux-x86-tdesc-selftest.c: Remove file.
5274 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
5275
5276 2019-06-20 Tom de Vries <tdevries@suse.de>
5277
5278 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
5279 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
5280
5281 2019-06-19 Tom de Vries <tdevries@suse.de>
5282
5283 * debug.h (debug_write): Change return type to ssize_t.
5284 * debug.c (debug_write): Same.
5285
5286 2019-06-14 Tom Tromey <tom@tromey.com>
5287
5288 * configure.ac: Use new path to gnulib.
5289 * configure: Rebuild.
5290 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
5291 to gnulib.
5292
5293 2019-06-11 Tom Tromey <tom@tromey.com>
5294
5295 * Makefile.in (SFILES): Add alloc.c.
5296 (OBS): Add alloc.o.
5297 (IPA_OBJS): Add alloc-ipa.o.
5298 (alloc-ipa.o): New target.
5299 (%.o: ../%.c): New pattern rule.
5300
5301 2019-06-10 Tom Tromey <tromey@adacore.com>
5302
5303 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
5304 end warning with a newline.
5305 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
5306 newline.
5307 * thread-db.c (attach_thread): Don't end warning with a newline.
5308 (thread_db_notice_clone): Likewise.
5309 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
5310 newline.
5311 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
5312 end warning with a newline.
5313
5314 2019-06-04 Pedro Alves <palves@redhat.com>
5315
5316 * server.c (captured_main): Use make_unique_xstrdup.
5317
5318 2019-06-02 Tom Tromey <tom@tromey.com>
5319
5320 * gdbreplay.c (fromhex): Remove.
5321 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5322
5323 2019-05-29 Tom Tromey <tromey@adacore.com>
5324
5325 * configure: Rebuild.
5326
5327 2019-05-06 Kevin Buettner <kevinb@redhat.com>
5328
5329 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
5330 sign extension code on 32-bit builds.
5331
5332 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5333
5334 * remote-utils.c:
5335 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5336
5337 2019-04-19 Tom Tromey <tom@tromey.com>
5338
5339 * server.c (struct vstop_notif): Derive from notif_event.
5340 <base>: Remove.
5341 (queue_stop_reply): Update.
5342 (remove_all_on_match_ptid): Change type. Rewrite.
5343 (discard_queued_stop_replies): Rewrite.
5344 (in_queued_stop_replies_ptid): Change type.
5345 (in_queued_stop_replies): Rewrite.
5346 (notif_stop): Update.
5347 (queue_stop_reply_callback): Update.
5348 (captured_main): Don't call initialize_notif.
5349 (push_stop_notification): Update.
5350 * notif.c (notif_write_event, handle_notif_ack)
5351 (notif_event_enque, notif_push): Update.
5352 (notif_event_xfree, initialize_notif): Remove.
5353 * notif.h (struct notif_event): Include <list>, not
5354 "common/queue.h".
5355 (struct notif_server) <queue>: Now a std::list.
5356 (notif_event_p): Remove typedef.
5357 (initialize_notif): Don't declare.
5358 (struct notif_event): Add virtual destructor.
5359
5360 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5361
5362 * ax.c (ax_vdebug): Call debug_printf.
5363 * debug.c (debug_write): New function.
5364 * debug.h (debug_write): New declaration.
5365 * linux-low.c (sigchld_handler): Call debug_write.
5366
5367 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5368
5369 * debug.c (debug_set_output): New function.
5370 (debug_vprintf): Send output to debug_file.
5371 (debug_flush): Likewise.
5372 * debug.h (debug_set_output): New declaration.
5373 * server.c (handle_monitor_command): Add debug-file option.
5374 (captured_main): Likewise.
5375
5376 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5377
5378 * debug.c (remote_debug): Add definition.
5379 * debug.h (remote_debug): Add declaration.
5380 * hostio.c (remote_debug): Remove declaration.
5381 * remote-utils.c (struct ui_file): Likewise.
5382 (remote_debug): Likewise.
5383 * remote-utils.h (remote_debug): Likewise,
5384 * server.c (remote_debug): Remove definition.
5385
5386 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5387
5388 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5389 when using a 64-bit gdbserver.
5390
5391 2019-04-09 Tom Tromey <tromey@adacore.com>
5392
5393 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5394
5395 2019-04-08 Tom Tromey <tom@tromey.com>
5396
5397 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5398 throw.
5399 (linux_resume_one_lwp): Likewise.
5400
5401 2019-04-08 Tom Tromey <tom@tromey.com>
5402
5403 * gdbreplay.c: Update.
5404 * linux-low.c: Update.
5405 * server.c: Update.
5406
5407 2019-04-08 Tom Tromey <tom@tromey.com>
5408
5409 * server.c: Use C++ exception handling.
5410 * linux-low.c: Use C++ exception handling.
5411 * gdbreplay.c: Use C++ exception handling.
5412
5413 2019-04-08 Tom Tromey <tom@tromey.com>
5414
5415 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5416 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5417 (captured_main, main): Update.
5418 * gdbreplay.c (main): Update.
5419
5420 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5421
5422 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5423 value in argument pointer, return 1 if the entry is found and 0
5424 otherwise. Move comment.
5425 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5426 * linux-low.h (linux_get_auxv): Declare.
5427 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5428
5429 2019-04-05 Tom Tromey <tromey@adacore.com>
5430
5431 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5432 variables.
5433
5434 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5435
5436 * linux-low.c (AT_HWCAP2): Add define if not already included.
5437
5438 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5439
5440 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5441 (aarch64_arch_setup): Call linux_get_hwcap.
5442 * linux-arm-low.c (arm_get_hwcap): Remove function.
5443 (arm_read_description): Call linux_get_hwcap.
5444 * linux-low.c (linux_get_auxv): New function.
5445 (linux_get_hwcap): Likewise.
5446 (linux_get_hwcap2): Likewise.
5447 * linux-low.h (linux_get_hwcap): New declaration.
5448 (linux_get_hwcap2): Likewise.
5449 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5450 (ppc_arch_setup): Call linux_get_hwcap.
5451 * linux-s390-low.c (s390_get_hwcap): Remove function.
5452 (s390_arch_setup): Call linux_get_hwcap.
5453
5454 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5455 Jiong Wang <jiong.wang@arm.com>
5456
5457 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5458 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5459 to fail.
5460 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5461
5462 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5463 Jiong Wang <jiong.wang@arm.com>
5464
5465 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5466 (aarch64_get_hwcap): New function.
5467 (aarch64_arch_setup): Read APIA hwcap.
5468
5469 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5470 Jiong Wang <jiong.wang@arm.com>
5471
5472 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5473 (initialize_low_tracepoint): Likewise.
5474 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5475 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5476 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5477 (aarch64_linux_read_description): Likewise.
5478 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5479
5480 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5481
5482 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5483 i386_create_target_description for 'segments' parameter.
5484 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5485 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5486 * win32-i386-low.c (i386_arch_setup): Likewise.
5487
5488 2019-03-12 Tom Tromey <tromey@adacore.com>
5489
5490 * linux-low.c (iterate_over_lwps): Update.
5491
5492 2019-03-06 Tom Tromey <tom@tromey.com>
5493
5494 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5495 (captured_main): Use SCOPE_EXIT.
5496
5497 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5498
5499 * configure.srv: Use '$enable_unittest' instead of '$development'
5500 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5501 case.
5502
5503 2019-02-27 Tom Tromey <tromey@adacore.com>
5504
5505 * gdbreplay.c (logchar): Handle \r\n.
5506
5507 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5508
5509 * linux-low.c (linux_attach): Add process before lwp.
5510 * server.c (attach_inferior): Check if already attached.
5511
5512 2019-02-07 Tom Tromey <tom@tromey.com>
5513
5514 * x86-tdesc.h: Rename include guard.
5515 * x86-low.h: Add include guard.
5516 * wincecompat.h: Rename include guard.
5517 * win32-low.h: Add include guard.
5518 * utils.h: Rename include guard.
5519 * tracepoint.h: Rename include guard.
5520 * tdesc.h: Rename include guard.
5521 * target.h: Rename include guard.
5522 * server.h: Rename include guard.
5523 * remote-utils.h: Rename include guard.
5524 * regcache.h: Rename include guard.
5525 * nto-low.h: Rename include guard.
5526 * notif.h: Add include guard.
5527 * mem-break.h: Rename include guard.
5528 * lynx-low.h: Add include guard.
5529 * linux-x86-tdesc.h: Add include guard.
5530 * linux-s390-tdesc.h: Add include guard.
5531 * linux-ppc-tdesc-init.h: Add include guard.
5532 * linux-low.h: Add include guard.
5533 * linux-aarch64-tdesc.h: Add include guard.
5534 * linux-aarch32-low.h: Add include guard.
5535 * inferiors.h: Rename include guard.
5536 * i387-fp.h: Rename include guard.
5537 * hostio.h: Rename include guard.
5538 * gdbthread.h: Rename include guard.
5539 * gdb_proc_service.h: Rename include guard.
5540 * event-loop.h: Rename include guard.
5541 * dll.h: Rename include guard.
5542 * debug.h: Rename include guard.
5543 * ax.h: Rename include guard.
5544
5545 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5546
5547 PR gdb/23985
5548 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5549 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5550
5551 2019-01-25 Tom Tromey <tom@tromey.com>
5552
5553 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5554
5555 2019-01-25 Tom Tromey <tom@tromey.com>
5556
5557 * win32-low.c: Fix common/ includes.
5558 * win32-i386-low.c: Fix common/ includes.
5559 * tracepoint.c: Fix common/ includes.
5560 * thread-db.c: Fix common/ includes.
5561 * target.h: Fix common/ includes.
5562 * symbol.c: Fix common/ includes.
5563 * spu-low.c: Fix common/ includes.
5564 * server.h: Fix common/ includes.
5565 * server.c: Fix common/ includes.
5566 * remote-utils.c: Fix common/ includes.
5567 * regcache.h: Fix common/ includes.
5568 * regcache.c: Fix common/ includes.
5569 * nto-x86-low.c: Fix common/ includes.
5570 * notif.h: Fix common/ includes.
5571 * mem-break.h: Fix common/ includes.
5572 * lynx-low.c: Fix common/ includes.
5573 * lynx-i386-low.c: Fix common/ includes.
5574 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5575 * linux-x86-low.c: Fix common/ includes.
5576 * linux-low.c: Fix common/ includes.
5577 * inferiors.h: Fix common/ includes.
5578 * i387-fp.c: Fix common/ includes.
5579 * hostio.c: Fix common/ includes.
5580 * hostio-errno.c: Fix common/ includes.
5581 * gdbthread.h: Fix common/ includes.
5582 * gdbreplay.c: Fix common/ includes.
5583 * fork-child.c: Fix common/ includes.
5584 * event-loop.c: Fix common/ includes.
5585 * ax.c:
5586 (enum gdb_agent_op): Fix common/ includes.
5587
5588 2019-01-21 Tom Tromey <tom@tromey.com>
5589
5590 * tracepoint.c: Fix includes.
5591 * remote-utils.c: Fix includes.
5592 * linux-x86-low.c: Fix includes.
5593
5594 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5595
5596 * gdbreplay.c (gdbreplay_version): Update copyright year in
5597 version message.
5598 * server.c (gdbserver_version): Likewise.
5599
5600 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5601
5602 * linux-low.c (add_lwp): Switch ordering.
5603
5604 2018-11-29 Tom Tromey <tom@tromey.com>
5605
5606 * win32-low.c (win32_join): Take pid, not process.
5607 * target.h (struct target_ops) <join>: Change argument type.
5608 (join_inferior): Change argument name.
5609 * spu-low.c (spu_join): Take pid, not process.
5610 * server.c (handle_detach): Preserve pid before destroying
5611 process.
5612 * lynx-low.c (lynx_join): Take pid, not process.
5613 * linux-low.c (linux_join): Take pid, not process.
5614
5615 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5616
5617 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5618 (aarch64_cannot_fetch_register): Likewise.
5619 (struct linux_target_ops): Update references.
5620
5621 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5622
5623 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5624
5625 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5626
5627 * configure.srv (ipa_ppc_linux_regobj): Add
5628 powerpc-isa207-htm-vsx32l-ipa.o and
5629 powerpc-isa207-htm-vsx64l-ipa.o.
5630 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5631 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5632 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5633 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5634 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5635 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5636 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5637 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5638 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5639 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5640 (init_registers_powerpc_isa207_htm_vsx32l)
5641 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5642 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5643 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5644 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5645 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5646 (ppc_store_tm_ctarregset): New functions.
5647 (ppc_regsets): Add entries for HTM regsets.
5648 (ppc_arch_setup): Set htm in features struct when needed. Set
5649 sizes for the HTM regsets.
5650 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5651 (initialize_low_arch): Call
5652 init_registers_powerpc_isa207_htm_vsx32l and
5653 init_registers_powerpc_isa207_htm_vsx64l.
5654 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5655 PPC_TDESC_ISA207_HTM_VSX.
5656 (initialize_low_tracepoint): Call
5657 init_registers_powerpc_isa207_htm_vsx32l and
5658 init_registers_powerpc_isa207_htm_vsx64l.
5659
5660 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5661
5662 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5663 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5664 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5665 (ppc_store_pmuregset): New functions.
5666 (ppc_regsets): Add entries for ebb and pmu regsets.
5667 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5668 pmu regsets are available. Set sizes for these regsets.
5669
5670 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5671
5672 * configure.srv (ipa_ppc_linux_regobj): Add
5673 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5674 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5675 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5676 rs6000/powerpc-isa207-vsx32l.xml, and
5677 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5678 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5679 <PPC_TDESC_ISA207_VSX>: New enum value.
5680 (init_registers_powerpc_isa207_vsx32l): Declare.
5681 (init_registers_powerpc_isa207_vsx64l): Declare.
5682 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5683 (ppc_store_tarregset): New function.
5684 (ppc_regsets): Add entry for the TAR regset.
5685 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5686 size for the TAR regsets.
5687 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5688 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5689 and init_registers_powerpc_isa207_vsx64l.
5690 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5691 (initialize_low_tracepoint): Call
5692 init_registers_powerpc_isa207_vsx32l and
5693 init_registers_powerpc_isa207_vsx64l.
5694
5695 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5696 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5697
5698 * configure.srv (ipa_ppc_linux_regobj): Add
5699 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5700 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5701 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5702 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5703 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5704 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5705 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5706 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5707 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5708 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5709 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5710 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5711 (ppc_hwcap): Add comment.
5712 (ppc_hwcap2): New global.
5713 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5714 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5715 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5716 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5717 when needed. Set sizes for the the DSCR and PPR regsets.
5718 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5719 (initialize_low_arch): Call
5720 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5721 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5722 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5723 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5724 (initialize_low_tracepoint): Call
5725 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5726 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5727
5728 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5729
5730 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5731
5732 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5733 Simon Marchi <simark@simark.ca>
5734
5735 * acinclude.m4: Include "../selftest.m4".
5736 * configure: Regenerate.
5737 * configure.ac: Use "GDB_AC_SELFTEST".
5738 * configure.srv: Use "$enable_unittests" instead of
5739 "$development" when checking whether unit tests have been
5740 enabled.
5741 * server.c (captured_main): Update message informing that
5742 selftests have been disabled.
5743
5744 2018-10-04 Tom Tromey <tom@tromey.com>
5745
5746 * configure: Rebuild.
5747
5748 2018-10-04 Tom Tromey <tom@tromey.com>
5749
5750 * server.c (handle_status): Rename inner "thread".
5751 (process_serial_event): Declare "res" in 'm' case.
5752 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5753 (iterate_over_lwps): Rename inner "thread".
5754 (linux_qxfer_libraries_svr4): Rename inner "len".
5755 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5756
5757 2018-10-01 Gary Benson <gbenson@redhat.com>
5758
5759 * gdb_proc_service.h: Moved common code to
5760 common/gdb_proc_service.h.
5761
5762 2018-10-01 Gary Benson <gbenson@redhat.com>
5763
5764 * gdb_proc_service.h: Synchronize comments and whitespace with
5765 GDB's version of this file.
5766
5767 2018-09-25 Tom Tromey <tom@tromey.com>
5768
5769 * configure: Rebuild.
5770 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5771
5772 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5773
5774 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5775 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5776 ($(IPA_LIB)): Sort IPA_OBJS.
5777
5778 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5779
5780 * Makefile.in: Remove references to $(ADD_DEPS).
5781
5782 2018-09-16 Tom Tromey <tom@tromey.com>
5783
5784 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5785 variables.
5786 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5787 variables.
5788
5789 2018-09-05 Tom Tromey <tom@tromey.com>
5790
5791 * configure: Rebuild.
5792
5793 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5794
5795 PR build/23399
5796 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5797
5798 2018-08-27 Tom Tromey <tom@tromey.com>
5799
5800 PR build/23087:
5801 * configure: Rebuild.
5802
5803 2018-08-27 Tom Tromey <tom@tromey.com>
5804
5805 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5806 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5807 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5808 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5809 (s390x_emit_stack_adjust): Add casts to unsigned char.
5810
5811 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5812
5813 PR gdb/23374
5814 PR gdb/23375
5815 * server.h (struct client_state) <disable_randomization>:
5816 Initialize to 1.
5817
5818 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5819
5820 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5821 variable.
5822 (mips_supply_ptrace_register): Likewise.
5823
5824 2018-07-22 Tom Tromey <tom@tromey.com>
5825
5826 * configure: Rebuild.
5827
5828 2018-07-22 Tom Tromey <tom@tromey.com>
5829
5830 * win32-low.c (win32_create_inferior): Remove unused variables.
5831 * gdbreplay.c (remote_open): Remove unused variable.
5832 * remote-utils.c (remote_prepare): Remove unused variable.
5833 * x86-tdesc.h (X86_TDESC_H): Define.
5834 (amd64_expedite_regs): Define conditionally.
5835 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5836 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5837 * remote-utils.c (readchar): Remove unused variable.
5838
5839 2018-07-13 Pedro Alves <palves@redhat.com>
5840
5841 * linux-low.c (linux_kill): Change parameter to process_info
5842 pointer instead of pid. Adjust.
5843 * lynx-low.c (lynx_kill): Likewise.
5844 * nto-low.c (nto_kill): Likewise.
5845 * spu-low.c (spu_kill): Likewise.
5846 * win32-low.c (win32_kill): Likewise.
5847 * server.c (handle_v_kill, kill_inferior_callback)
5848 (detach_or_kill_for_exit): Adjust.
5849 * target.c (kill_inferior): Change parameter to process_info
5850 pointer instead of pid. Adjust.
5851 * target.h (struct target_ops) <kill>: Change parameter to
5852 process_info pointer instead of pid. Adjust all implementations
5853 and callers.
5854 (kill_inferior): Likewise.
5855
5856 2018-07-13 Pedro Alves <palves@redhat.com>
5857
5858 * linux-low.c (linux_detach, linux_join): Change parameter to
5859 process_info pointer instead of pid. Adjust.
5860 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5861 * nto-low.c (nto_detach): Likewise.
5862 * spu-low.c (spu_detach, spu_join): Likewise.
5863 * win32-low.c (win32_detach, win32_join): Likewise.
5864 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5865 * target.h (struct target_ops) <detach, join>: Change parameter to
5866 process_info pointer instead of pid. Adjust all implementations
5867 and callers.
5868 (detach_inferior, join_inferior): Rename 'pid' parameter to
5869 'proc'.
5870
5871 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5872 Jan Kratochvil <jan.kratochvil@redhat.com>
5873 Paul Fertser <fercerpav@gmail.com>
5874 Tsutomu Seki <sekiriki@gmail.com>
5875
5876 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5877 (OBS): Add 'common/netstuff.o'.
5878 (GDBREPLAY_OBS): Likewise.
5879 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5880 (remote_open): Implement support for IPv6
5881 connections.
5882 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5883 and 'wspiapi.h'.
5884 (handle_accept_event): Accept connections from IPv6 sources.
5885 (remote_prepare): Handle IPv6-style hostnames; implement
5886 support for IPv6 connections.
5887 (remote_open): Implement support for printing connections from
5888 IPv6 sources.
5889
5890 2018-07-11 Pedro Alves <palves@redhat.com>
5891
5892 PR gdb/23377
5893 * mem-break.c (any_persistent_commands): Add process_info
5894 parameter and use it instead of relying on the current process.
5895 Change return type to bool.
5896 * mem-break.h (any_persistent_commands): Add process_info
5897 parameter and change return type to bool.
5898 * server.c (handle_detach): Remove require_running_or_return call.
5899 Look up the process_info for the process we're about to detach.
5900 If not found, return back error to GDB. Adjust
5901 any_persistent_commands call to pass down a process pointer.
5902
5903 2018-07-11 Pedro Alves <palves@redhat.com>
5904
5905 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5906 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5907 instead of collect_register_by_name.
5908 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5909 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5910
5911 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5912 Pedro Alves <palves@redhat.com>
5913
5914 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5915
5916 2018-07-03 Tom Tromey <tom@tromey.com>
5917
5918 * linux-low.c: Update.
5919 * lynx-low.c: Update.
5920 * mem-break.c: Update.
5921 * nto-low.c: Update.
5922 * remote-utils.c: Update.
5923 * server.c: Update.
5924 * spu-low.c: Update.
5925 * target.c: Update.
5926 * win32-low.c: Update.
5927
5928 2018-07-03 Tom Tromey <tom@tromey.com>
5929
5930 * server.c: Update.
5931
5932 2018-07-03 Tom Tromey <tom@tromey.com>
5933
5934 * linux-low.c: Update.
5935
5936 2018-07-03 Tom Tromey <tom@tromey.com>
5937
5938 * target.c: Update.
5939
5940 2018-07-03 Tom Tromey <tom@tromey.com>
5941
5942 * linux-low.c: Update.
5943 * linux-mips-low.c: Update.
5944 * lynx-low.c: Update.
5945 * nto-low.c: Update.
5946 * remote-utils.c: Update.
5947 * server.c: Update.
5948 * spu-low.c: Update.
5949 * target.c: Update.
5950 * thread-db.c: Update.
5951
5952 2018-07-03 Tom Tromey <tom@tromey.com>
5953
5954 * linux-low.c: Update.
5955 * linux-mips-low.c: Update.
5956 * lynx-low.c: Update.
5957 * mem-break.c: Update.
5958 * nto-low.c: Update.
5959 * remote-utils.c: Update.
5960 * server.c: Update.
5961 * spu-low.c: Update.
5962 * target.c: Update.
5963 * tracepoint.c: Update.
5964
5965 2018-07-03 Tom Tromey <tom@tromey.com>
5966
5967 * linux-low.c: Update.
5968 * linux-ppc-low.c: Update.
5969 * linux-x86-low.c: Update.
5970 * proc-service.c: Update.
5971 * server.c: Update.
5972 * spu-low.c: Update.
5973 * thread-db.c: Update.
5974 * win32-low.c: Update.
5975
5976 2018-07-03 Tom Tromey <tom@tromey.com>
5977
5978 * linux-low.c: Update.
5979 * lynx-low.c: Update.
5980 * nto-low.c: Update.
5981 * remote-utils.c: Update.
5982 * spu-low.c: Update.
5983 * thread-db.c: Update.
5984 * win32-low.c: Update.
5985
5986 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5987
5988 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5989 parameter in call to 'amd64_create_target_description'.
5990
5991 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5992
5993 * x86-tdesc.h: Remove executable permission flag.
5994
5995 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5996
5997 * configure.ac: Remove AC_PREREQ, add missing quoting.
5998 * configure: Re-generate.
5999 * config.in: Re-generate.
6000 * aclocal.m4: Re-generate.
6001
6002 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
6003
6004 * tracepoint.h (current_traceframe): Remove declaration.
6005
6006 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6007
6008 * linux-aarch64-low.c (is_sve_tdesc): New function.
6009 (aarch64_sve_regs_copy_to_regcache): Likewise.
6010 (aarch64_sve_regs_copy_from_regcache): Likewise.
6011 (aarch64_regs_info): Add SVE checks.
6012 (initialize_low_arch): Initialize SVE.
6013
6014 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6015
6016 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
6017
6018 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6019
6020 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
6021 (initialize_low_tracepoint): Likewise
6022 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
6023 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
6024 param.
6025 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
6026 checks.
6027 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
6028
6029 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6030
6031 * server.h (PBUFSIZ): Increase size
6032
6033 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6034
6035 * regcache.c (regcache::raw_compare): New function.
6036 * regcache.h (regcache::raw_compare): New declaration.
6037
6038 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6039
6040 * regcache.c (new_register_cache): Use new.
6041 (free_register_cache): Use delete.
6042 (register_data): Use const.
6043 (supply_register): Move body inside regcache.
6044 (regcache::raw_supply): New override function.
6045 (collect_register): Move body inside regcache.
6046 (regcache::raw_collect): New override function.
6047 (regcache::get_register_status): New override function.
6048 * regcache.h (struct regcache): Inherit from reg_buffer_common.
6049
6050 2018-06-09 Tom Tromey <tom@tromey.com>
6051
6052 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
6053 declare queue.
6054 (event_queue): Use std::queue.
6055 (gdb_event_xfree): Remove.
6056 (initialize_event_loop, process_event, wait_for_event): Update.
6057
6058 2018-06-08 Stan Cox <scox@redhat.com>
6059
6060 * win32-low.c (win32_create_inferior): last_ptid and last_status
6061 moved to client_state.
6062
6063 2018-06-08 Pedro Alves <palves@redhat.com>
6064
6065 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
6066 common/common-exceptions.o, common/common-utils.o,
6067 common/errors.o, common/print-utils.o and utils.o.
6068 * gdbreplay.c: Include "common-defs.h" instead of the two
6069 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
6070 string.h or alloca.h.
6071 (perror_with_name): Delete.
6072 (remote_open): Use xstrdup instead of strdup.
6073 (main): Rename to ...
6074 (captured_main): ... this.
6075 (main): New.
6076
6077 2018-06-08 Tom Tromey <tom@tromey.com>
6078
6079 * linux-low.c (linux_low_read_btrace): Update.
6080
6081 2018-06-04 Stan Cox <scox@redhat.com>
6082
6083 * server.h (struct client_state): New.
6084 * server.c (cont_thread, general_thread, multi_process)
6085 (report_fork_events, report_vfork_events, report_exec_events)
6086 (report_thread_events, swbreak_feature, hwbreak_feature)
6087 (vCont_supported, disable_randomization, pass_signals)
6088 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
6089 Moved to client_state.
6090 * remote-utils.c (remote_debug, noack_mode)
6091 (transport_is_reliable): Moved to client_state.
6092 * tracepoint.c (current_traceframe): Moved to client_state.
6093
6094 Update all callers.
6095 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
6096 linux-low.c, remote-utils.h, target.c: Use client_state.
6097
6098 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6099
6100 * configure.srv: Add new c/h file.
6101
6102 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6103
6104 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
6105 null VQ.
6106
6107 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6108
6109 * gdb.arch/mips-fpregset-core.exp: New test.
6110 * gdb.arch/mips-fpregset-core.c: New test source.
6111
6112 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
6113
6114 PR server/23198
6115 * hostio.c (require_int): Do not report overflow for integers
6116 between 0xfffffff and 0x7fffffff.
6117
6118 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6119
6120 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
6121 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
6122 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
6123 functions.
6124 (the_low_target): Wire them.
6125
6126 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6127
6128 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
6129 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
6130 mode. Call collect_register_by_name with vscr using
6131 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
6132 (ppc_store_vrregset): Add and set vscr_offset variable as in
6133 ppc_fill_vrregset. Call supply_register_by_name with vscr using
6134 vscr_offset.
6135
6136 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6137
6138 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6139 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
6140 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
6141
6142 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6143
6144 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
6145 (ppc_store_vsxregset): Likewise.
6146 (ppc_fill_vrregset): Likewise.
6147 (ppc_store_vrregset): Likewise.
6148 (ppc_fill_evrregset): Likewise.
6149 (ppc_store_evrregset): Likewise.
6150 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
6151 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
6152 needed.
6153
6154 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6155
6156 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
6157 wordsize of the inferior. Call ppc_linux_target_wordsize.
6158
6159 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6160
6161 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
6162 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
6163 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
6164 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6165 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6166 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6167 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6168 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6169 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6170 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6171 (tdesc_powerpc_e500l): Remove.
6172 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
6173 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
6174 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
6175 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
6176 linux-ppc-tdesc.h.
6177 (ppc_arch_setup): Remove target description matching code. Fill a
6178 ppc_linux_features struct and call ppc_linux_match_description
6179 with it.
6180
6181 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6182
6183 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
6184 width of the requested register exceeds the width of the
6185 `ptrace' data type.
6186 (mips_cannot_store_register): Likewise.
6187
6188 2018-05-21 Maciej W. Rozycki <macro@mips.com>
6189
6190 * linux-mips-low.c (mips_fetch_register): New function. Update
6191 preceding comment.
6192 (mips_store_gregset): Supply 0 rather than $restart for $zero.
6193 (the_low_target): Wire `mips_fetch_register'.
6194
6195 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6196
6197 * lynx-i386-low.c (LYNXOS_178): New macro.
6198 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
6199 the layout on LynxOS-178.
6200 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
6201 handle floating point registers that are not supported by
6202 LynxOS-178.
6203
6204 2018-05-10 Tom Tromey <tom@tromey.com>
6205
6206 * configure: Rebuild.
6207
6208 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6209
6210 PR server/23158:
6211 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
6212 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
6213 Use it to set the expedite_regs field in the given tdesc.
6214 * x86-tdesc.h: New file.
6215 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
6216 Adjust following the addition of the new expedite_regs parameter
6217 to init_target_desc.
6218 * linux-tic6x-low.c (tic6x_read_description): Likewise.
6219 * linux-x86-tdesc.c: #include "x86-tdesc.h".
6220 (i386_linux_read_description, amd64_linux_read_description):
6221 Adjust following the addition of the new expedite_regs parameter
6222 to init_target_desc.
6223 * lynx-i386-low.c: #include "x86-tdesc.h".
6224 (lynx_i386_arch_setup): Adjust following the addition of the new
6225 expedite_regs parameter to init_target_desc.
6226 * nto-x86-low.c: #include "x86-tdesc.h".
6227 (nto_x86_arch_setup): Adjust following the addition of the new
6228 expedite_regs parameter to init_target_desc.
6229 * win32-i386-low.c: #include "x86-tdesc.h".
6230 (i386_arch_setup): Adjust following the addition of the new
6231 expedite_regs parameter to init_target_desc.
6232
6233 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6234
6235 PR server/23158:
6236 * win32-low.c (win32_create_inferior): Add call to my_wait
6237 setting last_status global.
6238
6239 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6240
6241 PR server/23158:
6242 * win32-low.c (create_process): Only call gdb_tilde_expand if
6243 inferior_cwd is not NULL.
6244
6245 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6246
6247 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
6248 registers to the cache if their values have changed.
6249 (i387_xsave_to_cache): Provide default values for x87 control
6250 registers when these features are available, but disabled.
6251 * regcache.c (supply_register_by_name_zeroed): New function.
6252 * regcache.h (supply_register_by_name_zeroed): Declare new
6253 function.
6254
6255 2018-05-07 Tom Tromey <tom@tromey.com>
6256
6257 * configure: Rebuild.
6258
6259 2018-05-04 Tom Tromey <tom@tromey.com>
6260
6261 * configure: Rebuild.
6262
6263 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6264 Pedro Alves <palves@redhat.com>
6265
6266 * linux-aarch64-low.c (aarch64_stopped_data_address):
6267 Likewise.
6268
6269 2018-04-27 Tom Tromey <tom@tromey.com>
6270
6271 * configure: Rebuild.
6272
6273 2018-04-23 Tom Tromey <tom@tromey.com>
6274
6275 * configure: Rebuild.
6276
6277 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
6278
6279 * Makefile.in (depcomp): Add "..".
6280 (all_deps_files): New and use it.
6281
6282 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6283
6284 * configure.srv (aarch64*-*-linux*): Don't include xml.
6285 (i[34567]86-*-cygwin*): Likewise.
6286 (i[34567]86-*-linux*): Likewise.
6287 (i[34567]86-*-lynxos*): Likewise.
6288 (i[34567]86-*-mingw32ce*): Likewise.
6289 (i[34567]86-*-mingw*): Likewise.
6290 (i[34567]86-*-nto*): Likewise.
6291 (tic6x-*-uclinux): Likewise.
6292 (x86_64-*-linux*): Likewise.
6293 (x86_64-*-mingw*): Likewise.
6294 (x86_64-*-cygwin*): Likewise.
6295
6296 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6297
6298 * tdesc.c: Remove xml parameter.
6299
6300 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6301
6302 * server.c (get_features_xml): Remove cast.
6303 * tdesc.c (void target_desc::accept): Fill in function.
6304 (tdesc_get_features_xml): Remove old xml creation.
6305 (print_xml_feature::visit_pre): Add xml vistor.
6306 * tdesc.h (struct target_desc): Make xmltarget mutable.
6307 (tdesc_get_features_xml): Remove declaration.
6308
6309 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6310
6311 * tdesc.c (tdesc_architecture_name): Add new function.
6312 (tdesc_osabi_name): Likewise.
6313 (tdesc_get_features_xml): Use new functions.
6314
6315 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6316
6317 * tdesc.c (tdesc_create_flags): Remove.
6318 (tdesc_add_flag): Likewise.
6319 (tdesc_named_type): Likewise.
6320 (tdesc_create_union): Likewise.
6321 (tdesc_create_struct): Likewise.
6322 (tdesc_create_vector): Likewise.
6323 (tdesc_add_bitfield): Likewise.
6324 (tdesc_add_field): Likewise.
6325 (tdesc_set_struct_size): Likewise.
6326
6327 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6328
6329 * tdesc.c (~target_desc): Remove implictly deleted items.
6330 (init_target_desc): Iterate all features.
6331 (tdesc_get_features_xml): Use vector.
6332 (tdesc_create_feature): Create feature.
6333 * tdesc.h (tdesc_feature) Remove
6334 (target_desc): Add features.
6335
6336 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6337
6338 * Makefile.in: Add common/tdesc.c
6339 * tdesc.c (init_target_desc): init all reg_defs from register
6340 vector.
6341 (tdesc_create_reg): Create tdesc_reg.
6342 * tdesc.h (tdesc_feature): Add register vector.
6343
6344 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6345
6346 * tdesc.h (struct target_desc) <features>: Change type to
6347 std::vector<std::string>.
6348 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6349 changes.
6350 (tdesc_get_features_xml): Likewise.
6351 (tdesc_create_feature): Likewise.
6352
6353 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6354
6355 * regcache.c (find_register_by_number): Return a ref.
6356 (find_regno): Use references.
6357 (register_size): Likewise.
6358 (register_data): Likewise.
6359 * tdesc.c (target_desc::~target_desc): Remove free calls.
6360 (target_desc::operator==): Use std::vector compare.
6361 (init_target_desc): Use reference.
6362 (tdesc_create_reg): Use reg constructors.
6363 * tdesc.h (struct target_desc): Replace pointer with object.
6364
6365 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6366
6367 * regcache.c (find_register_by_number): Make static.
6368 (find_regno): Use find_register_by_number
6369 * regcache.h (struct reg): Remove declaration.
6370
6371 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6372
6373 * tdesc.c (target_desc::~target_desc): Move to here.
6374 (target_desc::operator==): Likewise.
6375 * tdesc.h (target_desc::~target_desc): Move from here.
6376 (target_desc::operator==): Likewise.
6377
6378 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6379
6380 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6381
6382 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6383
6384 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6385 S390_TDESC_GS.
6386 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6387 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6388 and init_registers_s390_gs_linux64.
6389
6390 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6391
6392 * linux-s390-low.c (s390_fill_gs): Remove function.
6393 (s390_fill_gsbc): Remove function.
6394 (s390_regsets): Set fill functions for the guarded storage regsets
6395 to NULL.
6396
6397 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6398
6399 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6400 the word size. Add comment.
6401 (s390_get_wordsize): New function.
6402 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6403 pswm with it. Instead, use s390_get_wordsize to determine the
6404 word size first and derive the correct tdesc from that directly.
6405
6406 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6407
6408 * Makefile.in: Include silent-rules.mk.
6409 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6410 (COMPILE): Add ECHO_CXX.
6411 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6412 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6413 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6414 (version-generated.c): Add ECHO_GEN.
6415 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6416 (IPAGENT_COMPILE): Add ECHO_CXX.
6417 (%-generated.c): Add ECHO_REGDAT.
6418
6419 2018-03-14 Tom Tromey <tom@tromey.com>
6420
6421 PR cli/14977:
6422 * ax.c (ax_printf): Special case for NULL.
6423
6424 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6425
6426 * linux-low.c (linux_qxfer_libraries_svr4): Use
6427 xml_escape_text_append.
6428
6429 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6430
6431 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6432
6433 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6434
6435 * server.c (handle_general_set): Remove unnecessary xstrdup.
6436
6437 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6438
6439 * server.c (parse_debug_format_options): Adjust to
6440 delim_string_to_char_ptr_vec changes.
6441 * thread-db.c (thread_db_load_search): Adjust to
6442 dirnames_to_char_ptr_vec changes.
6443
6444 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6445
6446 * target.h (target_enable_btrace, target_disable_btrace)
6447 (target_read_btrace, target_read_btrace_conf): Turn macro into
6448 inline function. Throw error if target method is not defined.
6449 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6450 check for btrace target method. Be prepared to handle exceptions
6451 from btrace target methods.
6452
6453 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6454
6455 * server.c (captured_main): Change order of error message printed
6456 when the current working directory cannot be found.
6457
6458 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6459
6460 * server.c: Include "filenames.h" and "pathstuff.h".
6461 (program_name): Delete variable.
6462 (program_path): New anonymous class.
6463 (get_exec_wrapper): Use "program_path" instead of
6464 "program_name".
6465 (handle_v_run): Likewise.
6466 (captured_main): Likewise.
6467 (process_serial_event): Likewise.
6468
6469 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6470
6471 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6472 (OBJS): Add "pathstuff.o".
6473 * server.c (current_directory): New global variable.
6474 (captured_main): Initialize "current_directory".
6475
6476 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6477
6478 * tdesc.c: Use common/tdesc.h.
6479 * tdesc.h: Likewise.
6480
6481 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6482 Simon Marchi <simon.marchi@ericsson.com>
6483
6484 * Makefile.in: Switch order of make rules.
6485
6486 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6487
6488 * Makefile.in: Add common directory in build.
6489 * configure.ac: Add common reference.
6490 * configure: Regenerate.
6491
6492 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6493
6494 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6495 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6496 * spu-low.c (spu_target_ops): Likewise.
6497 * win32-low.c (win32_target_ops): Likewise.
6498 * server.c (supported_btrace_packets): Report packets unconditionally.
6499 * target.h (target_ops) <supports_btrace>: Remove.
6500 (target_supports_btrace): Remove.
6501
6502 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6503
6504 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6505 (handle_btrace_disable): Change return type to void. Use exceptions
6506 to report errors.
6507 (handle_btrace_general_set): Catch exception and copy message to
6508 return message.
6509
6510 2018-02-08 Tom Tromey <tom@tromey.com>
6511
6512 * linux-low.c (install_software_single_step_breakpoints): Use
6513 make_scoped_restore.
6514 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6515 (do_restore_current_thread_cleanup): Remove.
6516 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6517 declare.
6518
6519 2018-02-08 Tom Tromey <tom@tromey.com>
6520
6521 * mem-break.c (set_raw_breakpoint_at): Use
6522 gdb::unique_xmalloc_ptr.
6523
6524 2018-01-30 Pedro Alves <palves@redhat.com>
6525
6526 PR gdb/13211
6527 * target.c (target_terminal::terminal_state): Rename to ...
6528 (target_terminal::m_terminal_state): ... this.
6529
6530 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6531
6532 * linux-low.c (handle_extended_wait): Surround call to
6533 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6534
6535 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6536
6537 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6538 linux_ptrace_attach_fail_reason_string now returning an
6539 std::string.
6540 (linux_attach): Likewise.
6541 * thread-db.c (attach_thread): Likewise.
6542
6543 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6544
6545 PR gdb/21559
6546 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6547 checking for fs_base/gs_base fields in struct user_regs_struct.
6548 * configure: Regenerate.
6549
6550 2018-01-16 Yao Qi <yao.qi@linaro.org>
6551
6552 PR gdb/18749
6553 * linux-low.c (fetch_register): Call supply_register instead of
6554 error.
6555
6556 2018-01-08 Yao Qi <yao.qi@linaro.org>
6557 Simon Marchi <simon.marchi@ericsson.com>
6558
6559 * Makefile.in (OBS): Remove selftest.o.
6560 * configure.ac: Set srv_selftest_objs if $development is true.
6561 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6562 * configure: Re-generated.
6563 * server.c (captured_main): Wrap variable selftest_filter with
6564 GDB_SELF_TEST.
6565
6566 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6567
6568 * server.c (parse_debug_format_options): Return std::string.
6569 (handle_monitor_command, captured_main): Adjust.
6570
6571 2018-01-05 Pedro Alves <palves@redhat.com>
6572
6573 PR gdb/18653
6574 * server.c (captured_main): Pass quiet=false to
6575 save_original_signals_state.
6576
6577 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6578
6579 * gdbreplay.c (gdbreplay_version): Update copyright year in
6580 version message.
6581 * server.c (gdbserver_version): Likewise.
6582
6583 2017-12-08 Tom Tromey <tom@tromey.com>
6584
6585 * ax.c (ax_printf): Update.
6586
6587 2017-12-07 Yao Qi <yao.qi@linaro.org>
6588
6589 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6590 aarch64_linux_read_description.
6591 * linux-amd64-ipa.c (idx2mask): New array.
6592 (get_ipa_tdesc): Move idx2mask out.
6593 (initialize_low_tracepoint): Initialize target descriptions.
6594 * linux-i386-ipa.c (idx2mask): New array.
6595 (get_ipa_tdesc): Move idx2mask out.
6596 (initialize_low_tracepoint): Initialize target descriptions.
6597
6598 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6599
6600 * tdesc.c (struct tdesc_type): Change return type.
6601 (tdesc_add_flag): Change parameter type.
6602 (tdesc_add_bitfield): Likewise.
6603 (tdesc_add_field): Likewise.
6604 (tdesc_set_struct_size): Likewise.
6605
6606 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6607
6608 * regcache.c (registers_to_string): Remove unused variable.
6609
6610 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6611
6612 * inferiors.c (for_each_inferior_with_data): Remove.
6613 * inferiors.h (for_each_inferior_with_data): Remove.
6614 * server.c (handle_qxfer_threads_worker): Change parameter type.
6615 (handle_qxfer_threads_proper): Use for_each_thread.
6616
6617 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6618
6619 * inferiors.c (for_each_inferior): Remove.
6620 (clear_inferiors): Use for_each_thread.
6621 * inferiors.h (for_each_inferior): Remove.
6622 * linux-low.c (linux_wait_for_event_filtered): Use
6623 for_each_thread.
6624 (linux_stabilize_threads): Likewise.
6625 * regcache.c (regcache_release): Likewise.
6626 * server.c (gdb_wants_all_threads_stopped): Likewise.
6627 (clear_pending_status_callback): Remove.
6628 (handle_status): Use for_each_thread.
6629 (captured_main): Likewise.
6630 * win32-low.c (child_init_thread_list): Likewise.
6631 (win32_clear_inferiors): Likewise.
6632 (fake_breakpoint_event): Likewise.
6633
6634 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6635
6636 * inferiors.h (find_inferior): Remove.
6637 * inferiors.c (find_inferior): Remove.
6638
6639 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6640
6641 * linux-low.c (resume_status_pending_p): Update comment.
6642 (need_step_over_p): Update comment.
6643
6644 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6645
6646 * linux-low.c (proceed_one_lwp): Return void, change parameter
6647 type.
6648 (unsuspend_and_proceed_one_lwp): Likewise.
6649 (proceed_all_lwps): Use for_each_thread.
6650 (unstop_all_lwps): Likewise.
6651
6652 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6653
6654 * linux-low.c (linux_resume_one_thread): Return void, take
6655 parameter directly.
6656 (linux_resume): Use for_each_thread.
6657
6658 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6659
6660 * linux-low.c (send_sigstop_callback): Return void, change
6661 parameter type. Rename to...
6662 (send_sigstop): ... this.
6663 (suspend_and_send_sigstop_callback): Return void, change parameter
6664 type. Rename to...
6665 (suspend_and_send_sigstop): ... this.
6666 (stop_all_lwps): Use for_each_thread.
6667
6668 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6669
6670 * linux-low.c (lwp_running): Return bool, remove unused
6671 argument.
6672 (linux_stabilize_threads): Use find_thread.
6673
6674 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6675
6676 * linux-low.c (select_singlestep_lwp_callback): Remove.
6677 (count_events_callback): Remove.
6678 (select_event_lwp_callback): Remove.
6679 (select_event_lwp): Use find_thread/for_each_thread.
6680
6681 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6682
6683 * linux-low.c (not_stopped_callback): Return bool, take filter
6684 argument directly.
6685 (linux_wait_for_event_filtered): Use find_thread.
6686 (linux_wait_1): Likewise.
6687
6688 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6689
6690 * linux-low.c (same_lwp): Remove.
6691 (find_lwp_pid): Use find_thread.
6692
6693 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6694
6695 * linux-low.c (delete_lwp_callback): Remove.
6696 (linux_mourn): Use for_each_thread.
6697
6698 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6699
6700 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6701 args parameter, don't check for pid.
6702 (linux_detach): Use for_each_thread.
6703
6704 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6705
6706 * linux-low.c (struct counter): Remove.
6707 (second_thread_of_pid_p): Remove.
6708 (last_thread_of_process_p): Use find_thread.
6709
6710 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6711
6712 * inferiors.c (find_inferior_in_random): Remove.
6713 * inferiors.h (find_inferior_in_random): Remove.
6714 * linux-low.c (status_pending_p_callback): Return bool, accept
6715 parameter ptid directly.
6716 (linux_wait_for_event_filtered): Use find_thread_in_random.
6717 (linux_wait_1): Likewise.
6718
6719 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6720
6721 * inferiors.c (find_inferior_id): Remove.
6722 (find_thread_ptid): Move implemention from find_inferior_id to
6723 here.
6724 * inferiors.h (find_inferior_id): Remove.
6725 * server.c (handle_status): Use find_thread_ptid.
6726 (process_serial_event): Likewise.
6727 * thread-db.c (find_one_thread): Likewise.
6728 (thread_db_thread_handle): Likewise.
6729 * win32-low.c (thread_rec): Likewise.
6730 (child_delete_thread): Likewise.
6731 (win32_thread_alive): Likewise.
6732 (get_child_debug_event): Likewise.
6733
6734 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6735
6736 * linux-mips-low.c (update_watch_registers_callback): Return
6737 void, remove pid_p parameter, don't check for pid.
6738 (mips_insert_point, mips_remove_point): Use for_each_thread.
6739
6740 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6741
6742 * lynx.low (lynx_delete_thread_callback): Remove.
6743 (lynx_mourn): Use for_each_thread.
6744
6745 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6746
6747 * regcache.c (regcache_invalidate_one): Remove.
6748 (regcache_invalidate_pid): use for_each_thread.
6749
6750 2017-11-26 Tom Tromey <tom@tromey.com>
6751
6752 * linux-low.c (linux_create_inferior): Update.
6753
6754 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6755
6756 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6757
6758 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6759
6760 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6761 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6762 * linux-aarch64-tdesc-selftest.c: New file.
6763 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6764
6765 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6766
6767 * configure.srv: Add new file.
6768 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6769 * linux-aarch64-tdesc-selftest.c: New file.
6770 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6771
6772 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6773
6774 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6775 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6776 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6777
6778 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6779
6780 * configure.srv: Add new files.
6781 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6782 aarch64_linux_read_description.
6783 * linux-aarch64-low.c (aarch64_linux_read_description):
6784 Merge with aarch64_arch_setup.
6785 (aarch64_arch_setup): Call aarch64_linux_read_description.
6786 * linux-aarch64-tdesc.c: New file.
6787 * linux-aarch64-tdesc.h: New file.
6788
6789 2017-11-24 Yao Qi <yao.qi@linaro.org>
6790
6791 * configure.srv: Set $srv_regobj for tic6x-linux.
6792 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6793 (tic6x_read_description): Move some code to tic6x_arch_setup.
6794 (tic6x_tdesc_test): New function.
6795 (initialize_low_arch): Call selftests::register_test.
6796
6797 2017-11-22 Yao Qi <yao.qi@linaro.org>
6798
6799 * remote-utils.c (prepare_resume_reply): Use memcpy.
6800
6801 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6802
6803 * linux-low.c (kill_one_lwp_callback): Return void, take
6804 argument directly, don't filter on pid.
6805 (linux_kill): Use for_each_thread.
6806
6807 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6808
6809 * linux-low.c (need_step_over_p): Return bool, remove dummy
6810 argument.
6811 (linux_resume, proceed_all_lwps): Use find_thread.
6812
6813 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6814
6815 * linux-low.c (resume_status_pending_p): Return bool, remove
6816 flag_p argument.
6817 (linux_resume): Use find_thread.
6818
6819 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6820
6821 * linux-low.c (struct thread_resume_array): Remove.
6822 (linux_set_resume_request): Return void, take arguments
6823 directly.
6824 (linux_resume): Use for_each_thread.
6825
6826 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6827
6828 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6829 return bool, remove data argument.
6830 (linux_stabilize_threads): Use find_thread.
6831
6832 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6833
6834 * linux-low.c (unsuspend_one_lwp): Remove.
6835 (unsuspend_all_lwps): Use for_each_thread, inline code from
6836 unsuspend_one_lwp.
6837
6838 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6839
6840 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6841 * linux-low.c (struct iterate_over_lwps_args): Remove.
6842 (iterate_over_lwps_filter): Remove.
6843 (iterate_over_lwps): Use find_thread.
6844
6845 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6846
6847 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6848 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6849 code from reset_lwp_ptrace_options_callback.
6850
6851 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6852
6853 * linux-arm-low.c (struct update_registers_data): Remove.
6854 (update_registers_callback): Return void, take arguments
6855 directly, don't check thread's pid.
6856 (arm_insert_point, arm_remove_point): Use for_each_thread.
6857
6858 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6859
6860 * win32-low.c (continue_one_thread): Return void, take argument
6861 directly.
6862 (child_continue): Use for_each_thread.
6863
6864 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6865
6866 * win32-i386-low.c (update_debug_registers_callback): Rename
6867 to ...
6868 (update_debug_registers): ... this, return void, remove pid_p arg.
6869 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6870
6871 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6872
6873 * inferiors.h (struct process_info): Add constructor, initialize
6874 fields..
6875 <syscalls_to_catch>: Change type to std::vector<int>.
6876 * inferiors.c (add_process): Allocate process_info with new.
6877 (remove_process): Free process_info with delete.
6878 * linux-low.c (handle_extended_wait): Adjust.
6879 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6880 * server.c (handle_general_set): Adjust.
6881
6882 2017-11-16 Pedro Alves <palves@redhat.com>
6883
6884 * remote-utils.c (remote_close): Block SIGIO signals instead of
6885 uninstalling the SIGIO handler.
6886
6887 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6888
6889 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6890
6891 2017-11-16 Yao Qi <yao.qi@linaro.org>
6892
6893 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6894 (tic6x_store_gregset): Likewise.
6895 (tic6x_usrregs_info): Move it up.
6896
6897 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6898
6899 * Makefile.in: Update arch rules.
6900 * configure.srv: Explicitly mark arch/ files.
6901
6902 2017-11-13 Andreas Schwab <schwab@suse.de>
6903
6904 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6905 function.
6906 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6907
6908 2017-11-06 Pedro Alves <palves@redhat.com>
6909
6910 * config.in, configure: Regenerate.
6911
6912 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6913
6914 * target.c (struct thread_search): Remove.
6915 (thread_search_callback): Remove.
6916 (prepare_to_access_memory): Use for_each_thread instead of
6917 find_inferior. Inline code from thread_search_callback.
6918
6919 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6920
6921 * server.c (struct visit_actioned_threads_data): Remove.
6922 (visit_actioned_threads): Change prototype to take arguments
6923 directly.
6924 (resume): Use find_thread instead of find_inferior.
6925
6926 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6927
6928 * server.c (queue_stop_reply_callback): Change prototype, return
6929 void.
6930 (find_status_pending_thread_callback): Remove.
6931 (handle_status): Replace find_inferior with find_thread and
6932 for_each_thread.
6933
6934 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6935
6936 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6937 with REGNO.
6938 (aarch64_store_gregset): Likewise.
6939 (aarch64_fill_fpregset): Likewise.
6940 (aarch64_store_fpregset): Likewise.
6941
6942 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6943
6944 * gdbthread.h (find_thread, for_each_thread): New functions.
6945 * inferiors.c (thread_of_pid): Remove.
6946 (find_any_thread_of_pid): Use find_thread.
6947 * linux-low.c (num_lwps): Use for_each_thread.
6948
6949 2017-10-17 Yao Qi <yao.qi@linaro.org>
6950
6951 * Makefile.in: Remove one rule.
6952 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6953
6954 2017-10-17 Yao Qi <yao.qi@linaro.org>
6955
6956 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6957 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6958
6959 2017-10-17 Yao Qi <yao.qi@linaro.org>
6960
6961 * configure.srv: Rename arm.o with arch/arm.o.
6962
6963 2017-10-17 Yao Qi <yao.qi@linaro.org>
6964
6965 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6966 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6967 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6968 (arch-i386.o, arch-amd64.o): Remove rules.
6969 (arch/%.o): New rule.
6970 Update POSTCOMPILE and COMPILE.pre.
6971 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6972 * configure: Re-generated.
6973 * configure.srv: Replace arch-i386.o with arch/i386.o.
6974 Replace arch-amd64.o with arch/amd64.o.
6975
6976 2017-10-16 Yao Qi <yao.qi@linaro.org>
6977
6978 * configure: Regenerated.
6979
6980 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6981
6982 * inferiors.h: (struct inferior_list): Remove.
6983 (struct inferior_list_entry); Remove.
6984 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6985 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6986 get_first_inferior): Remove.
6987 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6988 find_inferior_id, find_inferior_in_random): Change signature.
6989 * inferiors.c (all_threads): Change type to
6990 std::list<thread_info *>.
6991 (get_thread): Remove macro.
6992 (find_inferior, find_inferior_id): Change signature, implement
6993 using find_thread.
6994 (find_inferior_in_random): Change signature, implement using
6995 find_thread_in_random.
6996 (for_each_inferior, for_each_inferior_with_data): Change
6997 signature, implement using for_each_thread.
6998 (add_inferior_to_list, remove_inferior): Remove.
6999 (add_thread, get_first_thread, thread_of_pid,
7000 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
7001 (get_first_inferior, one_inferior_p, clear_inferior_list):
7002 Remove.
7003 (clear_inferiors, get_thread_process): Update.
7004 * gdbthread.h: Include <list>.
7005 (struct thread_info) <entry>: Remove field.
7006 <id>: New field.
7007 (all_threads): Change type to std::list<thread_info *>.
7008 (get_first_inferior): Add doc.
7009 (find_thread, for_each_thread, find_thread_in_random): New
7010 functions.
7011 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
7012 * linux-arm-low.c (update_registers_callback): Update.
7013 * linux-low.c (second_thread_of_pid_p): Update.
7014 (kill_one_lwp_callback, linux_detach_lwp_callback,
7015 delete_lwp_callback, status_pending_p_callback, same_lwp,
7016 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
7017 iterate_over_lwps, not_stopped_callback,
7018 resume_stopped_resumed_lwps, count_events_callback,
7019 select_singlestep_lwp_callback, select_event_lwp_callback,
7020 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
7021 suspend_and_send_sigstop_callback, wait_for_sigstop,
7022 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
7023 lwp_running, linux_set_resume_request, resume_status_pending_p,
7024 need_step_over_p, start_step_over, linux_resume_one_thread,
7025 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
7026 reset_lwp_ptrace_options_callback): Update.
7027 * linux-mips-low.c (update_watch_registers_callback): Update.
7028 * regcache.c (regcache_invalidate_one, regcache_invalidate):
7029 Update.
7030 (free_register_cache_thread_one): Remove.
7031 (regcache_release): Update.
7032 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
7033 handle_qxfer_threads_worker): Update.
7034 (handle_query): Update, use list iterator.
7035 (visit_actioned_threads, handle_pending_status,
7036 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
7037 clear_pending_status_callback, set_pending_status_callback,
7038 find_status_pending_thread_callback, handle_status,
7039 process_serial_event): Update.
7040 * target.c (thread_search_callback): Update.
7041 * thread-db.c (thread_db_get_tls_address): Update.
7042 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
7043 Update.
7044 * win32-i386-low.c (update_debug_registers_callback): Update.
7045 * win32-low.c (delete_thread_info, child_delete_thread,
7046 continue_one_thread, suspend_one_thread,
7047 get_child_debug_event): Adjust.
7048
7049 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
7050
7051 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
7052 * inferiors.h: Include <list>.
7053 (struct process_info) <entry>: Remove field.
7054 <pid>: New field.
7055 (pid_of): Change macro to function.
7056 (ptid_of, lwpid_of): Remove macro.
7057 (all_processes): Change type to std::list<process_info *>.
7058 (ALL_PROCESSES): Remove macro.
7059 (for_each_process, find_process): New function.
7060 * inferiors.c (all_processes): Change type to
7061 std::list<process_info *>.
7062 (find_thread_process): Adjust.
7063 (add_process): Likewise.
7064 (remove_process): Likewise.
7065 (find_process_pid): Likewise.
7066 (get_first_process): Likewise.
7067 (started_inferior_callback): Remove.
7068 (have_started_inferiors_p): Adjust.
7069 (attached_inferior_callback): Remove.
7070 (have_attached_inferiors_p): Adjust.
7071 * linux-low.c (check_zombie_leaders): Likewise.
7072 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
7073 (x86_linux_update_xmltarget): Adjust.
7074 * server.c (handle_query): Likewise.
7075 (gdb_reattached_process): Remove.
7076 (handle_status): Adjust.
7077 (kill_inferior_callback): Likewise.
7078 (detach_or_kill_inferior): Remove.
7079 (print_started_pid): Likewise.
7080 (print_attached_pid): Likewise.
7081 (detach_or_kill_for_exit): Update.
7082 (process_serial_event): Likewise.
7083 * linux-arm-low.c (arm_new_fork): Likewise.
7084
7085 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
7086
7087 * dll.h: Include <list>.
7088 (struct dll_info): Add constructor.
7089 <entry>: Remove field.
7090 (all_dlls): Change type to std::list<dll_info>.
7091 * dll.c: Include <algorithm>.
7092 (get_dll): Remove macro.
7093 (all_dlls): Change type to std::list<dll_info *>.
7094 (free_one_dll): Remove.
7095 (match_dll): Likewise.
7096 (loaded_dll): Adjust.
7097 (unloaded_dll): Adjust to all_dlls type change, use
7098 std::find_if. Inline code from match_dll.
7099 (clear_dlls): Adjust to all_dlls type change.
7100 * server.c (emit_dll_description): Remove.
7101 (handle_qxfer_libraries): Adjust to all_dlls type change,
7102 integrate emit_dll_description's functionality.
7103
7104 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
7105
7106 * linux-low.h (struct linux_target_ops) <delete_process>: New
7107 field.
7108 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
7109 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
7110 (struct linux_target_ops): Add delete_process callback.
7111 * linux-arm-low.c (arm_delete_process): New.
7112 (struct linux_target_ops): Add delete_process callback.
7113 * linux-bfin-low.c (struct linux_target_ops): Likewise.
7114 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
7115 * linux-m32r-low.c (struct linux_target_ops): Likewise.
7116 * linux-mips-low.c (mips_linux_delete_process): New.
7117 (struct linux_target_ops): Add delete_process callback.
7118 * linux-ppc-low.c (struct linux_target_ops): Likewise.
7119 * linux-s390-low.c (struct linux_target_ops): Likewise.
7120 * linux-sh-low.c (struct linux_target_ops): Likewise.
7121 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
7122 * linux-tile-low.c (struct linux_target_ops): Likewise.
7123 * linux-x86-low.c (x86_linux_delete_process): New.
7124 (struct linux_target_ops): Add delete_process callback.
7125 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
7126
7127 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
7128
7129 * linux-aarch64-low.c (the_low_target): Add thread delete
7130 callback.
7131 * linux-arm-low.c (arm_delete_thread): New function.
7132 (the_low_target): Add thread delete callback.
7133 * linux-bfin-low.c (the_low_target): Likewise.
7134 * linux-crisv32-low.c (the_low_target): Likewise.
7135 * linux-low.c (delete_lwp): Invoke delete_thread callback if
7136 set.
7137 * linux-low.h (struct linux_target_ops) <delete_thread>: New
7138 field.
7139 * linux-m32r-low.c (the_low_target): Add thread delete callback.
7140 * linux-mips-low.c (mips_linux_delete_thread): New function.
7141 (the_low_target): Add thread delete callback.
7142 * linux-ppc-low.c (the_low_target): Likewise.
7143 * linux-s390-low.c (the_low_target): Likewise.
7144 * linux-sh-low.c (the_low_target): Likewise.
7145 * linux-tic6x-low.c (the_low_target): Likewise.
7146 * linux-tile-low.c (the_low_target): Likewise.
7147 * linux-x86-low.c (the_low_target): Likewise.
7148 * linux-xtensa-low.c (the_low_target): Likewise.
7149
7150 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
7151
7152 * win32-low.c: Include "common-inferior.h".
7153
7154 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7155
7156 * inferiors.c (set_inferior_cwd): New function.
7157 * server.c (handle_general_set): Handle QSetWorkingDir packet.
7158 (handle_query): Inform that QSetWorkingDir is supported.
7159 * win32-low.c (create_process): Pass the inferior's cwd to
7160 CreateProcess.
7161
7162 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7163
7164 * inferiors.c (current_inferior_cwd): New global variable.
7165 (get_inferior_cwd): New function.
7166 * inferiors.h (struct process_info) <cwd>: New field.
7167
7168 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7169
7170 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
7171 (OBS): Add gdb_tilde_expand.o.
7172
7173 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
7174
7175 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
7176 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
7177
7178 2017-09-29 Pedro Alves <palves@redhat.com>
7179
7180 * ax.c (gdb_parse_agent_expr): Constify.
7181 * ax.h (gdb_parse_agent_expr): Constify.
7182 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7183 Constify.
7184 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
7185 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
7186 * remote-utils.h (read_ptid): Constify.
7187 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
7188 (process_point_options, process_serial_event): Constify.
7189 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
7190 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
7191 (cmd_qtbuffer): Constify.
7192
7193 2017-09-29 Pedro Alves <palves@redhat.com>
7194
7195 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
7196 fails.
7197
7198 2017-09-29 Pedro Alves <palves@redhat.com>
7199
7200 * linux-low.c (handle_extended_wait): Pass parent thread instead
7201 of process to thread_db_notice_clone.
7202 * linux-low.h (thread_db_notice_clone): Replace parent process
7203 parameter with parent thread parameter.
7204 * thread-db.c (find_one_thread): Add comment.
7205 (thread_db_notice_clone): Replace parent process parameter with
7206 parent thread parameter. Temporarily switch to the parent thread.
7207
7208 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
7209
7210 * gdbthread.h: Include "common-gdbthread.h".
7211 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
7212 "if" when validating the ptid.
7213 * remote-utils.c: Include "gdbthread.h".
7214 (prepare_resume_reply): Use "switch_to_thread".
7215 * target.c (done_accessing_memory): Likewise.
7216
7217 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7218
7219 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
7220 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
7221 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
7222 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
7223 s390x-gs-linux64-ipa.o to ipa_obj.
7224 * linux-s390-low.c (HWCAP_S390_GS): New define.
7225 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
7226 New functions.
7227 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
7228 (s390_arch_setup): Check for guarded-storage support and choose
7229 appropriate tdesc.
7230 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
7231 init_registers_s390x_gs_linux64.
7232 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
7233 enum value.
7234 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
7235 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
7236
7237 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
7238
7239 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
7240
7241 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7242
7243 * linux-low.h (struct lwp_info): Add new field, thread_handle.
7244 (thread_db_thread_handle): Declare.
7245 * linux-low.c (linux_target_ops): Initialize thread_handle.
7246 * server.c (handle_qxfer_threads_worker): Add support for
7247 "handle" attribute.
7248 * target.h (struct target_ops): Add new function pointer,
7249 thread_handle.
7250 (target_thread_handle): Define.
7251 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
7252 field in lwp.
7253 (thread_db_thread_handle): New function.
7254
7255 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7256
7257 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
7258 * linux-low.h (thread_db_notice_clone): Declare.
7259 * thread-db.c (thread_db_notice_clone): New function.
7260
7261 2017-09-21 Pedro Alves <palves@redhat.com>
7262
7263 * server.c (gdb_read_memory, handle_status, process_serial_event)
7264 (handle_serial_event, handle_target_event): Adjust to
7265 set_desired_thread prototype change.
7266 * target.c (set_desired_thread): Remove 'use_general' parameter
7267 and adjust.
7268 * target.h (set_desired_thread): Remove 'use_general' parameter.
7269
7270 2017-09-20 Tom Tromey <tom@tromey.com>
7271
7272 * target.c (target_terminal::terminal_state): Define.
7273 (target_terminal::init): Rename from target_terminal_init.
7274 (target_terminal::inferior): Rename from
7275 target_terminal_inferior.
7276 (target_terminal::ours): Rename from target_terminal_ours.
7277 (target_terminal::ours_for_output, target_terminal::info): New.
7278
7279 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7280
7281 * server.c (accumulate_file_name_length): Remove.
7282 (emit_dll_description): Adjust to std::string change.
7283 (handle_qxfer_libraries): Use std::string to hold document.
7284
7285 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7286
7287 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
7288 return type of xml_escape_text.
7289 * server.c (emit_dll_description): Likewise.
7290
7291 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7292
7293 * server.c (captured_main): Accept argument for --selftest.
7294 Update run_tests call.
7295 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
7296 when registering selftests.
7297
7298 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
7299
7300 * regcache.c (get_thread_regcache): Update code to use "std::vector"
7301 instead of "VEC" for "target_desc.reg_defs".
7302 (regcache_cpy): Likewise.
7303 (registers_to_string): Likewise.
7304 (registers_from_string): Likewise.
7305 (find_regno): Likewise.
7306 (supply_regblock): Likewise.
7307 (regcache_raw_read_unsigned): Likewise.
7308 * tdesc.c (init_target_desc): Likewise.
7309 (tdesc_create_reg): Likewise.
7310 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
7311 (struct target_desc) <reg_defs>: Convert to "std::vector".
7312 (target_desc): Do not initialize "reg_defs".
7313 (~target_desc): Update code to use "std::vector" instead of "VEC"
7314 for "target_desc.reg_defs".
7315 (operator==): Likewise.
7316
7317 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7318
7319 * inferiors.h (thread_to_gdb_id): Remove.
7320 * inferiors.c (thread_to_gdb_id): Remove.
7321 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
7322 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7323 lynx_store_registers, lynx_read_memory, lynx_write_memory):
7324 Likewise.
7325 * nto-low.c (nto_fetch_registers, nto_store_registers,
7326 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
7327
7328 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7329
7330 * inferiors.h (gdb_id_to_thread_id): Remove.
7331 * inferiors.c (gdb_id_to_thread_id): Remove.
7332 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7333 removal. Move pid declaration closer to where it's used.
7334
7335 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7336
7337 * server.c (handle_detach): New function.
7338 (process_serial_event): Move code out, call handle_detach.
7339
7340 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7341
7342 * server.c (require_running): Rename to ...
7343 (require_running_or_return): ... this ...
7344 (require_running_or_break): ... and this.
7345 (handle_query, process_serial_event): Adjust.
7346
7347 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7348
7349 * linux-low.c (linux_set_resume_request): Remove unused
7350 variables.
7351
7352 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7353
7354 * server.c (first_thread_of): Remove.
7355 (process_serial_event): Replace usage of first_thread_of with
7356 find_any_thread_of_pid.
7357 * tracepoint.c (same_process_p): Remove.
7358 (gdb_agent_about_to_close): Replace usage of same_process_p with
7359 find_any_thread_of_pid.
7360 * linux-x86-low.c (same_process_callback): Remove.
7361 (x86_arch_setup_process_callback): Replace usage of
7362 same_process_callback with find_any_thread_of_pid.
7363 * thread-db.c (any_thread_of): Remove.
7364 (switch_to_process): Replace usage of any_thread_of with
7365 find_any_thread_of_pid.
7366 * inferiors.c (thread_pid_matches_callback): Remove.
7367 (find_thread_process): Adjust to use find_any_thread_of_pid.
7368
7369 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7370
7371 * regcache.c (get_thread_regcache): Guard calls to "memset"
7372 with "!VEC_empty".
7373
7374 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7375
7376 * linux-low.c (handle_extended_wait): Use
7377 "allocate_target_description" instead of "XNEW".
7378 * linux-x86-low.c (initialize_low_arch): Likewise.
7379
7380 2017-09-05 Yao Qi <yao.qi@linaro.org>
7381
7382 * configure.srv (srv_i386_regobj): Remove.
7383 (srv_amd64_regobj): Remove.
7384 (srv_regobj): Set it to "" for x86 non-linux targets.
7385 * linux-x86-tdesc.c (i386_linux_read_description):
7386 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7387 (init_registers_i386): Remove the declaration.
7388 (tdesc_i386): Remove the declaration.
7389 (lynx_i386_arch_setup): Call i386_create_target_description.
7390 * nto-x86-low.c: Likewise.
7391 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7392 [!__x86_64__]: include arch/i386.h.
7393 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7394
7395 2017-09-05 Yao Qi <yao.qi@linaro.org>
7396
7397 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7398 i386/amd64-XXX-linux from it.
7399
7400 2017-09-05 Yao Qi <yao.qi@linaro.org>
7401
7402 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7403 false.
7404 (ipa_amd64_linux_regobj): Remove.
7405 (ipa_x32_linux_regobj): Remove.
7406
7407 2017-09-05 Yao Qi <yao.qi@linaro.org>
7408
7409 * Makefile.in (arch-amd64.o): New rule.
7410 * configure.srv: Append arch-amd64.o.
7411 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7412 (get_ipa_tdesc): Call amd64_linux_read_description.
7413 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7414 and init_registers_amd64_XXX.
7415 * linux-x86-low.c (x86_linux_read_description): Call
7416 amd64_linux_read_description.
7417 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7418 (initialize_low_arch): Don't call init_registers_x32_XXX and
7419 init_registers_amd64_XXX.
7420 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7421 and tdesc_amd64_XXX.
7422 [__x86_64__] (amd64_tdesc_test): New function.
7423 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7424 and init_registers_amd64_XXX.
7425 * linux-x86-tdesc.c: Include arch/amd64.h.
7426 (xcr0_to_tdesc_idx): New function.
7427 (i386_linux_read_description): New function.
7428 (amd64_get_ipa_tdesc_idx): New function.
7429 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7430 (amd64_get_ipa_tdesc): Declare.
7431
7432 2017-09-05 Yao Qi <yao.qi@linaro.org>
7433
7434 * configure.srv (srv_i386_linux_xmlfiles): Remove
7435 i386/i386-XXX-linux.xml from it.
7436
7437 2017-09-05 Yao Qi <yao.qi@linaro.org>
7438
7439 * configure.srv: Set srv_i386_linux_regobj empty if $development
7440 is false.
7441 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7442 initialize_low_tdesc.
7443 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7444 with #if initialize_low_tdesc.
7445 * linux-x86-tdesc-selftest.c: New file.
7446 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7447
7448 2017-09-05 Yao Qi <yao.qi@linaro.org>
7449
7450 * Makefile.in (arch-i386.o): New rule.
7451 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7452 (x86_64-*-linux*): Likewise.
7453 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7454 include arch/i386.h.
7455 (i386_linux_read_description): Remove code and call
7456 i386_create_target_description.
7457 * tdesc.c (allocate_target_description): New function.
7458 * tdesc.h (set_tdesc_architecture): Remove declaration.
7459 (set_tdesc_osabi): Likewise.
7460
7461 2017-09-05 Yao Qi <yao.qi@linaro.org>
7462
7463 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7464 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7465 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7466 .xmltarget.
7467 * server.c (get_features_xml): Call tdesc_get_features_xml.
7468 * tdesc.c (set_tdesc_architecture): New function.
7469 (set_tdesc_osabi): New function.
7470 (tdesc_get_features_xml): New function.
7471 (tdesc_create_feature): Add an argument.
7472 * tdesc.h (struct target_desc) <features>: New field.
7473 <arch, osabi>: New field.
7474 (~target_desc): xfree features, arch, and osabi.
7475 (target_desc::oerator==): Don't compare .xmltarget.
7476 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7477 (set_tdesc_osabi): Likewise.
7478 (tdesc_get_features_xml): Likewise.
7479
7480 2017-09-05 Yao Qi <yao.qi@linaro.org>
7481
7482 * linux-x86-tdesc.c: Include selftest.h.
7483 (i386_tdesc_test): New function.
7484 (initialize_low_tdesc): Call selftests::register_test.
7485 * tdesc.h: Include regdef.h.
7486 (target_desc): Override operator == and !=.
7487
7488 2017-09-05 Yao Qi <yao.qi@linaro.org>
7489
7490 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7491 (ipa_obj): Likewise.
7492 * linux-i386-ipa.c: Include common/x86-xstate.h
7493 (get_ipa_tdesc): Call i386_linux_read_description.
7494 (initialize_low_tracepoint): Don't call init_registers_XXX
7495 functions, call initialize_low_tdesc instead.
7496 * linux-x86-low.c (x86_linux_read_description): Call
7497 i386_linux_read_description.
7498 (initialize_low_arch): Don't call init_registers_i386_XXX
7499 functions, call initialize_low_tdesc.
7500 * linux-x86-tdesc.c: New file.
7501 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7502 (i386_get_ipa_tdesc_idx): Declare.
7503 (i386_get_ipa_tdesc): Declare.
7504 (initialize_low_tdesc): Declare.
7505
7506 2017-09-05 Yao Qi <yao.qi@linaro.org>
7507
7508 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7509 instead of 0.
7510
7511 2017-09-05 Yao Qi <yao.qi@linaro.org>
7512
7513 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7514 * regcache.c (get_thread_regcache): Use VEC_length.
7515 (init_register_cache): Likewise.
7516 (regcache_cpy): Likewise.
7517 (registers_to_string): Iterate reg_defs via VEC_iterate.
7518 (find_regno): Likewise.
7519 (find_register_by_number): Use VEC_index.
7520 (register_size): Call find_register_by_number.
7521 (register_data): Call find_register_by_number.
7522 (supply_regblock): Use VEC_length.
7523 (regcache_raw_read_unsigned): Likewise.
7524 * tdesc.c (init_target_desc): Iterate reg_defs via
7525 VEC_iterate.
7526 (default_description): Update initializer.
7527 (copy_target_description): Don't update field num_registers.
7528 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7529 <num_registers>: Remove.
7530
7531 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7532
7533 * Makefile.in (.SECONDARY): Define target.
7534
7535 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7536
7537 * linux-low.c (linux_wait_1): Adjust.
7538 * server.c (queue_stop_reply_callback): Adjust.
7539
7540 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7541
7542 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7543 QEnvironmentUnset and QEnvironmentReset packets.
7544 (handle_query): Inform remote that QEnvironmentHexEncoded,
7545 QEnvironmentUnset and QEnvironmentReset are supported.
7546
7547 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7548
7549 * inferiors.h (inferior_target_data): Rename to ...
7550 (thread_target_data): ... this.
7551 (inferior_regcache_data): Rename to ...
7552 (thread_regcache_data): ... this.
7553 (set_inferior_regcache_data): Rename to ...
7554 (set_thread_regcache_data): ... this.
7555 * inferiors.c (inferior_target_data): Rename to ...
7556 (thread_target_data): ... this.
7557 (inferior_regcache_data): Rename to ...
7558 (thread_regcache_data): ... this.
7559 (set_inferior_regcache_data): Rename to ...
7560 (set_thread_regcache_data): ... this.
7561 (free_one_thread): Update.
7562 * linux-low.h (get_thread_lwp): Update.
7563 * regcache.c (get_thread_regcache): Update.
7564 (regcache_invalidate_thread): Update.
7565 (free_register_cache_thread): Update.
7566 * win32-i386-low.c (update_debug_registers_callback): Update.
7567 (win32_get_current_dr): Update.
7568 * win32-low.c (thread_rec): Update.
7569 (delete_thread_info): Update.
7570 (continue_one_thread): Update.
7571 (suspend_one_thread): Update.
7572
7573 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7574
7575 * inferiors.c (set_inferior_target_data): Remove.
7576 * inferiors.h (set_inferior_target_data): Remove.
7577
7578 2017-08-18 Yao Qi <yao.qi@linaro.org>
7579
7580 * Makefile.in (OBS): Add selftest.o.
7581 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7582 * configure, config.in: Re-generated.
7583 * server.c: Include common/sefltest.h.
7584 (captured_main): Handle option --selftest.
7585
7586 2017-08-09 Yao Qi <yao.qi@linaro.org>
7587
7588 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7589 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7590 i386-avx-mpx.o and i386-mmx.o.
7591 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7592 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7593 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7594 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7595 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7596 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7597 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7598 i386/amd64-avx-mpx.xml.
7599
7600 2017-08-09 Yao Qi <yao.qi@linaro.org>
7601
7602 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7603 and x32-avx-avx512.o.
7604 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7605 i386/x32-avx-avx512.xml.
7606
7607 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7608
7609 * tracepoint.h (enum class fast_tpoint_collect_result): New
7610 enumeration.
7611 (fast_tracepoint_collecting): Change return type to
7612 fast_tpoint_collect_result.
7613 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7614 * linux-low.h: Include tracepoint.h.
7615 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7616 fast_tpoint_collect_result.
7617 * linux-low.c (handle_tracepoints): Adjust.
7618 (linux_fast_tracepoint_collecting): Change return type to
7619 fast_tpoint_collect_result.
7620 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7621 linux_wait_1, stuck_in_jump_pad_callback,
7622 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7623 proceed_one_lwp): Adjust to type change.
7624
7625 2017-07-10 Yao Qi <yao.qi@linaro.org>
7626
7627 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7628
7629 2017-06-29 Yao Qi <yao.qi@linaro.org>
7630
7631 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7632 Remove.
7633 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7634
7635 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7636
7637 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7638
7639 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7640
7641 * linux-low.c (linux_create_inferior): Adjust code to access the
7642 environment information via 'gdb_environ' class.
7643 * lynx-low.c (lynx_create_inferior): Likewise.
7644 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7645 (get_environ): Return a pointer to 'our_environ'.
7646 (captured_main): Initialize 'our_environ'.
7647 * server.h (get_environ): Adjust prototype.
7648 * spu-low.c (spu_create_inferior): Adjust code to access the
7649 environment information via 'gdb_environ' class.
7650
7651 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7652
7653 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7654 usage of "register" keyword.
7655
7656 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7657
7658 * configure: Re-generate.
7659
7660 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7661
7662 * configure: Re-generate.
7663
7664 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7665
7666 * Makefile.in (COMPILE.pre): Add "-x c++".
7667
7668 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7669
7670 * fork-child.c: Conditionally include <signal.h>.
7671
7672 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7673
7674 * server.c (handle_general_set): Handle new packet
7675 "QStartupWithShell".
7676 (handle_query): Add "QStartupWithShell" to the list of supported
7677 packets.
7678 (gdbserver_usage): Add help text explaining the
7679 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7680 options.
7681 (captured_main): Recognize and act upon the presence of the new
7682 CLI options.
7683
7684 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7685 Pedro Alves <palves@redhat.com>
7686
7687 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7688 * configure: Regenerate.
7689 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7690 "fork-inferior.o".
7691 (i[34567]86-*-lynxos*): Likewise.
7692 (spu*-*-*): Likewise.
7693 * fork-child.c: New file.
7694 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7695 and "environ.h".
7696 (linux_ptrace_fun): New function.
7697 (linux_create_inferior): Adjust function prototype to reflect
7698 change on "target.h". Adjust function code to use
7699 "fork_inferior".
7700 (linux_request_interrupt): Delete "signal_pid".
7701 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7702 (lynx_ptrace_fun): New function.
7703 (lynx_create_inferior): Adjust function prototype to reflect
7704 change on "target.h". Adjust function code to use
7705 "fork_inferior".
7706 * nto-low.c (nto_create_inferior): Adjust function prototype and
7707 code to reflect change on "target.h". Update comments.
7708 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7709 "common-terminal.h" and "environ.h".
7710 (terminal_fd): Moved to fork-child.c.
7711 (old_foreground_pgrp): Likewise.
7712 (restore_old_foreground_pgrp): Likewise.
7713 (last_status): Make it global.
7714 (last_ptid): Likewise.
7715 (our_environ): New variable.
7716 (startup_with_shell): Likewise.
7717 (program_name): Likewise.
7718 (program_argv): Rename to...
7719 (program_args): ...this.
7720 (wrapper_argv): New variable.
7721 (start_inferior): Delete function.
7722 (get_exec_wrapper): New function.
7723 (get_exec_file): Likewise.
7724 (get_environ): Likewise.
7725 (prefork_hook): Likewise.
7726 (post_fork_inferior): Likewise.
7727 (postfork_hook): Likewise.
7728 (postfork_child_hook): Likewise.
7729 (handle_v_run): Update code to deal with arguments coming from the
7730 remote host. Update calls from "start_inferior" to
7731 "create_inferior".
7732 (captured_main): Likewise. Initialize environment variable. Call
7733 "have_job_control".
7734 * server.h (post_fork_inferior): New prototype.
7735 (get_environ): Likewise.
7736 (last_status): Declare.
7737 (last_ptid): Likewise.
7738 (signal_pid): Likewise.
7739 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7740 (spu_ptrace_fun): New function.
7741 (spu_create_inferior): Adjust function prototype to reflect change
7742 on "target.h". Adjust function code to use "fork_inferior".
7743 * target.c (target_terminal_init): New function.
7744 (target_terminal_inferior): Likewise.
7745 (target_terminal_ours): Likewise.
7746 * target.h: Include <vector>.
7747 (struct target_ops) <create_inferior>: Update prototype.
7748 (create_inferior): Update macro.
7749 * utils.c (gdb_flush_out_err): New function.
7750 * win32-low.c (win32_create_inferior): Adjust function prototype
7751 and code to reflect change on "target.h".
7752
7753 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7754
7755 * inferiors.c (switch_to_thread): New function.
7756
7757 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7758
7759 * Makefile.in (SFILE): Add "common/job-control.c".
7760 (OBS): Add "job-control.o".
7761
7762 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7763
7764 * Makefile: Remove "@host_makefile_frag@".
7765
7766 2017-05-05 Pedro Alves <palves@redhat.com>
7767
7768 * configure: Regenerate.
7769
7770 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7771
7772 * configure: Regenerate.
7773
7774 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7775
7776 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7777 software_single_step change of return type to
7778 std::vector<CORE_ADDR>.
7779 * linux-low.c (install_software_single_step_breakpoints):
7780 Likewise.
7781 * linux-low.h (install_software_single_step_breakpoints):
7782 Likewise.
7783
7784 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7785
7786 * remote-utils.c: Include "gdb_termios.h" instead of
7787 "terminal.h".
7788 * terminal.h: Delete file.
7789
7790 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7791
7792 * server.c: Include <vector>.
7793 <program_argv, wrapper_argv>: Convert to std::vector.
7794 (start_inferior): Rewrite function to use C++.
7795 (handle_v_run): Likewise. Update code that calculates the argv
7796 based on the vRun packet; use C++.
7797 (captured_main): Likewise.
7798
7799 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7800
7801 * server.c (handle_v_cont): Initialize thread_resume::thread
7802 with null_ptid.
7803
7804 2017-04-05 Pedro Alves <palves@redhat.com>
7805
7806 * configure: Regenerate.
7807
7808 2017-04-05 Pedro Alves <palves@redhat.com>
7809
7810 * gdbreplay.c (sync_error): Constify.
7811 * linux-x86-low.c (push_opcode): Constify.
7812
7813 2017-04-05 Pedro Alves <palves@redhat.com>
7814
7815 * win32-low.c (get_child_debug_event)
7816 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7817 Report TARGET_WAITKIND_SPURIOUS instead.
7818
7819 2017-04-05 Pedro Alves <palves@redhat.com>
7820
7821 * remote-utils.c (remote_prepare, remote_open): Constify.
7822 * remote-utils.h (remote_prepare, remote_open): Constify.
7823 * server.c (captured_main): Constify 'port' handling.
7824
7825 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7826
7827 * Makefile.in (clean): Clear .deps.
7828
7829 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7830
7831 * .gitignore: Remove generated files, replace with wildcard.
7832 * (clean): Replace removal of generated files with wildcard.
7833 (version.c): Replace with...
7834 (version-generated.c): ...this.
7835 (xml-builtin.c): Replace with...
7836 (xml-builtin-generated.c): ...this.
7837 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7838 (%.c: *regformats*): Replace with...
7839 (%-generated.c: *regformats*): ...this.
7840
7841 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7842
7843 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7844 (xtensa_fill_gregset): Call collect_register_by_name for
7845 threadptr register.
7846 (xtensa_store_gregset): Call supply_register_by_name for
7847 threadptr register.
7848
7849 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7850
7851 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7852 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7853 (xtensa_store_gregset): Call supply_register for all registers in
7854 a0_regnum..a0_regnum + C0_NREGS range.
7855
7856 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7857
7858 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7859 (ax-ipa.o: ax.c): Remove.
7860 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7861 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7862 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7863 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7864 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7865
7866 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7867
7868 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7869 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7870 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7871 (errors-ipa.o: ../common/errors.c): Remove.
7872 (format-ipa.o: ../common/format.c): Remove.
7873 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7874
7875 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7876
7877 * Makefile.in (%-ipa.o: %.c): New rule.
7878 (tracepoint-ipa.o: tracepoint.c): Remove.
7879 (utils-ipa.o: utils.c): Remove.
7880 (remote-utils-ipa.o: remote-utils.c): Remove.
7881 (regcache-ipa.o: regcache.c): Remove.
7882 (i386-linux-ipa.o: i386-linux.c): Remove.
7883 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7884 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7885 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7886 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7887 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7888 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7889 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7890 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7891 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7892 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7893 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7894 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7895 (aarch64-ipa.o: aarch64.c): Remove.
7896 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7897 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7898 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7899 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7900 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7901 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7902 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7903 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7904 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7905 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7906 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7907 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7908 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7909 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7910 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7911 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7912 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7913 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7914 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7915 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7916 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7917 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7918 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7919 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7920 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7921 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7922 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7923 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7924 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7925 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7926 (tdesc-ipa.o: tdesc.c): Remove.
7927 (x32-linux-ipa.o: x32-linux.c): Remove.
7928 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7929 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7930
7931 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7932
7933 * Makefile.in (%.o: ../arch/%.c): New rule.
7934 (arm.o: ../arch/arm.c): Remove.
7935 (arm-linux.o: ../arch/arm-linux.c): Remove.
7936 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7937 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7938
7939 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7940
7941 * Makefile.in (%.o: ../nat/%.c): New rule.
7942 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7943 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7944 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7945 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7946 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7947 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7948 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7949 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7950 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7951 (linux-personality.o: ../nat/linux-personality.c): Remove.
7952 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7953 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7954 (x86-linux.o: ../nat/x86-linux.c): Remove.
7955 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7956 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7957
7958 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7959
7960 * Makefile.in (%.o: ../common/%.c): New rule.
7961 (signals.o: ../common/signals.c): Remove.
7962 (print-utils.o: ../common/print-utils.c): Remove.
7963 (rsp-low.o: ../common/rsp-low.c): Remove.
7964 (common-utils.o: ../common/common-utils.c): Remove.
7965 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7966 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7967 (vec.o: ../common/vec.c): Remove.
7968 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7969 (xml-utils.o: ../common/xml-utils.c): Remove.
7970 (ptid.o: ../common/ptid.c): Remove.
7971 (buffer.o: ../common/buffer.c): Remove.
7972 (format.o: ../common/format.c): Remove.
7973 (filestuff.o: ../common/filestuff.c): Remove.
7974 (agent.o: ../common/agent.c): Remove.
7975 (errors.o: ../common/errors.c): Remove.
7976 (environ.o: ../common/environ.c): Remove.
7977 (common-debug.o: ../common/common-debug.c): Remove.
7978 (cleanups.o: ../common/cleanups.c): Remove.
7979 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7980 (fileio.o: ../common/fileio.c): Remove.
7981 (common-regcache.o: ../common/common-regcache.c): Remove.
7982 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7983 (new-op.o: ../common/new-op.c): Remove.
7984 (btrace-common.o: ../common/btrace-common.c): Remove.
7985
7986 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7987
7988 * Makefile.in (%.o: ../target/%.c): New rule.
7989 (waitstatus.o: ../target/waitstatus.c): Remove.
7990
7991 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7992
7993 * Makefile.in
7994 (%.c: ../regformats/%.dat,
7995 (%.c: ../regformats/arm/%.dat,
7996 (%.c: ../regformats/i386/%.dat,
7997 (%.c: ../regformats/rs6000/%.dat): New rules.
7998 (aarch64.c): Remove.
7999 (reg-arm.c): Remove.
8000 (arm-with-iwmmxt.c): Remove.
8001 (arm-with-vfpv2.c): Remove.
8002 (arm-with-vfpv3.c): Remove.
8003 (arm-with-neon.c): Remove.
8004 (reg-bfin.c): Remove.
8005 (reg-cris.c): Remove.
8006 (reg-crisv32.c): Remove.
8007 (i386.c): Remove.
8008 (i386-linux.c): Remove.
8009 (i386-avx.c): Remove.
8010 (i386-avx-linux.c): Remove.
8011 (i386-avx-avx512.c): Remove.
8012 (i386-avx-avx512-linux.c): Remove.
8013 (i386-mpx.c): Remove.
8014 (i386-mpx-linux.c): Remove.
8015 (i386-avx-mpx-avx512-pku.c): Remove.
8016 (i386-avx-mpx-avx512-pku-linux.c): Remove.
8017 (i386-avx-mpx.c): Remove.
8018 (i386-avx-mpx-linux.c): Remove.
8019 (i386-mmx.c): Remove.
8020 (i386-mmx-linux.c): Remove.
8021 (reg-ia64.c): Remove.
8022 (reg-m32r.c): Remove.
8023 (reg-m68k.c): Remove.
8024 (reg-cf.c): Remove.
8025 (mips-linux.c): Remove.
8026 (mips-dsp-linux.c): Remove.
8027 (mips64-linux.c): Remove.
8028 (mips64-dsp-linux.c): Remove.
8029 (nios2-linux.c): Remove.
8030 (powerpc-32.c): Remove.
8031 (powerpc-32l.c): Remove.
8032 (powerpc-altivec32l.c): Remove.
8033 (powerpc-cell32l.c): Remove.
8034 (powerpc-vsx32l.c): Remove.
8035 (powerpc-isa205-32l.c): Remove.
8036 (powerpc-isa205-altivec32l.c): Remove.
8037 (powerpc-isa205-vsx32l.c): Remove.
8038 (powerpc-e500l.c): Remove.
8039 (powerpc-64l.c): Remove.
8040 (powerpc-altivec64l.c): Remove.
8041 (powerpc-cell64l.c): Remove.
8042 (powerpc-vsx64l.c): Remove.
8043 (powerpc-isa205-64l.c): Remove.
8044 (powerpc-isa205-altivec64l.c): Remove.
8045 (powerpc-isa205-vsx64l.c): Remove.
8046 (s390-linux32.c): Remove.
8047 (s390-linux32v1.c): Remove.
8048 (s390-linux32v2.c): Remove.
8049 (s390-linux64.c): Remove.
8050 (s390-linux64v1.c): Remove.
8051 (s390-linux64v2.c): Remove.
8052 (s390-te-linux64.c): Remove.
8053 (s390-vx-linux64.c): Remove.
8054 (s390-tevx-linux64.c): Remove.
8055 (s390x-linux64.c): Remove.
8056 (s390x-linux64v1.c): Remove.
8057 (s390x-linux64v2.c): Remove.
8058 (s390x-te-linux64.c): Remove.
8059 (s390x-vx-linux64.c): Remove.
8060 (s390x-tevx-linux64.c): Remove.
8061 (tic6x-c64xp-linux.c): Remove.
8062 (tic6x-c64x-linux.c): Remove.
8063 (tic6x-c62x-linux.c): Remove.
8064 (reg-sh.c): Remove.
8065 (reg-sparc64.c): Remove.
8066 (reg-spu.c): Remove.
8067 (amd64.c): Remove.
8068 (amd64-linux.c): Remove.
8069 (amd64-avx.c): Remove.
8070 (amd64-avx-linux.c): Remove.
8071 (amd64-avx-avx512.c): Remove.
8072 (amd64-avx-avx512-linux.c): Remove.
8073 (amd64-mpx.c): Remove.
8074 (amd64-mpx-linux.c): Remove.
8075 (amd64-avx-mpx-avx512-pku.c): Remove.
8076 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
8077 (amd64-avx-mpx.c): Remove.
8078 (amd64-avx-mpx-linux.c): Remove.
8079 (x32.c): Remove.
8080 (x32-linux.c): Remove.
8081 (x32-avx.c): Remove.
8082 (x32-avx-linux.c): Remove.
8083 (x32-avx-avx512.c): Remove.
8084 (x32-avx-avx512-linux.c): Remove.
8085 (reg-xtensa.c): Remove.
8086 (reg-tilegx.c): Remove.
8087 (reg-tilegx32.c): Remove.
8088
8089 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
8090
8091 * Makefile.in (SFILES): Add "common/environ.c".
8092 (OBJS): Add "common/environ.h".
8093
8094 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8095
8096 * configure.ac: Check if the fs_base and gs_base members of
8097 `struct user_regs_struct' exist.
8098 * config.in: Regenerated.
8099 * configure: Likewise.
8100
8101 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
8102
8103 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
8104 target_read_memory.
8105 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
8106 (get_next_pcs_syscall_next_pc): Likewise.
8107
8108 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
8109
8110 * win32-i386-low.c: Fix incorrect reference to a couple source files.
8111 * nto-x86-low.c: Likewise.
8112
8113 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
8114
8115 * Makefile.in: Include disable-implicit-rules.mk.
8116
8117 2016-11-23 Pedro Alves <palves@redhat.com>
8118
8119 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
8120 (debug_vprintf): Use std::chrono::steady_clock instead of
8121 gettimeofday. Use '.' instead of ':'.
8122 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
8123 (get_timestamp): Use std::chrono::steady_clock instead of
8124 gettimeofday.
8125
8126 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
8127
8128 * Makefile.in: Fix whitespace formatting.
8129
8130 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
8131
8132 * Makefile.in (SFILES, OBS): Flatten list and order
8133 alphabetically.
8134
8135 2016-11-23 Pedro Alves <palves@redhat.com>
8136
8137 * event-loop.c (handle_file_event): Use warning.
8138 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
8139 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8140 Use warning.
8141
8142 2016-11-23 Pedro Alves <palves@redhat.com>
8143
8144 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
8145 output.
8146 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
8147 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
8148 debug_printf and debug_flush for debug output.
8149 * server.c (handle_general_set): Likewise.
8150 * thread-db.c (try_thread_db_load): Use debug_printf for debug
8151 output.
8152
8153 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
8154
8155 * Makefile.in (.c.o): Replace rule with ...
8156 (%.o: %.c): ... this one.
8157
8158 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
8159
8160 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
8161 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
8162 make.
8163 * configure.ac: Remove checks for the make program.
8164 * configure: Re-generate.
8165
8166 2016-10-28 Pedro Alves <palves@redhat.com>
8167
8168 * Makefile.in (CXX_DIALECT): Get from configure.
8169 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
8170 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
8171 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
8172 * config.in: Regenerate.
8173 * configure: Regenerate.
8174
8175 2016-10-27 Yao Qi <yao.qi@linaro.org>
8176
8177 * linux-low.c (linux_supports_range_stepping): Return true if
8178 can_software_single_step return true.
8179
8180 2016-10-27 Yao Qi <yao.qi@linaro.org>
8181
8182 * inferiors.c (find_inferior_in_random): New function.
8183 * inferiors.h (find_inferior_in_random): Declare.
8184 * linux-low.c (linux_wait_for_event_filtered): Call
8185 find_inferior_in_random instead of find_inferior.
8186
8187 2016-10-27 Yao Qi <yao.qi@linaro.org>
8188
8189 * linux-low.c (linux_wait_1): If single-step breakpoints are
8190 inserted, remove them.
8191
8192 2016-10-26 Pedro Alves <palves@redhat.com>
8193
8194 * linux-low.c (handle_extended_wait): Link parent/child fork
8195 threads.
8196 (linux_wait_1): Unlink them.
8197 (linux_set_resume_request): Ignore resume requests for
8198 already-resumed and unhandled fork child threads.
8199 * linux-low.h (struct lwp_info) <fork_relative>: New field.
8200 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
8201 New functions.
8202 (handle_v_requests) <vCont>: Don't call require_running.
8203 * server.h (in_queued_stop_replies): New declaration.
8204
8205 2016-10-24 Yao Qi <yao.qi@linaro.org>
8206
8207 PR server/20733
8208 * linux-aarch64-low.c (append_insns): Cast the return value to
8209 'uint32_t *'.
8210
8211 2016-10-10 Yao Qi <yao.qi@linaro.org>
8212
8213 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
8214
8215 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
8216
8217 * target.c (target_supports_multi_process): New function, moved
8218 from...
8219 * target.h (target_supports_multi_process): ... here. Remove
8220 macro.
8221
8222 2016-10-05 Tom Tromey <tom@tromey.com>
8223
8224 PR remote/20655:
8225 * tracepoint.c (handle_tracepoint_bkpts): Check
8226 ipa_error_tracepoint, not ipa_stopping_tracepoint.
8227
8228 2016-10-05 Yao Qi <yao.qi@linaro.org>
8229
8230 * configure.srv: Update the path of arm-*.xml files.
8231
8232 2016-10-05 Terry Guo <terry.guo@arm.com>
8233 Yao Qi <yao.qi@linaro.org>
8234
8235 * Makefile.in: Adjust the path of rules.
8236 * configure.srv: Update the path of xml files.
8237 * regformats/arm-with-iwmmxt.dat: Regenerated.
8238 * regformats/arm-with-neon.dat: Likewise.
8239 * regformats/arm-with-vfpv2.dat: Likewise.
8240 * regformats/arm-with-vfpv3.dat Likewise.
8241
8242 2016-09-30 Yao Qi <yao.qi@linaro.org>
8243
8244 PR gdbserver/20627
8245 * target.c (target_stop_and_wait): Don't call
8246 target_continue_no_signal, use resume_stop instead.
8247
8248 2016-09-26 Yao Qi <yao.qi@linaro.org>
8249
8250 * linux-low.c (linux_wait_1): Call debug_exit.
8251
8252 2016-09-23 Pedro Alves <palves@redhat.com>
8253
8254 * Makefile.in (SFILES): Add common/new-op.c.
8255 (OBS): Add common/new-op.o.
8256 (new-op.o): New rule.
8257
8258 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
8259
8260 * .gitinore: Ignore more files.
8261
8262 2016-09-21 Yao Qi <yao.qi@linaro.org>
8263
8264 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
8265 23.
8266
8267 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
8268
8269 * server.c (start_inferior): Call target_mourn_inferior instead of
8270 mourn_inferior; pass ptid_t argument to it.
8271 (resume): Likewise.
8272 (handle_target_event): Likewise.
8273 * target.c (target_mourn_inferior): New function.
8274 * target.h (mourn_inferior): Delete macro.
8275
8276 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8277
8278 * linux-low.c (lwp_is_stepping): New function.
8279
8280 2016-09-06 Carl Love <cel@us.ibm.com>
8281
8282 * server.c (start_inferior): Fixed comment, requested comment change
8283 didn't get updated correctly. Removed reference to ptrace () call as
8284 it is only true on Linux systems.
8285
8286 2016-09-06 Carl Love <cel@us.ibm.com>
8287
8288 * server.c (start_inferior): Do not call
8289 function target_post_create_inferior () if the
8290 inferior process has already exited.
8291
8292 2016-09-05 Pedro Alves <palves@redhat.com>
8293
8294 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
8295 (COMPILE.pre, CC_LD): Use CXX directly.
8296 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
8297 * acinclude.m4: Don't include build-with-cxx.m4.
8298 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
8299 * configure: Regenerate.
8300
8301 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
8302
8303 PR gdb/19495
8304 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
8305 call writing data to own_buf.
8306
8307 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8308
8309 * target.c (mywait): Call target_wait instead of
8310 the_target->wait.
8311 (target_wait): New function.
8312
8313 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8314
8315 * server.c (start_inferior): New variable 'ptid'. Replace calls
8316 to the_target->resume by target_continue{,_no_signal}, depending
8317 on the case.
8318 * target.c (target_stop_and_wait): Call target_continue_no_signal
8319 instead of the_target->resume.
8320 (target_continue): New function.
8321
8322 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
8323
8324 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
8325
8326 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
8327
8328 PR server/20491
8329 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
8330 ps_prochandle.
8331 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8332 * linux-arm-low.c (ps_get_thread_area): Likewise.
8333 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8334 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8335 * linux-mips-low.c (ps_get_thread_area): Likewise.
8336 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8337 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8338 * linux-x86-low.c (ps_get_thread_area): Likewise.
8339 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8340
8341 2016-08-19 Pedro Alves <palves@redhat.com>
8342
8343 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8344
8345 2016-08-19 Pedro Alves <palves@redhat.com>
8346
8347 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8348 comment. Use memcpy instead of casting through unsigned long.
8349
8350 2016-08-19 Pedro Alves <palves@redhat.com>
8351
8352 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8353 allocating around 0x80000000.
8354
8355 2016-08-19 Pedro Alves <palves@redhat.com>
8356
8357 PR gdb/20415
8358 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8359 (x32-avx512-linux-ipa.o): New rules.
8360 * configure.ac (x86_64-*-linux*): New x32 check.
8361 * configure.srv (ipa_x32_linux_regobj): New.
8362 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8363 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8364 descriptions.
8365 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8366 descriptions.
8367 * configure: Regenerate.
8368
8369 2016-08-09 Pedro Alves <palves@redhat.com>
8370
8371 PR gdb/18653
8372 * Makefile.in (OBS): Add signals-state-save-restore.o.
8373 (signals-state-save-restore.o): New rule.
8374 * config.in: Regenerate.
8375 * configure: Regenerate.
8376 * linux-low.c: Include "signals-state-save-restore.h".
8377 (linux_create_inferior): Call
8378 restore_original_signals_state.
8379 * server.c: Include "dispositions-save-restore.h".
8380 (captured_main): Call save_original_signals_state.
8381
8382 2016-08-05 Pedro Alves <palves@redhat.com>
8383
8384 * configure: Regenerate.
8385
8386 2016-08-04 Yao Qi <yao.qi@linaro.org>
8387
8388 * linux-low.c (regsets_fetch_inferior_registers): Check
8389 errno is ESRCH or not.
8390
8391 2016-08-02 Yao Qi <yao.qi@linaro.org>
8392
8393 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8394 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8395 (thread_db_load_search): Update.
8396 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8397 td_ta_set_event and td_ta_event_getmsg.
8398
8399 2016-07-26 Pedro Alves <palves@redhat.com>
8400
8401 PR server/20414
8402 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8403 of unsigned long for 64-bit registers and use uint32_t instead of
8404 unsigned int for 32-bit registers.
8405
8406 2016-07-26 Pedro Alves <palves@redhat.com>
8407
8408 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8409 to 'ptrace'.
8410
8411 2016-07-21 Tom Tromey <tom@tromey.com>
8412
8413 * configure: Rebuild.
8414
8415 2016-07-21 Yao Qi <yao.qi@linaro.org>
8416
8417 * mem-break.c (find_gdb_breakpoint): Cast bp to
8418 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8419
8420 2016-07-21 Yao Qi <yao.qi@linaro.org>
8421
8422 * server.c (handle_v_requests): Support s and S actions
8423 if target_supports_software_single_step return true.
8424
8425 2016-07-21 Yao Qi <yao.qi@linaro.org>
8426
8427 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8428 is resume_step, call maybe_hw_step.
8429 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8430 and unstop them.
8431 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8432 breakpoints or not.
8433 (proceed_one_lwp): If resume request is resume_step, install
8434 reinsert breakpoints and call maybe_hw_step.
8435
8436 2016-07-21 Yao Qi <yao.qi@linaro.org>
8437
8438 * linux-low.c (proceed_one_lwp): Declare.
8439 (linux_resume_one_thread): Remove local variable 'step'.
8440 Lift code enqueue signal. Call proceed_one_lwp instead of
8441 linux_resume_one_lwp.
8442
8443 2016-07-21 Yao Qi <yao.qi@linaro.org>
8444
8445 * linux-low.c (linux_resume_one_thread): Call
8446 enqueue_pending_signal.
8447
8448 2016-07-21 Yao Qi <yao.qi@linaro.org>
8449
8450 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8451 * inferiors.c (do_restore_current_thread_cleanup): New function.
8452 (make_cleanup_restore_current_thread): Likewise.
8453 * linux-low.c (install_software_single_step_breakpoints): Call
8454 make_cleanup_restore_current_thread. Switch current_thread to
8455 thread.
8456
8457 2016-07-21 Yao Qi <yao.qi@linaro.org>
8458
8459 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8460 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8461 (clone_one_breakpoint): Likewise.
8462 (delete_reinsert_breakpoints): Change parameter to thread.
8463 Callers updated.
8464 (has_reinsert_breakpoints): Likewise.
8465 (uninsert_reinsert_breakpoints): Likewise.
8466 (reinsert_reinsert_breakpoints): Likewise.
8467 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8468 (delete_reinsert_breakpoints): Likewise.
8469 (reinsert_reinsert_breakpoints): Likewise.
8470 (uninsert_reinsert_breakpoints): Likewise.
8471 (has_reinsert_breakpoints): Likewise.
8472
8473 2016-07-21 Yao Qi <yao.qi@linaro.org>
8474
8475 * inferiors.c (get_thread_process): Make parameter const.
8476 * inferiors.h (get_thread_process): Update declaration.
8477 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8478 Add new parameters child_thread and parent_thread. Callers
8479 updated.
8480 * mem-break.h (clone_all_breakpoints): Update declaration.
8481
8482 2016-07-21 Yao Qi <yao.qi@linaro.org>
8483
8484 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8485 <command_list, handler>: Remove.
8486 (struct gdb_breakpoint): New.
8487 (struct other_breakpoint): New.
8488 (struct reinsert_breakpoint): New.
8489 (is_gdb_breakpoint): New function.
8490 (any_persistent_commands): Update command_list if
8491 is_gdb_breakpoint returns true.
8492 (set_breakpoint): Create breakpoints according to their types.
8493 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8494 (set_gdb_breakpoint_1): Likewise.
8495 (set_gdb_breakpoint): Likewise.
8496 (clear_breakpoint_conditions): Change parameter type to
8497 'struct gdb_breakpoint *'.
8498 (clear_breakpoint_commands): Likewise.
8499 (clear_breakpoint_conditions_and_commands): Likewise.
8500 (add_condition_to_breakpoint): Likewise.
8501 (add_breakpoint_condition): Likewise.
8502 (add_commands_to_breakpoint): Likewise.
8503 (check_breakpoints): Check other_breakpoint.
8504 (clone_one_breakpoint): Clone breakpopint according to its type.
8505 * mem-break.h (struct gdb_breakpoint): Declare.
8506 (set_gdb_breakpoint): Update declaration.
8507 (clear_breakpoint_conditions_and_commands): Likewise.
8508 (add_breakpoint_condition): Likewise.
8509 (add_breakpoint_commands): Likewise.
8510 * server.c (process_point_options): Change parameter type to
8511 'struct gdb_breakpoint *'.
8512
8513 2016-07-21 Yao Qi <yao.qi@linaro.org>
8514
8515 * mem-break.c (set_breakpoint_at): Rename it to ...
8516 (set_breakpoint_type_at): ... it.
8517 (set_breakpoint_at): Call set_breakpoint_type_at.
8518 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8519 * mem-break.h (set_breakpoint_at): Update comments.
8520
8521 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8522
8523 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8524 to buf parameter.
8525 (nios2_store_gregset): Likewise.
8526
8527 2016-07-01 Pedro Alves <palves@redhat.com>
8528 Antoine Tremblay <antoine.tremblay@ericsson.com>
8529
8530 * linux-low.c: Change interface to take the target lwp_info
8531 pointer directly and return void. Handle detaching from a zombie
8532 thread.
8533 (linux_detach_lwp_callback): New function.
8534 (linux_detach): Detach from the leader thread after detaching from
8535 the clone threads.
8536
8537 2016-06-28 Yao Qi <yao.qi@linaro.org>
8538
8539 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8540 for variable new_offset.
8541 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8542 (aarch64_ftrace_insn_reloc_cb): Likewise.
8543 (aarch64_ftrace_insn_reloc_tb): Likewise.
8544 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8545 PRIx64 instead of PRIx32.
8546
8547 2016-06-28 Yao Qi <yao.qi@linaro.org>
8548
8549 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8550 (the_low_target): Install arm_get_syscall_trapinfo.
8551
8552 2016-06-28 Yao Qi <yao.qi@linaro.org>
8553
8554 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8555 function.
8556 (the_low_target): Install aarch64_get_syscall_trapinfo.
8557
8558 2016-06-28 Yao Qi <yao.qi@linaro.org>
8559
8560 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8561 Callers updated.
8562 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8563 Remove parameter sysno.
8564 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8565 sysret.
8566
8567 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8568
8569 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8570 (s390_emit_ne_goto): Likewise.
8571 (s390_emit_lt_goto): Likewise.
8572 (s390_emit_le_goto): Likewise.
8573 (s390_emit_gt_goto): Likewise.
8574 (s390_emit_ge_goto): Likewise.
8575 (s390x_emit_eq_goto): Likewise.
8576 (s390x_emit_ne_goto): Likewise.
8577 (s390x_emit_lt_goto): Likewise.
8578 (s390x_emit_le_goto): Likewise.
8579 (s390x_emit_gt_goto): Likewise.
8580 (s390x_emit_ge_goto): Likewise.
8581 (s390_emit_ops_impl): Mark variable static.
8582 (s390x_emit_ops): Likewise.
8583
8584 2016-06-17 Yao Qi <yao.qi@linaro.org>
8585
8586 * linux-low.c (handle_extended_wait): Call
8587 uninsert_reinsert_breakpoints for the parent process. Remove
8588 reinsert breakpoints from the child process. Reinsert them to
8589 the parent process when vfork is done.
8590 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8591 (reinsert_reinsert_breakpoints): New function.
8592 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8593 (reinsert_reinsert_breakpoints): Declare.
8594
8595 2016-06-17 Yao Qi <yao.qi@linaro.org>
8596
8597 * linux-low.c (handle_extended_wait): If the parent is doing
8598 step-over, remove the reinsert breakpoints from the forked child.
8599
8600 2016-06-17 Yao Qi <yao.qi@linaro.org>
8601
8602 * linux-low.c (unsuspend_all_lwps): Declare.
8603 (linux_low_filter_event): If thread exited, call finish_step_over.
8604 If step-over is finished, unsuspend other threads.
8605
8606 2016-06-17 Yao Qi <yao.qi@linaro.org>
8607
8608 * linux-low.c (linux_resume_one_lwp_throw): Assert
8609 has_reinsert_breakpoints returns false.
8610 * mem-break.c (delete_disabled_breakpoints): Assert
8611 bp type isn't reinsert_breakpoint.
8612
8613 2016-06-17 Yao Qi <yao.qi@linaro.org>
8614
8615 * linux-low.c (maybe_hw_step): New function.
8616 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8617 (finish_step_over): Switch current_thread to lwp temporarily,
8618 and assert has_reinsert_breakpoints returns true.
8619 (proceed_one_lwp): Call maybe_hw_step.
8620 * mem-break.c (has_reinsert_breakpoints): New function.
8621 * mem-break.h (has_reinsert_breakpoints): Declare.
8622
8623 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8624
8625 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8626
8627 2016-05-17 Yao Qi <yao.qi@linaro.org>
8628
8629 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8630 instead of find_inferior.
8631
8632 2016-05-05 Yao Qi <yao.qi@linaro.org>
8633
8634 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8635 Initialize res to zero.
8636
8637 2016-05-05 Yao Qi <yao.qi@linaro.org>
8638
8639 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8640 to uint32_t.
8641
8642 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8643
8644 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8645 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8646 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8647
8648 2016-04-28 Par Olsson <par.olsson@windriver.com>
8649 Simon Marchi <simon.marchi@ericsson.com>
8650
8651 * tracepoint.c (write_inferior_int8): New function.
8652 (cmd_qtenable_disable): Write enable flag using
8653 write_inferior_int8.
8654
8655 2016-04-25 Yao Qi <yao.qi@linaro.org>
8656
8657 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8658 (need_step_over_p): Return zero if the LWP has pending signals
8659 can be delivered on software single step target.
8660
8661 2016-04-25 Yao Qi <yao.qi@linaro.org>
8662
8663 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8664 return instead of error.
8665
8666 2016-04-22 Yao Qi <yao.qi@linaro.org>
8667
8668 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8669 to 23.
8670
8671 2016-04-22 Yao Qi <yao.qi@linaro.org>
8672
8673 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8674 signal when stepping over breakpoint with software single
8675 step.
8676
8677 2016-04-21 Pedro Alves <palves@redhat.com>
8678
8679 * linux-s390-low.c (s390_collect_ptrace_register)
8680 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8681 add casts.
8682 (s390_check_regset): Use void * instead of gdb_byte *.
8683
8684 2016-04-20 Pedro Alves <palves@redhat.com>
8685
8686 * configure: Renegerate.
8687
8688 2016-04-20 Yao Qi <yao.qi@linaro.org>
8689
8690 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8691 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8692 number 16.
8693 (arm_store_gregset): Likewise.
8694
8695 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8696
8697 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8698 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8699 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8700 (amd64-avx-mpx-linux.c): New rules.
8701 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8702 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8703 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8704 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8705 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8706 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8707 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8708 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8709 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8710 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8711 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8712 * linux-x86-low.c (x86_linux_read_description): Add case for
8713 X86_XSTATE_AVX_MPX_MASK.
8714 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8715 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8716 init_registers_i386_avx_mpx_linux.
8717 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8718 (initialize_low_tracepoint): Call
8719 init_registers_i386_avx_mpx_linux.
8720 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8721 (initialize_low_tracepoint): Call
8722 init_registers_amd64_avx_mpx_linux.
8723 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8724 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8725 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8726 declarations.
8727
8728 2016-04-18 Pedro Alves <palves@redhat.com>
8729
8730 * configure: Regenerate.
8731
8732 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8733
8734 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8735 (aarch64_emit_sub): Likewise.
8736
8737 2016-04-12 Pedro Alves <palves@redhat.com>
8738
8739 * utils.c (prepare_to_throw_exception): Delete.
8740
8741 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8742
8743 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8744
8745 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8746
8747 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8748
8749 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8750
8751 * linux-aarch64-ipa.c: Add <elf.h> include.
8752 * linux-ppc-ipa.c: Add <elf.h> include.
8753 * linux-s390-ipa.c: Add <elf.h> include.
8754
8755 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8756
8757 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8758 (get_raw_reg_ptr): Likewise.
8759 (get_trace_state_variable_value_ptr): Likewise.
8760 (set_trace_state_variable_value_ptr): Likewise.
8761 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8762 char *.
8763
8764 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8765 Marcin Kościelnicki <koriakin@0x04.net>
8766
8767 PR/17221
8768 * linux-ppc-low.c (emit_insns): New function.
8769 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8770 (ppc_emit_prologue): New function.
8771 (ppc_emit_epilogue): New function.
8772 (ppc_emit_add): New function.
8773 (ppc_emit_sub): New function.
8774 (ppc_emit_mul): New function.
8775 (ppc_emit_lsh): New function.
8776 (ppc_emit_rsh_signed): New function.
8777 (ppc_emit_rsh_unsigned): New function.
8778 (ppc_emit_ext): New function.
8779 (ppc_emit_zero_ext): New function.
8780 (ppc_emit_log_not): New function.
8781 (ppc_emit_bit_and): New function.
8782 (ppc_emit_bit_or): New function.
8783 (ppc_emit_bit_xor): New function.
8784 (ppc_emit_bit_not): New function.
8785 (ppc_emit_equal): New function.
8786 (ppc_emit_less_signed): New function.
8787 (ppc_emit_less_unsigned): New function.
8788 (ppc_emit_ref): New function.
8789 (ppc_emit_const): New function.
8790 (ppc_emit_reg): New function.
8791 (ppc_emit_pop): New function.
8792 (ppc_emit_stack_flush): New function.
8793 (ppc_emit_swap): New function.
8794 (ppc_emit_stack_adjust): New function.
8795 (ppc_emit_call): New function.
8796 (ppc_emit_int_call_1): New function.
8797 (ppc_emit_void_call_2): New function.
8798 (ppc_emit_if_goto): New function.
8799 (ppc_emit_goto): New function.
8800 (ppc_emit_eq_goto): New function.
8801 (ppc_emit_ne_goto): New function.
8802 (ppc_emit_lt_goto): New function.
8803 (ppc_emit_le_goto): New function.
8804 (ppc_emit_gt_goto): New function.
8805 (ppc_emit_ge_goto): New function.
8806 (ppc_write_goto_address): New function.
8807 (ppc_emit_ops_impl): New static variable.
8808 (ppc64v1_emit_prologue): New function.
8809 (ppc64v2_emit_prologue): New function.
8810 (ppc64_emit_epilogue): New function.
8811 (ppc64_emit_add): New function.
8812 (ppc64_emit_sub): New function.
8813 (ppc64_emit_mul): New function.
8814 (ppc64_emit_lsh): New function.
8815 (ppc64_emit_rsh_signed): New function.
8816 (ppc64_emit_rsh_unsigned): New function.
8817 (ppc64_emit_ext): New function.
8818 (ppc64_emit_zero_ext): New function.
8819 (ppc64_emit_log_not): New function.
8820 (ppc64_emit_bit_and): New function.
8821 (ppc64_emit_bit_or): New function.
8822 (ppc64_emit_bit_xor): New function.
8823 (ppc64_emit_bit_not): New function.
8824 (ppc64_emit_equal): New function.
8825 (ppc64_emit_less_signed): New function.
8826 (ppc64_emit_less_unsigned): New function.
8827 (ppc64_emit_ref): New function.
8828 (ppc64_emit_const): New function.
8829 (ppc64v1_emit_reg): New function.
8830 (ppc64v2_emit_reg): New function.
8831 (ppc64_emit_pop): New function.
8832 (ppc64_emit_stack_flush): New function.
8833 (ppc64_emit_swap): New function.
8834 (ppc64v1_emit_call): New function.
8835 (ppc64v2_emit_call): New function.
8836 (ppc64v1_emit_int_call_1): New function.
8837 (ppc64v2_emit_int_call_1): New function.
8838 (ppc64v1_emit_void_call_2): New function.
8839 (ppc64v2_emit_void_call_2): New function.
8840 (ppc64_emit_if_goto): New function.
8841 (ppc64_emit_eq_goto): New function.
8842 (ppc64_emit_ne_goto): New function.
8843 (ppc64_emit_lt_goto): New function.
8844 (ppc64_emit_le_goto): New function.
8845 (ppc64_emit_gt_goto): New function.
8846 (ppc64_emit_ge_goto): New function.
8847 (ppc64v1_emit_ops_impl): New static variable.
8848 (ppc64v2_emit_ops_impl): New static variable.
8849 (ppc_emit_ops): New function.
8850 (linux_low_target): Wire in ppc_emit_ops.
8851
8852 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8853 Marcin Kościelnicki <koriakin@0x04.net>
8854
8855 PR/17221
8856 * Makefile.in: Add powerpc-*-ipa.o
8857 * configure.srv: Add ipa_obj for powerpc*-linux.
8858 * linux-ppc-ipa.c: New file.
8859 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8860 includes.
8861 (PPC_FIELD): New macro.
8862 (PPC_SEXT): New macro.
8863 (PPC_OP6): New macro.
8864 (PPC_BO): New macro.
8865 (PPC_LI): New macro.
8866 (PPC_BD): New macro.
8867 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8868 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8869 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8870 (ppc_get_thread_area): New function.
8871 (is_elfv2_inferior): New function.
8872 (gen_ds_form): New function.
8873 (GEN_STD): New macro.
8874 (GEN_STDU): New macro.
8875 (GEN_LD): New macro.
8876 (GEN_LDU): New macro.
8877 (gen_d_form): New function.
8878 (GEN_ADDI): New macro.
8879 (GEN_ADDIS): New macro.
8880 (GEN_LI): New macro.
8881 (GEN_LIS): New macro.
8882 (GEN_ORI): New macro.
8883 (GEN_ORIS): New macro.
8884 (GEN_LWZ): New macro.
8885 (GEN_STW): New macro.
8886 (GEN_STWU): New macro.
8887 (gen_xfx_form): New function.
8888 (GEN_MFSPR): New macro.
8889 (GEN_MTSPR): New macro.
8890 (GEN_MFCR): New macro.
8891 (GEN_MTCR): New macro.
8892 (GEN_SYNC): New macro.
8893 (GEN_LWSYNC): New macro.
8894 (gen_x_form): New function.
8895 (GEN_OR): New macro.
8896 (GEN_MR): New macro.
8897 (GEN_LWARX): New macro.
8898 (GEN_STWCX): New macro.
8899 (GEN_CMPW): New macro.
8900 (gen_md_form): New function.
8901 (GEN_RLDICL): New macro.
8902 (GEN_RLDICR): New macro.
8903 (gen_i_form): New function.
8904 (GEN_B): New macro.
8905 (GEN_BL): New macro.
8906 (gen_b_form): New function.
8907 (GEN_BNE): New macro.
8908 (GEN_LOAD): New macro.
8909 (GEN_STORE): New macro.
8910 (gen_limm): New function.
8911 (gen_atomic_xchg): New function.
8912 (gen_call): New function.
8913 (ppc_relocate_instruction): New function.
8914 (ppc_install_fast_tracepoint_jump_pad): New function.
8915 (ppc_get_min_fast_tracepoint_insn_len): New function.
8916 (ppc_get_ipa_tdesc_idx): New function.
8917 (the_low_target): Wire in the new functions.
8918 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8919 tdescs.
8920 * linux-ppc-tdesc.h: New file.
8921
8922 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8923
8924 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8925 (alloc_jump_pad_buffer): New function.
8926 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8927 (alloc_jump_pad_buffer): New function.
8928 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8929 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8930 (alloc_jump_pad_buffer): New function.
8931 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8932 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8933 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8934 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8935
8936 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8937
8938 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8939 * linux-amd64-ipa.c: Likewise.
8940 * linux-i386-ipa.c: Likewise.
8941 * linux-s390-ipa.c: Likewise.
8942 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8943 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8944 set_trace_state_variable_value_ptr.
8945 (struct ipa_sym_addresses): Likewise.
8946 (symbol_list): Likewise.
8947 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8948 accessing gdb_collect directly.
8949 (gdb_collect_ptr_type): New typedef.
8950 (get_raw_reg_ptr_type): New typedef.
8951 (get_trace_state_variable_value_ptr_type): New typedef.
8952 (set_trace_state_variable_value_ptr_type): New typedef.
8953 (gdb_collect_ptr): New global.
8954 (get_raw_reg_ptr): New global.
8955 (get_trace_state_variable_value_ptr): New global.
8956 (set_trace_state_variable_value_ptr): New global.
8957 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8958 accessing get_raw_reg directly.
8959 (get_get_tsv_func_addr): Likewise for
8960 get_trace_state_variable_value_ptr.
8961 (get_set_tsv_func_addr): Likewise for
8962 set_trace_state_variable_value_ptr.
8963 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8964
8965 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8966
8967 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8968
8969 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8970
8971 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8972 packets.
8973 (relocate_instruction): Remove own_buf.
8974 * server.c (own_buf): Make global.
8975 (handle_v_requests): Make global.
8976 * server.h (own_buf): New declaration.
8977 (handle_v_requests): New prototype.
8978
8979 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8980
8981 PR 18377
8982 * linux-s390-low.c (add_insns): New function.
8983 (s390_emit_prologue): New function.
8984 (s390_emit_epilogue): New function.
8985 (s390_emit_add): New function.
8986 (s390_emit_sub): New function.
8987 (s390_emit_mul): New function.
8988 (s390_emit_lsh): New function.
8989 (s390_emit_rsh_signed): New function.
8990 (s390_emit_rsh_unsigned): New function.
8991 (s390_emit_ext): New function.
8992 (s390_emit_log_not): New function.
8993 (s390_emit_bit_and): New function.
8994 (s390_emit_bit_or): New function.
8995 (s390_emit_bit_xor): New function.
8996 (s390_emit_bit_not): New function.
8997 (s390_emit_equal): New function.
8998 (s390_emit_less_signed): New function.
8999 (s390_emit_less_unsigned): New function.
9000 (s390_emit_ref): New function.
9001 (s390_emit_if_goto): New function.
9002 (s390_emit_goto): New function.
9003 (s390_write_goto_address): New function.
9004 (s390_emit_litpool): New function.
9005 (s390_emit_const): New function.
9006 (s390_emit_call): New function.
9007 (s390_emit_reg): New function.
9008 (s390_emit_pop): New function.
9009 (s390_emit_stack_flush): New function.
9010 (s390_emit_zero_ext): New function.
9011 (s390_emit_swap): New function.
9012 (s390_emit_stack_adjust): New function.
9013 (s390_emit_set_r2): New function.
9014 (s390_emit_int_call_1): New function.
9015 (s390_emit_void_call_2): New function.
9016 (s390_emit_eq_goto): New function.
9017 (s390_emit_ne_goto): New function.
9018 (s390_emit_lt_goto): New function.
9019 (s390_emit_le_goto): New function.
9020 (s390_emit_gt_goto): New function.
9021 (s390_emit_ge_goto): New function.
9022 (s390x_emit_prologue): New function.
9023 (s390x_emit_epilogue): New function.
9024 (s390x_emit_add): New function.
9025 (s390x_emit_sub): New function.
9026 (s390x_emit_mul): New function.
9027 (s390x_emit_lsh): New function.
9028 (s390x_emit_rsh_signed): New function.
9029 (s390x_emit_rsh_unsigned): New function.
9030 (s390x_emit_ext): New function.
9031 (s390x_emit_log_not): New function.
9032 (s390x_emit_bit_and): New function.
9033 (s390x_emit_bit_or): New function.
9034 (s390x_emit_bit_xor): New function.
9035 (s390x_emit_bit_not): New function.
9036 (s390x_emit_equal): New function.
9037 (s390x_emit_less_signed): New function.
9038 (s390x_emit_less_unsigned): New function.
9039 (s390x_emit_ref): New function.
9040 (s390x_emit_if_goto): New function.
9041 (s390x_emit_const): New function.
9042 (s390x_emit_call): New function.
9043 (s390x_emit_reg): New function.
9044 (s390x_emit_pop): New function.
9045 (s390x_emit_stack_flush): New function.
9046 (s390x_emit_zero_ext): New function.
9047 (s390x_emit_swap): New function.
9048 (s390x_emit_stack_adjust): New function.
9049 (s390x_emit_int_call_1): New function.
9050 (s390x_emit_void_call_2): New function.
9051 (s390x_emit_eq_goto): New function.
9052 (s390x_emit_ne_goto): New function.
9053 (s390x_emit_lt_goto): New function.
9054 (s390x_emit_le_goto): New function.
9055 (s390x_emit_gt_goto): New function.
9056 (s390x_emit_ge_goto): New function.
9057 (s390_emit_ops): New function.
9058 (struct linux_target_ops): Fill in emit_ops hook.
9059
9060 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
9061
9062 PR 18377
9063 * Makefile.in: Add s390 IPA files.
9064 * configure.srv: Build IPA for s390.
9065 * linux-s390-ipa.c: New file.
9066 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
9067 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
9068 (tdesc_s390_linux32): Likewise.
9069 (init_registers_s390_linux32v1): Likewise.
9070 (tdesc_s390_linux32v1): Likewise.
9071 (init_registers_s390_linux32v2): Likewise.
9072 (tdesc_s390_linux32v2): Likewise.
9073 (init_registers_s390_linux64): Likewise.
9074 (tdesc_s390_linux64): Likewise.
9075 (init_registers_s390_linux64v1): Likewise.
9076 (tdesc_s390_linux64v1): Likewise.
9077 (init_registers_s390_linux64v2): Likewise.
9078 (tdesc_s390_linux64v2): Likewise.
9079 (init_registers_s390_te_linux64): Likewise.
9080 (tdesc_s390_te_linux64): Likewise.
9081 (init_registers_s390_vx_linux64): Likewise.
9082 (tdesc_s390_vx_linux64): Likewise.
9083 (init_registers_s390_tevx_linux64): Likewise.
9084 (tdesc_s390_tevx_linux64): Likewise.
9085 (init_registers_s390x_linux64): Likewise.
9086 (tdesc_s390x_linux64): Likewise.
9087 (init_registers_s390x_linux64v1): Likewise.
9088 (tdesc_s390x_linux64v1): Likewise.
9089 (init_registers_s390x_linux64v2): Likewise.
9090 (tdesc_s390x_linux64v2): Likewise.
9091 (init_registers_s390x_te_linux64): Likewise.
9092 (tdesc_s390x_te_linux64): Likewise.
9093 (init_registers_s390x_vx_linux64): Likewise.
9094 (tdesc_s390x_vx_linux64): Likewise.
9095 (init_registers_s390x_tevx_linux64): Likewise.
9096 (tdesc_s390x_tevx_linux64): Likewise.
9097 (have_hwcap_s390_vx): New static variable.
9098 (s390_arch_setup): Fill have_hwcap_s390_vx.
9099 (s390_get_thread_area): New function.
9100 (s390_ft_entry_gpr_esa): New const.
9101 (s390_ft_entry_gpr_zarch): New const.
9102 (s390_ft_entry_misc): New const.
9103 (s390_ft_entry_fr): New const.
9104 (s390_ft_entry_vr): New const.
9105 (s390_ft_main_31): New const.
9106 (s390_ft_main_64): New const.
9107 (s390_ft_exit_fr): New const.
9108 (s390_ft_exit_vr): New const.
9109 (s390_ft_exit_misc): New const.
9110 (s390_ft_exit_gpr_esa): New const.
9111 (s390_ft_exit_gpr_zarch): New const.
9112 (append_insns): New function.
9113 (s390_relocate_instruction): New function.
9114 (s390_install_fast_tracepoint_jump_pad): New function.
9115 (s390_get_min_fast_tracepoint_insn_len): New function.
9116 (s390_get_ipa_tdesc_idx): New function.
9117 (struct linux_target_ops): Wire in the above functions.
9118 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
9119 * linux-s390-tdesc.h: New file.
9120
9121 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
9122
9123 * linux-s390-low.c (s390_supports_tracepoints): New function.
9124 (struct linux_target_ops): Fill supports_tracepoints hook.
9125
9126 2016-03-18 Yao Qi <yao.qi@linaro.org>
9127
9128 * linux-low.c (lwp_signal_can_be_delivered): New function.
9129 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
9130
9131 2016-03-18 Yao Qi <yao.qi@linaro.org>
9132
9133 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
9134 0 if signal is enqueued. Remove 'signal' from one debugging
9135 message. Move one debugging message to some lines below.
9136 Remove code setting 'signal' to 0.
9137
9138 2016-03-18 Yao Qi <yao.qi@linaro.org>
9139
9140 * linux-low.c (linux_low_filter_event): Remove redundant
9141 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
9142
9143 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
9144
9145 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
9146 (struct linux_target_ops): Wire in the above.
9147
9148 2016-03-03 Yao Qi <yao.qi@linaro.org>
9149
9150 * linux-low.c: Update comments to start_step_over.
9151
9152 2016-03-03 Yao Qi <yao.qi@linaro.org>
9153
9154 PR server/19736
9155 * linux-low.c (handle_extended_wait): Set child suspended
9156 if event_lwp->bp_reinsert isn't zero.
9157
9158 2016-03-02 Yao Qi <yao.qi@linaro.org>
9159
9160 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
9161 enqueue_pending_signal.
9162
9163 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
9164
9165 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
9166 is actually loaded.
9167
9168 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9169
9170 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
9171 (s390_regmap_3264) [!__s390x__]: New global.
9172 (s390_collect_ptrace_register): Skip map entries containing -1.
9173 (s390_supply_ptrace_register): Ditto.
9174 (s390_fill_gprs_high): New function.
9175 (s390_store_gprs_high): New function.
9176 (s390_regsets): Add NT_S390_HIGH_GPRS.
9177 (s390_get_hwcap): Enable on 31-bit.
9178 (have_hwcap_s390_high_gprs): Enable on 31-bit.
9179 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
9180 Detect NT_S390_HIGH_GPRS.
9181 (s390_usrregs_info_3264): Enable on 31-bit.
9182 (s390_regs_info): Enable regs_info_3264 on 31-bit.
9183 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
9184
9185 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9186
9187 PR gdb/13808
9188 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
9189 * configure.srv: Ditto.
9190 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
9191 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
9192 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
9193 (init_registers_amd64_linux): Remove prototype.
9194 (tdesc_amd64_linux): Remove declaration.
9195 (get_ipa_tdesc): New function.
9196 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9197 initialize remaining tdescs.
9198 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
9199 (init_registers_i386_linux): Remove prototype.
9200 (tdesc_i386_linux): Remove declaration.
9201 (get_ipa_tdesc): New function.
9202 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9203 initialize remaining tdescs.
9204 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
9205 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
9206 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
9207 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
9208 (x86_get_ipa_tdesc_idx): New function.
9209 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
9210 * linux-x86-tdesc.h: New file.
9211 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
9212 (target_get_ipa_tdesc_idx): New macro.
9213 * tracepoint.c (ipa_tdesc_idx): New macro.
9214 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
9215 (symbol_list): Add ipa_tdesc_idx.
9216 (cmd_qtstart): Write ipa_tdesc_idx in the target.
9217 (ipa_tdesc): Remove.
9218 (ipa_tdesc_idx): New variable.
9219 (get_context_regcache): Use get_ipa_tdesc.
9220 (gdb_collect): Ditto.
9221 (gdb_probe): Ditto.
9222 * tracepoint.h (get_ipa_tdesc): New prototype.
9223 (ipa_tdesc): Remove.
9224
9225 2016-02-24 Pedro Alves <palves@redhat.com>
9226
9227 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
9228 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
9229 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
9230 Factor out common code between the USE_SIGTRAP_SIGINFO and
9231 !USE_SIGTRAP_SIGINFO blocks.
9232 (linux_low_filter_event): Call save_stop_reason instead of
9233 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
9234 Update comments.
9235 (linux_wait_1): Update comments.
9236
9237 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
9238
9239 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
9240 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
9241 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
9242 ppc_insert_point, ppc_remove_point.
9243
9244 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
9245
9246 * linux-s390-low.c (s390_supports_z_point_type): New function.
9247 (struct linux_target_ops): Wire s390_supports_z_point_type in.
9248
9249 2016-02-16 Yao Qi <yao.qi@linaro.org>
9250
9251 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9252 PC. Get pc from regcache_read_pc.
9253
9254 2016-02-12 Yao Qi <yao.qi@linaro.org>
9255
9256 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
9257 or linux_get_pc_32bit.
9258 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
9259
9260 2016-02-12 Yao Qi <yao.qi@linaro.org>
9261
9262 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
9263 arm_linux_get_next_pcs_fixup.
9264
9265 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
9266
9267 * tracepoint.c (x_tracepoint_action_download): Change
9268 write_inferior_data_ptr to write_inferior_data_pointer.
9269 (cmd_qtstart): Likewise.
9270 (write_inferior_data_ptr): Remove.
9271 (download_agent_expr): Change write_inferior_data_ptr to
9272 write_inferior_data_pointer.
9273 (download_tracepoint_1): Likewise.
9274 (download_tracepoint): Likewise.
9275 (download_trace_state_variables): Likewise.
9276
9277 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
9278 Marcin Kościelnicki <koriakin@0x04.net>
9279
9280 * tracepoint.c (struct tracepoint_action_ops): Remove.
9281 (struct tracepoint_action): Remove ops.
9282 (m_tracepoint_action_download, r_tracepoint_action_download)
9283 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
9284 size and offset accordingly.
9285 (m_tracepoint_action_ops, r_tracepoint_action_ops)
9286 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
9287 (tracepoint_action_send, tracepoint_action_download): New functions.
9288 Helpers for trace action handlers.
9289 (add_tracepoint_action): Remove setup actions ops.
9290 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
9291
9292 2016-02-10 Yao Qi <yao.qi@linaro.org>
9293
9294 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
9295
9296 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9297
9298 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
9299 to AC_OUTPUT.
9300 * configure: Regenerate.
9301
9302 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9303
9304 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
9305 void * to gdb_byte *.
9306 * linux-low.c (siginfo_fixup): Likewise.
9307 (linux_xfer_siginfo): Likewise.
9308 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
9309 Likewise.
9310 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9311
9312 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
9313
9314 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9315 to srv_tgtobj.
9316 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
9317 to srv_tgtobj.
9318 * linux-x86-low.c [__x86_64__]: Include
9319 "nat/amd64-linux-siginfo.h".
9320 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
9321 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
9322 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
9323 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
9324 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
9325 (cpt_si_fd, si_timerid, si_overrun): Move from
9326 nat/amd64-linux-siginfo.c.
9327 * Makefile.in (amd64-linux-siginfo.o:): New rule.
9328
9329 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
9330
9331 * server.c (skip_to_semicolon): Remove.
9332 (process_point_options): Use strchrnul instead of
9333 skip_to_semicolon.
9334
9335 2016-01-26 Yao Qi <yao.qi@linaro.org>
9336
9337 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9338 * linux-low.c (install_software_single_step_breakpoints): Don't
9339 call regcache_read_pc.
9340 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9341 argument pc.
9342
9343 2016-01-26 Yao Qi <yao.qi@linaro.org>
9344
9345 * linux-low.c (install_software_single_step_breakpoints): Call
9346 regcache_read_pc instead of get_pc.
9347
9348 2016-01-26 Yao Qi <yao.qi@linaro.org>
9349
9350 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9351 (unblock_async_io): Rename to ...
9352 (block_unblock_async_io): ... it. New function.
9353 (enable_async_io): Don't install SIGIO handler. Unblock it
9354 instead.
9355 (disable_async_io): Don't ignore SIGIO. Block it instead.
9356 (initialize_async_io): Install SIGIO handler. Don't call
9357 unblock_async_io.
9358
9359 2016-01-26 Yao Qi <yao.qi@linaro.org>
9360
9361 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9362 first character is '\003', call *the_target->request_interrupt.
9363
9364 2016-01-25 Yao Qi <yao.qi@linaro.org>
9365
9366 * remote-utils.c (new_thread_notify): Remove.
9367 (dead_thread_notify): Likewise.
9368 * remote-utils.h (new_thread_notify): Remove declaration.
9369 (dead_thread_notify): Likewise.
9370
9371 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9372
9373 * gdb.trace/pending.exp: Fix expected message on continue.
9374
9375 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9376
9377 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9378 it works properly on big-endian machines where sizeof (CORE_ADDR)
9379 != sizeof (void *).
9380
9381 2016-01-21 Pedro Alves <palves@redhat.com>
9382
9383 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9384 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9385 * configure: Regenerate.
9386
9387 2016-01-21 Yao Qi <yao.qi@linaro.org>
9388
9389 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9390 is_thumb and set it according to CPSR saved on the stack.
9391 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9392 arm_sigreturn_next_pc.
9393
9394 2016-01-18 Yao Qi <yao.qi@linaro.org>
9395
9396 * linux-low.c (linux_set_pc_64bit): New function.
9397 (linux_get_pc_64bit): New function.
9398 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9399 Declare.
9400 * linux-sparc-low.c (debug_threads): Remove declaration.
9401 (sparc_get_pc): Remove.
9402 (the_low_target): Use linux_get_pc_64bit instead of
9403 sparc_get_pc.
9404 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9405 (the_low_target): Use linux_get_pc_64bit and
9406 linux_set_pc_64bit.
9407
9408 2016-01-18 Yao Qi <yao.qi@linaro.org>
9409
9410 * linux-arm-low.c (debug_threads): Remove declaration.
9411 (arm_get_pc, arm_set_pc): Remove.
9412 (the_low_target): Use linux_get_pc_32bit and
9413 linux_set_pc_32bit.
9414 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9415 (the_low_target): Use linux_get_pc_32bit and
9416 linux_set_pc_32bit.
9417 * linux-cris-low.c (debug_threads): Remove declaration.
9418 (cris_get_pc, cris_set_pc,): Remove.
9419 (the_low_target): Use linux_get_pc_32bit and
9420 linux_set_pc_32bit.
9421 * linux-crisv32-low.c (debug_threads): Remove declaration.
9422 (cris_get_pc, cris_set_pc): Remove.
9423 (the_low_target): Use linux_get_pc_32bit and
9424 linux_set_pc_32bit.
9425 * linux-low.c: Include inttypes.h.
9426 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9427 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9428 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9429 (the_low_target): Use linux_get_pc_32bit and
9430 linux_set_pc_32bit.
9431 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9432 (the_low_target): Use linux_get_pc_32bit and
9433 linux_set_pc_32bit.
9434 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9435 (the_low_target): Use linux_get_pc_32bit and
9436 linux_set_pc_32bit.
9437 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9438 (the_low_target): Use linux_get_pc_32bit and
9439 linux_set_pc_32bit.
9440 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9441 (the_low_target): Use linux_get_pc_32bit and
9442 linux_set_pc_32bit.
9443
9444 2016-01-18 Gary Benson <gbenson@redhat.com>
9445
9446 * configure.ac (AC_FUNC_FORK): New check.
9447 * config.in: Regenerate.
9448 * configure: Likewise.
9449
9450 2016-01-14 Yao Qi <yao.qi@linaro.org>
9451
9452 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9453 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9454 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9455 arm_get_next_pcs_ctor.
9456
9457 2016-01-12 Josh Stone <jistone@redhat.com>
9458 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9459
9460 * inferiors.h: Include "gdb_vecs.h".
9461 (struct process_info): Add syscalls_to_catch.
9462 * inferiors.c (remove_process): Free syscalls_to_catch.
9463 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9464 syscall_return stops.
9465 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9466 * server.c (handle_general_set): Handle QCatchSyscalls.
9467 (handle_query): Report support for QCatchSyscalls.
9468 * target.h (struct target_ops): Add supports_catch_syscall.
9469 (target_supports_catch_syscall): New macro.
9470 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9471 (struct lwp_info): Add syscall_state.
9472 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9473 Maintain syscall_state and syscalls_to_catch across exec.
9474 (get_syscall_trapinfo): New function, proxy to the_low_target.
9475 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9476 (linux_low_filter_event): Toggle syscall_state entry/return for
9477 syscall traps, and set it ignored for all others.
9478 (gdb_catching_syscalls_p): New function.
9479 (gdb_catch_this_syscall_p): New function.
9480 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9481 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9482 (linux_supports_catch_syscall): New function.
9483 (linux_target_ops): Install it.
9484 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9485 (the_low_target): Install it.
9486
9487 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9488
9489 * acinclude.m4: Include new ../warning.m4 file.
9490 * configure: Regenerated.
9491 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9492
9493 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9494
9495 * ax.c (is_goto_target): Mark static.
9496 * linux-low.c (register_addr): Likewise.
9497 (linux_fetch_registers, linux_store_registers): Likewise.
9498 * mem-break.c (any_persistent_commands): Fix old prototype.
9499 (add_commands_to_breakpoint): Mark static.
9500 * regcache.c (find_register_by_name): Delete unused func.
9501 * remote-utils.c (hex_or_minus_one): Mark static.
9502 * server.c (monitor_show_help): Mark static.
9503 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9504 handle_v_requests): Likewise.
9505
9506 2016-01-12 Pedro Alves <palves@redhat.com>
9507
9508 Remove use of the registered trademark symbol throughout.
9509
9510 2016-01-08 Yao Qi <yao.qi@linaro.org>
9511
9512 * remote-utils.c (getpkt): If c is '\003', call target hook
9513 request_interrupt.
9514
9515 2016-01-06 Yao Qi <yao.qi@linaro.org>
9516
9517 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9518 linux-aarch32-low.c.
9519 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9520 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9521 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9522 (thumb2_breakpoint): Declare.
9523 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9524 linux-aarch32-low.h.
9525 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9526 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9527 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9528
9529 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9530
9531 * gdbreplay.c (gdbreplay_version): Change copyright year in
9532 version message.
9533 * server.c (gdbserver_version): Likewise.
9534
9535 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9536
9537 * server.c (crc32_table): Delete.
9538 (crc32): Use libiberty's xcrc32 function.
9539
9540 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9541
9542 * lynx-low.c (lynx_delete_thread_callback): New function.
9543 (lynx_mourn): Properly delete our process and all of its
9544 threads. Remove call to clear_inferiors.
9545
9546 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9547
9548 * target.c (thread_search_callback): Add check that
9549 the thread_stopped target callback is not NULL before
9550 calling it.
9551
9552 2015-12-21 Yao Qi <yao.qi@linaro.org>
9553
9554 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9555 arm breakpoint.
9556
9557 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9558
9559 * server.c (handle_query): Call target_supports_software_single_step.
9560
9561 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9562
9563 * linux-low.c (single_step): New function.
9564 (linux_resume_one_lwp_throw): Call single_step.
9565 (start_step_over): Likewise.
9566
9567 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9568
9569 * Makefile.in (SFILES): Append arch/arm-linux.c,
9570 arch/arm-get-next-pcs.c.
9571 (arm-linux.o): New rule.
9572 (arm-get-next-pcs.o): New rule.
9573 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9574 arm-linux.o.
9575 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9576 to linux-aarch32-low.c.
9577 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9578 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9579 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9580 (thumb2_breakpoint_len): Likewise.
9581 (arm_is_thumb_mode): Make non-static.
9582 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9583 from linux-aarch32-low.c.
9584 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9585 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9586 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9587 (thumb2_breakpoint_len): Likewise.
9588 (arm_is_thumb_mode): New declaration.
9589 * linux-arm-low.c: Include arch/arm-linux.h
9590 aarch/arm-get-next-pcs.h, sys/syscall.h.
9591 (get_next_pcs_ops): New struct.
9592 (get_next_pcs_addr_bits_remove): New function.
9593 (get_next_pcs_is_thumb): New function.
9594 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9595 (arm_sigreturn_next_pc): Likewise.
9596 (get_next_pcs_syscall_next_pc): Likewise.
9597 (arm_gdbserver_get_next_pcs): Likewise.
9598 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9599 Initialize.
9600 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9601 * server.h: Include gdb_vecs.h.
9602
9603 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9604
9605 * Makefile.in (SFILES): Append common/common-regcache.c.
9606 (OBS): Append common-regcache.o.
9607 (common-regcache.o): New rule.
9608 * regcache.c (init_register_cache): Initialize cache to
9609 REG_UNAVAILABLE.
9610 (regcache_raw_read_unsigned): New function.
9611 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9612 register_status enum.
9613
9614 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9615
9616 * linux-aarch64-low.c (the_low_targets): Rename
9617 breakpoint_reinsert_addr to get_next_pcs.
9618 * linux-arm-low.c (the_low_targets): Likewise.
9619 * linux-bfin-low.c (the_low_targets): Likewise.
9620 * linux-cris-low.c (the_low_targets): Likewise.
9621 * linux-crisv32-low.c (the_low_targets): Likewise.
9622 * linux-low.c (can_software_single_step): Likewise.
9623 (install_software_single_step_breakpoints): New function.
9624 (start_step_over): Use install_software_single_step_breakpoints.
9625 * linux-low.h: New CORE_ADDR vector.
9626 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9627 get_next_pcs.
9628 * linux-mips-low.c (the_low_targets): Likewise.
9629 * linux-nios2-low.c (the_low_targets): Likewise.
9630 * linux-sparc-low.c (the_low_targets): Likewise.
9631
9632 2015-12-17 Pedro Alves <palves@redhat.com>
9633
9634 * linux-low.c (linux_kill_one_lwp): Remove references to
9635 LinuxThreads.
9636 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9637 to 'kill'.
9638 (linux_init_signals): Delete.
9639 (initialize_low): Adjust.
9640 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9641
9642 2015-12-16 Pedro Alves <palves@redhat.com>
9643
9644 * configure.ac (compiler warning flags): When testing a
9645 -Wno-foo option, check whether -Wfoo works instead.
9646 * configure: Regenerate.
9647
9648 2015-12-11 Don Breazeal <donb@codesourcery.com>
9649
9650 * server.c (process_serial_event): Don't exit from gdbserver
9651 in remote mode if there are still active inferiors.
9652
9653 2015-12-11 Yao Qi <yao.qi@linaro.org>
9654
9655 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9656 arm_breakpoint_at if the process is 32-bit.
9657
9658 2015-12-11 Yao Qi <yao.qi@linaro.org>
9659
9660 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9661 arm breakpoint.
9662
9663 2015-12-07 Yao Qi <yao.qi@linaro.org>
9664
9665 * configure.srv: Append arm.o to srv_tgtobj for
9666 aarch64*-*-linux* target.
9667 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9668 from linux-arm-low.c.
9669 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9670 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9671 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9672 (thumb2_breakpoint_len): Likewise.
9673 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9674 (arm_breakpoint_kinds): Likewise.
9675 (arm_breakpoint_kind_from_pc): Likewise.
9676 (arm_sw_breakpoint_from_kind): Likewise.
9677 (arm_breakpoint_kind_from_current_state): Likewise.
9678 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9679 (arm_sw_breakpoint_from_kind): Declare.
9680 (arm_breakpoint_kind_from_current_state): Declare.
9681 (arm_breakpoint_at): Declare.
9682 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9683 arm_sw_breakpoint_from_kind if process is 32-bit.
9684 (aarch64_breakpoint_kind_from_pc): New function.
9685 (aarch64_breakpoint_kind_from_current_state): New function.
9686 (the_low_target): Initialize fields breakpoint_kind_from_pc
9687 and breakpoint_kind_from_current_state.
9688 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9689 linux-aarch32-low.c.
9690 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9691 (arm_breakpoint, arm_breakpoint_len): Likewise.
9692 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9693 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9694 (arm_is_thumb_mode): Likewise.
9695 (arm_breakpoint_at): Likewise.
9696 (arm_breakpoint_kind_from_pc): Likewise.
9697 (arm_sw_breakpoint_from_kind): Likewise.
9698 (arm_breakpoint_kind_from_current_state): Likewise.
9699
9700 Revert:
9701 2015-08-04 Yao Qi <yao.qi@linaro.org>
9702
9703 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9704 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9705 * server.c (extended_protocol): Remove "static".
9706 * server.h (extended_protocol): Declare it.
9707
9708 2015-12-04 Josh Stone <jistone@redhat.com>
9709
9710 * target.h (struct target_ops) <arch_setup>: Rename to ...
9711 (struct target_ops) <post_create_inferior>: ... this.
9712 (target_arch_setup): Rename to ...
9713 (target_post_create_inferior): ... this, calling post_create_inferior.
9714 * server.c (start_inferior): Update target_arch_setup calls to
9715 target_post_create_inferior.
9716 * linux-low.c (linux_low_ptrace_options): Forward declare.
9717 (linux_arch_setup): Update its comment for general use.
9718 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9719 (struct linux_target_ops): Use linux_post_create_inferior.
9720 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9721 to post_create_inferior.
9722 * nto-low.c (struct nto_target_ops): Likewise.
9723 * spu-low.c (struct spu_target_ops): Likewise.
9724 * win32-low.c (struct win32_target_ops): Likewise.
9725
9726 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9727
9728 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9729
9730 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9731
9732 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9733 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9734 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9735 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9736 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9737 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9738 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9739 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9740 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9741 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9742 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9743 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9744
9745 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9746
9747 * linux-low.c (linux_look_up_symbols): Don't call
9748 linux_supports_traceclone.
9749 * linux-low.h (thread_db_init): Remove use_events argument.
9750 * thread-db.c (thread_db_use_event): Remove global variable.
9751 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9752 (struct thread_db) <td_create_bp>: Remove field.
9753 (thread_db_create_event): Remove function.
9754 (thread_db_enable_reporting): Likewise.
9755 (find_one_thread): Don't check for thread_db_use_events.
9756 (attach_thread): Likewise.
9757 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9758 (try_thread_db_load_1): Don't check for thread_db_use_events.
9759 (thread_db_init): Remove use_events argument and thread events
9760 handling.
9761 (remove_thread_event_breakpoints): Remove function.
9762 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9763
9764 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9765
9766 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9767 New function.
9768 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9769 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9770 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9771 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9772 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9773 Initialize.
9774 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9775 New function.
9776 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9777 * linux-low.c (can_hardware_single_step): Use
9778 supports_hardware_single_step.
9779 (can_software_single_step): New function.
9780 (start_step_over): Call can_software_single_step.
9781 (linux_supports_hardware_single_step): New function.
9782 (struct target_ops) <supports_software_single_step>: Initialize.
9783 * linux-low.h (struct linux_target_ops)
9784 <supports_hardware_single_step>: Initialize.
9785 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9786 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9787 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9788 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9789 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9790 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9791 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9792 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9793 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9794 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9795 Initialize.
9796 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9797 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9798 Initialize.
9799 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9800 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9801 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9802 New function.
9803 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9804 * target.h (struct target_ops): <supports_software_single_step>:
9805 New field.
9806 (target_supports_software_single_step): New macro.
9807
9808 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9809
9810 * linux-low.c (linux_wait_1): Fix pc advance condition.
9811 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9812 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9813
9814 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9815
9816 * linux-arm-low.c (arm_is_thumb_mode): New function.
9817 (arm_breakpoint_at): Use arm_is_thumb_mode.
9818 (arm_breakpoint_kind_from_current_state): New function.
9819 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9820 Initialize.
9821 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9822 (linux_breakpoint_kind_from_current_state): New function.
9823 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9824 * linux-low.h (struct linux_target_ops)
9825 <breakpoint_kind_from_current_state>: New field.
9826 * target.h (struct target_ops): Likewise.
9827 (target_breakpoint_kind_from_current_state): New macro.
9828
9829 2015-11-30 Pedro Alves <palves@redhat.com>
9830
9831 * linux-low.c (linux_resume): Wake up the event loop before
9832 returning.
9833
9834 2015-11-30 Pedro Alves <palves@redhat.com>
9835
9836 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9837 check.
9838 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9839 to -1.
9840 * target.c (struct thread_search): New structure.
9841 (thread_search_callback): New function.
9842 (prev_general_thread): New global.
9843 (prepare_to_access_memory, done_accessing_memory): New functions.
9844 * target.h (prepare_to_access_memory, done_accessing_memory):
9845 Replace macros with function declarations.
9846
9847 2015-11-30 Pedro Alves <palves@redhat.com>
9848
9849 PR 14618
9850 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9851 report TARGET_WAITKIND_NO_RESUMED.
9852 * remote-utils.c (prepare_resume_reply): Handle
9853 TARGET_WAITKIND_NO_RESUMED.
9854 * server.c (report_no_resumed): New global.
9855 (handle_query) <qSupported>: Handle "no-resumed+". Report
9856 "no-resumed+" support.
9857 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9858 return error if the client doesn't support no-resumed events.
9859 (push_stop_notification): New function.
9860 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9861 events if the client supports them.
9862
9863 2015-11-30 Pedro Alves <palves@redhat.com>
9864
9865 * linux-low.c (thread_still_has_status_pending_p): Don't check
9866 vCont;t here.
9867 (lwp_resumed): New function.
9868 (status_pending_p_callback): Return early if the LWP is not
9869 supposed to be resumed.
9870
9871 2015-11-30 Pedro Alves <palves@redhat.com>
9872
9873 * linux-low.c (handle_extended_wait): Assert that the LWP's
9874 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9875 thread create events, leave the new child's status pending.
9876 (linux_low_filter_event): If GDB wants to hear about thread exit
9877 events, leave the LWP marked dead and don't delete it.
9878 (linux_wait_for_event_filtered): Don't check for thread exit.
9879 (filter_exit_event): New function.
9880 (linux_wait_1): Use it, when returning an exit event.
9881 (linux_resume_one_lwp_throw): Assert that the LWP's
9882 waitstatus is TARGET_WAITKIND_IGNORE.
9883 * remote-utils.c (prepare_resume_reply): Handle
9884 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9885 * server.c (report_thread_events): New global.
9886 (handle_general_set): Handle QThreadEvents.
9887 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9888 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9889 TARGET_WAITKIND_THREAD_EXITED.
9890 * server.h (report_thread_events): Declare.
9891
9892 2015-11-30 Pedro Alves <palves@redhat.com>
9893
9894 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9895 the thread's last_resume_kind was resume_stop.
9896
9897 2015-11-30 Pedro Alves <palves@redhat.com>
9898
9899 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9900 before returning.
9901
9902 2015-11-30 Pedro Alves <palves@redhat.com>
9903
9904 * server.c (handle_v_requests): Handle vCtrlC.
9905
9906 2015-11-30 Pedro Alves <palves@redhat.com>
9907
9908 * gdbthread.h (find_any_thread_of_pid): Declare.
9909 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9910 functions.
9911 * server.c (handle_query): If current_thread is NULL, look for
9912 another thread of the selected process.
9913
9914 2015-11-26 Daniel Colascione <dancol@dancol.org>
9915 Simon Marchi <simon.marchi@ericsson.com>
9916
9917 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9918 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9919 name in reply.
9920 * target.h (struct target_ops) <thread_name>: New field.
9921 (target_thread_name): New macro.
9922
9923 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9924
9925 * regcache.h (regcache_invalidate_pid): Add declaration.
9926 * regcache.c (regcache_invalidate_pid): New function, extracted
9927 from regcache_invalidate.
9928 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9929 Add trivial documentation comment.
9930 * lynx-low.c: Use regcache_invalidate_pid instead of
9931 regcache_invalidate.
9932
9933 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9934
9935 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9936 and Elf64_auxv_t if the target is Android.
9937
9938 2015-11-22 Doug Evans <xdje42@gmail.com>
9939
9940 * target.h: #include <sys/types.h>.
9941
9942 2015-11-19 Pedro Alves <palves@redhat.com>
9943
9944 * linux-low.c (linux_process_qsupported): Change prototype.
9945 Adjust.
9946 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9947 Change prototype.
9948 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9949 and adjust to loop over all features.
9950 * server.c (handle_query) <qSupported>: Adjust to call
9951 target_process_qsupported once, passing it a vector of unprocessed
9952 features.
9953 * target.h (struct target_ops) <process_qsupported>: Change
9954 prototype.
9955 (target_process_qsupported): Adjust.
9956
9957 2015-11-19 Pedro Alves <palves@redhat.com>
9958
9959 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9960 mode.
9961 * configure: Regenerate.
9962
9963 2015-11-19 Pedro Alves <palves@redhat.com>
9964
9965 * configure: Regenerate.
9966
9967 2015-11-19 Yao Qi <yao.qi@linaro.org>
9968
9969 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9970 type to uint32_t.
9971
9972 2015-11-19 Yao Qi <yao.qi@linaro.org>
9973
9974 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9975 (struct aarch64_operand): Move enum out.
9976
9977 2015-11-19 Yao Qi <yao.qi@linaro.org>
9978
9979 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9980 struct user_fpsimd_state *.
9981 (aarch64_store_fpregset): Likewise.
9982
9983 2015-11-19 Yao Qi <yao.qi@linaro.org>
9984
9985 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9986 struct user_pt_regs *.
9987 (aarch64_store_gregset): Likewise.
9988
9989 2015-11-18 Pedro Alves <palves@redhat.com>
9990
9991 * Makefile.in (all_object_files): Add $IPA_OBJS.
9992
9993 2015-11-17 Pedro Alves <palves@redhat.com>
9994
9995 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9996 GDB_SIGNAL_0 and gdb_signal_to_string.
9997
9998 2015-11-17 Pedro Alves <palves@redhat.com>
9999
10000 * win32-low.c (handle_output_debug_string): Remove parameter.
10001 (win32_kill): Remove our_status local and adjust call to
10002 handle_output_debug_string.
10003 (get_child_debug_event): Adjust call to
10004 handle_output_debug_string.
10005
10006 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10007
10008 * linux-mips-low.c (mips_fill_gregset): Add cast.
10009 (mips_store_gregset): Likewise.
10010 (mips_fill_fpregset): Likewise.
10011 (mips_store_fpregset): Likewise.
10012
10013 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10014
10015 * linux-mips-low.c (mips_add_watchpoint): Rename private to
10016 priv.
10017
10018 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10019
10020 * linux-mips-low.c (mips_linux_new_thread): Change type of
10021 watch_type to enum target_hw_bp_type.
10022
10023 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10024
10025 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
10026 Change return type to arm_hwbp_type.
10027
10028 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10029
10030 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
10031 (arm_store_gregset): Likewise.
10032 * linux-arm-low.c (arm_get_hwcap): Likewise.
10033 (arm_read_description): Likewise.
10034
10035 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10036
10037 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
10038
10039 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10040
10041 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
10042 (ppc_fill_vsxregset): Likewise.
10043 (ppc_store_vsxregset): Likewise.
10044 (ppc_fill_vrregset): Likewise.
10045 (ppc_store_vrregset): Likewise.
10046 (ppc_fill_evrregset): Likewise.
10047 (ppc_store_evrregset): Likewise.
10048
10049 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10050
10051 * linux-ppc-low.c (ppc_usrregs_info): Remove
10052 forward-declaration.
10053 (ppc_arch_setup): Move lower in file.
10054
10055 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
10056
10057 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
10058 (ps_pdwrite): Likewise.
10059
10060 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
10061
10062 * linux-arm-low.c (arm_new_thread): Move pointer dereference
10063 to after assert checks.
10064
10065 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
10066
10067 * proc-service.c (ps_pdread): Add/adjust casts.
10068 (ps_pdwrite): Add/adjust casts.
10069
10070 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
10071
10072 * server.c (handle_search_memory_1): Cast return value of
10073 memmem.
10074
10075 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
10076
10077 * server.c (write_qxfer_response): Change type of data to
10078 gdb_byte *.
10079
10080 2015-10-29 Pedro Alves <palves@redhat.com>
10081
10082 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
10083
10084 2015-10-29 Pedro Alves <palves@redhat.com>
10085
10086 * tracepoint.c (clear_installed_tracepoints): Add casts.
10087
10088 2015-10-29 Pedro Alves <palves@redhat.com>
10089
10090 * server.c (handle_v_cont, process_serial_event): Add enum
10091 gdb_signal casts to signal parsing code.
10092
10093 2015-10-29 Pedro Alves <palves@redhat.com>
10094
10095 * linux-low.h (NULL_REGSET): Define.
10096 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
10097 * linux-arm-low.c (arm_regsets): Likewise.
10098 * linux-crisv32-low.c (cris_regsets): Likewise.
10099 * linux-m68k-low.c (m68k_regsets): Likewise.
10100 * linux-mips-low.c (mips_regsets): Likewise.
10101 * linux-nios2-low.c (nios2_regsets): Likewise.
10102 * linux-ppc-low.c (ppc_regsets): Likewise.
10103 * linux-s390-low.c (s390_regsets): Likewise.
10104 * linux-sh-low.c (sh_regsets): Likewise.
10105 * linux-sparc-low.c (sparc_regsets): Likewise.
10106 * linux-tic6x-low.c (tic6x_regsets): Likewise.
10107 * linux-tile-low.c (tile_regsets): Likewise.
10108 * linux-x86-low.c (x86_regsets): Likewise.
10109 * linux-xtensa-low.c (xtensa_regsets): Likewise.
10110
10111 2015-10-29 Pedro Alves <palves@redhat.com>
10112
10113 * linux-low.h (NULL_REGSET): Define.
10114 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
10115 * linux-arm-low.c (arm_regsets): Likewise.
10116 * linux-crisv32-low.c (cris_regsets): Likewise.
10117 * linux-m68k-low.c (m68k_regsets): Likewise.
10118 * linux-mips-low.c (mips_regsets): Likewise.
10119 * linux-nios2-low.c (nios2_regsets): Likewise.
10120 * linux-ppc-low.c (ppc_regsets): Likewise.
10121 * linux-s390-low.c (s390_regsets): Likewise.
10122 * linux-sh-low.c (sh_regsets): Likewise.
10123 * linux-sparc-low.c (sparc_regsets): Likewise.
10124 * linux-tic6x-low.c (tic6x_regsets): Likewise.
10125 * linux-tile-low.c (tile_regsets): Likewise.
10126 * linux-x86-low.c (x86_regsets): Likewise.
10127 * linux-xtensa-low.c (xtensa_regsets): Likewise.
10128
10129 2015-10-26 Doug Evans <dje@google.com>
10130
10131 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
10132
10133 2015-10-26 Doug Evans <dje@google.com>
10134
10135 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
10136
10137 2015-10-26 Doug Evans <dje@google.com>
10138
10139 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
10140 for debug_printf.
10141 (attach_thread, find_new_threads_callback): Ditto.
10142
10143 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10144
10145 * mem-break.h (set_breakpoint_data): Remove.
10146
10147 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10148
10149 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
10150 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
10151 (initialize_low): Remove set_breakpoint_data call.
10152 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
10153 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
10154 (initialize_low): Remove set_breakpoint_data call.
10155 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
10156 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
10157 (initialize_low): Remove set_breakpoint_data call.
10158
10159 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10160
10161 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
10162 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
10163 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
10164 * target.h (target_breakpoint_kind_from_pc): New macro.
10165
10166 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
10167
10168 * linux-low.c (default_breakpoint_kind_from_pc): New function.
10169 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
10170 the default breakpoint kind.
10171
10172 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10173
10174 * linux-arm-low.c (arm_supports_z_point_type): Add software
10175 breakpoint support.
10176
10177 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10178
10179 * linux-arm-low.c: Refactor breakpoint definitions.
10180 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
10181 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
10182
10183 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10184
10185 * Makefile.in: Add arm.c/o.
10186 * configure.srv: Likewise.
10187 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
10188 (arm_breakpoint_kind_from_pc): New function.
10189 (arm_sw_breakpoint_from_kind): Return proper kind.
10190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
10191
10192 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10193
10194 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
10195 removal.
10196 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
10197 (struct raw_breakpoint) <size>: Remove.
10198 (struct raw_breakpoint) <kind>: Add.
10199 (bp_size): New function.
10200 (bp_opcode): Likewise.
10201 (find_raw_breakpoint_at): Adjust for kind.
10202 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
10203 (remove_memory_breakpoint): Adjust for kind call bp_size.
10204 (set_raw_breakpoint_at): Adjust for kind.
10205 (set_breakpoint): Likewise.
10206 (set_breakpoint_at): Call breakpoint_kind_from_pc.
10207 (delete_raw_breakpoint): Adjust for kind.
10208 (delete_breakpoint): Likewise.
10209 (find_gdb_breakpoint): Likewise.
10210 (set_gdb_breakpoint_1): Likewise.
10211 (set_gdb_breakpoint): Likewise.
10212 (delete_gdb_breakpoint_1): Likewise.
10213 (delete_gdb_breakpoint): Likewise.
10214 (uninsert_raw_breakpoint): Likewise.
10215 (reinsert_raw_breakpoint): Likewise.
10216 (set_breakpoint_data): Remove.
10217 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
10218 (check_mem_read): Adjust for kind call bp_size.
10219 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
10220 (clone_one_breakpoint): Adjust for kind.
10221 * mem-break.h (set_gdb_breakpoint): Likewise.
10222 (delete_gdb_breakpoint): Likewise.
10223 * server.c (process_serial_event): Likewise.
10224
10225 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10226
10227 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
10228 (struct linux_target_ops) <breakpoint>: Remove.
10229 (struct linux_target_ops) <breakpoint_len>: Remove.
10230 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10231 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10232 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
10233 (arm_sw_breakpoint_from_kind): New function.
10234 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
10235 (struct linux_target_ops) <breakpoint>: Remove.
10236 (struct linux_target_ops) <breakpoint_len>: Remove.
10237 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10238 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10239 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
10240 (struct linux_target_ops) <breakpoint>: Remove.
10241 (struct linux_target_ops) <breakpoint_len>: Remove.
10242 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10243 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10244 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
10245 (struct linux_target_ops) <breakpoint>: Remove.
10246 (struct linux_target_ops) <breakpoint_len>: Remove.
10247 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10248 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10249 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
10250 and sw_breakpoint_from_kind to increment the pc.
10251 (linux_breakpoint_kind_from_pc): New function.
10252 (linux_sw_breakpoint_from_kind): New function.
10253 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
10254 (initialize_low): Call breakpoint_kind_from_pc and
10255 sw_breakpoint_from_kind to replace breakpoint_data/len.
10256 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
10257 New field.
10258 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
10259 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
10260 (struct linux_target_ops) <breakpoint>: Remove.
10261 (struct linux_target_ops) <breakpoint_len>: Remove.
10262 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10263 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10264 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
10265 (struct linux_target_ops) <breakpoint>: Remove.
10266 (struct linux_target_ops) <breakpoint_len>: Remove.
10267 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10268 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10269 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
10270 (struct linux_target_ops) <breakpoint>: Remove.
10271 (struct linux_target_ops) <breakpoint_len>: Remove.
10272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10273 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10274 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
10275 (struct linux_target_ops) <breakpoint>: Remove.
10276 (struct linux_target_ops) <breakpoint_len>: Remove.
10277 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10278 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10279 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
10280 (struct linux_target_ops) <breakpoint>: Remove.
10281 (struct linux_target_ops) <breakpoint_len>: Remove.
10282 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10284 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
10285 (struct linux_target_ops) <breakpoint>: Remove.
10286 (struct linux_target_ops) <breakpoint_len>: Remove.
10287 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10288 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10289 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
10290 (struct linux_target_ops) <breakpoint>: Remove.
10291 (struct linux_target_ops) <breakpoint_len>: Remove.
10292 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10293 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10294 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
10295 (struct linux_target_ops) <breakpoint>: Remove.
10296 (struct linux_target_ops) <breakpoint_len>: Remove.
10297 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10298 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10299 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
10300 (struct linux_target_ops) <breakpoint>: Remove.
10301 (struct linux_target_ops) <breakpoint_len>: Remove.
10302 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10303 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10304 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
10305 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
10306 (struct linux_target_ops) <breakpoint>: Remove.
10307 (struct linux_target_ops) <breakpoint_len>: Remove.
10308 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10309 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10310 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
10311 (struct linux_target_ops) <breakpoint>: Remove.
10312 (struct linux_target_ops) <breakpoint_len>: Remove.
10313 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10314 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10315
10316 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10317
10318 * linux-cris-low.c (cris_get_pc): Remove void arg.
10319
10320 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10321
10322 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
10323 variable name.
10324
10325 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10326
10327 * inferiors.c (thread_pid_matches_callback): New function.
10328 (find_thread_process): New function.
10329 (remove_thread): Reset current_thread.
10330 (remove_process): Assert threads have been removed first.
10331
10332 2015-10-15 Yao Qi <yao.qi@linaro.org>
10333
10334 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10335 if it is 3.
10336 (aarch64_remove_point): Likewise.
10337 * regcache.c (regcache_register_size): New function.
10338
10339 2015-10-12 Yao Qi <yao.qi@linaro.org>
10340
10341 * linux-aarch64-low.c: Update all callers as emit_load_store
10342 is renamed to aarch64_emit_load_store.
10343
10344 2015-10-12 Yao Qi <yao.qi@linaro.org>
10345
10346 * linux-aarch64-low.c: Update all callers of function renaming
10347 from emit_insn to aarch64_emit_insn.
10348
10349 2015-10-12 Yao Qi <yao.qi@linaro.org>
10350
10351 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10352 arch/aarch64-insn.h.
10353 (struct aarch64_memory_operand): Likewise.
10354 (ENCODE): Likewise.
10355 (emit_insn): Move to arch/aarch64-insn.c.
10356 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10357 (emit_load_store): Move to arch/aarch64-insn.c.
10358 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10359 (can_encode_int32): Remove.
10360
10361 2015-10-12 Yao Qi <yao.qi@linaro.org>
10362
10363 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10364 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10365 (aarch64_relocate_instruction): Likewise.
10366 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10367 (struct aarch64_insn_visitor): Likewise.
10368
10369 2015-10-12 Yao Qi <yao.qi@linaro.org>
10370
10371 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10372 (struct aarch64_insn_visitor): New.
10373 (struct aarch64_insn_relocation_data): New.
10374 (aarch64_ftrace_insn_reloc_b): New function.
10375 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10376 (aarch64_ftrace_insn_reloc_cb): Likewise.
10377 (aarch64_ftrace_insn_reloc_tb): Likewise.
10378 (aarch64_ftrace_insn_reloc_adr): Likewise.
10379 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10380 (aarch64_ftrace_insn_reloc_others): Likewise.
10381 (visitor): New.
10382 (aarch64_relocate_instruction): Use visitor.
10383
10384 2015-10-12 Yao Qi <yao.qi@linaro.org>
10385
10386 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10387 int. Add argument buf.
10388 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10389 aarch64_relocate_instruction.
10390
10391 2015-10-12 Yao Qi <yao.qi@linaro.org>
10392
10393 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10394 argument insn. Remove local variable insn. Don't call
10395 target_read_uint32.
10396 (aarch64_install_fast_tracepoint_jump_pad): Call
10397 target_read_uint32.
10398
10399 2015-09-30 Yao Qi <yao.qi@linaro.org>
10400
10401 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10402 (emit_load_store_pair): Likewise.
10403
10404 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10405
10406 * dll.c (match_dll): Add cast(s).
10407 (unloaded_dll): Likewise.
10408 * linux-low.c (second_thread_of_pid_p): Likewise.
10409 (delete_lwp_callback): Likewise.
10410 (count_events_callback): Likewise.
10411 (select_event_lwp_callback): Likewise.
10412 (linux_set_resume_request): Likewise.
10413 * server.c (accumulate_file_name_length): Likewise.
10414 (emit_dll_description): Likewise.
10415 (handle_qxfer_threads_worker): Likewise.
10416 (visit_actioned_threads): Likewise.
10417 * thread-db.c (any_thread_of): Likewise.
10418 * tracepoint.c (same_process_p): Likewise.
10419 (match_blocktype): Likewise.
10420 (build_traceframe_info_xml): Likewise.
10421
10422 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10423
10424 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10425 assignment.
10426 (gdb_unparse_agent_expr): Likewise.
10427 * hostio.c (require_data): Likewise.
10428 (handle_pread): Likewise.
10429 * linux-low.c (disable_regset): Likewise.
10430 (fetch_register): Likewise.
10431 (store_register): Likewise.
10432 (get_dynamic): Likewise.
10433 (linux_qxfer_libraries_svr4): Likewise.
10434 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10435 (set_fast_tracepoint_jump): Likewise.
10436 (uninsert_fast_tracepoint_jumps_at): Likewise.
10437 (reinsert_fast_tracepoint_jumps_at): Likewise.
10438 (validate_inserted_breakpoint): Likewise.
10439 (clone_agent_expr): Likewise.
10440 * regcache.c (init_register_cache): Likewise.
10441 * remote-utils.c (putpkt_binary_1): Likewise.
10442 (decode_M_packet): Likewise.
10443 (decode_X_packet): Likewise.
10444 (look_up_one_symbol): Likewise.
10445 (relocate_instruction): Likewise.
10446 (monitor_output): Likewise.
10447 * server.c (handle_search_memory): Likewise.
10448 (handle_qxfer_exec_file): Likewise.
10449 (handle_qxfer_libraries): Likewise.
10450 (handle_qxfer): Likewise.
10451 (handle_query): Likewise.
10452 (handle_v_cont): Likewise.
10453 (handle_v_run): Likewise.
10454 (captured_main): Likewise.
10455 * target.c (write_inferior_memory): Likewise.
10456 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10457 * tracepoint.c (init_trace_buffer): Likewise.
10458 (add_tracepoint_action): Likewise.
10459 (add_traceframe): Likewise.
10460 (add_traceframe_block): Likewise.
10461 (cmd_qtdpsrc): Likewise.
10462 (cmd_qtdv): Likewise.
10463 (cmd_qtstatus): Likewise.
10464 (response_source): Likewise.
10465 (response_tsv): Likewise.
10466 (cmd_qtnotes): Likewise.
10467 (gdb_collect): Likewise.
10468 (initialize_tracepoint): Likewise.
10469
10470 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10471
10472 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10473 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10474 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10475 <NOP>: New.
10476 (enum aarch64_condition_codes): New enum.
10477 (w0): New static global.
10478 (fp): Likewise.
10479 (lr): Likewise.
10480 (struct aarch64_memory_operand) <type>: New
10481 MEMORY_OPERAND_POSTINDEX type.
10482 (postindex_memory_operand): New helper function.
10483 (emit_ret): New function.
10484 (emit_load_store_pair): New function, factored out of emit_stp
10485 with support for MEMORY_OPERAND_POSTINDEX.
10486 (emit_stp): Rewrite using emit_load_store_pair.
10487 (emit_ldp): New function.
10488 (emit_load_store): Likewise.
10489 (emit_ldr): Mention post-index instruction in comment.
10490 (emit_ldrh): New function.
10491 (emit_ldrb): New function.
10492 (emit_ldrsw): Mention post-index instruction in comment.
10493 (emit_str): Likewise.
10494 (emit_subs): New function.
10495 (emit_cmp): Likewise.
10496 (emit_and): Likewise.
10497 (emit_orr): Likewise.
10498 (emit_orn): Likewise.
10499 (emit_eor): Likewise.
10500 (emit_mvn): Likewise.
10501 (emit_lslv): Likewise.
10502 (emit_lsrv): Likewise.
10503 (emit_asrv): Likewise.
10504 (emit_mul): Likewise.
10505 (emit_sbfm): Likewise.
10506 (emit_sbfx): Likewise.
10507 (emit_ubfm): Likewise.
10508 (emit_ubfx): Likewise.
10509 (emit_csinc): Likewise.
10510 (emit_cset): Likewise.
10511 (emit_nop): Likewise.
10512 (emit_ops_insns): New helper function.
10513 (emit_pop): Likewise.
10514 (emit_push): Likewise.
10515 (aarch64_emit_prologue): New function.
10516 (aarch64_emit_epilogue): Likewise.
10517 (aarch64_emit_add): Likewise.
10518 (aarch64_emit_sub): Likewise.
10519 (aarch64_emit_mul): Likewise.
10520 (aarch64_emit_lsh): Likewise.
10521 (aarch64_emit_rsh_signed): Likewise.
10522 (aarch64_emit_rsh_unsigned): Likewise.
10523 (aarch64_emit_ext): Likewise.
10524 (aarch64_emit_log_not): Likewise.
10525 (aarch64_emit_bit_and): Likewise.
10526 (aarch64_emit_bit_or): Likewise.
10527 (aarch64_emit_bit_xor): Likewise.
10528 (aarch64_emit_bit_not): Likewise.
10529 (aarch64_emit_equal): Likewise.
10530 (aarch64_emit_less_signed): Likewise.
10531 (aarch64_emit_less_unsigned): Likewise.
10532 (aarch64_emit_ref): Likewise.
10533 (aarch64_emit_if_goto): Likewise.
10534 (aarch64_emit_goto): Likewise.
10535 (aarch64_write_goto_address): Likewise.
10536 (aarch64_emit_const): Likewise.
10537 (aarch64_emit_call): Likewise.
10538 (aarch64_emit_reg): Likewise.
10539 (aarch64_emit_pop): Likewise.
10540 (aarch64_emit_stack_flush): Likewise.
10541 (aarch64_emit_zero_ext): Likewise.
10542 (aarch64_emit_swap): Likewise.
10543 (aarch64_emit_stack_adjust): Likewise.
10544 (aarch64_emit_int_call_1): Likewise.
10545 (aarch64_emit_void_call_2): Likewise.
10546 (aarch64_emit_eq_goto): Likewise.
10547 (aarch64_emit_ne_goto): Likewise.
10548 (aarch64_emit_lt_goto): Likewise.
10549 (aarch64_emit_le_goto): Likewise.
10550 (aarch64_emit_gt_goto): Likewise.
10551 (aarch64_emit_ge_got): Likewise.
10552 (aarch64_emit_ops_impl): New static global variable.
10553 (aarch64_emit_ops): New target function, return
10554 &aarch64_emit_ops_impl.
10555 (struct linux_target_ops): Install it.
10556
10557 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10558
10559 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10560 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10561 aarch64-ipa.o.
10562 * linux-aarch64-ipa.c: New file.
10563 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10564 and endian.h.
10565 (aarch64_get_thread_area): New target method.
10566 (extract_signed_bitfield): New helper function.
10567 (aarch64_decode_ldr_literal): New function.
10568 (enum aarch64_opcodes): New enum.
10569 (struct aarch64_register): New struct.
10570 (struct aarch64_operand): New struct.
10571 (x0): New static global.
10572 (x1): Likewise.
10573 (x2): Likewise.
10574 (x3): Likewise.
10575 (x4): Likewise.
10576 (w2): Likewise.
10577 (ip0): Likewise.
10578 (sp): Likewise.
10579 (xzr): Likewise.
10580 (aarch64_register): New helper function.
10581 (register_operand): Likewise.
10582 (immediate_operand): Likewise.
10583 (struct aarch64_memory_operand): New struct.
10584 (offset_memory_operand): New helper function.
10585 (preindex_memory_operand): Likewise.
10586 (enum aarch64_system_control_registers): New enum.
10587 (ENCODE): New macro.
10588 (emit_insn): New helper function.
10589 (emit_b): New function.
10590 (emit_bcond): Likewise.
10591 (emit_cb): Likewise.
10592 (emit_tb): Likewise.
10593 (emit_blr): Likewise.
10594 (emit_stp): Likewise.
10595 (emit_ldp_q_offset): Likewise.
10596 (emit_stp_q_offset): Likewise.
10597 (emit_load_store): Likewise.
10598 (emit_ldr): Likewise.
10599 (emit_ldrsw): Likewise.
10600 (emit_str): Likewise.
10601 (emit_ldaxr): Likewise.
10602 (emit_stxr): Likewise.
10603 (emit_stlr): Likewise.
10604 (emit_data_processing_reg): Likewise.
10605 (emit_data_processing): Likewise.
10606 (emit_add): Likewise.
10607 (emit_sub): Likewise.
10608 (emit_mov): Likewise.
10609 (emit_movk): Likewise.
10610 (emit_mov_addr): Likewise.
10611 (emit_mrs): Likewise.
10612 (emit_msr): Likewise.
10613 (emit_sevl): Likewise.
10614 (emit_wfe): Likewise.
10615 (append_insns): Likewise.
10616 (can_encode_int32_in): New helper function.
10617 (aarch64_relocate_instruction): New function.
10618 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10619 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10620 (struct linux_target_ops): Install aarch64_get_thread_area,
10621 aarch64_install_fast_tracepoint_jump_pad and
10622 aarch64_get_min_fast_tracepoint_insn_len.
10623
10624 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10625
10626 * Makefile.in (aarch64-insn.o): New rule.
10627 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10628
10629 2015-09-21 Yao Qi <yao.qi@linaro.org>
10630
10631 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10632
10633 2015-09-21 Yao Qi <yao.qi@linaro.org>
10634
10635 * tracepoint.c (max_jump_pad_size): Remove.
10636
10637 2015-09-18 Yao Qi <yao.qi@linaro.org>
10638
10639 * linux-aarch64-low.c: Don't include sys/uio.h.
10640 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10641
10642 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10643
10644 * tracepoint.c (eval_result_type): Change prototype.
10645 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10646
10647 2015-09-15 Pedro Alves <palves@redhat.com>
10648
10649 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10650 Check whether to report exec events instead of checking whether
10651 multiprocess is enabled.
10652
10653 2015-09-15 Pedro Alves <palves@redhat.com>
10654
10655 PR remote/18965
10656 * remote-utils.c (prepare_resume_reply): Merge
10657 TARGET_WAITKIND_VFORK_DONE switch case with the
10658 TARGET_WAITKIND_FORKED case.
10659
10660 2015-09-15 Yao Qi <yao.qi@linaro.org>
10661
10662 * server.c (handle_query): Check string comparison using
10663 "else if" instead of "if".
10664
10665 2015-09-15 Yao Qi <yao.qi@linaro.org>
10666
10667 * server.c (vCont_supported): New global variable.
10668 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10669 matches. Append ";vContSupported+" to own_buf.
10670 (handle_v_requests): Append ";s;S" to own_buf if target supports
10671 hardware single step or vCont_supported is false.
10672 (capture_main): Set vCont_supported to zero.
10673
10674 2015-09-15 Yao Qi <yao.qi@linaro.org>
10675
10676 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10677 it to ...
10678 (linux_supports_hardware_single_step): ... New function.
10679 (linux_target_ops): Update.
10680 * lynx-low.c (lynx_target_ops): Set field
10681 supports_hardware_single_step to target_can_do_hardware_single_step.
10682 * nto-low.c (nto_target_ops): Likewise.
10683 * spu-low.c (spu_target_ops): Likewise.
10684 * win32-low.c (win32_target_ops): Likewise.
10685 * target.c (target_can_do_hardware_single_step): New function.
10686 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10687 Remove. <supports_hardware_single_step>: New field.
10688 (target_supports_conditional_breakpoints): Remove.
10689 (target_supports_hardware_single_step): New macro.
10690 (target_can_do_hardware_single_step): Declare.
10691 * server.c (handle_query): Use target_supports_hardware_single_step
10692 instead of target_supports_conditional_breakpoints.
10693
10694 2015-09-15 Yao Qi <yao.qi@linaro.org>
10695
10696 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10697 function.
10698 (struct linux_target_ops the_low_target): Install
10699 aarch64_linux_siginfo_fixup.
10700
10701 2015-09-11 Don Breazeal <donb@codesourcery.com>
10702 Luis Machado <lgustavo@codesourcery.com>
10703
10704 * linux-low.c (linux_mourn): Static declaration.
10705 (linux_arch_setup): Move in front of
10706 handle_extended_wait.
10707 (linux_arch_setup_thread): New function.
10708 (handle_extended_wait): Handle exec events. Call
10709 linux_arch_setup_thread. Make event_lwp argument a
10710 pointer-to-a-pointer.
10711 (check_zombie_leaders): Do not check stopped threads.
10712 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10713 (linux_low_filter_event): Add lwp and thread for exec'ing
10714 non-leader thread if leader thread has been deleted.
10715 Refactor code into linux_arch_setup_thread and call it.
10716 Pass child lwp pointer by reference to handle_extended_wait.
10717 (linux_wait_for_event_filtered): Update comment.
10718 (linux_wait_1): Prevent clobbering exec event status.
10719 (linux_supports_exec_events): New function.
10720 (linux_target_ops) <supports_exec_events>: Initialize new member.
10721 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10722 new member.
10723 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10724 * server.c (report_exec_events): New global variable.
10725 (handle_query): Handle qSupported query for exec-events feature.
10726 (captured_main): Initialize report_exec_events.
10727 * server.h (report_exec_events): Declare new global variable.
10728 * target.h (struct target_ops) <supports_exec_events>: New
10729 member.
10730 (target_supports_exec_events): New macro.
10731 * win32-low.c (win32_target_ops) <supports_exec_events>:
10732 Initialize new member.
10733
10734 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10735
10736 * linux-low.c (linux_low_enable_btrace): Remove.
10737 (linux_target_ops): Replace linux_low_enable_btrace with
10738 linux_enable_btrace.
10739
10740 2015-09-03 Yao Qi <yao.qi@linaro.org>
10741
10742 * linux-aarch64-low.c (aarch64_insert_point): Call
10743 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10744 returns true.
10745
10746 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10747
10748 * linux-low.c (check_stopped_by_breakpoint): Use
10749 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10750
10751 2015-08-27 Pedro Alves <palves@redhat.com>
10752
10753 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10754
10755 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10756
10757 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10758 the XNEW-family equivalent.
10759 (compile_bytecodes): Likewise.
10760 * dll.c (loaded_dll): Likewise.
10761 * event-loop.c (append_callback_event): Likewise.
10762 (create_file_handler): Likewise.
10763 (create_file_event): Likewise.
10764 * hostio.c (handle_open): Likewise.
10765 * inferiors.c (add_thread): Likewise.
10766 (add_process): Likewise.
10767 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10768 * linux-arm-low.c (arm_new_process): Likewise.
10769 (arm_new_thread): Likewise.
10770 * linux-low.c (add_to_pid_list): Likewise.
10771 (linux_add_process): Likewise.
10772 (handle_extended_wait): Likewise.
10773 (add_lwp): Likewise.
10774 (enqueue_one_deferred_signal): Likewise.
10775 (enqueue_pending_signal): Likewise.
10776 (linux_resume_one_lwp_throw): Likewise.
10777 (linux_resume_one_thread): Likewise.
10778 (linux_read_memory): Likewise.
10779 (linux_write_memory): Likewise.
10780 * linux-mips-low.c (mips_linux_new_process): Likewise.
10781 (mips_linux_new_thread): Likewise.
10782 (mips_add_watchpoint): Likewise.
10783 * linux-x86-low.c (initialize_low_arch): Likewise.
10784 * lynx-low.c (lynx_add_process): Likewise.
10785 * mem-break.c (set_raw_breakpoint_at): Likewise.
10786 (set_breakpoint): Likewise.
10787 (add_condition_to_breakpoint): Likewise.
10788 (add_commands_to_breakpoint): Likewise.
10789 (clone_agent_expr): Likewise.
10790 (clone_one_breakpoint): Likewise.
10791 * regcache.c (new_register_cache): Likewise.
10792 * remote-utils.c (look_up_one_symbol): Likewise.
10793 * server.c (queue_stop_reply): Likewise.
10794 (start_inferior): Likewise.
10795 (queue_stop_reply_callback): Likewise.
10796 (handle_target_event): Likewise.
10797 * spu-low.c (fetch_ppc_memory): Likewise.
10798 (store_ppc_memory): Likewise.
10799 * target.c (set_target_ops): Likewise.
10800 * thread-db.c (thread_db_load_search): Likewise.
10801 (try_thread_db_load_1): Likewise.
10802 * tracepoint.c (add_tracepoint): Likewise.
10803 (add_tracepoint_action): Likewise.
10804 (create_trace_state_variable): Likewise.
10805 (cmd_qtdpsrc): Likewise.
10806 (cmd_qtro): Likewise.
10807 (add_while_stepping_state): Likewise.
10808 * win32-low.c (child_add_thread): Likewise.
10809 (get_image_name): Likewise.
10810
10811 2015-08-25 Yao Qi <yao.qi@linaro.org>
10812
10813 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10814
10815 2015-08-25 Yao Qi <yao.qi@linaro.org>
10816
10817 * Makefile.in (aarch64-linux.o): New rule.
10818 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10819 srv_tgtobj.
10820 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10821 (aarch64_init_debug_reg_state): Make it extern.
10822 (aarch64_linux_prepare_to_resume): Remove.
10823
10824 2015-08-25 Yao Qi <yao.qi@linaro.org>
10825
10826 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10827 lwp_arch_private_info and ptid_of_lwp.
10828
10829 2015-08-25 Yao Qi <yao.qi@linaro.org>
10830
10831 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10832 Find proc_info by find_process_pid. All callers updated.
10833
10834 2015-08-25 Yao Qi <yao.qi@linaro.org>
10835
10836 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10837 Remove.
10838 (debug_reg_change_callback): Remove.
10839 (aarch64_notify_debug_reg_change): Remove.
10840
10841 2015-08-25 Yao Qi <yao.qi@linaro.org>
10842
10843 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10844 Call current_lwp_ptid.
10845
10846 2015-08-25 Yao Qi <yao.qi@linaro.org>
10847
10848 * linux-aarch64-low.c (debug_reg_change_callback): Use
10849 debug_printf.
10850
10851 2015-08-25 Yao Qi <yao.qi@linaro.org>
10852
10853 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10854
10855 2015-08-25 Yao Qi <yao.qi@linaro.org>
10856
10857 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10858
10859 2015-08-25 Yao Qi <yao.qi@linaro.org>
10860
10861 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10862 the code.
10863
10864 2015-08-25 Yao Qi <yao.qi@linaro.org>
10865
10866 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10867 Remove.
10868 (debug_reg_change_callback): Remove argument entry and add argument
10869 lwp. Remove local variable thread. Don't print thread id in the
10870 debugging output. Don't check whether pid of thread equals to pid.
10871 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10872 iterate_over_lwps instead find_inferior.
10873
10874 2015-08-24 Pedro Alves <palves@redhat.com>
10875
10876 * inferiors.c (get_first_process): New function.
10877 * inferiors.h (get_first_process): New declaration.
10878 * remote-utils.c (read_ptid): Default to the first process in the
10879 list, instead of to the current thread's process.
10880
10881 2015-08-24 Pedro Alves <palves@redhat.com>
10882
10883 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10884 * event-loop.c: Likewise.
10885 * remote-utils.c: Likewise.
10886 * tracepoint.c: Likewise.
10887
10888 2015-08-24 Pedro Alves <palves@redhat.com>
10889
10890 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10891 ptid_get_lwp.
10892
10893 2015-08-21 Pedro Alves <palves@redhat.com>
10894
10895 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10896 instead of literal 1.
10897
10898 2015-08-21 Pedro Alves <palves@redhat.com>
10899
10900 * tdesc.c (default_description): Explicitly zero-initialize.
10901
10902 2015-08-21 Pedro Alves <palves@redhat.com>
10903
10904 PR gdb/18749
10905 * inferiors.c (remove_thread): Discard any pending stop reply for
10906 this thread.
10907 * server.c (remove_all_on_match_pid): Rename to ...
10908 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10909 instead of a pid.
10910 (discard_queued_stop_replies): Change parameter to a ptid. Now
10911 extern.
10912 (handle_v_kill, kill_inferior_callback, captured_main)
10913 (process_serial_event): Adjust.
10914 * server.h (discard_queued_stop_replies): Declare.
10915
10916 2015-08-21 Pedro Alves <palves@redhat.com>
10917
10918 * linux-low.c (wait_for_sigstop): Always switch to no thread
10919 selected if the previously current thread dies.
10920 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10921 process instead of the current thread's.
10922 * remote-utils.c (input_interrupt): Don't check if there's no
10923 current thread.
10924 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10925 current thread to the general thread fails, error out.
10926 (handle_qxfer_auxv, handle_qxfer_libraries)
10927 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10928 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10929 (handle_query): Check if there's a thread selected instead of
10930 checking whether there's any thread in the thread list.
10931 (handle_qxfer_threads, handle_qxfer_btrace)
10932 (handle_qxfer_btrace_conf): Don't error out early if there's no
10933 thread in the thread list.
10934 (handle_v_cont, myresume): Don't set the current thread to the
10935 continue thread.
10936 (process_serial_event) <Hg handling>: Also set thread_id if the
10937 previous general thread is still alive.
10938 (process_serial_event) <g/G handling>: If setting the current
10939 thread to the general thread fails, error out.
10940 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10941 thread's lwp instead of the current thread's.
10942 * target.c (set_desired_thread): If the desired thread was not
10943 found, leave the current thread pointing to NULL. Return an int
10944 (boolean) indicating success.
10945 * target.h (set_desired_thread): Change return type to int.
10946
10947 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10948
10949 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10950 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10951 #includes.
10952 (ps_get_thread_area): New function.
10953
10954 2015-08-19 Gary Benson <gbenson@redhat.com>
10955
10956 * hostio.c (handle_pread): Do not attempt to read more data
10957 than hostio_reply_with_data can fit in a packet.
10958
10959 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10960
10961 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10962
10963 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10964
10965 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10966
10967 2015-08-06 Pedro Alves <palves@redhat.com>
10968
10969 * tracepoint.c (expr_eval_result): Now an int.
10970
10971 2015-08-06 Pedro Alves <palves@redhat.com>
10972
10973 * gdbthread.h (struct regcache): Forward declare.
10974 (struct thread_info) <regcache_data>: Now a struct regcache
10975 pointer.
10976 * inferiors.c (inferior_regcache_data)
10977 (set_inferior_regcache_data): Now work with struct regcache
10978 pointers.
10979 * inferiors.h (struct regcache): Forward declare.
10980 (inferior_regcache_data, set_inferior_regcache_data): Now work
10981 with struct regcache pointers.
10982 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10983 (free_register_cache_thread): Remove struct regcache pointer
10984 casts.
10985
10986 2015-08-06 Pedro Alves <palves@redhat.com>
10987
10988 * server.c (captured_main): On error, print the exception message
10989 to stderr, and if run_once is set, throw a quit.
10990
10991 2015-08-06 Pedro Alves <palves@redhat.com>
10992
10993 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10994 the current thread.
10995
10996 2015-08-06 Pedro Alves <palves@redhat.com>
10997
10998 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10999 reading beyond the passed in buffer length.
11000
11001 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
11002
11003 * tracepoint.c (symbol_list) <required>: Remove.
11004
11005 2015-08-06 Pedro Alves <palves@redhat.com>
11006
11007 * linux-low.c (handle_extended_wait): Set the fork child's suspend
11008 count if stopping and suspending threads.
11009 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
11010 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
11011 (linux_detach): Complete an ongoing step-over.
11012 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
11013 throughout.
11014 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
11015 (linux_wait_1): If passing a signal to the inferior after
11016 finishing a step-over, unsuspend and re-resume all lwps. If we
11017 see a single-step event but the thread should be continuing, don't
11018 pass the trap to gdb.
11019 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
11020 internal_error instead of gdb_assert.
11021 (enqueue_pending_signal): New function.
11022 (check_ptrace_stopped_lwp_gone): Add debug output.
11023 (start_step_over): Use internal_error instead of gdb_assert.
11024 (complete_ongoing_step_over): New function.
11025 (linux_resume_one_thread): Don't resume a suspended thread.
11026 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
11027 it stepping.
11028
11029 2015-08-06 Pedro Alves <palves@redhat.com>
11030
11031 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
11032 (linux_thread_alive): Use lwp_is_marked_dead.
11033 (extended_event_reported): Delete.
11034 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
11035 instead of extended_event_reported.
11036 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
11037 as well.
11038 (lwp_is_marked_dead): New function.
11039 (lwp_running): Use lwp_is_marked_dead.
11040 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
11041 comment.
11042
11043 2015-08-06 Pedro Alves <palves@redhat.com>
11044
11045 * linux-low.c (linux_wait_1): Move fork event output out of the
11046 !report_to_gdb check. Pass event_child->waitstatus to
11047 target_waitstatus_to_string instead of ourstatus.
11048
11049 2015-08-04 Yao Qi <yao.qi@linaro.org>
11050
11051 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
11052 if current_thread is 32 bit.
11053
11054 2015-08-04 Yao Qi <yao.qi@linaro.org>
11055
11056 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
11057 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
11058 * server.c (extended_protocol): Remove "static".
11059 * server.h (extended_protocol): Declare it.
11060
11061 2015-08-04 Yao Qi <yao.qi@linaro.org>
11062
11063 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
11064 both aarch64 and aarch32.
11065 (aarch64_set_pc): Likewise.
11066
11067 2015-08-04 Yao Qi <yao.qi@linaro.org>
11068
11069 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
11070 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
11071 arm-with-neon.xml to srv_xmlfiles.
11072 * linux-aarch64-low.c: Include linux-aarch32-low.h.
11073 (is_64bit_tdesc): New function.
11074 (aarch64_linux_read_description): New function.
11075 (aarch64_arch_setup): Call aarch64_linux_read_description.
11076 (regs_info): Rename to regs_info_aarch64.
11077 (aarch64_regs_info): Return right regs_info.
11078 (initialize_low_arch): Call initialize_low_arch_aarch32.
11079
11080 2015-08-04 Yao Qi <yao.qi@linaro.org>
11081
11082 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
11083 * linux-aarch32-low.c: New file.
11084 * linux-aarch32-low.h: New file.
11085 * linux-arm-low.c (arm_fill_gregset): Move it to
11086 linux-aarch32-low.c.
11087 (arm_store_gregset): Likewise.
11088 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
11089 (arm_store_vfpregset): Call arm_store_vfpregset_num.
11090 (arm_arch_setup): Check if PTRACE_GETREGSET works.
11091 (regs_info): Rename to regs_info_arm.
11092 (arm_regs_info): Return regs_info_aarch32 if
11093 have_ptrace_getregset is 1 and target description is
11094 arm_with_neon or arm_with_vfpv3.
11095 (initialize_low_arch): Don't call init_registers_arm_with_neon.
11096 Call initialize_low_arch_aarch32 instead.
11097
11098 2015-08-04 Yao Qi <yao.qi@linaro.org>
11099
11100 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
11101 * linux-low.c: ... here.
11102 * linux-low.h (have_ptrace_getregset): Declare it.
11103
11104 2015-08-04 Pedro Alves <palves@redhat.com>
11105
11106 * thread-db.c (struct thread_db): Use new typedefs.
11107 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
11108 CHK calls.
11109 (disable_thread_event_reporting): Cast result of dlsym to
11110 destination function pointer type.
11111 (thread_db_mourn): Use td_ta_delete_ftype.
11112
11113 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
11114
11115 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
11116 arch variant.
11117 (CDX_BREAKPOINT): Define for R2.
11118 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
11119 (the_low_target): Add comments.
11120
11121 2015-07-30 Yao Qi <yao.qi@linaro.org>
11122
11123 * linux-arm-low.c (arm_hwcap): Remove it.
11124 (arm_read_description): New local variable arm_hwcap. Don't
11125 set arm_hwcap to zero.
11126
11127 2015-07-30 Yao Qi <yao.qi@linaro.org>
11128
11129 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
11130 Use regcache->tdesc instead.
11131 (arm_store_wmmxregset): Likewise.
11132 (arm_fill_vfpregset): Likewise.
11133 (arm_store_vfpregset): Likewise.
11134
11135 2015-07-30 Yao Qi <yao.qi@linaro.org>
11136
11137 * linux-arm-low.c: Include arch/arm.h.
11138 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
11139 (arm_store_gregset): Likewise.
11140
11141 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
11142
11143 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
11144 ptrace's 4th parameter.
11145
11146 2015-07-27 Yao Qi <yao.qi@linaro.org>
11147
11148 * configure.srv (case aarch64*-*-linux*): Don't set
11149 srv_linux_usrregs.
11150
11151 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
11152
11153 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
11154 sys/ptrace.h.
11155 * linux-arm-low.c: Likewise.
11156 * linux-cris-low.c: Likewise.
11157 * linux-crisv32-low.c: Likewise.
11158 * linux-low.c: Likewise.
11159 * linux-m68k-low.c: Likewise.
11160 * linux-mips-low.c: Likewise.
11161 * linux-nios2-low.c: Likewise.
11162 * linux-s390-low.c: Likewise.
11163 * linux-sparc-low.c: Likewise.
11164 * linux-tic6x-low.c: Likewise.
11165 * linux-tile-low.c: Likewise.
11166 * linux-x86-low.c: Likewise.
11167
11168 2015-07-24 Pedro Alves <palves@redhat.com>
11169
11170 * config.in: Regenerate.
11171 * configure: Regenerate.
11172
11173 2015-07-24 Pedro Alves <palves@redhat.com>
11174
11175 * acinclude.m4: Include ../ptrace.m4.
11176 * configure.ac: Call GDB_AC_PTRACE.
11177 * config.in, configure: Regenerate.
11178
11179 2015-07-24 Yao Qi <yao.qi@linaro.org>
11180
11181 * linux-low.c (linux_create_inferior): Remove setting to
11182 proc->priv->new_inferior.
11183 (linux_attach): Likewise.
11184 (linux_low_filter_event): Likewise.
11185 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
11186
11187 2015-07-24 Yao Qi <yao.qi@linaro.org>
11188
11189 * linux-low.c (linux_arch_setup): New function.
11190 (linux_low_filter_event): If proc->tdesc is NULL and
11191 proc->attached is true, call the_low_target.arch_setup.
11192 Otherwise, keep status pending, and return.
11193 (linux_resume_one_lwp_throw): Don't call get_pc if
11194 thread->while_stepping isn't NULL. Don't call
11195 get_thread_regcache if proc->tdesc is NULL.
11196 (need_step_over_p): Return 0 if proc->tdesc is NULL.
11197 (linux_target_ops): Install arch_setup.
11198 * server.c (start_inferior): Call the_target->arch_setup.
11199 * target.h (struct target_ops) <arch_setup>: New field.
11200 (target_arch_setup): New marco.
11201 * lynx-low.c (lynx_target_ops): Update.
11202 * nto-low.c (nto_target_ops): Update.
11203 * spu-low.c (spu_target_ops): Update.
11204 * win32-low.c (win32_target_ops): Update.
11205
11206 2015-07-24 Yao Qi <yao.qi@linaro.org>
11207
11208 * linux-low.c (linux_add_process): Don't set
11209 proc->priv->new_inferior.
11210 (linux_create_inferior): Set proc->priv->new_inferior to 1.
11211 (linux_attach): Likewise.
11212
11213 2015-07-24 Yao Qi <yao.qi@linaro.org>
11214
11215 * server.c (start_inferior): Code refactor.
11216
11217 2015-07-24 Yao Qi <yao.qi@linaro.org>
11218
11219 * server.c (process_serial_event): Set general_thread.
11220
11221 2015-07-21 Yao Qi <yao.qi@linaro.org>
11222
11223 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
11224 aarch64_linux_get_debug_reg_capacity.
11225
11226 2015-07-17 Yao Qi <yao.qi@linaro.org>
11227
11228 * Makefile.in (aarch64-linux-hw-point.o): New rule.
11229 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
11230 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
11231 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
11232 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
11233 (AARCH64_HWP_ALIGNMENT): Likewise.
11234 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
11235 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
11236 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
11237 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
11238 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
11239 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
11240 (struct aarch64_debug_reg_state): Likewise.
11241 (struct arch_lwp_info): Likewise.
11242 (aarch64_align_watchpoint): Likewise.
11243 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
11244 (aarch64_watchpoint_length): Likewise.
11245 (aarch64_point_encode_ctrl_reg): Likewise
11246 (aarch64_point_is_aligned): Likewise.
11247 (aarch64_align_watchpoint): Likewise.
11248 (aarch64_linux_set_debug_regs):
11249 (aarch64_dr_state_insert_one_point): Likewise.
11250 (aarch64_dr_state_remove_one_point): Likewise.
11251 (aarch64_handle_breakpoint): Likewise.
11252 (aarch64_handle_aligned_watchpoint): Likewise.
11253 (aarch64_handle_unaligned_watchpoint): Likewise.
11254 (aarch64_handle_watchpoint): Likewise.
11255
11256 2015-07-17 Yao Qi <yao.qi@linaro.org>
11257
11258 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
11259 and don't aarch64_get_debug_reg_state. All callers update.
11260 (aarch64_handle_aligned_watchpoint): Likewise.
11261 (aarch64_handle_unaligned_watchpoint): Likewise.
11262 (aarch64_handle_watchpoint): Likewise.
11263 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
11264 (aarch64_remove_point): Likewise.
11265
11266 2015-07-17 Yao Qi <yao.qi@linaro.org>
11267
11268 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
11269 debug_printf.
11270 (aarch64_handle_unaligned_watchpoint): Likewise.
11271
11272 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11273
11274 Revert the previous 3 commits:
11275 Move gdb_regex* to common/
11276 Move linux_find_memory_regions_full & co.
11277 gdbserver build-id attribute generator
11278
11279 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11280 Jan Kratochvil <jan.kratochvil@redhat.com>
11281
11282 gdbserver build-id attribute generator.
11283 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
11284 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
11285 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
11286 (find_phdr): New.
11287 (get_dynamic): Use find_pdhr to traverse program headers.
11288 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
11289 (compare_mapping_entry_range, struct find_memory_region_callback_data)
11290 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
11291 (get_hex_build_id): New.
11292 (linux_qxfer_libraries_svr4): Add optional build-id attribute
11293 to reply XML document.
11294
11295 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11296 Jan Kratochvil <jan.kratochvil@redhat.com>
11297
11298 * target.c: Include target/target-utils.h and fcntl.h.
11299 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
11300 (target_fileio_read_stralloc): New functions.
11301
11302 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11303
11304 * Makefile.in (OBS): Add gdb_regex.o.
11305 (gdb_regex.o): New.
11306 * config.in: Rebuilt.
11307 * configure: Rebuilt.
11308
11309 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11310 Jan Kratochvil <jan.kratochvil@redhat.com>
11311
11312 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
11313 * Makefile.in (OBS): Add target-utils.o.
11314 (linux-maps.o, target-utils.o): New.
11315 * configure.srv (srv_linux_obj): Add linux-maps.o.
11316
11317 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
11318
11319 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
11320 function, return 1.
11321 (the_low_target): Install it.
11322
11323 2015-07-14 Pedro Alves <palves@redhat.com>
11324
11325 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
11326 Instead, ignore ECHILD, and throw an error for other errnos.
11327
11328 2015-07-10 Pedro Alves <palves@redhat.com>
11329
11330 * event-loop.c (struct callback_event) <data>: Change type to
11331 gdb_client_data instance instead of gdb_client_data pointer.
11332 (append_callback_event): Adjust.
11333
11334 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11335
11336 * linux-aarch64-low.c: Add comments for each linux_target_ops
11337 method. Remove comments already covered in target_ops and
11338 linux_target_ops definitions.
11339 (the_low_target): Add comments for each unimplemented method.
11340
11341 2015-07-09 Yao Qi <yao.qi@linaro.org>
11342
11343 * linux-aarch64-low.c (aarch64_regmap): Remove.
11344 (aarch64_usrregs_info): Remove.
11345 (regs_info): Set field usrregs to NULL.
11346
11347 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11348
11349 * linux-low.c: Include "rsp-low.h"
11350 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11351 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11352 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11353 (handle_btrace_enable_pt): New.
11354 (handle_btrace_general_set): Support "pt".
11355 (handle_btrace_conf_general_set): Support "pt:size".
11356
11357 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11358
11359 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11360 Z_PACKET_SW_BP.
11361
11362 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11363
11364 * linux-aarch64-low.c: Remove comment about endianness.
11365 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11366 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11367 memcmp.
11368
11369 2015-06-24 Gary Benson <gbenson@redhat.com>
11370
11371 * linux-i386-ipa.c (stdint.h): Do not include.
11372 * lynx-i386-low.c (stdint.h): Likewise.
11373 * lynx-ppc-low.c (stdint.h): Likewise.
11374 * mem-break.c (stdint.h): Likewise.
11375 * thread-db.c (stdint.h): Likewise.
11376 * tracepoint.c (stdint.h): Likewise.
11377 * win32-low.c (stdint.h): Likewise.
11378
11379 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11380
11381 * server.c (write_qxfer_response): Update call to
11382 remote_escape_output.
11383
11384 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11385 Jan Kratochvil <jan.kratochvil@redhat.com>
11386
11387 Merge multiple hex conversions.
11388 * gdbreplay.c (tohex): Rename to 'fromhex'.
11389 (logchar): Use fromhex.
11390
11391 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11392
11393 * server.c (handle_qxfer_libraries): Set `version' attribute for
11394 <library-list>.
11395
11396 2015-06-10 Gary Benson <gbenson@redhat.com>
11397
11398 * target.h (struct target_ops) <multifs_open>: New field.
11399 <multifs_unlink>: Likewise.
11400 <multifs_readlink>: Likewise.
11401 * linux-low.c (nat/linux-namespaces.h): New include.
11402 (linux_target_ops): Initialize the_target->multifs_open,
11403 the_target->multifs_unlink and the_target->multifs_readlink.
11404 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11405 * hostio.c (hostio_fs_pid): New static variable.
11406 (hostio_handle_new_gdb_connection): New function.
11407 (handle_setfs): Likewise.
11408 (handle_open): Use the_target->multifs_open as appropriate.
11409 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11410 (handle_readlink): Use the_target->multifs_readlink as
11411 appropriate.
11412 (handle_vFile): Handle vFile:setfs packets.
11413 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11414 after target_handle_new_gdb_connection.
11415
11416 2015-06-10 Gary Benson <gbenson@redhat.com>
11417
11418 * configure.ac (AC_CHECK_FUNCS): Add setns.
11419 * config.in: Regenerate.
11420 * configure: Likewise.
11421 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11422 (linux-namespaces.o): New rule.
11423 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11424
11425 2015-06-09 Gary Benson <gbenson@redhat.com>
11426
11427 * hostio.c (handle_open): Process mode argument with
11428 fileio_to_host_mode.
11429
11430 2015-06-01 Yao Qi <yao.qi@linaro.org>
11431
11432 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11433 * linux-x86-low.c: Likewise.
11434
11435 2015-05-28 Don Breazeal <donb@codesourcery.com>
11436
11437 * linux-low.c (handle_extended_wait): Initialize
11438 thread_info.last_resume_kind for new fork children.
11439
11440 2015-05-15 Pedro Alves <palves@redhat.com>
11441
11442 * target.h (target_handle_new_gdb_connection): Rewrite using if
11443 wrapped in do/while.
11444
11445 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11446
11447 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11448 * configure, config.in: Regenerate.
11449 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11450 Declare typedef.
11451
11452 2015-05-12 Don Breazeal <donb@codesourcery.com>
11453
11454 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11455 PTRACE_EVENT_VFORK_DONE.
11456 (linux_low_ptrace_options, extended_event_reported): Add vfork
11457 events.
11458 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11459 and "vforkdone" for RSP 'T' Stop Reply Packet.
11460 * server.h (report_vfork_events): Declare
11461 global variable.
11462
11463 2015-05-12 Don Breazeal <donb@codesourcery.com>
11464
11465 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11466 (the_low_target) <new_fork>: Initialize new member.
11467 * linux-arm-low.c (arm_new_fork): New function.
11468 (the_low_target) <new_fork>: Initialize new member.
11469 * linux-low.c (handle_extended_wait): Call new target function
11470 new_fork.
11471 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11472 * linux-mips-low.c (mips_add_watchpoint): New function
11473 extracted from mips_insert_point.
11474 (the_low_target) <new_fork>: Initialize new member.
11475 (mips_linux_new_fork): New function.
11476 (mips_insert_point): Call mips_add_watchpoint.
11477 * linux-x86-low.c (x86_linux_new_fork): New function.
11478 (the_low_target) <new_fork>: Initialize new member.
11479
11480 2015-05-12 Don Breazeal <donb@codesourcery.com>
11481
11482 * linux-low.c (handle_extended_wait): Implement return value,
11483 rename argument 'event_child' to 'event_lwp', handle
11484 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11485 (linux_low_ptrace_options): New function.
11486 (linux_low_filter_event): Call linux_low_ptrace_options,
11487 use different argument fo linux_enable_event_reporting,
11488 use return value from handle_extended_wait.
11489 (extended_event_reported): New function.
11490 (linux_wait_1): Call extended_event_reported and set
11491 status to report fork events.
11492 (linux_write_memory): Add pid to debug message.
11493 (reset_lwp_ptrace_options_callback): New function.
11494 (linux_handle_new_gdb_connection): New function.
11495 (linux_target_ops): Initialize new structure member.
11496 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11497 * lynx-low.c: Initialize new structure member.
11498 * remote-utils.c (prepare_resume_reply): Implement stop reason
11499 "fork" for "T" stop message.
11500 * server.c (handle_query): Call handle_new_gdb_connection.
11501 * server.h (report_fork_events): Declare global flag.
11502 * target.h (struct target_ops) <handle_new_gdb_connection>:
11503 New member.
11504 (target_handle_new_gdb_connection): New macro.
11505 * win32-low.c: Initialize new structure member.
11506
11507 2015-05-12 Don Breazeal <donb@codesourcery.com>
11508
11509 * mem-break.c (APPEND_TO_LIST): Define macro.
11510 (clone_agent_expr): New function.
11511 (clone_one_breakpoint): New function.
11512 (clone_all_breakpoints): New function.
11513 * mem-break.h: Declare new functions.
11514
11515 2015-05-12 Don Breazeal <donb@codesourcery.com>
11516
11517 * linux-low.c (linux_supports_fork_events): New function.
11518 (linux_supports_vfork_events): New function.
11519 (linux_target_ops): Initialize new structure members.
11520 (initialize_low): Call linux_check_ptrace_features.
11521 * lynx-low.c (lynx_target_ops): Initialize new structure
11522 members.
11523 * server.c (report_fork_events, report_vfork_events):
11524 New global flags.
11525 (handle_query): Add new features to qSupported packet and
11526 response.
11527 (captured_main): Initialize new global variables.
11528 * target.h (struct target_ops) <supports_fork_events>:
11529 New member.
11530 <supports_vfork_events>: New member.
11531 (target_supports_fork_events): New macro.
11532 (target_supports_vfork_events): New macro.
11533 * win32-low.c (win32_target_ops): Initialize new structure
11534 members.
11535
11536 2015-05-12 Gary Benson <gbenson@redhat.com>
11537
11538 * server.c (handle_qxfer_exec_file): Use current process
11539 if annex is empty.
11540
11541 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11542
11543 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11544 Remove HAVE_PTRACE_GETREGS conditionals.
11545 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11546 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11547
11548 2015-05-08 Yao Qi <yao.qi@linaro.org>
11549
11550 * linux-low.c (linux_supports_conditional_breakpoints): New
11551 function.
11552 (linux_target_ops): Install new target method.
11553 * lynx-low.c (lynx_target_ops): Install NULL hook for
11554 supports_conditional_breakpoints.
11555 * nto-low.c (nto_target_ops): Likewise.
11556 * spu-low.c (spu_target_ops): Likewise.
11557 * win32-low.c (win32_target_ops): Likewise.
11558 * server.c (handle_query): Check
11559 target_supports_conditional_breakpoints.
11560 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11561 New field.
11562 (target_supports_conditional_breakpoints): New macro.
11563
11564 2015-05-06 Pedro Alves <palves@redhat.com>
11565
11566 PR server/18081
11567 * server.c (start_inferior): If the process exits, mourn it.
11568
11569 2015-04-21 Gary Benson <gbenson@redhat.com>
11570
11571 * hostio.c (fileio_open_flags_to_host): Factored out to
11572 fileio_to_host_openflags in common/fileio.c. Single use
11573 updated.
11574
11575 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11576
11577 * linux-xtensa-low.c (xtensa_fill_gregset)
11578 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11579 XCHAL_HAVE_LOOP.
11580
11581 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11582
11583 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11584 (regs_info): Replace usrregs pointer with NULL.
11585
11586 2015-04-17 Gary Benson <gbenson@redhat.com>
11587
11588 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11589 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11590 * server.c (handle_qxfer_exec_file): New function.
11591 (qxfer_packets): Add exec-file entry.
11592 (handle_query): Report qXfer:exec-file:read as supported packet.
11593
11594 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11595
11596 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11597
11598 2015-04-09 Gary Benson <gbenson@redhat.com>
11599
11600 * hostio-errno.c (errno_to_fileio_error): Remove function.
11601 Update caller to use remote_fileio_to_fio_error.
11602
11603 2015-04-09 Yao Qi <yao.qi@linaro.org>
11604
11605 * linux-low.c (linux_insert_point): Call
11606 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11607 (linux_remove_point): Call remove_memory_breakpoint if type is
11608 raw_bkpt_type_sw.
11609 * linux-x86-low.c (x86_insert_point): Don't call
11610 insert_memory_breakpoint.
11611 (x86_remove_point): Don't call remove_memory_breakpoint.
11612
11613 2015-04-01 Pedro Alves <palves@redhat.com>
11614 Cleber Rosa <crosa@redhat.com>
11615
11616 * server.c (gdbserver_usage): Reorganize and extend the usage
11617 message.
11618
11619 2015-03-24 Pedro Alves <palves@redhat.com>
11620
11621 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11622 output. Also dump TRAP_TRACE.
11623 (linux_low_filter_event): In debug output, distinguish a
11624 resume_stop SIGSTOP from a delayed SIGSTOP.
11625
11626 2015-03-24 Gary Benson <gbenson@redhat.com>
11627
11628 * linux-x86-low.c (x86_linux_new_thread): Moved to
11629 nat/x86-linux.c.
11630 (x86_linux_prepare_to_resume): Likewise.
11631
11632 2015-03-24 Gary Benson <gbenson@redhat.com>
11633
11634 * Makefile.in (x86-linux-dregs.o): New rule.
11635 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11636 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11637 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11638 (x86_linux_dr_get): Likewise.
11639 (x86_linux_dr_set): Likewise.
11640 (update_debug_registers_callback): Likewise.
11641 (x86_linux_dr_set_addr): Likewise.
11642 (x86_linux_dr_get_addr): Likewise.
11643 (x86_linux_dr_set_control): Likewise.
11644 (x86_linux_dr_get_control): Likewise.
11645 (x86_linux_dr_get_status): Likewise.
11646 (x86_linux_update_debug_registers): Likewise.
11647
11648 2015-03-24 Gary Benson <gbenson@redhat.com>
11649
11650 * linux-x86-low.c (x86_linux_update_debug_registers):
11651 New function, factored out from...
11652 (x86_linux_prepare_to_resume): ...this.
11653
11654 2015-03-24 Gary Benson <gbenson@redhat.com>
11655
11656 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11657 (x86_linux_dr_set): Likewise.
11658 (update_debug_registers_callback): Likewise.
11659 (x86_linux_dr_set_addr): Likewise.
11660 (x86_linux_dr_get_addr): Likewise.
11661 (x86_linux_dr_set_control): Likewise.
11662 (x86_linux_dr_get_control): Likewise.
11663 (x86_linux_dr_get_status): Likewise.
11664 (x86_linux_prepare_to_resume): Likewise.
11665
11666 2015-03-24 Gary Benson <gbenson@redhat.com>
11667
11668 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11669 Use perror_with_name. Pass string through gettext.
11670 (x86_linux_dr_set): Likewise.
11671
11672 2015-03-24 Gary Benson <gbenson@redhat.com>
11673
11674 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11675 (x86_linux_dr_set_addr): ...this.
11676 (x86_dr_low_get_addr): Rename to...
11677 (x86_linux_dr_get_addr): ...this.
11678 (x86_dr_low_set_control): Rename to...
11679 (x86_linux_dr_set_control): ...this.
11680 (x86_dr_low_get_control): Rename to...
11681 (x86_linux_dr_get_control): ...this.
11682 (x86_dr_low_get_status): Rename to...
11683 (x86_linux_dr_get_status): ...this.
11684 (x86_dr_low): Update with new function names.
11685
11686 2015-03-24 Gary Benson <gbenson@redhat.com>
11687
11688 * Makefile.in (x86-linux.o): New rule.
11689 * configure.srv: Add x86-linux.o to relevant targets.
11690 * linux-low.c (lwp_set_arch_private_info): New function.
11691 (lwp_arch_private_info): Likewise.
11692 * linux-x86-low.c: Include nat/x86-linux.h.
11693 (arch_lwp_info): Removed structure.
11694 (update_debug_registers_callback):
11695 Use lwp_set_debug_registers_changed.
11696 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11697 and lwp_set_debug_registers_changed.
11698 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11699
11700 2015-03-24 Gary Benson <gbenson@redhat.com>
11701
11702 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11703 * linux-arm-low.c (arm_new_thread): Likewise.
11704 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11705 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11706 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11707 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11708
11709 2015-03-24 Gary Benson <gbenson@redhat.com>
11710
11711 * linux-low.c (ptid_of_lwp): New function.
11712 (lwp_is_stopped): Likewise.
11713 (lwp_stop_reason): Likewise.
11714 * linux-x86-low.c (update_debug_registers_callback):
11715 Use lwp_is_stopped.
11716 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11717 lwp_stop_reason.
11718
11719 2015-03-24 Gary Benson <gbenson@redhat.com>
11720
11721 * linux-low.h (linux_stop_lwp): Remove declaration.
11722
11723 2015-03-24 Gary Benson <gbenson@redhat.com>
11724
11725 * linux-low.h: Include nat/linux-nat.h.
11726 * linux-low.c (iterate_over_lwps_args): New structure.
11727 (iterate_over_lwps_filter): New function.
11728 (iterate_over_lwps): Likewise.
11729 * linux-x86-low.c (update_debug_registers_callback):
11730 Update signature to what iterate_over_lwps expects.
11731 Remove PID check that iterate_over_lwps now performs.
11732 (x86_dr_low_set_addr): Use iterate_over_lwps.
11733 (x86_dr_low_set_control): Likewise.
11734
11735 2015-03-24 Gary Benson <gbenson@redhat.com>
11736
11737 * linux-x86-low.c (x86_debug_reg_state): New function.
11738 (x86_linux_prepare_to_resume): Use the above.
11739
11740 2015-03-24 Gary Benson <gbenson@redhat.com>
11741
11742 * linux-low.c (current_lwp_ptid): New function.
11743 * linux-x86-low.c: Include nat/linux-nat.h.
11744 (x86_dr_low_get_addr): Use current_lwp_ptid.
11745 (x86_dr_low_get_control): Likewise.
11746 (x86_dr_low_get_status): Likewise.
11747
11748 2015-03-20 Pedro Alves <palves@redhat.com>
11749
11750 * tracepoint.c (cmd_qtstatus): Make "str" const.
11751
11752 2015-03-20 Pedro Alves <palves@redhat.com>
11753
11754 * server.c (handle_general_set): Make "req_str" const.
11755
11756 2015-03-19 Pedro Alves <palves@redhat.com>
11757
11758 * linux-low.c (linux_resume_one_lwp): Rename to ...
11759 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11760 instead call perror_with_name.
11761 (check_ptrace_stopped_lwp_gone): New function.
11762 (linux_resume_one_lwp): Reimplement as wrapper around
11763 linux_resume_one_lwp_throw that swallows errors if the LWP is
11764 gone.
11765
11766 2015-03-19 Pedro Alves <palves@redhat.com>
11767
11768 * linux-low.c (count_events_callback, select_event_lwp_callback):
11769 No longer check whether the thread has resume_stop as last resume
11770 kind.
11771
11772 2015-03-19 Pedro Alves <palves@redhat.com>
11773
11774 * linux-low.c (count_events_callback, select_event_lwp_callback):
11775 Use the lwp's status_pending_p field, not the thread's.
11776
11777 2015-03-19 Pedro Alves <palves@redhat.com>
11778
11779 * linux-low.c (select_event_lwp_callback): Update comments to
11780 no longer mention SIGTRAP.
11781
11782 2015-03-18 Gary Benson <gbenson@redhat.com>
11783
11784 * server.c (handle_query): Do not report vFile:fstat as supported.
11785
11786 2015-03-11 Gary Benson <gbenson@redhat.com>
11787
11788 * hostio.c (sys/types.h): New include.
11789 (sys/stat.h): Likewise.
11790 (common-remote-fileio.h): Likewise.
11791 (handle_fstat): New function.
11792 (handle_vFile): Handle vFile:fstat packets.
11793
11794 2015-03-11 Gary Benson <gbenson@redhat.com>
11795
11796 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11797 struct stat.st_blocks and struct stat.st_blksize.
11798 * configure: Regenerate.
11799 * config.in: Likewise.
11800 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11801 (OBS): Add common-remote-fileio.o.
11802 (common-remote-fileio.o): New rule.
11803
11804 2015-03-09 Pedro Alves <palves@redhat.com>
11805
11806 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11807 'struct sockaddr' pointer in 'accept' call.
11808
11809 2015-03-09 Pedro Alves <palves@redhat.com>
11810
11811 Revert:
11812 2015-03-07 Pedro Alves <palves@redhat.com>
11813 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11814 or <winsock2.h> here. Instead include "gdb_socket.h".
11815 (remote_open): Use union gdb_sockaddr_u.
11816 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11817 or <winsock2.h> here. Instead include "gdb_socket.h".
11818 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11819 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11820 or <sys/un.h>.
11821 (init_named_socket, gdb_agent_helper_thread): Use union
11822 gdb_sockaddr_u.
11823
11824 2015-03-07 Pedro Alves <palves@redhat.com>
11825
11826 * configure.ac (build_warnings): Move
11827 -Wdeclaration-after-statement to the C-specific set.
11828 * configure: Regenerate.
11829
11830 2015-03-07 Pedro Alves <palves@redhat.com>
11831
11832 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11833 or <winsock2.h> here. Instead include "gdb_socket.h".
11834 (remote_open): Use union gdb_sockaddr_u.
11835 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11836 or <winsock2.h> here. Instead include "gdb_socket.h".
11837 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11838 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11839 or <sys/un.h>.
11840 (init_named_socket, gdb_agent_helper_thread): Use union
11841 gdb_sockaddr_u.
11842
11843 2015-03-07 Pedro Alves <palves@redhat.com>
11844
11845 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11846 instead.
11847
11848 2015-03-06 Yao Qi <yao.qi@linaro.org>
11849
11850 * linux-aarch64-low.c (aarch64_insert_point): Use
11851 show_debug_regs as a boolean.
11852 (aarch64_remove_point): Likewise.
11853
11854 2015-03-05 Pedro Alves <palves@redhat.com>
11855
11856 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11857 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11858 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11859 * nto-low.c (nto_target_ops): Likewise.
11860 * spu-low.c (spu_target_ops): Likewise.
11861 * win32-low.c (win32_target_ops): Likewise.
11862
11863 2015-03-04 Pedro Alves <palves@redhat.com>
11864
11865 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11866 Decide whether a breakpoint triggered based on the SIGTRAP's
11867 siginfo.si_code.
11868 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11869 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11870 (linux_low_filter_event): Check for breakpoints before checking
11871 watchpoints.
11872 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11873 siginfo.si_code.
11874 (linux_stopped_by_sw_breakpoint)
11875 (linux_supports_stopped_by_sw_breakpoint)
11876 (linux_stopped_by_hw_breakpoint)
11877 (linux_supports_stopped_by_hw_breakpoint): New functions.
11878 (linux_target_ops): Install new target methods.
11879
11880 2015-03-04 Pedro Alves <palves@redhat.com>
11881
11882 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11883 * server.c (swbreak_feature, hwbreak_feature): New globals.
11884 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11885 (captured_main): Clear swbreak_feature and hwbreak_feature.
11886 * server.h (swbreak_feature, hwbreak_feature): Declare.
11887 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11888 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11889 supports_stopped_by_hw_breakpoint>: New fields.
11890 (target_supports_stopped_by_sw_breakpoint)
11891 (target_stopped_by_sw_breakpoint)
11892 (target_supports_stopped_by_hw_breakpoint)
11893 (target_stopped_by_hw_breakpoint): Declare.
11894
11895 2015-03-04 Pedro Alves <palves@redhat.com>
11896
11897 enum lwp_stop_reason -> enum target_stop_reason
11898 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11899 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11900 (linux_wait_1, stuck_in_jump_pad_callback)
11901 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11902 (linux_stopped_by_watchpoint):
11903 * linux-low.h (enum lwp_stop_reason): Delete.
11904 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11905 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11906
11907 2015-03-04 Yao Qi <yao.qi@linaro.org>
11908
11909 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11910
11911 2015-03-03 Gary Benson <gbenson@redhat.com>
11912
11913 * hostio.c (handle_vFile): Fix prefix lengths.
11914
11915 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11916
11917 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11918 ptr_bits.
11919
11920 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11921
11922 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11923 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11924 (clean): Add "rm -f" for above C files.
11925 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11926 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11927 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11928 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11929 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11930 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11931 (init_registers_s390x_vx_linux64)
11932 (init_registers_s390x_tevx_linux64)
11933 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11934 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11935 declarations.
11936 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11937 (s390_store_vxrs_high): New functions.
11938 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11939 NT_S390_VXRS_HIGH.
11940 (s390_arch_setup): Add logic for selecting one of the new target
11941 descriptions. Activate the new vector regsets if applicable.
11942 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11943 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11944 and init_registers_s390x_tevx_linux64.
11945
11946 2015-03-01 Pedro Alves <palves@redhat.com>
11947
11948 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11949 parameter.
11950
11951 2015-02-27 Pedro Alves <palves@redhat.com>
11952
11953 * linux-x86-low.c (u_debugreg_offset): New function.
11954 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11955
11956 2015-02-27 Pedro Alves <palves@redhat.com>
11957
11958 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11959 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11960 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11961 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11962 (ps_lsetfpregs, ps_getpid)
11963 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11964 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11965 (ps_lsetxregs, ps_plog): Declare.
11966
11967 2015-02-27 Pedro Alves <palves@redhat.com>
11968
11969 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11970 IP_AGENT_EXPORT_FUNC.
11971 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11972 IP_AGENT_EXPORT_FUNC.
11973 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11974 (IP_AGENT_EXPORT): Delete.
11975 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11976 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11977 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11978 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11979 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11980 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11981 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11982 (traceframe_read_count, traceframe_write_count)
11983 (traceframes_created, trace_state_variables, get_raw_reg)
11984 (get_trace_state_variable_value, set_trace_state_variable_value)
11985 (ust_loaded, helper_thread_id, cmd_buf): Use
11986 IPA_SYM_EXPORTED_NAME.
11987 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11988 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11989 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11990 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11991 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11992 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11993 EXTERN_C_PUSH/EXTERN_C_POP.
11994 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11995 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11996 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11997 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11998 (traceframe_write_count, traceframe_read_count)
11999 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
12000 (about_to_request_buffer_space, get_trace_state_variable_value)
12001 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
12002 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
12003 EXTERN_C_PUSH/EXTERN_C_POP.
12004 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
12005 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
12006 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
12007 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
12008 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12009 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
12010 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
12011 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
12012 Define.
12013 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
12014 (IP_AGENT_EXPORT_VAR_DECL): Define.
12015 (tracing): Declare.
12016 (gdb_agent_get_raw_reg): Declare.
12017
12018 2015-02-27 Tom Tromey <tromey@redhat.com>
12019 Pedro Alves <palves@redhat.com>
12020
12021 Rename symbols whose names are reserved C++ keywords throughout.
12022
12023 2015-02-27 Pedro Alves <palves@redhat.com>
12024
12025 * Makefile.in (COMPILER): New, get it from autoconf.
12026 (CXX): Get from autoconf instead.
12027 (COMPILE.pre): Use COMPILER.
12028 (CC-LD): Rename to ...
12029 (CC_LD): ... this. Use COMPILER.
12030 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
12031 (CXX_FOR_TARGET): Default to g++ instead of gcc.
12032 * acinclude.m4: Include build-with-cxx.m4.
12033 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
12034 Disable -Werror by default if building in C++ mode.
12035 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
12036 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
12037 the C++ compiler. Save/restore CXXFLAGS too.
12038 * configure: Regenerate.
12039
12040 2015-02-27 Pedro Alves <palves@redhat.com>
12041
12042 * acinclude.m4: Include libiberty.m4.
12043 * configure.ac: Call libiberty_INIT.
12044 * config.in, configure: Regenerate.
12045
12046 2015-02-26 Pedro Alves <palves@redhat.com>
12047
12048 * linux-low.c (linux_wait_1): When incrementing the PC past a
12049 program breakpoint always use the_low_target.breakpoint_len as
12050 increment, rather than the maximum between that and
12051 the_low_target.decr_pc_after_break.
12052
12053 2015-02-23 Pedro Alves <palves@redhat.com>
12054
12055 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
12056 thread was doing a step-over; always adjust the PC if
12057 we stepped over a permanent breakpoint.
12058 (linux_wait_1): If we stepped over breakpoint that was on top of a
12059 permanent breakpoint, manually advance the PC past it.
12060
12061 2015-02-23 Pedro Alves <palves@redhat.com>
12062
12063 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
12064 modes.
12065 (x86_fill_gregset, x86_store_gregset): Use it when handling
12066 $orig_eax.
12067
12068 2015-02-20 Pedro Alves <palves@redhat.com>
12069
12070 * thread-db.c: Include "nat/linux-procfs.h".
12071 (thread_db_init): Skip listing new threads if the kernel supports
12072 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
12073
12074 2015-02-20 Pedro Alves <palves@redhat.com>
12075
12076 * linux-low.c (status_pending_p_callback): Use ptid_match.
12077
12078 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
12079
12080 PR breakpoints/16812
12081 * linux-low.c (wstatus_maybe_breakpoint): Remove.
12082 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
12083 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
12084
12085 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
12086
12087 PR breakpoints/15956
12088 * tracepoint.c (cmd_qtinit): Add check for current_thread.
12089
12090 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12091
12092 * linux-low.c (linux_low_btrace_conf): Print size.
12093 * server.c (handle_btrace_conf_general_set): New.
12094 (hanle_general_set): Call handle_btrace_conf_general_set.
12095 (handle_query): Report Qbtrace-conf:bts:size as supported.
12096
12097 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12098
12099 * linux-low.c (linux_low_enable_btrace): Update parameters.
12100 (linux_low_btrace_conf): New.
12101 (linux_target_ops)<to_btrace_conf>: Initialize.
12102 * server.c (current_btrace_conf): New.
12103 (handle_btrace_enable): Rename to ...
12104 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
12105 to target_enable_btrace. Update comment. Update users.
12106 (handle_qxfer_btrace_conf): New.
12107 (qxfer_packets): Add btrace-conf entry.
12108 (handle_query): Report qXfer:btrace-conf:read as supported packet.
12109 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
12110 (target_ops)<read_btrace_conf>: New.
12111 (target_enable_btrace): Update parameters.
12112 (target_read_btrace_conf): New.
12113
12114 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12115
12116 * server.c (handle_btrace_general_set): Remove call to
12117 target_supports_btrace.
12118 (supported_btrace_packets): New.
12119 (handle_query): Call supported_btrace_packets.
12120 * target.h: include btrace-common.h.
12121 (btrace_target_info): Removed.
12122 (supports_btrace, target_supports_btrace): Update parameters.
12123
12124 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12125
12126 * Makefile.in (SFILES): Add common/btrace-common.c.
12127 (OBS): Add common/btrace-common.o.
12128 (btrace-common.o): Add build rules.
12129 * linux-low: Include btrace-common.h.
12130 (linux_low_read_btrace): Use struct btrace_data. Call
12131 btrace_data_init and btrace_data_fini.
12132
12133 2015-02-06 Pedro Alves <palves@redhat.com>
12134
12135 * thread-db.c (find_new_threads_callback): Add debug output.
12136
12137 2015-02-04 Pedro Alves <palves@redhat.com>
12138
12139 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
12140 (resume_stopped_resumed_lwps): New function.
12141 (linux_wait_for_event_filtered): Use it.
12142
12143 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
12144
12145 * Makefile.in (SFILES): Add linux-personality.c.
12146 (linux-personality.o): New rule.
12147 * configure.srv (srv_linux_obj): Add linux-personality.o to the
12148 list of objects to be built.
12149 * linux-low.c: Include nat/linux-personality.h.
12150 (linux_create_inferior): Remove code to disable address space
12151 randomization (moved to ../nat/linux-personality.c). Create
12152 cleanup to disable address space randomization.
12153
12154 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
12155
12156 * Makefile.in (posix-strerror.o): New rule.
12157 (mingw-strerror.o): Likewise.
12158 * configure: Regenerated.
12159 * configure.ac: Source file ../common/common.host. Initialize new
12160 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
12161
12162 2015-01-14 Yao Qi <yao@codesourcery.com>
12163
12164 * Makefile.in (SFILES): Add nat/ppc-linux.c.
12165 (ppc-linux.o): New rule.
12166 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
12167 * configure.ac: AC_CHECK_FUNCS(getauxval).
12168 * config.in: Re-generated.
12169 * configure: Re-generated.
12170 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
12171 ppc64_64bit_inferior_p
12172
12173 2015-01-14 Yao Qi <yao@codesourcery.com>
12174
12175 * linux-ppc-low.c: Include "nat/ppc-linux.h".
12176 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
12177 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
12178 (PT_ORIG_R3, PT_TRAP): Likewise.
12179 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
12180 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
12181 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
12182
12183 2015-01-10 Joel Brobecker <brobecker@adacore.com>
12184
12185 * i387-fp.c (i387_cache_to_xsave): In look over
12186 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
12187 zmmh_low_space field by use of zmmh_high_space.
12188
12189 2015-01-09 Pedro Alves <palves@redhat.com>
12190
12191 * linux-low.c (step_over_bkpt): Move higher up in the file.
12192 (handle_extended_wait): Don't store the stop_pc here.
12193 (get_stop_pc): Adjust comments and rename to ...
12194 (check_stopped_by_breakpoint): ... this. Record whether the LWP
12195 stopped for a software breakpoint or hardware breakpoint.
12196 (thread_still_has_status_pending_p): New function.
12197 (status_pending_p_callback): Use
12198 thread_still_has_status_pending_p. If the event is no longer
12199 interesting, resume the LWP.
12200 (handle_tracepoints): Add assert.
12201 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
12202 (wstatus_maybe_breakpoint): New function.
12203 (cancel_breakpoint): Delete function.
12204 (check_stopped_by_watchpoint): New function, factored out from
12205 linux_low_filter_event.
12206 (lp_status_maybe_breakpoint): Delete function.
12207 (linux_low_filter_event): Remove filter_ptid argument.
12208 Leave thread group exits pending here. Store the LWP's stop PC.
12209 Always leave events pending.
12210 (linux_wait_for_event_filtered): Pull all events out of the
12211 kernel, and leave them all pending.
12212 (count_events_callback, select_event_lwp_callback): Consider all
12213 events.
12214 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
12215 (select_event_lwp): Only give preference to the stepping LWP in
12216 all-stop mode. Adjust comments.
12217 (ignore_event): New function.
12218 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
12219 references to cancel_breakpoints. Adjust to renames. Also give
12220 equal priority to all LWPs that have had events in non-stop mode.
12221 If reporting a software breakpoint event, unadjust the LWP's PC.
12222 (linux_wait): If linux_wait_1 returned an ignored event, retry.
12223 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
12224 Adjust.
12225 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
12226 (resume_status_pending_p): Use thread_still_has_status_pending_p.
12227 (linux_stopped_by_watchpoint): Adjust.
12228 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
12229 * linux-low.h (enum lwp_stop_reason): New.
12230 (struct lwp_info) <stop_pc>: Adjust comment.
12231 <stopped_by_watchpoint>: Delete field.
12232 <stop_reason>: New field.
12233 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
12234 * mem-break.c (software_breakpoint_inserted_here)
12235 (hardware_breakpoint_inserted_here): New function.
12236 * mem-break.h (software_breakpoint_inserted_here)
12237 (hardware_breakpoint_inserted_here): Declare.
12238 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
12239 (cancel_breakpoints): Delete.
12240 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
12241 (upload_fast_traceframes): Remove references to
12242 cancel_breakpoints.
12243
12244 2015-01-09 Pedro Alves <palves@redhat.com>
12245
12246 * thread-db.c (find_new_threads_callback): Ignore thread if the
12247 kernel thread ID is -1.
12248
12249 2015-01-09 Pedro Alves <palves@redhat.com>
12250
12251 * linux-low.c (linux_attach_fail_reason_string): Move to
12252 nat/linux-ptrace.c, and rename.
12253 (linux_attach_lwp): Update comment.
12254 (attach_proc_task_lwp_callback): New function.
12255 (linux_attach): Adjust to rename and use
12256 linux_proc_attach_tgid_threads.
12257 (linux_attach_fail_reason_string): Delete declaration.
12258
12259 2015-01-01 Joel Brobecker <brobecker@adacore.com>
12260
12261 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
12262 * server.c (gdbserver_version): Likewise.
12263
12264 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
12265
12266 * remote-utils.c: Include ctype.h.
12267 (input_interrupt): Explicitly handle the case when the char
12268 received is the NUL byte. Improve the printing of non-ASCII
12269 characters.
12270
12271 2014-12-16 Joel Brobecker <brobecker@adacore.com>
12272
12273 * linux-low.c (linux_low_filter_event): Update call to
12274 linux_enable_event_reporting following the addition of
12275 a new parameter to that function.
12276
12277 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
12278
12279 PR server/17457
12280 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
12281 (AARCH64_FPCR_REGNO): Likewise.
12282 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
12283 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
12284 (aarch64_store_fpregset): Likewise.
12285
12286 2014-12-15 Joel Brobecker <brobecker@adacore.com>
12287
12288 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
12289 Remove FIXME comment about assumption about N.
12290
12291 2014-12-13 Joel Brobecker <brobecker@adacore.com>
12292
12293 * configure.ac: If large-file support is disabled in GDBserver,
12294 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
12295 * configure: Regenerate.
12296
12297 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12298
12299 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
12300 warning upon ENODATA from ptrace.
12301 * linux-s390-low.c (s390_store_tdb): New.
12302 (s390_regsets): Add regset for NT_S390_TDB.
12303
12304 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12305
12306 * linux-low.c (regsets_store_inferior_registers): Skip regsets
12307 without a fill_function.
12308 * linux-s390-low.c (s390_fill_last_break): Remove.
12309 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
12310 (s390_arch_setup): Use regset's size instead of fill_function for
12311 loop end condition.
12312
12313 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12314
12315 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
12316 the regset's store function when ptrace returned an error.
12317 * regcache.c (get_thread_regcache): Invalidate register cache
12318 before fetching inferior's registers.
12319
12320 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12321
12322 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
12323 while-loop as for-loop.
12324 (regsets_store_inferior_registers): Likewise.
12325
12326 2014-11-28 Yao Qi <yao@codesourcery.com>
12327
12328 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
12329 * config.in, configure: Re-generate.
12330 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
12331 is defined.
12332
12333 2014-11-21 Yao Qi <yao@codesourcery.com>
12334
12335 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12336 (AC_CHECK_HEADERS): Remove malloc.h.
12337 * configure: Re-generated.
12338 * config.in: Re-generated.
12339 * server.h: Don't include alloca.h and malloc.h.
12340 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12341 Don't include malloc.h.
12342
12343 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12344
12345 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12346 corresponding ERRNO check in same block.
12347
12348 2014-11-12 Pedro Alves <palves@redhat.com>
12349
12350 * server.c (cont_thread): Update comment.
12351 (start_inferior, attach_inferior): No longer clear cont_thread.
12352 (handle_v_cont): No longer set cont_thread.
12353 (captured_main): Clear cont_thread each time a GDB connects.
12354
12355 2014-11-12 Pedro Alves <palves@redhat.com>
12356
12357 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12358 thread, and don't resume all threads if the Hc thread has exited.
12359
12360 2014-11-12 Pedro Alves <palves@redhat.com>
12361
12362 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12363 the process group instead of to a specific LWP.
12364
12365 2014-10-15 Pedro Alves <palves@redhat.com>
12366
12367 PR server/17487
12368 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12369 parameter.
12370 (arm_set_thread_context): Delete.
12371 (the_low_target): Adjust.
12372 * win32-i386-low.c (debug_registers_changed)
12373 (debug_registers_used): Delete.
12374 (update_debug_registers_callback): New function.
12375 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12376 needing to update their debug registers.
12377 (win32_get_current_dr): New function.
12378 (x86_dr_low_get_addr, x86_dr_low_get_control)
12379 (x86_dr_low_get_status): Fetch the debug register from the thread
12380 record's context.
12381 (i386_initial_stuff): Adjust.
12382 (i386_get_thread_context): Remove current_event parameter. Don't
12383 clear debug_registers_changed nor copy DR values to
12384 debug_reg_state.
12385 (i386_set_thread_context): Delete.
12386 (i386_prepare_to_resume): New function.
12387 (i386_thread_added): Mark the thread as needing to update irs
12388 debug registers.
12389 (the_low_target): Remove i386_set_thread_context and install
12390 i386_prepare_to_resume.
12391 * win32-low.c (win32_get_thread_context): Adjust.
12392 (win32_set_thread_context): Use SetThreadContext
12393 directly.
12394 (win32_prepare_to_resume): New function.
12395 (win32_require_context): New function, factored out from ...
12396 (thread_rec): ... this.
12397 (continue_one_thread): Call win32_prepare_to_resume on each thread
12398 we're about to continue.
12399 (win32_resume): Call win32_prepare_to_resume on the event thread.
12400 * win32-low.h (struct win32_thread_info)
12401 <debug_registers_changed>: New field.
12402 (struct win32_target_ops): Change prototype of set_thread_context,
12403 delete set_thread_context and add prepare_to_resume.
12404 (win32_require_context): New declaration.
12405
12406 2014-10-08 Gary Benson <gbenson@redhat.com>
12407
12408 * server.h: Do not include common-exceptions.h.
12409
12410 2014-10-08 Gary Benson <gbenson@redhat.com>
12411
12412 * server.h: Do not include cleanups.h.
12413
12414 2014-09-30 James Hogan <james.hogan@imgtec.com>
12415
12416 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12417 mips64-dsp-linux.c.
12418
12419 2014-09-23 Yao Qi <yao@codesourcery.com>
12420
12421 * linux-low.c (lp_status_maybe_breakpoint): New function.
12422 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12423 (count_events_callback): Likewise.
12424 (select_event_lwp_callback): Likewise.
12425 (cancel_breakpoints_callback): Likewise.
12426
12427 2014-09-19 Don Breazeal <donb@codesourcery.com>
12428
12429 * linux-low.c (handle_extended_wait): Call
12430 linux_ptrace_get_extended_event.
12431 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12432 linux_is_extended_waitstatus.
12433
12434 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12435
12436 * Makefile.in (CPPFLAGS): Define.
12437 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12438 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12439
12440 2014-09-16 Gary Benson <gbenson@redhat.com>
12441
12442 * inferiors.h (current_inferior): Renamed as...
12443 (current_thread): New variable. All uses updated.
12444 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12445 (maybe_move_out_of_jump_pad): Likewise.
12446 (cancel_breakpoint): Likewise.
12447 (linux_low_filter_event): Likewise.
12448 (wait_for_sigstop): Likewise.
12449 (linux_resume_one_lwp): Likewise.
12450 (need_step_over_p): Likewise.
12451 (start_step_over): Likewise.
12452 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12453 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12454 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12455 and save_inferior as saved_thread.
12456 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12457 saved_thread.
12458 (regcache_invalidate_thread): Likewise.
12459 * remote-utils.c (prepare_resume_reply): Likewise.
12460 * thread-db.c (thread_db_get_tls_address): Likewise.
12461 (disable_thread_event_reporting): Likewise.
12462 (remove_thread_event_breakpoints): Likewise.
12463 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12464 as saved_thread.
12465 * target.h (set_desired_inferior): Renamed as...
12466 (set_desired_thread): New declaration. All uses updated.
12467 * server.c (myresume): Updated comment to reference thread instead
12468 of inferior.
12469 (handle_serial_event): Likewise.
12470 (handle_target_event): Likewise.
12471
12472 2014-09-12 Tom Tromey <tromey@redhat.com>
12473 Gary Benson <gbenson@redhat.com>
12474
12475 * regcache.h: Include common-regcache.h.
12476 (regcache_read_pc): Don't declare.
12477 * regcache.c (get_thread_regcache_for_ptid): New function.
12478
12479 2014-09-11 Tom Tromey <tromey@redhat.com>
12480 Gary Benson <gbenson@redhat.com>
12481
12482 * symbol.c: New file.
12483 * Makefile.in (SFILES): Add symbol.c.
12484 (OBS): Add symbol.o.
12485
12486 2014-09-11 Gary Benson <gbenson@redhat.com>
12487
12488 * target.c (target_stop_ptid, target_continue_ptid): New
12489 functions.
12490
12491 2014-09-11 Tom Tromey <tromey@redhat.com>
12492 Gary Benson <gbenson@redhat.com>
12493
12494 * target.h: Include target/target.h.
12495 * target.c (target_read_memory, target_read_uint32)
12496 (target_write_memory): New functions.
12497
12498 2014-09-11 Gary Benson <gbenson@redhat.com>
12499
12500 * server.h (debug_hw_points): Don't declare.
12501 * server.c (debug_hw_points): Don't define. Replace all uses
12502 with show_debug_regs.
12503 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12504 all uses with show_debug_regs.
12505
12506 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12507
12508 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12509 endianness into account.
12510 (ppc_supply_ptrace_register): Likewise.
12511
12512 2014-09-03 James Hogan <james.hogan@imgtec.com>
12513
12514 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12515 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12516
12517 2014-09-03 Gary Benson <gbenson@redhat.com>
12518
12519 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12520 ALL_DEBUG_ADDRESS_REGISTERS.
12521
12522 2014-09-02 Gary Benson <gbenson@redhat.com>
12523
12524 * i386-low.h: Renamed as...
12525 * x86-low.h: New file. All type, function and variable name
12526 prefixes changed from "i386_" to "x86_". All references updated.
12527 * i386-low.c: Renamed as...
12528 * x86-low.c: New file. All type, function and variable name
12529 prefixes changed from "i386_" to "x86_". All references updated.
12530
12531 2014-09-02 Gary Benson <gbenson@redhat.com>
12532
12533 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12534 (x86_linux_new_thread): Likewise.
12535
12536 2014-08-29 Gary Benson <gbenson@redhat.com>
12537
12538 * server.h (setjmp.h): Do not include.
12539 (toplevel): Do not declare.
12540 (common-exceptions.h): Include.
12541 (cleanups.h): Likewise.
12542 * server.c (toplevel): Do not define.
12543 (exit_code): New static global.
12544 (detach_or_kill_for_exit_cleanup): New function.
12545 (main): New function. Original main renamed to...
12546 (captured_main): New function.
12547 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12548
12549 2014-08-29 Gary Benson <gbenson@redhat.com>
12550
12551 * Makefile.in (SFILES): Add common/common-exceptions.c.
12552 (OBS): Add common-exceptions.o.
12553 (common-exceptions.o): New rule.
12554 * utils.c (prepare_to_throw_exception): New function.
12555
12556 2014-08-29 Gary Benson <gbenson@redhat.com>
12557
12558 * config.in: Regenerate.
12559 * configure: Likewise.
12560
12561 2014-08-29 Gary Benson <gbenson@redhat.com>
12562
12563 * Makefile.in (SFILES): Add common/cleanups.c.
12564 (OBS): cleanups.o.
12565 (cleanups.o): New rule.
12566
12567 2014-08-29 Gary Benson <gbenson@redhat.com>
12568
12569 * utils.c (internal_vwarning): New function.
12570
12571 2014-08-28 Gary Benson <gbenson@redhat.com>
12572
12573 * utils.h (fatal): Remove declaration.
12574 * utils.c (fatal): Remove function.
12575
12576 2014-08-28 Gary Benson <gbenson@redhat.com>
12577
12578 * tracepoint.c (gdb_agent_init): Replace fatal with
12579 perror_with_name.
12580 (initialize_tracepoint): Likewise.
12581
12582 2014-08-28 Gary Benson <gbenson@redhat.com>
12583
12584 * remote-utils.c (remote_prepare): Replace fatal with error.
12585
12586 2014-08-28 Gary Benson <gbenson@redhat.com>
12587
12588 * linux-low.c (linux_async): Replace fatal with warning.
12589 Tidy up and return.
12590 (linux_start_non_stop): Return -1 if linux_async failed.
12591
12592 2014-08-28 Gary Benson <gbenson@redhat.com>
12593
12594 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12595 gdb_assert.
12596 (i386_dr_low_get_addr): Remove vague comment.
12597 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12598 gdb_assert.
12599
12600 2014-08-28 Gary Benson <gbenson@redhat.com>
12601
12602 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12603 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12604 internal_error.
12605 (linux_resume_one_lwp): Likewise.
12606 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12607 gdb_assert.
12608 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12609 with internal_error.
12610 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12611 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12612 (find_register_by_name): Replace fatal with internal_error.
12613 (find_regno): Likewise.
12614 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12615 * thread-db.c (thread_db_create_event): Likewise.
12616 (thread_db_load_search): Likewise.
12617 (try_thread_db_load_1): Likewise.
12618 * tracepoint.c (get_jump_space_head): Replace fatal with
12619 internal_error.
12620 (claim_trampoline_space): Likewise.
12621 (have_fast_tracepoint_trampoline_buffer): Likewise.
12622 (cmd_qtstart): Likewise.
12623 (stop_tracing): Likewise.
12624 (fast_tracepoint_collecting): Likewise.
12625 (target_malloc): Likewise.
12626 (download_tracepoint): Likewise.
12627 (download_trace_state_variables): Replace check with gdb_assert.
12628 (upload_fast_traceframes): Replace fatal with internal_error.
12629
12630 2014-08-19 Tom Tromey <tromey@redhat.com>
12631 Gary Benson <gbenson@redhat.com>
12632
12633 * Makefile.in (SFILES): Add common/common-debug.c.
12634 (OBS): Add common-debug.o.
12635 (common-debug.o): New rule.
12636 * debug.h (debug_printf): Don't declare.
12637 * debug.c (debug_printf): Renamed and rewritten as...
12638 (debug_vprintf): New function.
12639
12640 2014-08-19 Gary Benson <gbenson@redhat.com>
12641
12642 * utils.h: Do not include print-utils.h.
12643
12644 2014-08-19 Tom Tromey <tromey@redhat.com>
12645 Gary Benson <gbenson@redhat.com>
12646
12647 * server.h: Add static assertion.
12648 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12649
12650 2014-08-19 Tom Tromey <tromey@redhat.com>
12651 Gary Benson <gbenson@redhat.com>
12652
12653 * Makefile.in (SFILES): Add common/errors.c.
12654 (OBS): Add errors.o.
12655 (IPA_OBS): Add errors-ipa.o.
12656 (errors.o): New rule.
12657 (errors-ipa.o): Likewise.
12658 * utils.h (perror_with_name, error, warning): Don't declare.
12659 * utils.c (warning): Renamed and rewritten as...
12660 (vwarning): New function.
12661 (error): Renamed and rewritten as...
12662 (verror): New function.
12663 (internal_error): Renamed and rewritten as...
12664 (internal_verror): New function.
12665
12666 2014-08-07 Gary Benson <gbenson@redhat.com>
12667
12668 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12669 * configure: Regenerate.
12670 * config.in: Likewise.
12671 * server.h: Do not include errno.h.
12672 * event-loop.c: Likewise.
12673 * hostio-errno.c: Likewise.
12674 * linux-low.c: Likewise.
12675 * remote-utils.c: Likewise.
12676 * spu-low.c: Likewise.
12677 * utils.c: Likewise.
12678 * gdbreplay.c: Unconditionally include errno.h.
12679
12680 2014-08-07 Gary Benson <gbenson@redhat.com>
12681
12682 * server.h: Do not include string.h.
12683 * event-loop.c: Likewise.
12684 * linux-low.c: Likewise.
12685 * regcache.c: Likewise.
12686 * remote-utils.c: Likewise.
12687 * spu-low.c: Likewise.
12688 * utils.c: Likewise.
12689
12690 2014-08-07 Gary Benson <gbenson@redhat.com>
12691
12692 * server.h: Do not include gdb_assert.h.
12693
12694 2014-08-07 Gary Benson <gbenson@redhat.com>
12695
12696 * server.h: Do not include common-utils.h.
12697
12698 2014-08-07 Gary Benson <gbenson@redhat.com>
12699
12700 * server.h: Do not include ptid.h.
12701 * notif.h: Likewise.
12702
12703 2014-08-07 Gary Benson <gbenson@redhat.com>
12704
12705 * server.h: Do not include gdb_locale.h.
12706
12707 2014-08-07 Gary Benson <gbenson@redhat.com>
12708
12709 * server.h: Do not include gdb/signals.h.
12710 * win32-low.c: Likewise.
12711
12712 2014-08-07 Gary Benson <gbenson@redhat.com>
12713
12714 * server.h: Do not include pathmax.h.
12715
12716 2014-08-07 Gary Benson <gbenson@redhat.com>
12717
12718 * server.h: Do not include libiberty.h.
12719 * linux-bfin-low.c: Likewise.
12720
12721 2014-08-07 Gary Benson <gbenson@redhat.com>
12722
12723 * server.h: Do not include ansidecl.h.
12724
12725 2014-08-07 Gary Benson <gbenson@redhat.com>
12726
12727 * linux-x86-low.c: Do not include stddef.h.
12728 * lynx-ppc-low.c: Likewise.
12729 * tracepoint.c: Likewise.
12730
12731 2014-08-07 Gary Benson <gbenson@redhat.com>
12732
12733 * server.h: Do not include stdarg.h.
12734 * nto-low.c: Likewise.
12735
12736 2014-08-07 Gary Benson <gbenson@redhat.com>
12737
12738 * server.h: Do not include stdlib.h.
12739 * inferiors.c: Likewise.
12740 * linux-low.c: Likewise.
12741 * regcache.c: Likewise.
12742 * spu-low.c: Likewise.
12743 * tracepoint.c: Likewise.
12744 * utils.c: Likewise.
12745
12746 2014-08-07 Gary Benson <gbenson@redhat.com>
12747
12748 * server.h: Do not include stdio.h.
12749 * linux-low.c: Likewise.
12750 * remote-utils.c: Likewise.
12751 * spu-low.c: Likewise.
12752 * utils.c: Likewise.
12753 * wincecompat.c: Likewise.
12754
12755 2014-08-06 Gary Benson <gbenson@redhat.com>
12756
12757 * regcache.c (init_register_cache): Move conditionals inside if.
12758
12759 2014-08-06 Gary Benson <gbenson@redhat.com>
12760
12761 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12762
12763 2014-07-31 Gary Benson <gbenson@redhat.com>
12764
12765 * ax.h: Do not include server.h.
12766 * gdbthread.h: Likewise.
12767 * lynx-low.h: Likewise.
12768 * notif.h: Likewise.
12769
12770 2014-07-30 Gary Benson <gbenson@redhat.com>
12771
12772 * server.h: Include common-defs.h.
12773 Do not include config.h or build-gnulib-gdbserver/config.h.
12774
12775 2014-07-30 Gary Benson <gbenson@redhat.com>
12776
12777 * hostio-errno.c: Move server.h to top of includes list.
12778 * inferiors.c: Likewise.
12779 * linux-x86-low.c: Likewise.
12780 * notif.c: Include server.h.
12781
12782 2014-07-24 Tom Tromey <tromey@redhat.com>
12783 Gary Benson <gbenson@redhat.com>
12784
12785 * server.h (CORE_ADDR): Now unsigned.
12786
12787 2014-07-16 Pedro Alves <palves@redhat.com>
12788
12789 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12790
12791 2014-07-15 Pedro Alves <palves@redhat.com>
12792
12793 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12794 copy.
12795
12796 2014-07-11 Pedro Alves <palves@redhat.com>
12797
12798 * linux-low.c (kill_wait_lwp): New function, based on
12799 kill_one_lwp_callback, but use my_waitpid directly.
12800 (kill_one_lwp_callback, linux_kill): Use it.
12801
12802 2014-06-23 Pedro Alves <palves@redhat.com>
12803
12804 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12805 before setting DR0..DR3.
12806
12807 2014-06-20 Gary Benson <gbenson@redhat.com>
12808
12809 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12810 * configure: Regenerated.
12811 * config.in: Likewise.
12812
12813 2014-06-20 Gary Benson <gbenson@redhat.com>
12814
12815 * Makefile.in (SFILES): Update locations for files moved
12816 from common to nat.
12817 (object file files): Reordered.
12818
12819 2014-06-20 Gary Benson <gbenson@redhat.com>
12820
12821 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12822 (i386_dr_low_set_addr): Likewise.
12823 (i386_dr_low_get_addr): Likewise.
12824 (i386_dr_low_can_set_control): Likewise.
12825 (i386_dr_low_set_control): Likewise.
12826 (i386_dr_low_get_control): Likewise.
12827 (i386_dr_low_get_status): Likewise.
12828 (i386_get_debug_register_length): Likewise.
12829 * linux-x86-low.c (i386_dr_low_set_addr):
12830 Changed signature. Made static.
12831 (i386_dr_low_get_addr): Likewise.
12832 (i386_dr_low_set_control): Likewise.
12833 (i386_dr_low_get_control): Likewise.
12834 (i386_dr_low_get_status): Likewise.
12835 (i386_dr_low): New global variable.
12836 * win32-i386-low.c (i386_dr_low_set_addr):
12837 Changed signature. Made static.
12838 (i386_dr_low_get_addr): Likewise.
12839 (i386_dr_low_set_control): Likewise.
12840 (i386_dr_low_get_control): Likewise.
12841 (i386_dr_low_get_status): Likewise.
12842 (i386_dr_low): New global variable.
12843
12844 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12845
12846 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12847 * Makefile.in (AR, AR_FLAGS): Define.
12848 * configure: Regenerate.
12849
12850 2014-06-19 Gary Benson <gbenson@redhat.com>
12851
12852 * Makefile.in (i386-dregs.o): New rule.
12853 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12854 * i386-low.c (target.h): Remove include.
12855 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12856 (DR_CONTROL_SHIFT): Likewise.
12857 (DR_CONTROL_SIZE): Likewise.
12858 (DR_RW_EXECUTE): Likewise.
12859 (DR_RW_WRITE): Likewise.
12860 (DR_RW_READ): Likewise.
12861 (DR_RW_IORW): Likewise.
12862 (DR_LEN_1): Likewise.
12863 (DR_LEN_2): Likewise.
12864 (DR_LEN_4): Likewise.
12865 (DR_LEN_8): Likewise.
12866 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12867 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12868 (DR_ENABLE_SIZE): Likewise.
12869 (DR_LOCAL_SLOWDOWN): Likewise.
12870 (DR_GLOBAL_SLOWDOWN): Likewise.
12871 (DR_CONTROL_RESERVED): Likewise.
12872 (I386_DR_CONTROL_MASK): Likewise.
12873 (I386_DR_VACANT): Likewise.
12874 (I386_DR_LOCAL_ENABLE): Likewise.
12875 (I386_DR_GLOBAL_ENABLE): Likewise.
12876 (I386_DR_DISABLE): Likewise.
12877 (I386_DR_SET_RW_LEN): Likewise.
12878 (I386_DR_GET_RW_LEN): Likewise.
12879 (I386_DR_WATCH_HIT): Likewise.
12880 (i386_wp_op_t): Likewise.
12881 (i386_show_dr): Likewise.
12882 (i386_length_and_rw_bits): Likewise.
12883 (i386_insert_aligned_watchpoint): Likewise.
12884 (i386_remove_aligned_watchpoint): Likewise.
12885 (i386_handle_nonaligned_watchpoint): Likewise.
12886 i386_update_inferior_debug_regs(): Likewise.
12887 (i386_dr_insert_watchpoint): Likewise.
12888 (i386_dr_remove_watchpoint): Likewise.
12889 (i386_dr_region_ok_for_watchpoint): Likewise.
12890 (i386_dr_stopped_data_address): Likewise.
12891 (i386_dr_stopped_by_watchpoint): Likewise.
12892
12893 2014-06-19 Gary Benson <gbenson@redhat.com>
12894
12895 * i386-low.c (i386_dr_show): Renamed to
12896 i386_show_dr and made static. All uses updated.
12897 (i386_dr_length_and_rw_bits): Renamed to
12898 i386_length_and_rw_bits and made static.
12899 All uses updated.
12900 (i386_dr_insert_aligned_watchpoint): Renamed to
12901 i386_insert_aligned_watchpoint and made static.
12902 All uses updated.
12903 (i386_dr_remove_aligned_watchpoint): Renamed to
12904 i386_remove_aligned_watchpoint and made static.
12905 All uses updated.
12906 (i386_dr_update_inferior_debug_regs): Renamed to
12907 i386_update_inferior_debug_regs and made static.
12908 All uses updated.
12909
12910 2014-06-18 Gary Benson <gbenson@redhat.com>
12911
12912 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12913 (i386_dr_low_can_set_control): Likewise.
12914 (i386_get_debug_register_length): Likewise.
12915 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12916 (i386_dr_low_can_set_control): Likewise.
12917 (i386_get_debug_register_length): Likewise.
12918
12919 2014-06-17 Gary Benson <gbenson@redhat.com>
12920
12921 * i386-low.h (i386-dregs.h): New include.
12922 (DR_FIRSTADDR): Now in i386-dregs.h.
12923 (DR_LASTADDR): Likewise.
12924 (DR_NADDR): Likewise.
12925 (DR_STATUS): Likewise.
12926 (DR_CONTROL): Likewise.
12927 (i386_debug_reg_state): Likewise.
12928 (i386_dr_insert_watchpoint): Likewise.
12929 (i386_dr_remove_watchpoint): Likewise.
12930 (i386_dr_region_ok_for_watchpoint): Likewise.
12931 (i386_dr_stopped_data_address): Likewise.
12932 (i386_dr_stopped_by_watchpoint): Likewise.
12933 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12934
12935 2014-06-18 Gary Benson <gbenson@redhat.com>
12936
12937 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12938 i386_dr_insert_watchpoint.
12939 (i386_low_remove_watchpoint): Renamed to
12940 i386_dr_remove_watchpoint.
12941 (i386_low_region_ok_for_watchpoint): Renamed to
12942 i386_dr_region_ok_for_watchpoint.
12943 (i386_low_stopped_data_address): Renamed to
12944 i386_dr_stopped_data_address.
12945 (i386_low_stopped_by_watchpoint): Renamed to
12946 i386_dr_stopped_by_watchpoint.
12947 * i386-low.c (i386_show_dr): Renamed to
12948 i386_dr_show and made nonstatic. All uses updated.
12949 (i386_length_and_rw_bits): Renamed to
12950 i386_dr_length_and_rw_bits and made nonstatic.
12951 All uses updated.
12952 (i386_insert_aligned_watchpoint): Renamed to
12953 i386_dr_insert_aligned_watchpoint and made nonstatic.
12954 All uses updated.
12955 (i386_remove_aligned_watchpoint): Renamed to
12956 i386_dr_remove_aligned_watchpoint and made nonstatic.
12957 All uses updated.
12958 (i386_update_inferior_debug_regs): Renamed to
12959 i386_dr_update_inferior_debug_regs and made nonstatic.
12960 All uses updated.
12961 (i386_low_insert_watchpoint): Renamed to
12962 i386_dr_insert_watchpoint. All uses updated.
12963 (i386_low_remove_watchpoint): Renamed to
12964 i386_dr_remove_watchpoint. All uses updated.
12965 (i386_low_region_ok_for_watchpoint): Renamed to
12966 i386_dr_region_ok_for_watchpoint. All uses updated.
12967 (i386_low_stopped_data_address): Renamed to
12968 i386_dr_stopped_data_address. All uses updated.
12969 (i386_low_stopped_by_watchpoint): Renamed to
12970 i386_dr_stopped_by_watchpoint. All uses updated.
12971
12972 2014-06-18 Gary Benson <gbenson@redhat.com>
12973
12974 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12975 (i386_dr_low_can_set_control): Likewise.
12976 (i386_insert_aligned_watchpoint): New check.
12977
12978 2014-06-18 Gary Benson <gbenson@redhat.com>
12979
12980 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12981 Renamed to state.
12982
12983 2014-06-18 Gary Benson <gbenson@redhat.com>
12984
12985 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12986 instead of fatal and error.
12987 (i386_handle_nonaligned_watchpoint): Likewise.
12988
12989 2014-06-18 Gary Benson <gbenson@redhat.com>
12990
12991 * i386-low.c (i386_get_debug_register_length): New macro.
12992 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12993 (i386_show_dr): Use debug_printf instead of fprintf. Use
12994 phex to format values.
12995
12996 2014-06-18 Gary Benson <gbenson@redhat.com>
12997
12998 * i386-low.h: Comment changes.
12999 * i386-low.c: Likewise.
13000
13001 2014-06-18 Gary Benson <gbenson@redhat.com>
13002
13003 * i386-low.c: Whitespace changes.
13004
13005 2014-06-12 Tom Tromey <tromey@redhat.com>
13006
13007 * utils.c (freeargv): Remove.
13008
13009 2014-06-12 Tom Tromey <tromey@redhat.com>
13010
13011 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
13012 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
13013 (parse_debug_format_options): Likewise.
13014 (gdbserver_usage): Likewise.
13015 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
13016 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
13017 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
13018 against libiberty.
13019 ($(LIBGNU)): Depend on libiberty.
13020 (all-lib): Recurse into all subdirs.
13021 (install-only): Invoke "install" target in subdirs.
13022 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
13023 targets.
13024 * configure: Rebuild.
13025 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
13026 for vasprintf, vsnprintf, or gettimeofday.
13027 * configure.srv: Don't add safe-ctype.o or lbasename.o to
13028 srv_tgtobj.
13029
13030 2014-06-05 Joel Brobecker <brobecker@adacore.com>
13031
13032 * development.sh: Delete.
13033 * Makefile.in (config.status): Adjust dependency on development.sh.
13034 * configure.ac: Adjust development.sh source call.
13035 * configure: Regenerate.
13036
13037 2014-06-02 Pedro Alves <palves@redhat.com>
13038
13039 * ax.c (gdb_free_agent_expr): New function.
13040 * ax.h (gdb_free_agent_expr): New declaration.
13041 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
13042 list.
13043 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
13044 static.
13045 (clear_breakpoint_conditions_and_commands): New function.
13046 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
13047 (clear_breakpoint_conditions_and_commands): New declaration.
13048
13049 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13050
13051 * linux-aarch64-low.c (asm/ptrace.h): Include.
13052
13053 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13054
13055 Fix TLS access for -static -pthread.
13056 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
13057 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
13058 (thread_db_load_search, try_thread_db_load_1): Initialize it.
13059
13060 2014-05-20 Pedro Alves <palves@redhat.com>
13061
13062 * linux-aarch64-low.c (aarch64_insert_point)
13063 (aarch64_remove_point): No longer check whether the type is
13064 supported here. Adjust to new interface.
13065 (the_low_target): Install aarch64_supports_z_point_type as
13066 supports_z_point_type method.
13067 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
13068 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
13069 instead of a Z packet char. Adjust.
13070 (arm_supports_z_point_type): New function.
13071 (arm_insert_point, arm_remove_point): Adjust to new interface.
13072 (the_low_target): Install arm_supports_z_point_type.
13073 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
13074 (cris_insert_point, cris_remove_point): Adjust to new interface.
13075 Don't check whether the type is supported here.
13076 (the_low_target): Install cris_supports_z_point_type.
13077 * linux-low.c (linux_supports_z_point_type): New function.
13078 (linux_insert_point, linux_remove_point): Adjust to new interface.
13079 * linux-low.h (struct linux_target_ops) <insert_point,
13080 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
13081 raw_breakpoint pointer parameter.
13082 <supports_z_point_type>: New method.
13083 * linux-mips-low.c (mips_supports_z_point_type): New function.
13084 (mips_insert_point, mips_remove_point): Adjust to new interface.
13085 Use mips_supports_z_point_type.
13086 (the_low_target): Install mips_supports_z_point_type.
13087 * linux-ppc-low.c (the_low_target): Install NULL as
13088 supports_z_point_type method.
13089 * linux-s390-low.c (the_low_target): Install NULL as
13090 supports_z_point_type method.
13091 * linux-sparc-low.c (the_low_target): Install NULL as
13092 supports_z_point_type method.
13093 * linux-x86-low.c (x86_supports_z_point_type): New function.
13094 (x86_insert_point): Adjust to new insert_point interface. Use
13095 insert_memory_breakpoint. Adjust to new
13096 i386_low_insert_watchpoint interface.
13097 (x86_remove_point): Adjust to remove_point interface. Use
13098 remove_memory_breakpoint. Adjust to new
13099 i386_low_remove_watchpoint interface.
13100 (the_low_target): Install x86_supports_z_point_type.
13101 * lynx-low.c (lynx_target_ops): Install NULL as
13102 supports_z_point_type callback.
13103 * nto-low.c (nto_supports_z_point_type): New.
13104 (nto_insert_point, nto_remove_point): Adjust to new interface.
13105 (nto_target_ops): Install nto_supports_z_point_type.
13106 * mem-break.c: Adjust intro comment.
13107 (struct raw_breakpoint) <raw_type, size>: New fields.
13108 <inserted>: Update comment.
13109 <shlib_disabled>: Delete field.
13110 (enum bkpt_type) <gdb_breakpoint>: Delete value.
13111 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
13112 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
13113 (raw_bkpt_type_to_target_hw_bp_type): New function.
13114 (find_enabled_raw_code_breakpoint_at): New function.
13115 (find_raw_breakpoint_at): New type and size parameters. Use them.
13116 (insert_memory_breakpoint): New function, based off
13117 set_raw_breakpoint_at.
13118 (remove_memory_breakpoint): New function.
13119 (set_raw_breakpoint_at): Reimplement.
13120 (set_breakpoint): New, based on set_breakpoint_at.
13121 (set_breakpoint_at): Reimplement.
13122 (delete_raw_breakpoint): Go through the_target->remove_point
13123 instead of assuming memory breakpoints.
13124 (find_gdb_breakpoint_at): Delete.
13125 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
13126 (find_gdb_breakpoint): New function.
13127 (set_gdb_breakpoint_at): Delete.
13128 (z_type_supported): New function.
13129 (set_gdb_breakpoint_1): New function, loosely based off
13130 set_gdb_breakpoint_at.
13131 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
13132 (delete_gdb_breakpoint_at): Delete.
13133 (delete_gdb_breakpoint_1): New function, loosely based off
13134 delete_gdb_breakpoint_at.
13135 (delete_gdb_breakpoint): New function.
13136 (clear_gdb_breakpoint_conditions): Rename to ...
13137 (clear_breakpoint_conditions): ... this. Don't handle a NULL
13138 breakpoint.
13139 (add_condition_to_breakpoint): Make static.
13140 (add_breakpoint_condition): Take a struct breakpoint pointer
13141 instead of an address. Adjust.
13142 (gdb_condition_true_at_breakpoint): Rename to ...
13143 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
13144 z_type parameter.
13145 (gdb_condition_true_at_breakpoint): Reimplement.
13146 (add_breakpoint_commands): Take a struct breakpoint pointer
13147 instead of an address. Adjust.
13148 (gdb_no_commands_at_breakpoint): Rename to ...
13149 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
13150 parameter. Return true if no breakpoint was found. Change debug
13151 output.
13152 (gdb_no_commands_at_breakpoint): Reimplement.
13153 (run_breakpoint_commands): Rename to ...
13154 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
13155 and change return type to boolean.
13156 (run_breakpoint_commands): New function.
13157 (gdb_breakpoint_here): Also check for Z1 breakpoints.
13158 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
13159 breakpoint. Go through the_target->remove_point instead of
13160 assuming memory breakpoint.
13161 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
13162 software and hardware breakpoints.
13163 (reinsert_raw_breakpoint): Go through the_target->insert_point
13164 instead of assuming memory breakpoint.
13165 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
13166 software and hardware breakpoints.
13167 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
13168 Check both software and hardware breakpoints.
13169 (validate_inserted_breakpoint): Assert the breakpoint is a
13170 software breakpoint. Set the inserted flag to -1 instead of
13171 setting shlib_disabled.
13172 (delete_disabled_breakpoints): Adjust.
13173 (validate_breakpoints): Only validate software breakpoints.
13174 Adjust to inserted flag change.
13175 (check_mem_read, check_mem_write): Skip breakpoint types other
13176 than software breakpoints. Adjust to inserted flag change.
13177 * mem-break.h (enum raw_bkpt_type): New enum.
13178 (raw_breakpoint, struct process_info): Forward declare.
13179 (Z_packet_to_target_hw_bp_type): Delete declaration.
13180 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
13181 (set_gdb_breakpoint, delete_gdb_breakpoint)
13182 (clear_breakpoint_conditions): New declarations.
13183 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
13184 (breakpoint_inserted_here): Update comment.
13185 (add_breakpoint_condition, add_breakpoint_commands): Replace
13186 address parameter with a breakpoint pointer parameter.
13187 (gdb_breakpoint_here): Update comment.
13188 (delete_gdb_breakpoint_at): Delete.
13189 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
13190 * server.c (process_point_options): Take a struct breakpoint
13191 pointer instead of an address. Adjust.
13192 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
13193 delete_gdb_breakpoint.
13194 * spu-low.c (spu_target_ops): Install NULL as
13195 supports_z_point_type method.
13196 * target.h: Include mem-break.h.
13197 (struct target_ops) <prepare_to_access_memory>: Update comment.
13198 <supports_z_point_type>: New field.
13199 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13200 instead of a char. Also take a raw breakpoint pointer.
13201 * win32-arm-low.c (the_low_target): Install NULL as
13202 supports_z_point_type.
13203 * win32-i386-low.c (i386_supports_z_point_type): New function.
13204 (i386_insert_point, i386_remove_point): Adjust to new interface.
13205 (the_low_target): Install i386_supports_z_point_type.
13206 * win32-low.c (win32_supports_z_point_type): New function.
13207 (win32_insert_point, win32_remove_point): Adjust to new interface.
13208 (win32_target_ops): Install win32_supports_z_point_type.
13209 * win32-low.h (struct win32_target_ops):
13210 <supports_z_point_type>: New method.
13211 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13212 instead of a char. Also take a raw breakpoint pointer.
13213
13214 2014-05-20 Pedro Alves <palves@redhat.com>
13215
13216 * mem-break.h: Include break-common.h.
13217 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13218 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
13219 (Z_packet_to_target_hw_bp_type): New declaration.
13220 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
13221 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
13222 (Z_PACKET_ACCESS_WP): Delete macros.
13223 (Z_packet_to_hw_type): Delete function.
13224 * i386-low.h: Don't include break-common.h here.
13225 (Z_packet_to_hw_type): Delete declaration.
13226 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
13227 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13228 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
13229 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13230 * linux-aarch64-low.c: Don't include break-common.h here.
13231 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13232 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
13233 (Z_packet_to_target_hw_bp_type): Delete function.
13234 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
13235 function.
13236 (mips_insert_point, mips_remove_point): Use
13237 Z_packet_to_target_hw_bp_type.
13238
13239 2014-05-20 Pedro Alves <palves@redhat.com>
13240
13241 * linux-aarch64-low.c: Include break-common.h.
13242 (enum target_point_type): Delete.
13243 (Z_packet_to_point_type): Rename to ...
13244 (Z_packet_to_target_hw_bp_type): ... this, and return a
13245 target_hw_bp_type instead.
13246 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
13247 instead of an enum target_point_type.
13248 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
13249 breakpoint type.
13250 (aarch64_dr_state_insert_one_point)
13251 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
13252 (aarch64_handle_aligned_watchpoint)
13253 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
13254 Take an enum target_hw_bp_type instead of an enum
13255 target_point_type.
13256 (aarch64_supports_z_point_type): New function.
13257 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
13258 use Z_packet_to_target_hw_bp_type.
13259
13260 2014-05-20 Joel Brobecker <brobecker@adacore.com>
13261
13262 * configure.ac: Only use -Werror by default when DEVELOPMENT
13263 is true.
13264 * configure: Regenerate.
13265
13266 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
13267
13268 Fix gdbserver qGetTLSAddr for x86_64 -m32.
13269 * linux-x86-low.c (X86_64_USER_REGS): New.
13270 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
13271
13272 2014-04-28 Yao Qi <yao@codesourcery.com>
13273
13274 * Makefile.in (i386-avx512.c): Fix the typo of generated file
13275 name.
13276
13277 2014-04-25 Pedro Alves <palves@redhat.com>
13278
13279 PR server/16255
13280 * linux-low.c (linux_attach_fail_reason_string): New function.
13281 (linux_attach_lwp): Delete.
13282 (linux_attach_lwp_1): Rename to ...
13283 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
13284 argument. Remove "initial" parameter. Return int instead of
13285 void. Don't error or warn here.
13286 (linux_attach): Adjust to call linux_attach_lwp. Call error on
13287 failure to attach to the tgid. Call warning when failing to
13288 attach to an lwp.
13289 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
13290 argument. Remove "initial" parameter. Return int instead of
13291 void. Don't error or warn here.
13292 (linux_attach_fail_reason_string): New declaration.
13293 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
13294 interface change. Use linux_attach_fail_reason_string.
13295
13296 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
13297 Walfred Tedeschi <walfred.tedeschi@intel.com>
13298
13299 * Makefile.in: Added rules to handle new files
13300 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
13301 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
13302 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
13303 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
13304 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
13305 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
13306 x32-avx512-linux.o.
13307 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
13308 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
13309 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
13310 i386/x32-avx512.xml.
13311 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
13312 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
13313 i386/x32-avx512-linux.xml.
13314 * i387-fp.c (num_avx512_k_registers): New constant for number
13315 of K registers.
13316 (num_avx512_zmmh_low_registers): New constant for number of
13317 lower ZMM registers (0-15).
13318 (num_avx512_zmmh_high_registers): New constant for number of
13319 higher ZMM registers (16-31).
13320 (num_avx512_ymmh_registers): New contant for number of higher
13321 YMM registers (ymm16-31 added by avx521 on x86_64).
13322 (num_avx512_xmm_registers): New constant for number of higher
13323 XMM registers (xmm16-31 added by AVX512 on x86_64).
13324 (struct i387_xsave): Add space for AVX512 registers.
13325 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
13326 Add code to handle AVX512 registers.
13327 (i387_xsave_to_cache): Add code to handle AVX512 registers.
13328 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
13329 prototypei from generated file.
13330 (tdesc_amd64_avx512_linux): Likewise.
13331 (init_registers_x32_avx512_linux): Likewise.
13332 (tdesc_x32_avx512_linux): Likewise.
13333 (init_registers_i386_avx512_linux): Likewise.
13334 (tdesc_i386_avx512_linux): Likewise.
13335 (x86_64_regmap): Add AVX512 registers.
13336 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13337 mask.
13338 (initialize_low_arch): Add code to initialize AVX512 registers.
13339
13340 2014-04-23 Pedro Alves <palves@redhat.com>
13341
13342 * mem-break.c (find_gdb_breakpoint_at): Make static.
13343 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13344
13345 2014-04-23 Pedro Alves <palves@redhat.com>
13346
13347 * i386-low.c: Don't include break-common.h here.
13348 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13349 prototype to take target_hw_bp_type as argument instead of a Z
13350 packet char.
13351 * i386-low.h: Include break-common.h here.
13352 (Z_packet_to_hw_type): Declare.
13353 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13354 prototypes.
13355 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13356 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13357 (x86_remove_point): Convert the packet number to a
13358 target_hw_bp_type before calling i386_low_remove_watchpoint.
13359 * win32-i386-low.c (i386_insert_point): Convert the packet number
13360 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13361 (i386_remove_point): Convert the packet number to a
13362 target_hw_bp_type before calling i386_low_remove_watchpoint.
13363
13364 2014-04-23 Pedro Alves <palves@redhat.com>
13365
13366 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13367
13368 2014-04-10 Pedro Alves <palves@redhat.com>
13369
13370 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13371 Check if the condition or command is NULL before checking if the
13372 breakpoint is known. On success, return true.
13373 * mem-break.h (add_breakpoint_condition): Document return.
13374 (add_breakpoint_commands): Add describing comment.
13375 * server.c (skip_to_semicolon): New function.
13376 (process_point_options): Use it.
13377
13378 2014-04-09 Pedro Alves <palves@redhat.com>
13379
13380 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13381 to lwpid_of.
13382
13383 2014-02-27 Pedro Alves <palves@redhat.com>
13384
13385 PR 12702
13386 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13387 macros.
13388 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13389 output.
13390 (last_thread_of_process_p): Take a PID argument instead of a
13391 thread pointer.
13392 (linux_wait_for_lwp): Delete.
13393 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13394 functions.
13395 (linux_low_filter_event): New function, party factored out from
13396 linux_wait_for_event.
13397 (linux_wait_for_event): Rename to ...
13398 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13399 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13400 sigsuspend. Check for zombie leaders.
13401 (linux_wait_for_event): Reimplement as wrapper around
13402 linux_wait_for_event_filtered.
13403 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13404 a normal or signal exit is seen, it's the whole process exiting.
13405 (wait_for_sigstop): No longer a for_each_inferior callback.
13406 Rewrite on top of linux_wait_for_event_filtered.
13407 (stop_all_lwps): Call wait_for_sigstop directly.
13408 * server.c (resume, handle_target_event): Handle
13409 TARGET_WAITKIND_NO_RESUMED.
13410
13411 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13412
13413 * win32-low.c (psapi_get_dll_name,
13414 * win32_CreateToolhelp32Snapshot): Delete.
13415 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13416 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13417 Delete.
13418 (handle_load_dll): Add function description.
13419 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13420
13421 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13422
13423 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13424 Add comment.
13425 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13426 base address when calling win32_add_one_solib.
13427 (handle_load_dll): Delete local variable load_addr.
13428 Remove 0x1000 offset applied to DLL base address when calling
13429 win32_add_one_solib.
13430 (handle_unload_dll): Add comment.
13431
13432 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13433
13434 * win32-low.c (win32_add_all_dlls): Renames
13435 win32_ensure_ntdll_loaded. Rewrite function documentation.
13436 Adjust implementation to always load all DLLs.
13437 Add 0x1000 offset to DLL base address when calling
13438 win32_add_one_solib.
13439 (child_initialization_done): New static global.
13440 (do_initial_child_stuff): Set child_initialization_done to
13441 zero during child initialization, and 1 after. Replace call
13442 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13443 Add comment.
13444 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13445 (handle_unload_dll): Add function documentation.
13446 (get_child_debug_event): Ignore load and unload DLL events
13447 during child initialization.
13448
13449 2014-02-20 Doug Evans <dje@google.com>
13450
13451 Remove global all_lwps.
13452 * inferiors.h (ptid_of): Move here from linux-low.h.
13453 (pid_of, lwpid_of): Ditto.
13454 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13455 parameter is a struct thread_info * now.
13456 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13457 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13458 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13459 directly.
13460 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13461 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13462 * linux-arm-low.c (update_registers_callback): Update, "entry"
13463 parameter is a struct thread_info * now.
13464 Fetch lwpid from current_inferior directly.
13465 (arm_insert_point): Pass &all_threads to find_inferior instead of
13466 &all_lwps.
13467 (arm_remove_point): Ditto.
13468 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13469 (arm_prepare_to_resume): Fetch pid from thread.
13470 (arm_read_description): Fetch lwpid from current_inferior directly.
13471 * linux-low.c (all_lwps): Delete.
13472 (delete_lwp): Delete call to remove_inferior.
13473 (handle_extended_wait): Fetch lwpid from thread.
13474 (add_lwp): Don't set lwp->entry.id. Remove call to
13475 add_inferior_to_list.
13476 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13477 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13478 (kill_one_lwp_callback): Ditto.
13479 (linux_kill): Don't dereference NULL pointer.
13480 Fetch ptid,lwpid from thread.
13481 (get_detach_signal): Fetch ptid from thread.
13482 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13483 Simplify call to regcache_invalidate_thread.
13484 (delete_lwp_callback): Update, "entry" parameter is a
13485 struct thread_info * now. Fetch pid from thread.
13486 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13487 (status_pending_p_callback): Update, "entry" parameter is a
13488 struct thread_info * now. Fetch ptid from thread.
13489 (find_lwp_pid): Update, "entry" parameter is a
13490 struct thread_info * now.
13491 (linux_wait_for_lwp): Fetch pid from thread.
13492 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13493 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13494 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13495 (dequeue_one_deferred_signal): Ditto.
13496 (cancel_breakpoint): Fetch ptid from current_inferior.
13497 (linux_wait_for_event): Pass &all_threads to find_inferior,
13498 not &all_lwps. Fetch ptid, lwpid from thread.
13499 (count_events_callback): Update, "entry" parameter is a
13500 struct thread_info * now.
13501 (select_singlestep_lwp_callback): Ditto.
13502 (select_event_lwp_callback): Ditto.
13503 (cancel_breakpoints_callback): Ditto.
13504 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13505 not &all_lwps.
13506 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13507 (unsuspend_one_lwp): Update, "entry" parameter is a
13508 struct thread_info * now.
13509 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13510 not &all_lwps.
13511 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13512 Fetch lwpid from thread, not lwp.
13513 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13514 Pass &all_threads to find_inferior, not &all_lwps.
13515 (send_sigstop): Fetch lwpid from thread, not lwp.
13516 (send_sigstop_callback): Update, "entry" parameter is a
13517 struct thread_info * now.
13518 (suspend_and_send_sigstop_callback): Ditto.
13519 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13520 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13521 struct thread_info * now.
13522 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13523 from thread, lwp.
13524 (lwp_running): Update, "entry" parameter is a
13525 struct thread_info * now.
13526 (stop_all_lwps): Fetch ptid from thread.
13527 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13528 (linux_resume_one_lwp): Fetch lwpid from thread.
13529 (linux_set_resume_request): Update, "entry" parameter is a
13530 struct thread_info * now. Fetch pid, lwpid from thread.
13531 (resume_status_pending_p): Update, "entry" parameter is a
13532 struct thread_info * now.
13533 (need_step_over_p): Ditto. Fetch lwpid from thread.
13534 (start_step_over): Fetch lwpid from thread.
13535 (linux_resume_one_thread): Update, "entry" parameter is a
13536 struct thread_info * now. Fetch lwpid from thread.
13537 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13538 (proceed_one_lwp): Update, "entry" parameter is a
13539 struct thread_info * now. Fetch lwpid from thread.
13540 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13541 struct thread_info * now.
13542 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13543 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13544 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13545 directly.
13546 (regsets_store_inferior_registers): Ditto.
13547 (fetch_register, store_register): Ditto.
13548 (linux_read_memory, linux_write_memory): Ditto.
13549 (linux_request_interrupt): Ditto.
13550 (linux_read_auxv): Ditto.
13551 (linux_xfer_siginfo): Ditto.
13552 (linux_qxfer_spu): Ditto.
13553 (linux_qxfer_libraries_svr4): Ditto.
13554 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13555 moved to inferiors.h.
13556 (get_lwp): Delete.
13557 (get_thread_lwp): Update.
13558 (struct lwp_info): Delete member "entry". Simplify comment for
13559 member "thread".
13560 (all_lwps): Delete.
13561 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13562 current_inferior directly.
13563 (update_watch_registers_callback): Update, "entry" parameter is a
13564 struct thread_info * now. Fetch pid from thread.
13565 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13566 (mips_insert_point): Fetch lwpid from current_inferior.
13567 Pass &all_threads to find_inferior, not &all_lwps.
13568 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13569 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13570 directly.
13571 (mips_stopped_data_address): Ditto.
13572 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13573 directly.
13574 * linux-tile-low.c (tile_arch_setup): Ditto.
13575 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13576 (update_debug_registers_callback): Update, "entry" parameter is a
13577 struct thread_info * now. Fetch pid from thread.
13578 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13579 Pass &all_threads to find_inferior, not &all_lwps.
13580 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13581 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13582 Pass &all_threads to find_inferior, not &all_lwps.
13583 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13584 (i386_dr_low_get_status): Ditto.
13585 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13586 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13587 (x86_linux_read_description): Ditto.
13588 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13589
13590 2014-02-20 Doug Evans <dje@google.com>
13591
13592 * inferiors.c (get_first_inferior): Fix buglet.
13593
13594 2014-02-19 Doug Evans <dje@google.com>
13595
13596 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13597 * inferiors.c (add_thread): Change result type to struct thread_info *.
13598 All callers updated.
13599 (add_lwp): Call add_thread here instead of in callers.
13600 All callers updated.
13601 * linux-low.h (get_lwp_thread): Rewrite.
13602 (struct lwp_info): New member "thread".
13603
13604 2014-02-19 Doug Evans <dje@google.com>
13605
13606 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13607 All callers updated.
13608
13609 2014-02-19 Doug Evans <dje@google.com>
13610
13611 * inferiors.c (add_thread): Fix whitespace.
13612
13613 2014-02-19 Doug Evans <dje@google.com>
13614
13615 * dll.c (clear_dlls): Replace accessing list implemention details
13616 with API function.
13617 * gdbthread.h (get_first_thread): Declare.
13618 * inferiors.c (for_each_inferior_with_data): New function.
13619 (get_first_thread): New function.
13620 (find_thread_ptid): Simplify.
13621 (get_first_inferior): New function.
13622 (clear_list): Delete.
13623 (one_inferior_p): New function.
13624 (clear_inferior_list): New function.
13625 (clear_inferiors): Update.
13626 * inferiors.h (for_each_inferior_with_data): Declare.
13627 (clear_inferior_list): Declare.
13628 (one_inferior_p): Declare.
13629 (get_first_inferior): Declare.
13630 * linux-low.c (linux_wait_for_event): Replace accessing list
13631 implemention details with API function.
13632 * server.c (target_running): Ditto.
13633 (accumulate_file_name_length): New function.
13634 (emit_dll_description): New function.
13635 (handle_qxfer_libraries): Replace accessing list implemention
13636 details with API function.
13637 (handle_qxfer_threads_worker): New function.
13638 (handle_qxfer_threads_proper): Replace accessing list implemention
13639 details with API function.
13640 (handle_query): Ditto.
13641 (visit_actioned_threads_callback_ftype): New typedef.
13642 (visit_actioned_threads_data): New struct.
13643 (visit_actioned_threads): Rewrite to be find_inferior callback.
13644 (resume): Call find_inferior.
13645 (handle_status): Replace accessing list implemention
13646 details with API function.
13647 (process_serial_event): Replace accessing list implemention details
13648 with API function.
13649 * target.c (set_desired_inferior): Replace accessing list implemention
13650 details with API function.
13651 * tracepoint.c (same_process_p): New function.
13652 (gdb_agent_about_to_close): Replace accessing list implemention
13653 details with API function.
13654 * win32-low.c (child_delete_thread): Replace accessing list
13655 implemention details with API function.
13656 (match_dll_by_basename): New function.
13657 (dll_is_loaded_by_basename): New function.
13658 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13659 details call to dll_is_loaded_by_basename.
13660
13661 2014-02-19 Doug Evans <dje@google.com>
13662
13663 * dll.h (struct dll_info): Add comment.
13664 * gdbthread.h (struct thread_info): Add comment.
13665 (current_ptid): Simplify.
13666 * inferiors.c (add_process): Update.
13667 (remove_process): Update.
13668 * inferiors.h (struct process_info): Rename member "head" to "entry".
13669 * linux-low.c (delete_lwp): Update.
13670 (add_lwp): Update.
13671 (last_thread_of_process_p): Update.
13672 (kill_one_lwp_callback, linux_kill): Update.
13673 (status_pending_p_callback): Update.
13674 (wait_for_sigstop): Update. Simplify read of ptid.
13675 (start_step_over): Update.
13676 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13677 (get_lwp_thread): Update.
13678 (struct lwp_info): Rename member "head" to "entry".
13679 * regcache.h (inferior_list_entry): Delete.
13680 * server.c (kill_inferior_callback): Update.
13681 (detach_or_kill_inferior_callback): Update.
13682 (print_started_pid): Update.
13683 (print_attached_pid): Update.
13684 (process_serial_event): Simplify read of ptid.
13685 * thread-db.c (thread_db_create_event): Update.
13686 (thread_db_get_tls_address): Update.
13687 * win32-low.c (current_inferior_ptid): Simplify.
13688
13689 2014-02-19 Tom Tromey <tromey@redhat.com>
13690
13691 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13692 argument.
13693 (target_supports_btrace): Update.
13694
13695 2014-02-14 Yao Qi <yao@codesourcery.com>
13696
13697 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13698 (rsp-low-ipa.o): New target.
13699
13700 2014-02-12 Tom Tromey <tromey@redhat.com>
13701
13702 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13703 convert_ascii_to_int.
13704 * regcache.c (registers_to_string): Likewise.
13705 * remote-utils.c (decode_M_packet): Likewise.
13706 * server.c (process_serial_event): Likewise.
13707
13708 2014-02-12 Tom Tromey <tromey@redhat.com>
13709
13710 * server.c (handle_query, handle_v_run): Use hex2bin, not
13711 unhexify.
13712 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13713
13714 2014-02-12 Tom Tromey <tromey@redhat.com>
13715
13716 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13717 convert_int_to_ascii.
13718 * regcache.c (registers_to_string, collect_register_as_string):
13719 Likewise.
13720 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13721 Likewise.
13722 * server.c (process_serial_event): Likewise.
13723 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13724 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13725
13726 2014-02-12 Tom Tromey <tromey@redhat.com>
13727
13728 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13729 bin2hex, not hexify.
13730 * tracepoint.c (cmd_qtstatus): Likewise.
13731
13732 2014-02-12 Tom Tromey <tromey@redhat.com>
13733
13734 * remote-utils.c (monitor_output): Pass explicit length to
13735 hexify.
13736
13737 2014-02-12 Tom Tromey <tromey@redhat.com>
13738
13739 * tracepoint.c: Include rsp-low.h.
13740 * server.c: Include rsp-low.h.
13741 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13742 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13743 declare.
13744 * remote-utils.c: Include rsp-low.h.
13745 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13746 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13747 (convert_int_to_ascii, convert_ascii_to_int): Move to
13748 common/rsp-low.c.
13749 * regcache.c: Include rsp-low.h.
13750 * ax.c: Include rsp-low.h.
13751 * Makefile.in (SFILES): Add common/rsp-low.c.
13752 (OBS): Add rsp-low.o.
13753 (rsp-low.o): New target.
13754
13755 2014-02-12 Tom Tromey <tromey@redhat.com>
13756
13757 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13758 Include print-utils.h.
13759 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13760 (plongest, thirty_two, phex_nz): Remove.
13761 * Makefile.in (SFILES): Add common/print-utils.c.
13762 (OBS): Add print-utils.o.
13763 (print-utils-ipa.o): New target.
13764 (print-utils.o): New target.
13765 (IPA_OBJS): Add print-utils-ipa.o.
13766
13767 2014-02-06 Tom Tromey <tromey@redhat.com>
13768
13769 * Makefile.in (SFILES): Fix indentation.
13770
13771 2014-02-05 Doug Evans <dje@google.com>
13772
13773 * linux-low.c (linux_wait_for_event): Improve comment.
13774 (linux_wait_1): Keep current_inferior in sync with event_child.
13775
13776 2014-01-22 Doug Evans <dje@google.com>
13777
13778 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13779
13780 2014-01-22 Doug Evans <dje@google.com>
13781
13782 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13783 * configure: Regenerate.
13784 * config.in: Regenerate.
13785 * Makefile.in (SFILES): Add debug.c.
13786 (OBS): Add debug.o.
13787 * debug.c: New file.
13788 * debug.h: New file.
13789 * linux-aarch64-low.c (*): Update all debugging printfs to use
13790 debug_printf instead of fprintf.
13791 * linux-arm-low.c (*): Ditto.
13792 * linux-cris-low.c (*): Ditto.
13793 * linux-crisv32-low.c (*): Ditto.
13794 * linux-m32r-low.c (*): Ditto.
13795 * linux-sparc-low.c (*): Ditto.
13796 * linux-x86.c (*): Ditto.
13797 * linux-low.c (*): Ditto.
13798 (linux_wait_1): Add calls to debug_enter, debug_exit.
13799 (linux_wait): Remove redundant debugging printf.
13800 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13801 (linux_resume, unstop_all_lwps): Ditto.
13802 * mem-break.c (*): Update all debugging printfs to use
13803 debug_printf instead of fprintf.
13804 * remote-utils.c (*): Ditto.
13805 * thread-db.c (*): Ditto.
13806 * server.c #include <ctype.h>, "gdb_vecs.h".
13807 (debug_threads): Moved to debug.c.
13808 (*): Update all debugging printfs to use debug_printf instead of
13809 fprintf.
13810 (start_inferior): Replace call to fflush with call to debug_flush.
13811 (monitor_show_help): Mention set debug-format.
13812 (parse_debug_format_options): New function.
13813 (handle_monitor_command): Handle "monitor set debug-format".
13814 (gdbserver_usage): Mention --debug-format.
13815 (main): Parse --debug-format.
13816 * server.h (debug_threads): Declaration moved to debug.h.
13817 #include "debug.h".
13818 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13819 trace_debug_1 that uses debug_printf.
13820 (tracepoint_look_up_symbols): Update all debugging printfs to use
13821 debug_printf instead of fprintf.
13822
13823 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13824
13825 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13826 sys/ptrace.h.
13827
13828 2014-01-17 Pedro Alves <palves@redhat.com>
13829
13830 PR build/16445
13831 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13832 defined after including gdb_proc_service.h.
13833
13834 2014-01-16 Doug Evans <dje@google.com>
13835
13836 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13837 (match_dll): Use it.
13838
13839 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13840
13841 * target.h (target_ops) <read_btrace>: Change parameters and
13842 return type to allow error reporting.
13843 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13844 trace reading errors on.
13845 * linux-low.c (linux_low_read_btrace): Pass trace reading
13846 errors on.
13847 (linux_low_disable_btrace): New.
13848
13849 2014-01-15 Doug Evans <dje@google.com>
13850
13851 * inferiors.c (thread_id_to_gdb_id): Delete.
13852 * inferiors.h (thread_id_to_gdb_id): Delete.
13853
13854 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13855
13856 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13857 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13858 versions.
13859
13860 2014-01-08 Pedro Alves <palves@redhat.com>
13861
13862 * server.c (handle_status): Don't discard previous queued stop
13863 replies or thread's pending status here.
13864 (main) <disconnection>: Do it here instead.
13865
13866 2014-01-08 Pedro Alves <palves@redhat.com>
13867
13868 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13869 * server.c (visit_actioned_threads, handle_pending_status): New
13870 function.
13871 (handle_v_cont): Factor out parts to ...
13872 (resume): ... this new function. If in all-stop, and a thread
13873 being resumed has a pending status, report it without actually
13874 resuming.
13875 (myresume): Adjust to use the new 'resume' function.
13876 (clear_pending_status_callback, set_pending_status_callback)
13877 (find_status_pending_thread_callback): New functions.
13878 (handle_status): Handle the case of multiple threads having
13879 interesting statuses to report. Report threads' real last signal
13880 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13881 with an interesting thread to report the status for, instead of
13882 always reporting the status of the first thread.
13883
13884 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13885
13886 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13887 * gdbreplay.c (gdbreplay_version): Likewise.
13888
13889 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13890
13891 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13892 iov.iov_len with the real length in use.
13893
13894 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13895
13896 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13897 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13898 for all targets that use win32-low.c.
13899 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13900 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13901
13902 2013-12-13 Pedro Alves <palves@redhat.com>
13903
13904 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13905 if equal to TARGET_WAITKIND_LOADED.
13906 * win32-low.c (cached_status): New static global.
13907 (win32_wait): Add declaration.
13908 (do_initial_child_stuff): Flush all initial pending debug events
13909 up to the initial breakpoint.
13910 (win32_wait): If CACHED_STATUS was set, return that instead
13911 of doing a real wait. Remove the code resuming the execution
13912 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13913 during the initial phase. Also remove the code changing
13914 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13915 TARGET_WAITKIND_STOPPED.
13916
13917 2013-12-11 Yao Qi <yao@codesourcery.com>
13918
13919 * notif.c (handle_notif_ack): Return 0 if no notification
13920 matches.
13921
13922 2013-11-20 Doug Evans <dje@google.com>
13923
13924 * linux-low.c (linux_set_resume_request): Fix comment.
13925
13926 2013-11-20 Doug Evans <dje@google.com>
13927
13928 * linux-low.c (resume_status_pending_p): Tweak comment.
13929
13930 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13931
13932 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13933 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13934 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13935 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13936 (srv_amd64_regobj): Add amd64-mpx.o.
13937 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13938 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13939 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13940 * i387-fp.c (num_pl_bnd_register) Added constant.
13941 (num_pl_bnd_cfg_registers) Added constant.
13942 (struct i387_xsave) Added reserved area and MPX fields.
13943 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13944 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13945 function.
13946 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13947 (init_registers_amd64_mpx_linux): Declare new function.
13948 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13949 (x86_64_regmap): Add MPX registers.
13950 (x86_linux_read_description): Add MPX case.
13951 (initialize_low_arch): Initialize MPX targets.
13952
13953 2013-11-18 Tom Tromey <tromey@redhat.com>
13954
13955 * configure: Rebuild.
13956 * configure.ac: Don't check for stdlib.h.
13957 * gdbreplay.c: Unconditionally include stdlib.h.
13958
13959 2013-11-18 Tom Tromey <tromey@redhat.com>
13960
13961 * config.in: Rebuild.
13962 * configure: Rebuild.
13963 * configure.ac: Don't use AC_HEADER_DIRENT.
13964
13965 2013-11-18 Tom Tromey <tromey@redhat.com>
13966
13967 * server.h: Don't check HAVE_STRING_H.
13968 * gdbreplay.c: Don't check HAVE_STRING_H.
13969 * configure: Rebuild.
13970
13971 2013-11-18 Tom Tromey <tromey@redhat.com>
13972
13973 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13974 LIBGNU.
13975
13976 2013-11-08 Tom Tromey <tromey@redhat.com>
13977
13978 * configure, config.in: Rebuild.
13979 * configure.ac: Remove unused configury.
13980
13981 2013-11-08 Tom Tromey <tromey@redhat.com>
13982
13983 * acinclude.m4: Include common.m4, codeset.m4.
13984 * configure, config.in: Rebuild.
13985 * configure.ac: Use GDB_AC_COMMON.
13986
13987 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13988
13989 * linux-s390-low.c (HWCAP_S390_TE): New define.
13990 (s390_arch_setup): Consider the TE field in the HWCAP for
13991 determining 'have_regset_tdb'.
13992
13993 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13994
13995 PR gdb/16014
13996 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13997 call to sizeof.
13998
13999 2013-10-02 Pedro Alves <palves@redhat.com>
14000
14001 * server.c (process_serial_event): Don't output "GDBserver
14002 exiting" if GDB is connected through stdio.
14003 * target.c (mywait): Likewise, be silent if GDB is connected
14004 through stdio.
14005
14006 2013-10-01 Joel Brobecker <brobecker@adacore.com>
14007
14008 * lynx-low.c (lynx_add_threads_after_attach): New function.
14009 (lynx_attach): Remove call to add_thread. Add call to
14010 lynx_add_threads_after_attach instead.
14011
14012 2013-09-28 Mike Frysinger <vapier@gentoo.org>
14013
14014 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
14015 * config.in, configure: Regenerated.
14016
14017 2013-09-18 Yao Qi <yao@codesourcery.com>
14018
14019 PR server/15959
14020 * server.c (start_inferior): Clear 'resume_info'.
14021
14022 2013-09-16 Jiong Wang <jiwang@tilera.com>
14023
14024 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
14025 for each register.
14026
14027 2013-09-16 Jiong Wang <jiwang@tilera.com>
14028
14029 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
14030 linux-tile-low.o to srv_tgtobj.
14031
14032 2013-09-16 Will Newton <will.newton@linaro.org>
14033
14034 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
14035 out regs.
14036
14037 2013-09-06 Pedro Alves <palves@redhat.com>
14038
14039 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
14040 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
14041 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
14042 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
14043 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
14044 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
14045
14046 2013-09-06 Pedro Alves <palves@redhat.com>
14047
14048 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
14049 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
14050
14051 2013-09-06 Pedro Alves <palves@redhat.com>
14052
14053 * linux-amd64-ipa.c: Include tracepoint.h.
14054 * linux-i386-ipa.c: Include tracepoint.h.
14055
14056 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
14057
14058 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
14059 (ps_get_thread_area): New function.
14060
14061 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
14062
14063 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
14064 (initialize_low_arch): Call init_registers_crisv32 rather than
14065 init_register_crisv32.
14066
14067 2013-09-05 Pedro Alves <palves@redhat.com>
14068
14069 * server.h (handle_vFile, hostio_last_error_from_errno): Move
14070 to ...
14071 * hostio.h: ... this new file.
14072 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
14073 win32-low.c: Include hostio.h.
14074
14075 2013-09-05 Pedro Alves <palves@redhat.com>
14076
14077 * server.h (gdb_client_data, handler_func, callback_handler_func)
14078 (delete_file_handler, add_file_handler, append_callback_event)
14079 (delete_callback_event, start_event_loop, initialize_event_loop):
14080 Move to event-loop.h and include it.
14081 * event-loop.h: New file.
14082
14083 2013-09-05 Pedro Alves <palves@redhat.com>
14084
14085 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
14086 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
14087 (loaded_dll, unloaded_dll): Move to ...
14088 * dll.h: ... this new file.
14089 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
14090
14091 2013-09-05 Pedro Alves <palves@redhat.com>
14092
14093 * server.h (current_process, get_thread_process, all_processes)
14094 (add_inferior_to_list, for_each_inferior, current_inferior)
14095 (remove_inferior, add_process, remove_process, find_process_pid)
14096 (have_started_inferiors_p, have_attached_inferiors_p)
14097 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
14098 (clear_inferiors, find_inferior, find_inferior_id)
14099 (inferior_target_data, set_inferior_target_data)
14100 (inferior_regcache_data, set_inferior_regcache_data): Move to
14101 inferiors.h, and include it.
14102 * inferiors.h: New file.
14103
14104 2013-09-05 Pedro Alves <palves@redhat.com>
14105
14106 * server.h (struct emit_ops, current_insn_ptr, emit_error):
14107 Move ...
14108 * ax.h: ... here.
14109
14110 2013-09-05 Pedro Alves <palves@redhat.com>
14111
14112 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
14113 tracepoint.h.
14114 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
14115 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
14116 (handle_tracepoint_general_set, handle_tracepoint_query)
14117 (tracepoint_finished_step, tracepoint_was_hit)
14118 (release_while_stepping_state_list, current_traceframe)
14119 (in_readonly_region, traceframe_read_mem)
14120 (fetch_traceframe_registers, traceframe_read_sdata)
14121 (traceframe_read_info, struct fast_tpoint_collect_status)
14122 (fast_tracepoint_collecting, force_unlock_trace_buffer)
14123 (handle_tracepoit_bkpts, initialize_low_tracepoint)
14124 (supply_fast_tracepoint_registers)
14125 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
14126 (ipa_tdesc, claim_trampoline_space)
14127 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
14128 (agent_mem_read, agent_get_trace_state_variable_value)
14129 (agent_set_trace_state_variable_value, agent_tsv_read)
14130 (agent_mem_read_string, get_raw_reg_func_addr)
14131 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
14132 * tracepoint.h: ... this new file.
14133
14134 2013-09-05 Pedro Alves <palves@redhat.com>
14135
14136 * server.h (perror_with_name, error, fatal, warning, paddress)
14137 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
14138 include it.
14139 * utils.h: New file.
14140
14141 2013-09-05 Pedro Alves <palves@redhat.com>
14142
14143 * server.h (remote_debug, noack_mode, transport_is_reliable)
14144 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
14145 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
14146 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
14147 (write_enn, initialize_async_io, enable_async_io)
14148 (disable_async_io, check_remote_input_interrupt_request)
14149 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
14150 (dead_thread_notify, prepare_resume_reply)
14151 (decode_address_to_semicolon, decode_address, decode_m_packet)
14152 (decode_M_packet, decode_X_packet, decode_xfer_write)
14153 (decode_search_memory_packet, unhexify, hexify)
14154 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
14155 (look_up_one_symbol, relocate_instruction)
14156 (monitor_output): Move to remote-utils.h, and include it.
14157 * remote-utils.h: New file.
14158
14159 2013-09-05 Pedro Alves <palves@redhat.com>
14160
14161 * server.h (_): Delete.
14162
14163 2013-09-02 Pedro Alves <palves@redhat.com>
14164
14165 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
14166 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
14167 allocated.
14168 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
14169
14170 2013-09-02 Pierre Muller <muller@sourceware.org>
14171
14172 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
14173 or WriteProcessMemory complete successfully and handle
14174 ERROR_PARTIAL_COPY error.
14175
14176 2013-09-02 Pedro Alves <palves@redhat.com>
14177
14178 * server.c (gdb_read_memory): Return -1 on traceframe memory read
14179 error instead of EIO.
14180
14181 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14182
14183 PR server/15604
14184 * linux-low.c: Include filestuff.h.
14185 (linux_create_inferior) <pid == 0>: Call close_most_fds.
14186 * lynx-low.c: Include filestuff.h.
14187 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
14188 * server.c: Include filestuff.h.
14189 (main): Call notice_open_fds.
14190 * spu-low.c: Include filestuff.h.
14191 (spu_create_inferior) <pid == 0>: Call close_most_fds.
14192
14193 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
14194
14195 * Makefile.in: Explain why ../target and ../nat are not
14196 listed as include file search paths.
14197 (linux-waitpid.o): New object file rule.
14198 * configure.srv (srv_native_linux_obj): New variable.
14199 Replace all occurrences of linux native object files with
14200 $srv_native_linux_obj.
14201 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
14202 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
14203 (linux_enable_event_reporting): Remove declaration.
14204 (my_waitpid): Moved to common/linux-waitpid.c.
14205 (linux_wait_for_event): Pass ptid when calling
14206 linux_enable_event_reporting.
14207 (linux_supports_tracefork_flag): Remove.
14208 (linux_enable_event_reporting): Likewise.
14209 (linux_tracefork_grandchild): Remove.
14210 (STACK_SIZE): Moved to common/linux-ptrace.c.
14211 (linux_tracefork_child): Remove.
14212 (linux_test_for_tracefork): Remove.
14213 (linux_look_up_symbols): Call linux_supports_traceclone.
14214 (initialize_low): Remove call to linux_test_for_tracefork.
14215 * linux-low.h (PTRACE_TYPE_ARG3): Move to
14216 common/linux-ptrace.h.
14217 (PTRACE_TYPE_ARG4): Likewise.
14218 Include linux-ptrace.h.
14219
14220 2013-08-21 Pedro Alves <palves@redhat.com>
14221
14222 * config.in: Renegerate.
14223
14224 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
14225
14226 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
14227 (SFILES): Remove $(srcdir)/common/target-common.c and
14228 add $(srcdir)/target/waitstatus.c.
14229 (OBS): Remove target-common.o and add waitstatus.o.
14230 (server_h): Remove $(srcdir)/../common/target-common.h and
14231 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
14232 and $(srcdir)/../target/waitstatus.h.
14233 (target-common.o): Remove.
14234 (waitstatus.o): New target object file.
14235 * target.h: Do not include target-common.h and
14236 include target/resume.h, target/wait.h and
14237 target/waitstatus.h.
14238
14239 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
14240
14241 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14242 to PTRACE_TYPE_ARG3.
14243 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14244 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
14245 PTRACE_TYPE_ARG4.
14246 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
14247 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
14248
14249 2013-07-27 Jie Zhang <jie@codesourcery.com>
14250 Daniel Jacobowitz <dan@codesourcery.com>
14251 Yao Qi <yao@codesourcery.com>
14252
14253 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
14254 (mips-linux-watch.o): New rule.
14255 (mips_linux_watch_h): New variable.
14256 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
14257 srv_tgtobj.
14258 * linux-mips-low.c: Include mips-linux-watch.h.
14259 (struct arch_process_info, struct arch_lwp_info): New.
14260 (update_watch_registers_callback): New function.
14261 (mips_linux_new_process, mips_linux_new_thread) New functions.
14262 (mips_linux_prepare_to_resume, mips_insert_point): New
14263 functions.
14264 (mips_remove_point, mips_stopped_by_watchpoint): New
14265 functions.
14266 (rsp_bp_type_to_target_hw_bp_type): New function.
14267 (mips_stopped_data_address): New function.
14268 (the_low_target): Add watchpoint support functions.
14269
14270 2013-07-27 Yao Qi <yao@codesourcery.com>
14271
14272 * i386-low.c: Include break-common.h.
14273 (enum target_hw_bp_type): Remove.
14274
14275 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
14276
14277 * Makefile.in (SFILES): /common/target-common.c.
14278 (OBS): Add target-common.o.
14279 (server_h): Add $(srcdir)/../common/target-common.h.
14280 (target-common.o): New target.
14281 * server.c (queue_stop_reply_callback): Free
14282 status string after use.
14283 * target.c (target_waitstatus_to_string): Remove.
14284 * target.h: Include target-common.h.
14285 (resume_kind): Likewise.
14286 (target_waitkind): Likewise.
14287 (target_waitstatus): Likewise.
14288 (TARGET_WNOHANG): Likewise.
14289
14290 2013-07-04 Yao Qi <yao@codesourcery.com>
14291
14292 * Makefile.in (host_alias): Use @host_noncanonical@.
14293 (target_alias): Use @target_noncanonical@.
14294 * configure.ac: Use ACX_NONCANONICAL_TARGET and
14295 ACX_NONCANONICAL_HOST.
14296 * configure: Regenerated.
14297
14298 Revert:
14299 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14300
14301 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14302 * configure: Rebuild.
14303 * Makefile.in (version_host, version_target): Get from configure.
14304 (version.c): Use $(version_host) and $(version_target).
14305
14306 2013-07-03 Pedro Alves <palves@redhat.com>
14307
14308 * Makefile.in (config.status): Depend on development.sh.
14309 * acinclude.m4: Include libmcheck.m4.
14310 * configure: Regenerate.
14311
14312 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14313
14314 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
14315 attribute inside the parentheses.
14316 (winapi_DebugSetProcessKillOnExit): Ditto.
14317 (winapi_DebugBreakProcess): Ditto.
14318 (winapi_GenerateConsoleCtrlEvent): Ditto.
14319
14320 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14321
14322 * notif.h (notif_event): Add a dummy member to avoid compiler
14323 errors.
14324
14325 2013-07-01 Pedro Alves <palves@redhat.com>
14326
14327 * hostio.c (HOSTIO_PATH_MAX): Define.
14328 (require_filename, handle_open, handle_unlink, handle_readlink):
14329 Use it.
14330
14331 2013-07-01 Pedro Alves <palves@redhat.com>
14332
14333 * server.h: Include "pathmax.h".
14334 * linux-low.c: Don't include sys/param.h.
14335 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14336 MAXPATHLEN.
14337 * win32-low.c: Don't include sys/param.h.
14338 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14339
14340 2013-07-01 Pedro Alves <palves@redhat.com>
14341
14342 * event-loop.c: Don't check HAVE_UNISTD_H before including
14343 <unistd.h>.
14344 * gdbreplay.c: Likewise.
14345 * remote-utils.c: Likewise.
14346 * server.c: Likewise.
14347 * configure.ac: Don't check for unistd.h.
14348 * configure: Regenerate.
14349
14350 2013-06-28 Tom Tromey <tromey@redhat.com>
14351
14352 * Makefile.in (version.c): Use version.in, not
14353 common/version.in.
14354
14355 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14356
14357 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14358 * configure: Rebuild.
14359 * Makefile.in (version_host, version_target): Get from configure.
14360 (version.c): Use $(version_host) and $(version_target).
14361
14362 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14363
14364 Fix trace-status to output user name without trailing colon.
14365 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14366
14367 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14368
14369 Fix trace-status to output proper start-time and stop-time.
14370 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14371 output start time and stop time in hex as gdb expects.
14372
14373 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14374
14375 * tracepoint.c (build_traceframe_info_xml): Output trace state
14376 variables present in the trace buffer.
14377
14378 2013-06-24 Tom Tromey <tromey@redhat.com>
14379
14380 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14381 create-version.sh.
14382 (version.o): Remove.
14383 * gdbreplay.c: Include version.h.
14384 (version, host_name): Don't declare.
14385 * server.h: Include version.h.
14386 (version, host_name): Don't declare.
14387
14388 2013-06-12 Pedro Alves <palves@redhat.com>
14389
14390 * linux-x86-low.c (linux_is_elf64): Delete global.
14391 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14392 with local linux_pid_exe_is_elf_64_file use.
14393
14394 2013-06-11 Pedro Alves <palves@redhat.com>
14395
14396 * linux-low.c (regset_disabled, disable_regset): New functions.
14397 (regsets_fetch_inferior_registers)
14398 (regsets_store_inferior_registers): Use them.
14399 (initialize_regsets_info); Don't allocate the disabled_regsets
14400 array here.
14401 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14402 comment.
14403
14404 2013-06-11 Pedro Alves <palves@redhat.com>
14405
14406 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14407 xmalloc.
14408
14409 2013-06-11 Pedro Alves <palves@redhat.com>
14410
14411 * linux-x86-low.c (initialize_low_arch): Call
14412 init_registers_x32_avx_linux.
14413
14414 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14415
14416 Fix compatibility with Android Bionic.
14417 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14418 it is not empty.
14419
14420 2013-06-07 Pedro Alves <palves@redhat.com>
14421
14422 PR server/14823
14423 * Makefile.in (OBS): Add tdesc.o.
14424 (IPA_OBJS): Add tdesc-ipa.o.
14425 (tdesc-ipa.o): New rule.
14426 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14427 interface.
14428 * linux-low.c (new_inferior): Delete.
14429 (disabled_regsets, num_regsets): Delete.
14430 (linux_add_process): Adjust to set the new per-process
14431 new_inferior flag.
14432 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14433 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14434 was a stop. When calling arch_setup, switch the current inferior
14435 to the thread that got an event.
14436 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14437 (regsets_fetch_inferior_registers)
14438 (regsets_store_inferior_registers): New regsets_info parameter.
14439 Adjust to use it.
14440 (linux_register_in_regsets): New regs_info parameter. Adjust to
14441 use it.
14442 (register_addr, fetch_register, store_register): New usrregs_info
14443 parameter. Adjust to use it.
14444 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14445 parameter regs_info. Adjust to use it.
14446 (linux_fetch_registers): Get the current inferior's regs_info, and
14447 adjust to use it.
14448 (linux_store_registers): Ditto.
14449 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14450 (initialize_low): Don't initialize the target_regsets here. Call
14451 initialize_low_arch.
14452 * linux-low.h (target_regsets): Delete declaration.
14453 (struct regsets_info): New.
14454 (struct usrregs_info): New.
14455 (struct regs_info): New.
14456 (struct process_info_private) <new_inferior>: New field.
14457 (struct linux_target_ops): Delete the num_regs, regmap, and
14458 regset_bitmap fields. New field regs_info.
14459 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14460 * i387-fp.c (num_xmm_registers): Delete.
14461 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14462 calls to new interface.
14463 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14464 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14465 Infer the number of xmm registers from the regcache's target
14466 description.
14467 * i387-fp.h (num_xmm_registers): Delete.
14468 * inferiors.c (add_thread): Don't install the thread's regcache
14469 here.
14470 * proc-service.c (gregset_info): Fetch the current inferior's
14471 regs_info. Adjust to use it.
14472 * regcache.c: Include tdesc.h.
14473 (register_bytes, reg_defs, num_registers)
14474 (gdbserver_expedite_regs): Delete.
14475 (get_thread_regcache): If the thread doesn't have a regcache yet,
14476 create one, instead of aborting gdbserver.
14477 (regcache_invalidate_one): Rename to ...
14478 (regcache_invalidate_thread): ... this.
14479 (regcache_invalidate_one): New.
14480 (regcache_invalidate): Only invalidate registers of the current
14481 process.
14482 (init_register_cache): Add target_desc parameter, and use it.
14483 (new_register_cache): Ditto. Assert the target description has a
14484 non zero registers_size.
14485 (regcache_cpy): Add assertions. Adjust.
14486 (realloc_register_cache, set_register_cache): Delete.
14487 (registers_to_string, registers_from_string): Adjust.
14488 (find_register_by_name, find_regno, find_register_by_number)
14489 (register_cache_size): Add target_desc parameter, and use it.
14490 (free_register_cache_thread, free_register_cache_thread_one)
14491 (regcache_release, register_cache_size): New.
14492 (register_size): Add target_desc parameter, and use it.
14493 (register_data, supply_register, supply_register_zeroed)
14494 (supply_regblock, supply_register_by_name, collect_register)
14495 (collect_register_as_string, collect_register_by_name): Adjust.
14496 * regcache.h (struct target_desc): Forward declare.
14497 (struct regcache) <tdesc>: New field.
14498 (init_register_cache, new_register_cache): Add target_desc
14499 parameter.
14500 (regcache_invalidate_thread): Declare.
14501 (regcache_invalidate_one): Delete declaration.
14502 (regcache_release): Declare.
14503 (find_register_by_number, register_cache_size, register_size)
14504 (find_regno): Add target_desc parameter.
14505 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14506 declarations.
14507 * remote-utils.c: Include tdesc.h.
14508 (outreg, prepare_resume_reply): Adjust.
14509 * server.c: Include tdesc.h.
14510 (gdbserver_xmltarget): Delete declaration.
14511 (get_features_xml, process_serial_event): Adjust.
14512 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14513 declare.
14514 (struct process_info) <tdesc>: New field.
14515 (ipa_tdesc): Declare.
14516 * tdesc.c: New file.
14517 * tdesc.h: New file.
14518 * tracepoint.c: Include tdesc.h.
14519 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14520 (get_context_regcache): Adjust to pass ipa_tdesc down.
14521 (do_action_at_tracepoint): Adjust to get the register cache size
14522 from the context regcache's description.
14523 (traceframe_walk_blocks): Adjust to get the register cache size
14524 from the current trace frame's description.
14525 (traceframe_get_pc): Adjust to get current trace frame's
14526 description and pass it down.
14527 (gdb_collect): Adjust to get the register cache size from the
14528 IPA's description.
14529 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14530 (gdbserver_xmltarget): Delete.
14531 (initialize_low_tracepoint): Set the ipa's target description.
14532 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14533 (initialize_low_tracepoint): Set the ipa's target description.
14534 * linux-x86-low.c: Include tdesc.h.
14535 [__x86_64__] (is_64bit_tdesc): New.
14536 (ps_get_thread_area, x86_get_thread_area): Use it.
14537 (i386_cannot_store_register): Rename to ...
14538 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14539 (i386_cannot_fetch_register): Rename to ...
14540 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14541 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14542 to new interface.
14543 (target_regsets): Rename to ...
14544 (x86_regsets): ... this.
14545 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14546 interface.
14547 (x86_siginfo_fixup): Use is_64bit_tdesc.
14548 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14549 (tdesc_x32_avx_linux, tdesc_x32_linux)
14550 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14551 Declare.
14552 (x86_linux_update_xmltarget): Delete.
14553 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14554 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14555 (AMD64_LINUX_USER64_CS): New.
14556 (x86_linux_read_description): New, based on
14557 x86_linux_update_xmltarget.
14558 (same_process_callback): New.
14559 (x86_arch_setup_process_callback): New.
14560 (x86_linux_update_xmltarget): New.
14561 (x86_regsets_info): New.
14562 (amd64_linux_regs_info): New.
14563 (i386_linux_usrregs_info): New.
14564 (i386_linux_regs_info): New.
14565 (x86_linux_regs_info): New.
14566 (x86_arch_setup): Reimplement.
14567 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14568 (x86_emit_ops): Ditto.
14569 (the_low_target): Adjust. Install x86_linux_regs_info,
14570 x86_cannot_fetch_register, and x86_cannot_store_register.
14571 (initialize_low_arch): New.
14572 * linux-ia64-low.c (tdesc_ia64): Declare.
14573 (ia64_fetch_register): Adjust.
14574 (ia64_usrregs_info, regs_info): New globals.
14575 (ia64_regs_info): New function.
14576 (the_low_target): Adjust.
14577 (initialize_low_arch): New function.
14578 * linux-sparc-low.c (tdesc_sparc64): Declare.
14579 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14580 Adjust.
14581 (sparc_arch_setup): New function.
14582 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14583 (the_low_target): Adjust.
14584 (initialize_low_arch): New function.
14585 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14586 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14587 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14588 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14589 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14590 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14591 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14592 (tdesc_powerpc_isa205_vsx64l): Declare.
14593 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14594 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14595 (ppc_set_pc, ppc_get_hwcap): Adjust.
14596 (ppc_usrregs_info): Forward declare.
14597 (!__powerpc64__) ppc_regmap_adjusted: New global.
14598 (ppc_arch_setup): Adjust to the current process'es target
14599 description.
14600 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14601 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14602 (ppc_store_evrregset): Adjust.
14603 (target_regsets): Rename to ...
14604 (ppc_regsets): ... this, and make static.
14605 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14606 (ppc_regs_info): New function.
14607 (the_low_target): Adjust.
14608 (initialize_low_arch): New function.
14609 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14610 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14611 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14612 (tdesc_s390x_linux64v2): Declare.
14613 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14614 (s390_fill_gregset, s390_store_last_break): Adjust.
14615 (target_regsets): Rename to ...
14616 (s390_regsets): ... this, and make static.
14617 (s390_get_pc, s390_set_pc): Adjust.
14618 (s390_get_hwcap): New target_desc parameter, and use it.
14619 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14620 (s390_arch_setup): Adjust to set the current process'es target
14621 description. Don't adjust the regmap.
14622 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14623 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14624 (regs_info_3264): New globals.
14625 (s390_regs_info): New function.
14626 (the_low_target): Adjust.
14627 (initialize_low_arch): New function.
14628 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14629 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14630 [__mips64] (init_registers_mips_linux)
14631 (init_registers_mips_dsp_linux): Delete defines.
14632 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14633 (have_dsp): New global.
14634 (mips_read_description): New, based on mips_arch_setup.
14635 (mips_arch_setup): Reimplement.
14636 (get_usrregs_info): New function.
14637 (mips_cannot_fetch_register, mips_cannot_store_register)
14638 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14639 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14640 (target_regsets): Rename to ...
14641 (mips_regsets): ... this, and make static.
14642 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14643 (dsp_regs_info, regs_info): New globals.
14644 (mips_regs_info): New function.
14645 (the_low_target): Adjust.
14646 (initialize_low_arch): New function.
14647 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14648 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14649 Declare.
14650 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14651 (arm_read_description): New, with bits factored from
14652 arm_arch_setup.
14653 (arm_arch_setup): Reimplement.
14654 (target_regsets): Rename to ...
14655 (arm_regsets): ... this, and make static.
14656 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14657 (arm_regs_info): New function.
14658 (the_low_target): Adjust.
14659 (initialize_low_arch): New function.
14660 * linux-m68k-low.c (tdesc_m68k): Declare.
14661 (target_regsets): Rename to ...
14662 (m68k_regsets): ... this, and make static.
14663 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14664 (m68k_regs_info): New function.
14665 (m68k_arch_setup): New function.
14666 (the_low_target): Adjust.
14667 (initialize_low_arch): New function.
14668 * linux-sh-low.c (tdesc_sharch): Declare.
14669 (target_regsets): Rename to ...
14670 (sh_regsets): ... this, and make static.
14671 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14672 (sh_regs_info, sh_arch_setup): New functions.
14673 (the_low_target): Adjust.
14674 (initialize_low_arch): New function.
14675 * linux-bfin-low.c (tdesc_bfin): Declare.
14676 (bfin_arch_setup): New function.
14677 (bfin_usrregs_info, regs_info): New globals.
14678 (bfin_regs_info): New function.
14679 (the_low_target): Adjust.
14680 (initialize_low_arch): New function.
14681 * linux-cris-low.c (tdesc_cris): Declare.
14682 (cris_arch_setup): New function.
14683 (cris_usrregs_info, regs_info): New globals.
14684 (cris_regs_info): New function.
14685 (the_low_target): Adjust.
14686 (initialize_low_arch): New function.
14687 * linux-cris-low.c (tdesc_crisv32): Declare.
14688 (cris_arch_setup): New function.
14689 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14690 (cris_regs_info): New function.
14691 (the_low_target): Adjust.
14692 (initialize_low_arch): New function.
14693 * linux-m32r-low.c (tdesc_m32r): Declare.
14694 (m32r_arch_setup): New function.
14695 (m32r_usrregs_info, regs_info): New globals.
14696 (m32r_regs_info): Adjust.
14697 (initialize_low_arch): New function.
14698 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14699 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14700 (tic6x_usrregs_info): Forward declare.
14701 (tic6x_read_description): New function, based on ...
14702 (tic6x_arch_setup): ... this. Reimplement.
14703 (target_regsets): Rename to ...
14704 (tic6x_regsets): ... this, and make static.
14705 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14706 (tic6x_regs_info): New function.
14707 (the_low_target): Adjust.
14708 (initialize_low_arch): New function.
14709 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14710 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14711 (target_regsets): Rename to ...
14712 (xtensa_regsets): ... this, and make static.
14713 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14714 globals.
14715 (xtensa_arch_setup, xtensa_regs_info): New functions.
14716 (the_low_target): Adjust.
14717 (initialize_low_arch): New function.
14718 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14719 (nios2_arch_setup): Set the current process'es tdesc.
14720 (target_regsets): Rename to ...
14721 (nios2_regsets): ... this.
14722 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14723 (nios2_regs_info): New function.
14724 (the_low_target): Adjust.
14725 (initialize_low_arch): New function.
14726 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14727 (aarch64_arch_setup): Set the current process'es tdesc.
14728 (target_regsets): Rename to ...
14729 (aarch64_regsets): ... this.
14730 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14731 (aarch64_regs_info): New function.
14732 (the_low_target): Adjust.
14733 (initialize_low_arch): New function.
14734 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14735 globals.
14736 (target_regsets): Rename to ...
14737 (tile_regsets): ... this.
14738 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14739 (tile_regs_info): New function.
14740 (tile_arch_setup): Set the current process'es tdesc.
14741 (the_low_target): Adjust.
14742 (initialize_low_arch): New function.
14743 * spu-low.c (tdesc_spu): Declare.
14744 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14745 * win32-arm-low.c (tdesc_arm): Declare.
14746 (arm_arch_setup): New function.
14747 (the_low_target): Install arm_arch_setup instead of
14748 init_registers_arm.
14749 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14750 (init_windows_x86): Rename to ...
14751 (i386_arch_setup): ... this. Set `win32_tdesc'.
14752 (the_low_target): Adjust.
14753 * win32-low.c (win32_tdesc): New global.
14754 (child_add_thread): Don't create the thread cache here.
14755 (do_initial_child_stuff): Set the new process'es tdesc.
14756 * win32-low.h (struct target_desc): Forward declare.
14757 (win32_tdesc): Declare.
14758 * lynx-i386-low.c (tdesc_i386): Declare global.
14759 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14760 * lynx-low.c (lynx_tdesc): New global.
14761 (lynx_add_process): Set the new process'es tdesc.
14762 * lynx-low.h (struct target_desc): Forward declare.
14763 (lynx_tdesc): Declare global.
14764 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14765 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14766 * nto-low.c (nto_tdesc): New global.
14767 (do_attach): Set the new process'es tdesc.
14768 * nto-low.h (struct target_desc): Forward declare.
14769 (nto_tdesc): Declare.
14770 * nto-x86-low.c (tdesc_i386): Declare.
14771 (nto_x86_arch_setup): Set `nto_tdesc'.
14772
14773 2013-06-04 Gary Benson <gbenson@redhat.com>
14774
14775 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14776 to qSupported response when appropriate.
14777 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14778 with nonzero-length annex.
14779 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14780 arguments supplied in annex.
14781
14782 2013-05-31 Doug Evans <dje@google.com>
14783
14784 PR server/15594
14785 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14786 64 bits in 64-cross-32 environment.
14787
14788 2013-05-28 Pedro Alves <palves@redhat.com>
14789
14790 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14791 (aarch64-without-fpu.c): Delete rule.
14792 * configure.srv (aarch64*-*-linux*): Remove references to
14793 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14794 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14795 declaration.
14796
14797 2013-05-24 Pedro Alves <palves@redhat.com>
14798
14799 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14800 instead of strchr/decode_address. Error if the range isn't split
14801 with a ','. Don't assume there's be a ':' in the action.
14802
14803 2013-05-23 Yao Qi <yao@codesourcery.com>
14804 Pedro Alves <palves@redhat.com>
14805
14806 * linux-low.c (lwp_in_step_range): New function.
14807 (linux_wait_1): If the thread was range stepping and stopped
14808 outside the stepping range, report the stop to GDB. Otherwise,
14809 continue stepping. Add range stepping debug output.
14810 (linux_set_resume_request): Copy the step range from the resume
14811 request to the lwp.
14812 (linux_supports_range_stepping): New.
14813 (linux_target_ops) <supports_range_stepping>: Set to
14814 linux_supports_range_stepping.
14815 * linux-low.h (struct linux_target_ops)
14816 <supports_range_stepping>: New field.
14817 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14818 * linux-x86-low.c (x86_supports_range_stepping): New.
14819 (the_low_target) <supports_range_stepping>: Set to
14820 x86_supports_range_stepping.
14821 * server.c (handle_v_cont): Handle 'r' action.
14822 (handle_v_requests): Append ";r" if the target supports range
14823 stepping.
14824 * target.h (struct thread_resume) <step_range_start,
14825 step_range_end>: New fields.
14826 (struct target_ops) <supports_range_stepping>:
14827 New field.
14828 (target_supports_range_stepping): New macro.
14829
14830 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14831
14832 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14833 confusion in comment.
14834
14835 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14836
14837 * lynx-low.c (struct process_info_private): New type.
14838 (lynx_add_process): New function.
14839 (lynx_create_inferior, lynx_attach): Replace calls to
14840 add_process by calls to lynx_add_process.
14841 (lynx_resume): If PTID is null, then try using
14842 current_process()->private->last_wait_event_ptid.
14843 Add comments.
14844 (lynx_clear_inferiors): Delete. The contents of that function
14845 has been inlined in lynx_mourn;
14846 (lynx_wait_1): Save the ptid in the process's private data.
14847 (lynx_mourn): Free the process' private data. Replace call
14848 to lynx_clear_inferiors by call to clear_inferiors.
14849
14850 2013-05-17 Yao Qi <yao@codesourcery.com>
14851
14852 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14853 the right place.
14854
14855 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14856
14857 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14858 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14859 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14860 PT_TEXT_END_ADDR guards. Update comments.
14861 (linux_target_op) <read_offsets>: Conditionally define to
14862 linux_read_offsets if the target is UCLIBC and if it defines
14863 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14864
14865 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14866 Andrew Jenner <andrew@codesourcery.com>
14867
14868 * Makefile.in (SFILES): Add linux-nios2-low.c.
14869 (clean): Add action to delete nios2-linux.c.
14870 (nios2-linux.c): New rule.
14871 * configure.srv: Add nios2*-*-linux*.
14872 * linux-nios2-low.c: New.
14873
14874 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14875
14876 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14877
14878 2013-04-25 Hui Zhu <hui@codesourcery.com>
14879
14880 PR gdb/15186
14881 * ax.c (ax_printf): Add fflush.
14882
14883 2013-04-22 Tom Tromey <tromey@redhat.com>
14884
14885 * Makefile.in (SFILES): Add filestuff.c.
14886 (OBS): Add filestuff.o.
14887 (filestuff.o): New target.
14888 * config.in, configure: Rebuild.
14889 * configure.ac: Check for fdwalk, pipe2.
14890
14891 2013-04-17 Pedro Alves <palves@redhat.com>
14892
14893 * configure.ac (USE_THREAD_DB): Delete variable.
14894 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14895 Don't AC_SUBST USE_THREAD_DB.
14896 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14897 * config.in, configure: Regenerate.
14898
14899 2013-04-16 Pedro Alves <palves@redhat.com>
14900
14901 * linux-low.h (struct lwp_info) <thread_known>: Move under
14902 the USE_THREAD_DB #ifdef.
14903
14904 2013-04-16 Pedro Alves <palves@redhat.com>
14905
14906 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14907 (linux-low.o): Delete rule.
14908 * linux-low.h: Always include "gdb_thread_db.h" instead of
14909 conditionally including thread_db.h.
14910 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14911 HAVE_THREAD_DB_H.
14912
14913 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14914
14915 * Makefile.in (install-only): Fix make install regression.
14916
14917 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14918
14919 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14920 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14921 installation.
14922 * gdbserver.1: Remove.
14923
14924 2013-03-22 Pedro Alves <palves@redhat.com>
14925
14926 * linux-low.c (handle_extended_wait): Don't call
14927 linux_enable_event_reporting.
14928
14929 2013-03-15 Tony Theodore <tonyt@logyst.com>
14930
14931 PR build/9098:
14932 * Makefile.in (SHELL): Use @SHELL@.
14933
14934 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14935
14936 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14937 compiler warning.
14938
14939 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14940
14941 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14942 Remove extraneous NULL element.
14943
14944 2013-03-13 Yao Qi <yao@codesourcery.com>
14945
14946 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14947 'V' block in trace frame.
14948
14949 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14950
14951 * target.h (struct target_ops): Add btrace ops.
14952 (target_supports_btrace): New macro.
14953 (target_enable_btrace): New macro.
14954 (target_disable_btrace): New macro.
14955 (target_read_btrace): New macro.
14956 * gdbthread.h (struct thread_info): Add btrace field.
14957 * server.c: Include btrace-common.h.
14958 (handle_btrace_general_set): New function.
14959 (handle_btrace_enable): New function.
14960 (handle_btrace_disable): New function.
14961 (handle_general_set): Call handle_btrace_general_set.
14962 (handle_qxfer_btrace): New function.
14963 (struct qxfer qxfer_packets[]): Add btrace entry.
14964 * inferiors.c (remove_thread): Disable btrace.
14965 * linux-low: Include linux-btrace.h.
14966 (linux_low_enable_btrace): New function.
14967 (linux_low_read_btrace): New function.
14968 (linux_target_ops): Add btrace ops.
14969 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14970 Add srv_linux_btrace=yes.
14971 (x86_64-*-linux*): Add linux-btrace.o.
14972 Add srv_linux_btrace=yes.
14973 * configure.ac: Define HAVE_LINUX_BTRACE.
14974 * config.in: Regenerated.
14975 * configure: Regenerated.
14976
14977 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14978
14979 * server.c (handle_qxfer): Preserve error message if -3 is
14980 returned.
14981 (qxfer): Document the -3 return value.
14982
14983 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14984
14985 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14986 (linux_btrace_h): New variable.
14987 (linux-btrace.o): New rule.
14988
14989 2013-03-08 Stan Shebs <stan@codesourcery.com>
14990 Hafiz Abid Qadeer <abidh@codesourcery.com>
14991
14992 * tracepoint.c (trace_buffer_size): New global.
14993 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14994 (init_trace_buffer): Change to one-argument function. Allocate
14995 trace buffer memory.
14996 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14997 handle QTBuffer:size packet.
14998 (cmd_bigqtbuffer_size): New function.
14999 (initialize_tracepoint): Call init_trace_buffer with
15000 DEFAULT_TRACE_BUFFER_SIZE.
15001 * server.c (handle_query): Add QTBuffer:size in the
15002 supported packets.
15003
15004 2013-03-07 Yao Qi <yao@codesourcery.com>
15005
15006 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
15007 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
15008 of -1.
15009 (cmd_qtsp): Adjust condition. Do post increment.
15010 Set cur_action and cur_step_action back to 0.
15011
15012 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
15013
15014 PR server/15236
15015 * linux-low.c (linux_write_memory): Return early success if LEN is
15016 zero.
15017
15018 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
15019
15020 * configure.srv: Add x86_64-*-cygwin* as target.
15021
15022 2013-02-28 Tom Tromey <tromey@redhat.com>
15023
15024 * configure.ac: Invoke AC_SYS_LARGEFILE.
15025 * configure, config.in: Rebuild.
15026
15027 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
15028
15029 * win32-low.c: Throughout, fix format strings and casts of
15030 printf-like functions to avoid type related warnings on all
15031 platforms.
15032 (get_child_debug_event): Print dwDebugEventCode as hex since
15033 that's how it's usually documented.
15034
15035 2013-02-28 Yao Qi <yao@codesourcery.com>
15036
15037 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
15038 pulongest.
15039
15040 2013-02-27 Jiong Wang <jiwang@tilera.com>
15041
15042 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
15043 (reg-tilegx32.c): New rule.
15044 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
15045 * linux-tile-low.c (tile_arch_setup): New function. Invoke
15046 different register info initializer according to elf class.
15047 (init_registers_tilgx32): New function. The tilegx32 register info
15048 initializer.
15049 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
15050 (tile_store_gregset): Likewise.
15051
15052 2013-02-27 Yao Qi <yao@codesourcery.com>
15053
15054 * server.c (process_point_options): Print debug message when
15055 debug_threads is true.
15056
15057 2013-02-26 Yao Qi <yao@codesourcery.com>
15058
15059 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
15060
15061 2013-02-19 Pedro Alves <palves@redhat.com>
15062 Kai Tietz <ktietz@redhat.com>
15063
15064 PR gdb/15161
15065
15066 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
15067 instead of strtoul to extract address from packet.
15068 (process_serial_event) <'z'>: Likewise.
15069
15070 2013-02-18 Yao Qi <yao@codesourcery.com>
15071
15072 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
15073
15074 2013-02-14 Pedro Alves <palves@redhat.com>
15075
15076 Plug memory leak.
15077
15078 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
15079 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
15080
15081 2013-02-14 Pedro Alves <palves@redhat.com>
15082
15083 * tracepoint.c (cmd_qtdpsrc): Use savestring.
15084
15085 2013-02-14 Pedro Alves <palves@redhat.com>
15086
15087 * tracepoint.c (save_string): Delete.
15088 (add_tracepoint_action): Use savestring instead of save_string.
15089
15090 2013-02-12 Pedro Alves <palves@redhat.com>
15091
15092 * linux-xtensa-low.c: Ditto.
15093 * xtensa-xtregs.c: Ditto.
15094
15095 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
15096
15097 * thread-db.c (thread_db_get_tls_address): NULL pointer check
15098 thread_db.
15099
15100 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
15101
15102 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
15103 aarch64_num_wp_regs and aarch64_num_bp_regs to
15104 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
15105
15106 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
15107
15108 * linux-aarch64-low.c (ps_get_thread_area): Replace
15109 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
15110
15111 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
15112 Marcus Shawcroft <marcus.shawcroft@arm.com>
15113 Nigel Stephens <nigel.stephens@arm.com>
15114 Yufeng Zhang <yufeng.zhang@arm.com>
15115
15116 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
15117 (aarch64.c, aarch64-without-fpu.c): New targets.
15118 * configure.srv (aarch64*-*-linux*): New.
15119 * linux-aarch64-low.c: New file.
15120
15121 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
15122
15123 * linux-low.c (handle_extended_wait, linux_create_inferior)
15124 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
15125 (dequeue_one_deferred_signal, linux_resume_one_thread)
15126 (fetch_register, linux_write_memory, linux_enable_event_reporting)
15127 (linux_tracefork_grandchild, linux_test_for_tracefork)
15128 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
15129 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
15130 where the argument is 0.
15131
15132 2013-01-25 Yao Qi <yao@codesourcery.com>
15133
15134 * event-loop.c: Include "queue.h".
15135 (gdb_event_p): New typedef.
15136 (struct gdb_event) <next_event>: Remove.
15137 (event_queue): Change to QUEUE(gdb_event_p).
15138 (async_queue_event): Remove.
15139 (gdb_event_xfree): New.
15140 (initialize_event_loop): New.
15141 (process_event): Use API from QUEUE.
15142 (wait_for_event): Likewise.
15143 * server.c (main): Call initialize_event_loop.
15144 * server.h (initialize_event_loop): Declare.
15145
15146 2013-01-18 Yao Qi <yao@codesourcery.com>
15147
15148 * ax.h (struct eval_agent_expr_context): New.
15149 (gdb_eval_agent_expr): Update declaration.
15150 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
15151 TFRAME. Add new argument CTX.
15152 * server.h (struct eval_agent_expr_context): Declare.
15153 (agent_mem_read, agent_tsv_read): Update declaration.
15154 (agent_mem_read_string): Likewise.
15155 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
15156 (add_traceframe_block): Add new argument TPOINT.
15157 Increase TPOINT->traceframe_usage.
15158 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
15159 eval_tracepoint_agent_expr.
15160 (condition_true_at_tracepoint): Likewise.
15161 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
15162 (agent_mem_read_string, agent_tsv_read): Likewise.
15163
15164 2013-01-16 Yao Qi <yao@codesourcery.com>
15165
15166 * linux-low.c (linux_resume_one_lwp): Don't check
15167 'lwp->bp_reinsert != 0'.
15168
15169 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15170 Pedro Alves <palves@redhat.com>
15171
15172 * lynx-low.c (ptrace_request_to_str): Define a temporary
15173 macro and use it to simplify this function's implementation.
15174
15175 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15176
15177 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
15178 sets errno.
15179
15180 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15181
15182 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
15183
15184 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15185
15186 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
15187
15188 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15189
15190 * lynx-low.c (lynx_resume): Use the resume_info parameter
15191 to determine the ptid for the lynx_ptrace call, unless
15192 it is equal to minus_one_ptid, in which case we use the
15193 ptid of the current_inferior.
15194 (lynx_wait_1): After having received a thread create/exit
15195 event, resume the inferior's execution using the signaling
15196 thread's ptid, rather than the old ptid.
15197
15198 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15199
15200 * lynx-low.c (lynx_resume): Delete variable ret.
15201
15202 2013-01-01 Joel Brobecker <brobecker@adacore.com>
15203
15204 * gdbreplay.c (gdbreplay_version): Update copyright year.
15205 * server.c (gdbserver_version): Likewise.
15206
15207 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15208
15209 * lynx-low.c (lynx_wait_1): Add debug trace before adding
15210 new thread.
15211
15212 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15213
15214 * lynx-low.c (ptrace_request_to_str): Add handling for
15215 PTRACE_GETTRACESIG.
15216
15217 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15218
15219 * lynx-low.c (lynx_attach): Delete variable new_process.
15220
15221 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15222
15223 * lynx-low.c (lynx_create_inferior): Delete variable
15224 new_process.
15225
15226 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15227
15228 * lynx-low.c (ptrace_request_to_str): Do not handle
15229 PTRACE_GETTHREADLIST if this macro does not exist.
15230
15231 2012-12-15 Yao Qi <yao@codesourcery.com>
15232
15233 * Makefile.in (OBS): Add notif.o.
15234 * notif.c, notif.h: New.
15235 * server.c: Include "notif.h".
15236 (struct vstop_notif) <next>: Remove.
15237 <base>: New field.
15238 (queue_stop_reply): Update.
15239 (push_event, send_next_stop_reply): Remove.
15240 (discard_queued_stop_replies): Update.
15241 (notif_stop): New variable.
15242 (handle_v_stopped): Remove.
15243 (handle_v_requests): Don't call handle_v_stopped. Call
15244 handle_ack_notif instead.
15245 (queue_stop_reply_callback): Call notif_event_enque instead
15246 of queue_stop_reply.
15247 (handle_status): Don't call send_next_stop_reply, call
15248 notif_write_event instead.
15249 (kill_inferior_callback): Likewise.
15250 (detach_or_kill_inferior_callback): Likewise.
15251 (main): Call initialize_notif.
15252 (process_serial_event): Call QUEUE_is_empty.
15253 (handle_target_event): Call notif_push instead of push event.
15254 * server.h (push_event): Remove declaration.
15255
15256 2012-12-10 Tom Tromey <tromey@redhat.com>
15257
15258 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
15259 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
15260 macros.
15261 (.c.o): Rewrite.
15262 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
15263 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
15264 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
15265 (amd64-linux-ipa.o, ax.o): Rewrite.
15266 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
15267 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
15268 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
15269 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
15270 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
15271 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
15272 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
15273 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
15274 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
15275 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
15276 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
15277 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
15278 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
15279 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
15280 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
15281 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
15282 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
15283 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
15284 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
15285 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
15286 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
15287 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
15288 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
15289 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
15290 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
15291 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
15292 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
15293 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
15294 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
15295 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
15296 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
15297 (reg-tilegx.o): Remove.
15298 (all_object_files): New macro.
15299 Include .deps files.
15300 * aclocal.m4, configure: Rebuild.
15301 * acinclude.m4: Include depstand.m4, lead-dot.m4.
15302 * configure.ac: Invoke ZW_CREATE_DEPDIR,
15303 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
15304
15305 2012-12-05 Tom Tromey <tromey@redhat.com>
15306
15307 PR gdb/14917:
15308 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
15309
15310 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
15311
15312 * configure.ac: Check for linux/perf_event.h.
15313 * config.in: Regenerated.
15314 * configure: Regenerated.
15315
15316 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
15317
15318 * hostio.c (handle_readlink): Decrease buffer size
15319 parameter passed to readlink by one byte.
15320
15321 2012-11-26 Yao Qi <yao@codesourcery.com>
15322
15323 * configure.ac (build_warnings): Append '-Wempty-body'.
15324 * configure: Regenerated.
15325 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
15326 body.
15327
15328 2012-11-15 Pierre Muller <muller@sourceware.org>
15329
15330 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
15331 * config.in: Regenerate.
15332 * configure: Regenerate.
15333 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15334 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15335 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15336 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15337 header.
15338 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15339 instead of <sys/wait.h> header.
15340 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15341
15342 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15343
15344 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15345 (various make rules): Remove -DGDBSERVER
15346
15347 2012-11-09 Yao Qi <yao@codesourcery.com>
15348
15349 * spu-low.c (current_ptid): Move it to ..
15350 * gdbthread.h: ... here. New.
15351 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15352 * server.c (myresume, process_serial_event): Likewise.
15353 * thread-db.c (thread_db_find_new_threads): Likewise.
15354 * tracepoint.c (run_inferior_command): Likewise.
15355
15356 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15357
15358 * server.c (handle_search_memory_1): Include access length in
15359 warning message.
15360
15361 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15362
15363 * linux-crisv32-low.c: Fix compile errors.
15364
15365 2012-09-04 Yao Qi <yao@codesourcery.com>
15366
15367 * tracepoint.c (cmd_qtsv): Adjust debug message.
15368 Don't check CUR_TPOINT.
15369
15370 2012-08-28 Yao Qi <yao@codesourcery.com>
15371
15372 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15373 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15374 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15375 Remove declarations of xmalloc, xreallloc, xstrdup and
15376 freeargv.
15377 * Makefile.in (libiberty_h): New.
15378 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15379 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15380
15381 2012-08-23 Yao Qi <yao@codesourcery.com>
15382
15383 * server.h: Remove declaration of 'xsnprintf'.
15384
15385 2012-08-22 Keith Seitz <keiths@redhat.com>
15386
15387 * server.h: Include build-gnulib-gbserver/config.h.
15388 * gdbreplay.c: Likewise.
15389
15390 2012-08-08 Doug Evans <dje@google.com>
15391
15392 * Makefile.in (SFILES): Add gdb_vecs.c.
15393 (OBS): Add gdb_vecs.o.
15394 (gdb_vecs_h, host_defs_h): New variables.
15395 (thread-db.o): Add $(gdb_vecs_h) dependency.
15396 (gdb_vecs.o): New rule.
15397 * thread-db.c: #include "gdb_vecs.h".
15398 (thread_db_load_search): Use a vector to iterate over path elements.
15399 Handle text appearing after "$pdir".
15400
15401 * configure.ac: Add check for strstr.
15402 * config.in: Regenerate.
15403 * configure: Regenerate.
15404
15405 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15406
15407 * hostio.c (handle_pread): If pread fails, fall back to attempting
15408 lseek/read.
15409 (handle_pwrite): Likewise for pwrite.
15410
15411 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15412
15413 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15414 between unsupported TYPE and unimplementable ADDR/LEN combination.
15415 (arm_insert_point): Act on new return value.
15416
15417 2012-07-31 Pedro Alves <palves@redhat.com>
15418
15419 * server.c (process_point_options): Only skip tokens if we find
15420 one that is unrecognized. Don't treat 'X' specially while
15421 skipping unrecognized tokens.
15422
15423 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15424
15425 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15426 to 4-byte-align HW breakpoint addresses for Thumb.
15427
15428 2012-07-27 Yao Qi <yao@codesourcery.com>
15429
15430 PR remote/14161.
15431
15432 * server.h: Declare gdb_agent_about_to_close.
15433 * target.c (kill_inferior): Include "agent.h".
15434 New. Send command 'kill'.
15435 * target.h (kill_inferior): Removed macro.
15436 * tracepoint.c (gdb_agent_about_to_close): New.
15437 (gdb_agent_helper_thread): Handle command 'close'.
15438 Wait endlessly until the inferior stops.
15439 Install gdb_agent_remove_socket to atexit hook.
15440 (agent_socket_name): New static variable.
15441 (gdb_agent_socket_init): Replace local variable 'name' with
15442 'agent_socket_name'.
15443 (gdb_agent_remove_socket): New.
15444
15445 2012-07-27 Yao Qi <yao@codesourcery.com>
15446
15447 * server.c (process_point_options): Stop at 'X' when parsing.
15448
15449 2012-07-19 Michael Eager <eager@eagercon.com>
15450
15451 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15452 to hw_execute.
15453 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15454 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15455 hardware breakpoint.
15456
15457 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15458
15459 * gdbserver/linux-low.c (initialize_low): Call
15460 linux_ptrace_init_warnings.
15461
15462 2012-07-02 Doug Evans <dje@google.com>
15463
15464 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15465 pointer to int.
15466
15467 2012-07-02 Stan Shebs <stan@codesourcery.com>
15468
15469 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15470 (ax.o): Add it to build rule.
15471 (ax-ipa.o): Ditto.
15472 (OBS): Add format.o.
15473 (IPA_OBS): Add format.o.
15474 * server.c (handle_query): Claim support for breakpoint commands.
15475 (process_point_options): Add command case.
15476 (process_serial_event): Leave running if there are printfs in
15477 effect.
15478 * mem-break.h (any_persistent_commands): Declare.
15479 (add_breakpoint_commands): Declare.
15480 (gdb_no_commands_at_breakpoint): Declare.
15481 (run_breakpoint_commands): Declare.
15482 * mem-break.c (struct point_command_list): New struct.
15483 (struct breakpoint): New field command_list.
15484 (any_persistent_commands): New function.
15485 (add_commands_to_breakpoint): New function.
15486 (add_breakpoint_commands): New function.
15487 (gdb_no_commands_at_breakpoint): New function.
15488 (run_breakpoint_commands): New function.
15489 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15490 locally.
15491 * ax.c: Include format.h.
15492 (ax_printf): New function.
15493 (gdb_eval_agent_expr): Add printf opcode.
15494
15495 2012-06-13 Yao Qi <yao@codesourcery.com>
15496
15497 * server.c (start_inferior): Remove duplicated writes to fields
15498 'last_resume_kind' and 'last_status' of 'current_inferior'.
15499
15500 2012-06-12 Yao Qi <yao@codesourcery.com>
15501 Pedro Alves <palves@redhat.com>
15502
15503 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15504 comment.
15505 * server.c (handle_v_cont): Extend comment.
15506
15507 2012-06-11 Yao Qi <yao@codesourcery.com>
15508
15509 * linux-low.c (linux_attach): Add 'static'.
15510
15511 2012-06-06 Yao Qi <yao@codesourcery.com>
15512
15513 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15514
15515 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15516
15517 Fix gcc -flto compilation warning.
15518 * server.c (main): Make variable multi_mode and attach volatile.
15519
15520 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15521
15522 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15523 if the platform doesn't know about it.
15524
15525 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15526
15527 * Makefile.in (SFILES): Add linux-tile-low.c.
15528 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15529 * configure.srv: Handle tilegx-*-linux*.
15530 * linux-tile-low.c: New file.
15531
15532 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15533
15534 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15535
15536 2012-05-24 Pedro Alves <palves@redhat.com>
15537
15538 PR gdb/7205
15539
15540 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15541
15542 2012-05-24 Pedro Alves <palves@redhat.com>
15543
15544 PR gdb/7205
15545
15546 Replace target_signal with gdb_signal throughout.
15547
15548 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15549
15550 * linux-low.c (linux_store_registers): Avoid the copying sequence
15551 when no data has been retrieved by ptrace.
15552
15553 2012-05-22 Will Deacon <will.deacon@arm.com>
15554
15555 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15556 Include asm/ptrace.h.
15557 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15558 already defined.
15559
15560 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15561
15562 * linux-low.c (linux_store_registers): Don't re-retrieve data
15563 with ptrace that has already been obtained from /proc. Always
15564 copy any data retrieved with ptrace to the buffer supplied.
15565
15566 2012-05-11 Yao Qi <yao@codesourcery.com>
15567 Pedro Alves <palves@redhat.com>
15568
15569 * linux-low.c (enum stopping_threads_kind): New.
15570 (stopping_threads): Change type to `enum stopping_threads_kind'.
15571 (handle_extended_wait): If stopping and suspending threads, leave
15572 the new_lwp suspended too.
15573 (linux_wait_for_event): Adjust.
15574 (stop_all_lwps): Set `stopping_threads' to
15575 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15576 whether we're suspending threads or just stopping them. Assert no
15577 recursion happens.
15578
15579 2012-04-29 Yao Qi <yao@codesourcery.com>
15580
15581 * server.h: Move some code to ...
15582 * gdbthread.h: ... here. New.
15583 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15584 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15585 (nto-low.o, win32-low.o): Likewise.
15586 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15587 * regcache.c, remote-utils.c, server.c: Likewise.
15588 * target.c, tracepoint.c, win32-low.c: Likewise.
15589
15590 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15591
15592 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15593 (PTRACE_ARG4_TYPE): Likewise.
15594 (PTRACE_XFER_TYPE): Likewise.
15595 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15596 ptrace to PTRACE_ARG3_TYPE.
15597 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15598 (PTRACE_ARG4_TYPE): Likewise.
15599 (PTRACE_XFER_TYPE): Likewise.
15600 (linux_detach_one_lwp): Cast fourth argument of
15601 ptrace to long then PTRACE_ARG4_TYPE.
15602 (regsets_fetch_inferior_registers): Cast third argument of
15603 ptrace to long then PTRACE_ARG3_TYPE.
15604 (regsets_store_inferior_registers): Likewise.
15605
15606 2012-04-20 Pedro Alves <palves@redhat.com>
15607
15608 * configure: Regenerate.
15609
15610 2012-04-19 Pedro Alves <palves@redhat.com>
15611
15612 * Makefile.in (GNULIB_BUILDDIR): New.
15613 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15614 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15615 (all, install-only, uninstall, clean-info, all-lib, clean): No
15616 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15617 (maintainer-clean realclean distclean): Use subdir_do.
15618 (subdir_do): New.
15619 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15620 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15621 * acinclude.m4: Include acx_configure_dir.m4.
15622 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15623 calls. Call AC_PROG_RANLIB. Configure gnulib using
15624 ACX_CONFIGURE_DIR.
15625 (GNULIB): New.
15626 (GNULIB_STDINT_H): Adjust.
15627 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15628 * gdbreplay.c: Include build-gnulib/config.h.
15629 * server.h: Likewise.
15630 * aclocal.m4: Regenerate.
15631 * config.in: Regenerate.
15632 * configure: Regenerate.
15633
15634 2012-04-19 Pedro Alves <palves@redhat.com>
15635
15636 * Makefile.in (LIBGNU, INCGNU): Adjust.
15637 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15638 (all, install-only, uninstall, clean-info, all-lib, clean)
15639 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15640 * configure.ac: Adjust AC_OUTPUT output.
15641 * aclocal.m4: Regenerate.
15642 * configure: Regenerate.
15643
15644 2012-04-19 Pedro Alves <palves@redhat.com>
15645
15646 * Makefile.in (generated_files): New.
15647 (server_h): Remove the explicit dependency on config.h, and depend
15648 on $generated_files.
15649
15650 2012-04-19 Pedro Alves <palves@redhat.com>
15651
15652 * Makefile.in (INCGNU): Add -Ignulib.
15653
15654 2012-04-19 Pedro Alves <palves@redhat.com>
15655
15656 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15657 (INCGNU): ... this, and spell out -I here.
15658 (GNULIB_LIB): Rename to ...
15659 (LIBGNU): ... this.
15660 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15661
15662 2012-04-19 Pedro Alves <palves@redhat.com>
15663
15664 * config.in: Regenerate.
15665
15666 2012-04-19 Pedro Alves <palves@redhat.com>
15667
15668 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15669 * server.h (memmem): Remove declaration.
15670 * config.in: Regenerate.
15671 * configure: Regenerate.
15672
15673 2012-04-19 Yao Qi <yao@codesourcery.com>
15674
15675 * Makefile.in (SFILES): Add common/vec.c.
15676 (OBS): Add vec.o.
15677 (vec.o): New rule.
15678
15679 2012-04-19 Yao Qi <yao@codesourcery.com>
15680
15681 * remote-utils.c (prepare_resume_reply): Replace with macro
15682 target_core_of_thread.
15683 * server.c (handle_qxfer_threads_proper): Likewise.
15684 * target.h (traget_core_of_thread): New macro.
15685
15686 2012-04-18 Pedro Alves <palves@redhat.com>
15687
15688 * aclocal.m4: Regenerate.
15689 * configure: Regenerate.
15690
15691 2012-04-16 Yao Qi <yao@codesourcery.com>
15692
15693 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15694 duplicated on address.
15695
15696 2012-04-16 Yao Qi <yao@codesourcery.com>
15697
15698 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15699 (struct tracepoint_action_ops) <send>: New field.
15700 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15701 (agent_expr_send, x_tracepoint_action_send): New.
15702 (l_tracepoint_action_send): New.
15703 (cmd_qtdp): Download and install tracepoint
15704 according to `use_agent'.
15705 (run_inferior_command): Add one more parameter `len'.
15706 Update callers.
15707 (tracepoint_send_agent): New.
15708 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15709
15710 2012-04-16 Yao Qi <yao@codesourcery.com>
15711
15712 * tracepoint.c (download_tracepoints): Moved to ...
15713 (cmd_qtstart): ... here.
15714
15715 2012-04-14 Yao Qi <yao@codesourcery.com>
15716
15717 * tracepoint.c: Include inttypes.h.
15718 (struct collect_memory_action): Use sized types.
15719 (struct tracepoint): Likewise.
15720 (cmd_qtdp, stop_tracing): Update print specifiers.
15721 (cmd_qtp, response_tracepoint): Likewise.
15722 (collect_data_at_tracepoint): Likewise.
15723 (collect_data_at_step): Likewise.
15724
15725 2012-04-14 Yao Qi <yao@codesourcery.com>
15726
15727 Import gnulib module inttypes.
15728 * aclocal.m4, config.in, configure: Regenerated.
15729
15730 2012-04-14 Yao Qi <yao@codesourcery.com>
15731
15732 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15733 Makefile and config.status at last.
15734
15735 2012-04-13 Yao Qi <yao@codesourcery.com>
15736
15737 * tracepoint.c: Include stdint.h unconditionally.
15738
15739 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15740
15741 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15742 on BFD_HAVE_SYS_PROCFS_TYPE.
15743 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15744 * configure: Regenerate.
15745 * config.in: Likewise.
15746
15747 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15748
15749 * Makefile.in (clean): Also remove x32.c x32-linux.c
15750 x32-avx.c x32-avx-linux.c.
15751 (x32.o): New target.
15752 (x32.c): Likewise.
15753 (x32-linux.o): Likewise.
15754 (x32-linux.c): Likewise.
15755 (x32-avx.o): Likewise.
15756 (x32-avx.c): Likewise.
15757 (x32-avx-linux.o): Likewise.
15758 (x32-avx-linux.c): Likewise.
15759
15760 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15761 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15762 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15763 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15764 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15765 i386/x32-avx-linux.xml.
15766
15767 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15768 (init_registers_x32_avx_linux): Likwise.
15769 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15770 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15771
15772 2012-04-13 Pedro Alves <palves@redhat.com>
15773
15774 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15775 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15776 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15777 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15778 the sub-make.
15779
15780 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15781
15782 * linux-x86-low.c (compat_x32_clock_t): New.
15783 (compat_x32_siginfo_t): Likewise.
15784 (compat_x32_siginfo_from_siginfo): Likewise.
15785 (siginfo_from_compat_x32_siginfo): Likewise.
15786 (linux_is_elf64): Likewise.
15787 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15788 and siginfo_from_compat_x32_siginfo for x32.
15789 (x86_arch_setup): Set linux_is_elf64.
15790
15791 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15792
15793 PR gdb/13969
15794 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15795 e_machine field.
15796 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15797 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15798 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15799 compatible with process.
15800
15801 2012-04-12 Yao Qi <yao@codesourcery.com>
15802
15803 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15804 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15805 (install-only, install-info, clean): Handle sub dir gnulib.
15806 (all-lib, am--refresh): New targets.
15807 (memmem.o): Remove target.
15808 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15809 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15810 (AC_REPLACE_FUNCS): Remove memmem.
15811 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15812 (AC_OUTPUT): Generate Makefile in gnulib/.
15813 * aclocal.m4, config.in, configure: Regenerated.
15814
15815 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15816
15817 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15818
15819 2012-04-05 Pedro Alves <palves@redhat.com>
15820
15821 -Werror=strict-aliasing
15822
15823 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15824 pointer.
15825
15826 2012-04-04 Pedro Alves <palves@redhat.com>
15827
15828 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15829 (sparc_store_gregset_from_stack, sparc_store_gregset)
15830 (sparc_breakpoint_at): Fix formatting.
15831
15832 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15833
15834 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15835 are available.
15836 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15837 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15838 * config.in: Regenerate.
15839 * configure: Likewise.
15840
15841 2012-03-29 Pedro Alves <palves@redhat.com>
15842
15843 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15844 Correct ptrace arguments.
15845
15846 2012-03-28 Pedro Alves <palves@redhat.com>
15847
15848 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15849 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15850 (IA64_FR1_REGNUM): New defines.
15851 (ia64_fetch_register): New.
15852 (the_low_target): Install it.
15853 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15854 field.
15855 * linux-low.c (linux_fetch_registers): Try the
15856 the_low_target.fetch_register hook first.
15857
15858 * linux-arm-low.c (the_low_target): Adjust.
15859 * linux-bfin-low.c (the_low_target): Adjust.
15860 * linux-cris-low.c (the_low_target): Adjust.
15861 * linux-crisv32-low.c (the_low_target): Adjust.
15862 * linux-m32r-low.c (the_low_target): Adjust.
15863 * linux-m68k-low.c (the_low_target): Adjust.
15864 * linux-mips-low.c (the_low_target): Adjust.
15865 * linux-ppc-low.c (the_low_target): Adjust.
15866 * linux-s390-low.c (the_low_target): Adjust.
15867 * linux-sh-low.c (the_low_target): Adjust.
15868 * linux-sparc-low.c (the_low_target): Adjust.
15869 * linux-tic6x-low.c (the_low_target): Adjust.
15870 * linux-x86-low.c (the_low_target): Adjust.
15871 * linux-xtensa-low.c (the_low_target): Adjust.
15872
15873 2012-03-26 Pedro Alves <palves@redhat.com>
15874
15875 * server.c (handle_qxfer_libraries): Don't bail early if
15876 the_target->qxfer_libraries_svr4 is not NULL.
15877
15878 2012-03-26 Pedro Alves <palves@redhat.com>
15879
15880 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15881
15882 2012-03-23 Pedro Alves <palves@redhat.com>
15883
15884 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15885 "library-list-svr4" element's start tag when the the DSO list is
15886 empty.
15887
15888 2012-03-23 Pedro Alves <palves@redhat.com>
15889
15890 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15891 a variable whose type size is the same as the inferior's pointer
15892 size.
15893
15894 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15895
15896 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15897 struct siginfo.
15898 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15899 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15900 * linux-low.h: Include <signal.h>.
15901 (struct siginfo): Remove forward declaration.
15902 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15903 struct siginfo.
15904
15905 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15906
15907 * .gitignore: Ignore more files.
15908
15909 2012-03-19 Pedro Alves <palves@redhat.com>
15910 Jan Kratochvil <jan.kratochvil@redhat.com>
15911
15912 * server.c (cont_thread, general_thread): Add describing comments.
15913 (start_inferior): Clear `cont_thread'.
15914 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15915 of a process.
15916
15917 2012-03-15 Yao Qi <yao@codesourcery.com>
15918
15919 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15920 handling to ...
15921 (cmd_qtdp): ... here.
15922
15923 2012-03-15 Yao Qi <yao@codesourcery.com>
15924
15925 * tracepoint.c (struct tracepoint_action_ops): New.
15926 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15927 (m_tracepoint_action_download): New.
15928 (r_tracepoint_action_download): New.
15929 (x_tracepoint_action_download): New.
15930 (l_tracepoint_action_download): New.
15931 (add_tracepoint_action): Install `action->ops' according type.
15932 (download_tracepoint_1): Move code `download' function pointer
15933 of various tracepoint_action_ops.
15934
15935 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15936
15937 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15938 linux_ptrace_attach_warnings.
15939
15940 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15941
15942 * Makefile.in (linux-ptrace.o): New.
15943 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15944 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15945 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15946 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15947 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15948 of these targets.
15949 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15950
15951 2012-03-08 Yao Qi <yao@codesourcery.com>
15952 Pedro Alves <palves@redhat.com>
15953
15954 Fix PR server/13392.
15955 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15956 offset of JMP insn.
15957 * tracepoint.c (remove_tracepoint): New.
15958 (cmd_qtdp): Call remove_tracepoint when failed to install.
15959
15960 2012-03-07 Pedro Alves <palves@redhat.com>
15961
15962 * linux-low.c (get_detach_signal): New.
15963 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15964 Pass on pending signals to PTRACE_DETACH. Check the result of the
15965 ptrace call.
15966 * server.c (program_signals, program_signals_p): New.
15967 (handle_general_set): Handle QProgramSignals.
15968 * server.h (program_signals, program_signals_p): Declare.
15969
15970 2012-03-05 Pedro Alves <palves@redhat.com>
15971 Jan Kratochvil <jan.kratochvil@redhat.com>
15972
15973 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15974 New comment why.
15975
15976 2012-03-03 Yao Qi <yao@codesourcery.com>
15977
15978 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15979 agent_look_up_symbols.
15980
15981 2012-03-03 Yao Qi <yao@codesourcery.com>
15982
15983 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15984 (linux-x86-low.o): Likewise.
15985 * server.h: Remove in_process_agent_loaded.
15986 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15987 common/agent.c.
15988 Update callers.
15989
15990 2012-03-03 Yao Qi <yao@codesourcery.com>
15991
15992 * tracepoint.c (gdb_agent_capability): New global.
15993 (in_process_agent_loaded_ust): Renamed to
15994 `in_process_agent_supports_ust'.
15995 Update callers.
15996 (in_process_agent_supports_ust): Call agent_capability_check.
15997 (clear_installed_tracepoints): Assert that agent supports
15998 agent.
15999
16000 2012-03-03 Yao Qi <yao@codesourcery.com>
16001
16002 * linux-low.c (linux_supports_agent): New.
16003 (linux_target_ops): Initialize field `supports_agent' with
16004 linux_supports_agent.
16005 * target.h (struct target_ops) <supports_agent>: New.
16006 (target_supports_agent): New macro.
16007 * server.c (handle_general_set): Handle packet 'QAgent'.
16008 (handle_query): Send `QAgent+'.
16009 * Makefile.in (server.o): Depends on agent.h.
16010
16011 2012-03-03 Yao Qi <yao@codesourcery.com>
16012
16013 * Makefile.in (OBS): Add agent.o.
16014 Add new rule for agent.o.
16015 Track dependence of tracepoint.c on agent.h.
16016 * tracepoint.c (run_inferior_command_1):
16017 (run_inferior_command): Call agent_run_command.
16018 (gdb_ust_connect_sync_socket): Deleted. Move it to
16019 common/agent.c.
16020 (resume_thread, stop_thread): Likewise.
16021 (gdb_ust_socket_init): Renamed to ...
16022 (gdb_agent_socket_init): ... New.
16023 (gdb_ust_thread): Renamed to ...
16024 (gdb_agent_helper_thread): ... New.
16025 (gdb_ust_init): Move some code to ...
16026 (gdb_agent_init): ... here. New.
16027 [HAVE_UST]: Call gdb_ust_init.
16028 (initialize_tracepoint_ftlib): Call gdb_agent_init.
16029 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
16030 * config.in, configure: Regenerated.
16031
16032 2012-03-02 Pedro Alves <palves@redhat.com>
16033
16034 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
16035 * linux-low.c (struct simple_pid_list): New.
16036 (stopped_pids): New a struct simple_pid_list pointer.
16037 (add_to_pid_list, pull_pid_from_list): New.
16038 (handle_extended_wait): Don't assume the first signal new children
16039 report is SIGSTOP. Adjust call to pull_pid_from_list.
16040 (linux_wait_for_lwp): Adjust.
16041
16042 2012-03-02 Yao Qi <yao@codesourcery.com>
16043
16044 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
16045 debug log.
16046
16047 2012-03-02 Yao Qi <yao@codesourcery.com>
16048
16049 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
16050 `stop_pc' and `tpoint'. Update caller.
16051
16052 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
16053
16054 * linux-low.h (linux_target_ops): Add regset_bitmap member.
16055 * linux-low.c (use_linux_regsets): New macro.
16056 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
16057 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
16058 (linux_register_in_regsets): New function.
16059 (usr_fetch_inferior_registers): Skip registers covered by
16060 regsets.
16061 (usr_store_inferior_registers): Likewise.
16062 (usr_fetch_inferior_registers): New macro.
16063 (usr_store_inferior_registers): Likewise.
16064 (linux_fetch_registers): Handle mixed regset/non-regset targets.
16065 (linux_store_registers): Likewise.
16066 * linux-mips-low.c (init_registers_mips_dsp_linux): New
16067 prototype.
16068 (init_registers_mips64_dsp_linux): Likewise.
16069 (init_registers_mips_linux): New macro.
16070 (init_registers_mips_dsp_linux): Likewise.
16071 (mips_dsp_num_regs): Likewise.
16072 (DSP_BASE, DSP_CONTROL): New fallback macros.
16073 (mips_base_regs): New macro.
16074 (mips_regmap): Use it. Fix the size.
16075 (mips_dsp_regmap): New variable.
16076 (mips_dsp_regset_bitmap): Likewise.
16077 (mips_arch_setup): New function.
16078 (mips_cannot_fetch_register): Use the_low_target.regmap rather
16079 than mips_regmap.
16080 (mips_cannot_store_register): Likewise.
16081 (the_low_target): Update .arch_setup, .num_regs and .regmap
16082 initializers. Add .regset_bitmap initializer.
16083 * linux-arm-low.c (the_low_target): Add .regset_bitmap
16084 initializer.
16085 * linux-bfin-low.c (the_low_target): Likewise.
16086 * linux-cris-low.c (the_low_target): Likewise.
16087 * linux-crisv32-low.c (the_low_target): Likewise.
16088 * linux-ia64-low.c (the_low_target): Likewise.
16089 * linux-m32r-low.c (the_low_target): Likewise.
16090 * linux-m68k-low.c (the_low_target): Likewise.
16091 * linux-ppc-low.c (the_low_target): Likewise.
16092 * linux-s390-low.c (the_low_target): Likewise.
16093 * linux-sh-low.c (the_low_target): Likewise.
16094 * linux-sparc-low.c (the_low_target): Likewise.
16095 * linux-tic6x-low.c (the_low_target): Likewise.
16096 * linux-x86-low.c (the_low_target): Likewise.
16097 * linux-xtensa-low.c (the_low_target): Likewise.
16098 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
16099 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
16100 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
16101 srv_xmlfiles.
16102 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
16103 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
16104
16105 2012-02-29 Yao Qi <yao@codesourcery.com>
16106 Pedro Alves <palves@redhat.com>
16107
16108 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
16109 `step_over_finished' is true.
16110
16111 2012-02-27 Pedro Alves <palves@redhat.com>
16112
16113 * linux-low.c (pid_is_stopped): Delete, moved to common/.
16114 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
16115
16116 2012-02-27 Pedro Alves <palves@redhat.com>
16117
16118 PR server/9684
16119 * linux-low.c (pid_is_stopped): New.
16120 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
16121
16122 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
16123
16124 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
16125 of conditions.
16126
16127 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
16128
16129 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
16130
16131 2012-02-24 Luis Machado <lgustavo@codesourcery>
16132
16133 * server.c (handle_query): Advertise support for target-side
16134 breakpoint condition evaluation.
16135 (process_point_options): New function.
16136 (process_serial_event): When inserting a breakpoint, check for
16137 a target-side condition that should be evaluated.
16138
16139 * mem-break.c: Include regcache.h and ax.h.
16140 (point_cond_list_t): New data structure.
16141 (breakpoint) <cond_list>: New field.
16142 (find_gdb_breakpoint_at): Make non-static.
16143 (delete_gdb_breakpoint_at): Clear any target-side
16144 conditions.
16145 (clear_gdb_breakpoint_conditions): New function.
16146 (add_condition_to_breakpoint): Likewise.
16147 (add_breakpoint_condition): Likewise.
16148 (gdb_condition_true_at_breakpoint): Likewise.
16149 (gdb_breakpoint_here): Return result directly instead
16150 of going through a local variable.
16151
16152 * mem-break.h (find_gdb_breakpoint_at): New prototype.
16153 (clear_gdb_breakpoint_conditions): Likewise.
16154 (add_breakpoint_condition): Likewise.
16155 (gdb_condition_true_at_breakpoint): Likewise.
16156
16157 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
16158 (need_step_over_p): Take target-side breakpoint condition into
16159 consideration.
16160
16161 2012-02-24 Luis Machado <lgustavo@codesourcery>
16162
16163 * server.h: Include tracepoint.h.
16164 (agent_mem_read, agent_get_trace_state_variable_value,
16165 agent_set_trace_state_variable_value,
16166 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
16167 get_set_tsv_func_addr): New prototypes.
16168
16169 * ax.h: New include file.
16170 * ax.c: New source file.
16171
16172 * tracepoint.c: Include ax.h.
16173 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
16174 agent_expr, eval_result_type): Move to ax.h.
16175 (parse_agent_expr): Rename to ...
16176 (gdb_parse_agent_expr): ... this, make it non-static and move
16177 to ax.h.
16178 (unparse_agent_expr) Rename to ...
16179 (gdb_unparse_agent_expr): ... this, make it non-static and move
16180 to ax.h.
16181 (eval_agent_expr): Rename to ...
16182 (eval_tracepoint_agent_expr): ... this.
16183 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
16184 forward declarations.
16185 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
16186 (agent_get_trace_state_variable_value): New function.
16187 (agent_set_trace_state_variable_value): New function.
16188 (cmd_qtdp): Call gdb_parse_agent_expr (...).
16189 (response_tracepoint): Call gdb_unparse_agent_expr (...).
16190 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
16191 (condition_true_at_tracepoint): Likewise.
16192 (parse_agent_expr): Rename to ...
16193 (gdb_parse_agent_expr): ... this and move to ax.c.
16194 (unparse_agent_expr): Rename to ...
16195 (gdb_unparse_agent_expr): ... this and move to ax.c.
16196 (gdb_agent_op_name): Move to ax.c.
16197 (eval_agent_expr): Rename to ...
16198 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
16199 and move to ax.c.
16200 (eval_tracepoint_agent_expr): New function.
16201 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
16202 non-static.
16203 (current_insn_ptr, emit_error, struct bytecode_address): Move to
16204 ax.c.
16205 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
16206 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
16207 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
16208 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
16209 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
16210 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
16211 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
16212 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
16213 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
16214 (compile_bytecodes): Remove forward declaration.
16215 (is_goto_target): Move to ax.c.
16216 (compile_bytecodes): Move to ax.c and call
16217 agent_get_trace_state_variable_value (...) and
16218 agent_set_trace_state_variable_value (...).
16219
16220 * Makefile.in: Update ax.c and IPA dependencies.
16221
16222 2012-02-24 Pedro Alves <palves@redhat.com>
16223
16224 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
16225 (cmd_bigqtbuffer_circular): ... this. Only handle
16226 'QTBuffer:circular:'.
16227 (handle_tracepoint_general_set): Adjust.
16228
16229 2012-02-16 Yao Qi <yao@codesourcery.com>
16230
16231 * inferiors.c: Move code to ...
16232 * dll.c: .... here. New.
16233 * server.h: Declare clear_dlls.
16234 * Makefile.in (SFILES): Add dll.c.
16235 (OBS): Add dll.o
16236 (dll.o): New rule.
16237
16238 2012-02-11 Yao Qi <yao@codesourcery.com>
16239
16240 * server.c: (handle_monitor_command): Add a new parameter
16241 `own_buf'.
16242 (handle_query): Update caller.
16243
16244 2012-02-09 Joel Brobecker <brobecker@adacore.com>
16245
16246 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
16247 * configure, config.in: Regenerate.
16248 * hostio.c: Provide an alternate implementation if HAVE_READLINK
16249 is not defined.
16250
16251 2012-02-02 Pedro Alves <palves@redhat.com>
16252
16253 Try SIGKILL first, then PTRACE_KILL.
16254 * linux-low.c (linux_kill_one_lwp): New.
16255 (linux_kill_one_lwp): Rename to ...
16256 (kill_one_lwp_callback): ... this. Use the new
16257 linux_kill_one_lwp.
16258
16259 2012-02-02 Pedro Alves <palves@redhat.com>
16260
16261 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
16262 inferior.
16263
16264 2012-01-27 Pedro Alves <palves@redhat.com>
16265
16266 * linux-low.c (linux_child_pid_to_exec_file): Delete.
16267 (elf_64_file_p): Make static.
16268 (linux_pid_exe_is_elf_64_file): New.
16269 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
16270 Delete declarations.
16271 (linux_pid_exe_is_elf_64_file): Declare.
16272 * linux-x86-low.c (x86_arch_setup): Use
16273 linux_pid_exe_is_elf_64_file.
16274
16275 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16276
16277 * linux-low.c (linux_wait_for_event_1): Rename to ...
16278 (linux_wait_for_event): ... here and merge it with former
16279 linux_wait_for_event - new variable wait_ptid, use it.
16280 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
16281
16282 2012-01-23 Pedro Alves <palves@redhat.com>
16283
16284 * server.c (main): Avoid yet another case of infinite loop while
16285 detaching/killing after a longjmp.
16286
16287 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16288
16289 Code cleanup.
16290 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
16291
16292 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
16293
16294 * hostio.c (handle_readlink): New function.
16295 (handle_vFile): Call it to handle "vFile:readlink" packets.
16296
16297 2012-01-20 Pedro Alves <palves@redhat.com>
16298 Ulrich Weigand <ulrich.weigand@linaro.org>
16299
16300 * server.c (handle_v_requests): Only support vAttach and vRun to
16301 start multiple processes when in extended protocol mode.
16302
16303 2012-01-17 Pedro Alves <palves@redhat.com>
16304
16305 * tracepoint.c (initialize_tracepoint): Use mmap instead of
16306 memalign plus mprotect to allocate the scratch buffer.
16307
16308 2012-01-13 Pedro Alves <palves@redhat.com>
16309
16310 * server.c (attach_inferior): Clear `cont_thread'.
16311
16312 2012-01-13 Pedro Alves <palves@redhat.com>
16313
16314 * server.c (main): Avoid infinite loop while detaching/killing
16315 after a longjmp.
16316
16317 2012-01-09 Doug Evans <dje@google.com>
16318
16319 * server.c (start_inferior): Set last_ptid in --wrapper case.
16320
16321 2012-01-06 Yao Qi <yao@codesourcery.com>
16322
16323 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
16324 defined.
16325 [IN_PROCESS_AGENT] (debug_agent): New global variable.
16326
16327 2012-01-04 Yao Qi <yao@codesourcery.com>
16328
16329 * tracepoint.c (cmd_qtdp): Print debug message
16330 for static tracepoint.
16331
16332 2012-01-04 Yao Qi <yao@codesourcery.com>
16333
16334 * tracepoint.c (trace_vdebug): Differentiate debug message
16335 between gdbserver and IPA.
16336
16337 2012-01-03 Yao Qi <yao@codesourcery.com>
16338
16339 * tracepoint.c (tracepoint_was_hit): Don't collect for
16340 static tracepoint.
16341
16342 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16343
16344 * terminal.h: Reformat copyright header.
16345
16346 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16347
16348 * server.c (gdbserver_version): Update copyright year.
16349 * gdbreplay.c (gdbreplay_version): Likewise.
16350
16351 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16352
16353 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16354
16355 Revert:
16356 2011-12-18 Hui Zhu <teawater@gmail.com>
16357 * linux-low.c (linux_create_inferior): Save return value to ret.
16358
16359 2011-12-18 Hui Zhu <teawater@gmail.com>
16360
16361 * linux-low.c (linux_create_inferior): Save return value to ret.
16362
16363 2011-12-16 Doug Evans <dje@google.com>
16364
16365 * linux-low.c (linux_create_inferior): If stdio connection,
16366 redirect stdin from /dev/null, stdout to stderr.
16367 * remote-utils.c (remote_is_stdio): New static global.
16368 (remote_connection_is_stdio): New function.
16369 (remote_prepare): Handle stdio connection.
16370 (remote_open): Ditto.
16371 (remote_close): Don't close stdin for stdio connections.
16372 (read_prim,write_prim): New functions. Replace all calls to
16373 read/write to these.
16374 * server.c (main): Watch for "-" argument. Move call to
16375 remote_prepare before start_inferior.
16376 * server.h (STDIO_CONNECTION_NAME): New macro.
16377 (remote_connection_is_stdio): Declare.
16378
16379 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16380 in debugging output.
16381
16382 2011-12-15 Yao Qi <yao@codesourcery.com>
16383
16384 * tracepoint.c: Include sys/syscall.h.
16385 (gdb_ust_thread): Remove preprocessor conditional.
16386
16387 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16388
16389 * linux-low.c (linux_detach_one_lwp): Call
16390 the_low_target.prepare_to_resume before detaching.
16391
16392 2011-12-14 Yao Qi <yao@codesourcery.com>
16393
16394 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16395 of write.
16396
16397 2011-12-14 Yao Qi <yao@codesourcery.com>
16398
16399 * i386-low.c (i386_low_stopped_data_address): Initialize local
16400 variable `control'.
16401
16402 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16403
16404 PR remote/13492
16405
16406 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16407 DR_CONTROL unless necessary. Extend comments.
16408 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16409 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16410
16411 2011-12-13 Yao Qi <yao@codesourcery.com>
16412
16413 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16414 macros.
16415 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16416
16417 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16418
16419 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16420 Print new debug message for such case.
16421
16422 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16423
16424 Fix overlapping memcpy.
16425 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16426 the read_inferior_memory transfer.
16427 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16428 write_inferior_memory transfer.
16429 (set_fast_tracepoint_jump): New variable buf. Use it for the
16430 read_inferior_memory and write_inferior_memory transfers.
16431 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16432 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16433 Use it for the write_inferior_memory transfer.
16434 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16435 buffers.
16436
16437 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16438
16439 * linux-low.c (fetch_register, store_register): Make code
16440 consistent, fix formatting.
16441
16442 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16443
16444 * linux-low.c (usr_store_inferior_registers): Factor out code
16445 to handle individual registers into...
16446 (store_register): ... this new function.
16447
16448 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16449
16450 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16451 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16452 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16453 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16454 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16455 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16456 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16457 (srv_xmlfiles): Add new XML files.
16458
16459 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16460 and <sys/uio.h>.
16461 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16462 (init_registers_s390_linux32v1): Add prototype.
16463 (init_registers_s390_linux32v2): Likewise.
16464 (init_registers_s390_linux64v1): Likewise.
16465 (init_registers_s390_linux64v2): Likewise.
16466 (init_registers_s390x_linux64v1): Likewise.
16467 (init_registers_s390x_linux64v2): Likewise.
16468 (s390_num_regs): Increment to 52.
16469 (s390_regmap): Add orig_r2 register.
16470 (s390_num_regs_3264): Increment to 68.
16471 (s390_regmap_3264): Add orig_r2 register.
16472 (s390_collect_ptrace_register): Handle orig_r2 register.
16473 (s390_supply_ptrace_register): Likewise.
16474 (s390_fill_last_break): New function.
16475 (s390_store_last_break): Likewise.
16476 (s390_fill_system_call): New function.
16477 (s390_store_system_call): Likewise.
16478 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16479 register sets.
16480 (s390_check_regset): New function.
16481 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16482 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16483 Update target_regsets for available register sets.
16484
16485 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16486 Jan Kratochvil <jan.kratochvil@redhat.com>
16487
16488 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16489 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16490 New.
16491 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16492 * linux-low.h (struct process_info_private): New member r_debug.
16493 * server.c (handle_qxfer_libraries): Call
16494 the_target->qxfer_libraries_svr4.
16495 (handle_qxfer_libraries_svr4): New function.
16496 (qxfer_packets): New entry "libraries-svr4".
16497 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16498 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16499 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16500 PACKET_qXfer_libraries_svr4.
16501
16502 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16503
16504 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16505 PSW address/mask between 8-byte and 16-byte formats.
16506 (s390_supply_ptrace_register): Likewise.
16507 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16508 basic addressing mode bit.
16509
16510 2011-11-24 Stan Shebs <stan@codesourcery.com>
16511
16512 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16513
16514 2011-11-17 Stan Shebs <stan@codesourcery.com>
16515
16516 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16517 (tracing_start_time): New global.
16518 (tracing_stop_time): New global.
16519 (tracing_user_name): New global.
16520 (tracing_notes): New global.
16521 (tracing_stop_note): New global.
16522 (cmd_qtstart): Set traceframe_usage, start_time.
16523 (stop_tracing): Set stop_time.
16524 (cmd_qtstatus): Report additional status.
16525 (cmd_qtp): New function.
16526 (handle_tracepoint_query): Call it.
16527 (cmd_qtnotes): New function.
16528 (handle_tracepoint_general_set): Call it.
16529 (get_timestamp): Rename from tsv_get_timestamp.
16530
16531 2011-11-14 Stan Shebs <stan@codesourcery.com>
16532 Kwok Cheung Yeung <kcy@codesourcery.com>
16533
16534 * linux-x86-low.c (small_jump_insn): New.
16535 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16536 trampoline and error message, build a trampoline and issue a small
16537 jump instruction to it.
16538 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16539 trampoline and error message.
16540 (x86_get_min_fast_tracepoint_insn_len): New.
16541 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16542 * linux-low.h (struct linux_target_ops): Add arguments to
16543 install_fast_tracepoint_jump_pad operation, add new operation.
16544 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16545 arguments.
16546 (linux_get_min_fast_tracepoint_insn_len): New function.
16547 (linux_target_op): Add new operation.
16548 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16549 (gdb_trampoline_buffer_end): Ditto.
16550 (gdb_trampoline_buffer_error): Ditto.
16551 (struct ipa_sym_addresses): Add fields for new IPA variables.
16552 (symbol_list): Add entries for new IPA variables.
16553 (struct tracepoint): Add fields to hold the address range of the
16554 trampoline used by the tracepoint.
16555 (trampoline_buffer_head): New static variable.
16556 (trampoline_buffer_tail): Ditto.
16557 (claim_trampoline_space): New function.
16558 (have_fast_tracepoint_trampoline_buffer): New function.
16559 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16560 structure.
16561 (install_fast_tracepoint): Ditto, also add error buffer argument.
16562 (cmd_qtminftpilen): New function.
16563 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16564 (fast_tracepoint_from_trampoline_address): New function.
16565 (fast_tracepoint_collecting): Handle trampoline as part of jump
16566 pad space.
16567 (set_trampoline_buffer_space): New function.
16568 (initialize_tracepoint): Initialize new IPA variables.
16569 * target.h (struct target_ops): Add arguments to
16570 install_fast_tracepoint_jump_pad operation, add new
16571 get_min_fast_tracepoint_insn_len operation.
16572 (target_get_min_fast_tracepoint_insn_len): New.
16573 (install_fast_tracepoint_jump_pad): Add arguments.
16574 * server.h (IPA_BUFSIZ): Define.
16575 * linux-i386-ipa.c: Include extra header files.
16576 (initialize_fast_tracepoint_trampoline_buffer): New function.
16577 (initialize_low_tracepoint): Call it.
16578 * server.h (set_trampoline_buffer_space): Declare.
16579 (claim_trampoline_space): Ditto.
16580 (have_fast_tracepoint_trampoline_buffer): Ditto.
16581
16582 2011-11-14 Yao Qi <yao@codesourcery.com>
16583
16584 * server.c (handle_query): Handle InstallInTrace for qSupported.
16585 * tracepoint.c (add_tracepoint): Sort list.
16586 (install_tracepoint, download_tracepoint): New.
16587 (cmd_qtdp): Call them to install and download tracepoints.
16588 (sort_tracepoints): Removed.
16589 (cmd_qtstart): Update.
16590
16591 2011-11-14 Yao Qi <yao@codesourcery.com>
16592
16593 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16594 * mem-break.h: Declare.
16595 * tracepoint.c (cmd_qtstart): Move some code to ...
16596 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16597 New.
16598 (download_tracepoints): Move some code to ...
16599 (download_tracepoint_1): ... here. New.
16600
16601 2011-11-08 Yao Qi <yao@codesourcery.com>
16602
16603 * remote-utils.c (relocate_instruction): A comment fix.
16604
16605 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16606
16607 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16608 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16609 dr_status_mirror and dr_control_mirror from debug_reg_state.
16610 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16611 (i386_initial_stuff): Remove use of deleted globals.
16612 (i386_get_thread_context, i386_set_thread_context,
16613 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16614 from debug_reg_state.
16615
16616 2011-11-05 Yao Qi <yao@codesourcery.com>
16617
16618 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16619 address as TPOINT's.
16620
16621 2011-11-02 Stan Shebs <stan@codesourcery.com>
16622
16623 * tracepoint.c (agent_mem_read_string): New function.
16624 (eval_agent_expr): Call it for tracenz.
16625 * server.c (handle_query): Report support for tracenz.
16626
16627 2011-11-02 Yao Qi <yao@codesourcery.com>
16628
16629 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16630
16631 2011-11-02 Yao Qi <yao@codesourcery.com>
16632
16633 * target.h: Fix a typo in comment.
16634
16635 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16636
16637 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16638 clobber the breakpoints' shadows with fast tracepoint jumps.
16639 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16640 * target.c (write_inferior_memory): Also pass MYADDR down to
16641 check_mem_write.
16642
16643 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16644
16645 * configure.ac: Check support for personality routine.
16646 * configure: Regenerate.
16647 * config.in: Likewise.
16648 * linux-low.c: Include <sys/personality.h>.
16649 Define ADDR_NO_RANDOMIZE if necessary.
16650 (linux_create_inferior): Disable address space randomization when
16651 forking inferior, if requested.
16652 (linux_supports_disable_randomization): New function.
16653 (linux_target_ops): Install it.
16654 * server.h (disable_randomization): Declare.
16655 * server.c (disable_randomization): New global variable.
16656 (handle_general_set): Handle QDisableRandomization.
16657 (handle_query): Likewise for qSupported.
16658 (main): Support --disable-randomization and --no-disable-randomization
16659 command line arguments.
16660 * target.h (struct target_ops): Add supports_disable_randomization.
16661 (target_supports_disable_randomization): New macro.
16662
16663 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16664
16665 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16666 ifdef check.
16667 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16668 [!PT_GETDSBT] (target_loadmap): New definition.
16669 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16670 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16671 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16672 and PT_GETDSBT to LINUX_LOADMAP.
16673 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16674 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16675
16676 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16677
16678 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16679 (arm_linux_hwbp_cap): New static variable.
16680 (arm_linux_get_hwbp_cap): Replace by ...
16681 (arm_linux_init_hwbp_cap): ... this new function.
16682 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16683 (arm_linux_get_hw_watchpoint_count): Likewise.
16684 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16685 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16686 (arm_prepare_to_resume): Use perror_with_name instead of error.
16687
16688 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16689
16690 * linux-arm-low.c: Include <signal.h>.
16691 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16692 (struct arm_linux_hwbp_cap): New data type.
16693 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16694 (struct arm_linux_hw_breakpoint): New data type.
16695 (MAX_BPTS, MAX_WPTS): Define.
16696 (struct arch_process_info, struct arch_lwp_info): New data types.
16697 (arm_linux_get_hwbp_cap): New function.
16698 (arm_linux_get_hw_breakpoint_count): Likewise.
16699 (arm_linux_get_hw_watchpoint_count): Likewise.
16700 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16701 (arm_hwbp_control_initialize): Likewise.
16702 (arm_hwbp_control_is_enabled): Likewise.
16703 (arm_hwbp_control_is_initialized): Likewise.
16704 (arm_hwbp_control_disable): Likewise.
16705 (arm_linux_hw_breakpoint_equal): Likewise.
16706 (arm_linux_hw_point_initialize): Likewise.
16707 (struct update_registers_data): New data structure.
16708 (update_registers_callback: New function.
16709 (arm_insert_point): Likewise.
16710 (arm_remove_point): Likewise.
16711 (arm_stopped_by_watchpoint): Likewise.
16712 (arm_stopped_data_address): Likewise.
16713 (arm_new_process): Likewise.
16714 (arm_new_thread): Likewise.
16715 (arm_prepare_to_resume): Likewise.
16716 (the_low_target): Register arm_insert_point, arm_remove_point,
16717 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16718 arm_new_thread, and arm_prepare_to_resume.
16719
16720 2011-09-15 Stan Shebs <stan@codesourcery.com>
16721
16722 * server.h (struct emit_ops): Add compare-goto fields.
16723 * tracepoint.c (gdb_agent_op_sizes): New table.
16724 (emit_eq_goto): New function.
16725 (emit_ne_goto): New function.
16726 (emit_lt_goto): New function.
16727 (emit_le_goto): New function.
16728 (emit_gt_goto): New function.
16729 (emit_ge_goto): New function.
16730 (is_goto_target): New function.
16731 (compile_bytecodes): Recognize special cases of compare-goto
16732 combinations and call specialized emitters for them.
16733 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16734 (amd64_emit_ne_goto): New function.
16735 (amd64_emit_lt_goto): New function.
16736 (amd64_emit_le_goto): New function.
16737 (amd64_emit_gt_goto): New function.
16738 (amd64_emit_ge_goto): New function.
16739 (amd64_emit_ops): Add the new functions.
16740 (i386_emit_eq_goto): New function.
16741 (i386_emit_ne_goto): New function.
16742 (i386_emit_lt_goto): New function.
16743 (i386_emit_le_goto): New function.
16744 (i386_emit_gt_goto): New function.
16745 (i386_emit_ge_goto): New function.
16746 (i386_emit_ops): Add the new functions.
16747
16748 2011-09-08 Stan Shebs <stan@codesourcery.com>
16749
16750 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16751 (i386_emit_epilogue): Restore %ebx.
16752
16753 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16754
16755 * server.c (step_thread): Remove definition.
16756 (process_serial_event): Don't handle Hs.
16757 * server.h (step_thread): Remove declaration.
16758 * target.c (set_desired_inferior): Remove use of step_thread.
16759
16760 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16761
16762 * linux-low.c: Include linux-procfs.h.
16763 (linux_attach_lwp_1): Update comments.
16764 (linux_attach): Scan for existing threads when attaching to a
16765 process that is the tgid.
16766 * Makefile.in: Update dependencies.
16767
16768 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16769
16770 * configure.srv: Add linux-procfs.o dependencies.
16771
16772 2011-08-14 Yao Qi <yao@codesourcery.com>
16773
16774 * target.h (struct target_ops): Fix indent.
16775 * win32-low.c (win32_target_ops): Fix comment.
16776
16777 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16778 Yao Qi <yao@codesourcery.com>
16779
16780 * Makefile.in (clean): Remove tic6x-*.c files.
16781 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16782 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16783 (tic6x-c64xp-linux.c): Likewise.
16784 * configure.srv: Add support for tic6x-*-uclinux.
16785 * linux-tic6x-low.c: New.
16786 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16787
16788 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16789 Yao Qi <yao@codesourcery.com>
16790
16791 * target.h (struct target_ops): Add read_loadmap.
16792 * linux-low.c (struct target_loadseg): New type.
16793 (struct target_loadmap): New type.
16794 (linux_read_loadmap): New function.
16795 (linux_target_ops): Add linux_read_loadmap.
16796 * server.c (handle_query): Support qXfer:fdpic:read packet.
16797 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16798 to NULL.
16799
16800 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16801
16802 * win32-low.c: Include <stdint.h>.
16803
16804 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16805
16806 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16807 to the inferior here.
16808 (i386_remove_aligned_watchpoint): Ditto.
16809 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16810 fit part of the watchpoint in the debug registers.
16811 (i386_update_inferior_debug_regs): New.
16812 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16813 registers, and only update the inferior on success.
16814 (i386_low_remove_watchpoint): Ditto.
16815
16816 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16817
16818 * linux-low.c (compare_ints, unique, list_threads, show_process,
16819 linux_core_of_thread): Delete.
16820 (linux_target_ops): Change linux_core_of_thread to
16821 linux_common_core_of_thread.
16822 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16823 * utils.c (malloc_failure): Change type of argument.
16824 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16825 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16826 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16827 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16828 (IPA_OBJS): Add common-utils-ipa.o.
16829 (ptid_h, linux_osdata_h): New macros.
16830 (server_h): Add common/common-utils.h, common/xml-utils.h,
16831 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16832 common/ptid.h.
16833 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16834 ptid.o, buffer.o): New rules.
16835 (linux-low.o): Add common/linux-osdata.h as a dependency.
16836 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16837 * configure.ac: Add AC_HEADER_DIRENT check.
16838 * config.in: Regenerate.
16839 * configure: Regenerate.
16840 * remote-utils.c (xml_escape_text): Delete.
16841 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16842 buffer_xml_printf): Move to common/buffer.c.
16843 * server.c (main): Remove call to initialize_inferiors.
16844 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16845 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16846 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16847 internal_error, gdb_assert, gdb_assert_fail): Delete.
16848 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16849 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16850 common/buffer.h.
16851 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16852 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16853 initialize_inferiors): Delete.
16854
16855 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16856
16857 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16858 symbol error.
16859
16860 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16861
16862 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16863 assertion.
16864 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16865
16866 2011-05-26 Yao Qi <yao@codesourcery.com>
16867
16868 * Makefile.in (thread-db.o): Track dependence to
16869 common/gdb_thread_db.h.
16870 * thread-db.c: include gdb_thread_db.h from right place.
16871
16872 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16873
16874 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16875 __FILE__ and __LINE__ to internal_error.
16876
16877 2011-05-13 Doug Evans <dje@google.com>
16878
16879 * thread-db.c (try_thread_db_load_from_sdir): New function.
16880 (try_thread_db_load_from_dir): New function.
16881 (thread_db_load_search): Handle $sdir, ignore $pdir.
16882 Remove trying of system directories if search of
16883 libthread-db-search-path fails, that is now done via $sdir.
16884
16885 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16886
16887 * server.c (handle_query): Add EnableDisableTracepoints to the list
16888 of supported features.
16889 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16890 tracepoints.
16891 (cmd_qtenable_disable): New.
16892 (cmd_qtstart): Install tracepoints even if disabled.
16893 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16894 receiving a QTEnable or QTDisable packet.
16895 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16896 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16897 tracepoints.
16898 (gdb_probe): Skip data collection if static tracepoint is disabled.
16899
16900 2011-05-10 Doug Evans <dje@google.com>
16901
16902 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16903
16904 2011-05-04 Doug Evans <dje@google.com>
16905
16906 * linux-low.c (linux_join): Skip process lookup.
16907 * spu-low.c (spu_join): Ditto.
16908 * server.c (join_inferiors_callback): Delete.
16909 (process_serial_event): For 'D' packet (detach) call join_inferior
16910 directly.
16911
16912 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16913
16914 * README: Don't mention xscale*-*-linux*.
16915 * configure.srv (xscale*-*-linux*): Don't handle target.
16916
16917 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16918
16919 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16920 casting pointers.
16921 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16922 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16923 (i386_emit_void_call_2): Likewise.
16924
16925 2011-04-26 Yao Qi <yao@codesourcery.com>
16926
16927 * linux-low.c: Move common macros to linux-ptrace.h.
16928 Include linux-ptrace.h.
16929 * Makefile.in (linux_ptrace_h): New.
16930 (linux-low.o): Depends on linux-ptrace.h.
16931
16932 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16933
16934 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16935 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16936 (remote_prepare): New function with most of the TCP code from ...
16937 (remote_open): ... here. Detect PORT here unconditionally. Move also
16938 setting transport_is_reliable.
16939 * server.c (run_once): New variable.
16940 (gdbserver_usage): Document it.
16941 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16942 the first run if RUN_ONCE.
16943 * server.h (run_once, remote_prepare): New declarations.
16944
16945 2011-04-19 Tom Tromey <tromey@redhat.com>
16946
16947 * win32-low.c (handle_load_dll): Remove duplicate "the".
16948
16949 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16950
16951 Remove support for old Cygwin 1.5 versions.
16952 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16953 function to avoid warning.
16954 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16955 warning.
16956
16957 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16958
16959 * gdbserver/server.h (Macro _): Define it if not available.
16960
16961 2011-03-14 Michael Snyder <msnyder@vmware.com>
16962
16963 * hostio.c (handle_close): Remove unnecessary null test.
16964
16965 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16966
16967 * Makefile.in (maintainer-clean realclean distclean): Remove
16968 "make ... subdir_do" command.
16969
16970 2011-03-10 Michael Snyder <msnyder@vmware.com>
16971
16972 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16973
16974 * server.c (handle_v_run): Free alloced buffer on early return.
16975
16976 2011-03-09 Yao Qi <yao@codesourcery.com>
16977
16978 Revert:
16979 2011-03-04 Yao Qi <yao@codesourcery.com>
16980
16981 * Makefile.in: Remove GNU make feature --directory.
16982
16983 2011-03-05 Yao Qi <yao@codesourcery.com>
16984
16985 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16986 (subdir_do): New make target. Copied from gdb/Makefile.
16987 (maintainer-clean, realclean, distclean, clean): Call corresponding
16988 make targets in common/Makefile.
16989
16990 2011-02-11 Yao Qi <yao@codesourcery.com>
16991
16992 * configure.ac: Call AC_PROG_RANLIB.
16993 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16994 * configure: Regenerate.
16995
16996 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16997
16998 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16999
17000 2011-03-06 Yao Qi <yao@codesourcery.com>
17001
17002 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
17003
17004 2011-03-05 Yao Qi <yao@codesourcery.com>
17005
17006 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
17007 (subdir_do): New make target. Copied from gdb/Makefile.
17008 (maintainer-clean, realclean, distclean, clean): Call corresponding
17009 make targets in common/Makefile.
17010
17011 2011-03-04 Yao Qi <yao@codesourcery.com>
17012
17013 * Makefile.in: Remove GNU make feature --directory.
17014
17015 2011-03-04 Michael Snyder <msnyder@vmware.com>
17016
17017 * server.c (queue_stop_reply): Call xmalloc not malloc.
17018
17019 2011-03-02 Michael Snyder <msnyder@vmware.com>
17020
17021 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
17022
17023 2011-02-28 Michael Snyder <msnyder@vmware.com>
17024
17025 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
17026 (cmd_qtframe): Ditto.
17027 (cmd_qtbuffer): Ditto.
17028 (cmd_bigqtbuffer): Ditto.
17029
17030 * utils.c (decimal2str): Initialize 'width' to nine, then
17031 don't mess with it.
17032
17033 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17034
17035 * hostio.c (require_data): Free *data, not data.
17036
17037 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17038
17039 * hostio.c (require_data): Use free, not xfree.
17040
17041 2011-02-27 Michael Snyder <msnyder@vmware.com>
17042
17043 * server.c (handle_query): Discard unused value.
17044
17045 * hostio.c (require_data): Free malloc memory before returning
17046 error.
17047
17048 2011-02-26 Michael Snyder <msnyder@vmware.com>
17049
17050 * linux-low.c (list_threads): Call closedir for dirent.
17051
17052 2011-02-27 Michael Snyder <msnyder@vmware.com>
17053
17054 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
17055 a case statement falls through.
17056
17057 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
17058
17059 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
17060 in comparison.
17061
17062 2011-02-26 Michael Snyder <msnyder@vmware.com>
17063
17064 * utils.c (decimal2str): Eliminate dead code and dead param.
17065 (pulongest): Drop dead param from call to decimal2str.
17066 (plongest): Ditto.
17067
17068 2011-02-24 Joel Brobecker <brobecker@adacore.com>
17069
17070 Revert the following patch (not approved yet):
17071 2011-02-21 Hui Zhu <teawater@gmail.com>
17072 * tracepoint.c (tp_printf): New function.
17073 (eval_agent_expr): Handle gdb_agent_op_printf.
17074
17075 2011-02-21 Hui Zhu <teawater@gmail.com>
17076
17077 * tracepoint.c (tp_printf): New function.
17078 (eval_agent_expr): Handle gdb_agent_op_printf.
17079
17080 2011-02-18 Tom Tromey <tromey@redhat.com>
17081
17082 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
17083 (tracepoint.o): Likewise.
17084 * tracepoint.c (enum gdb_agent_op): Use ax.def.
17085 (gdb_agent_op_names): Likewise.
17086
17087 2011-02-18 Tom Tromey <tromey@redhat.com>
17088
17089 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
17090 gdb_agent_op_rot>: New constants.
17091 (gdb_agent_op_names): Add pick and roll.
17092 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
17093 cases.
17094
17095 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
17096
17097 * aclocal.m4: Regenerated with aclocal-1.11.1.
17098
17099 2011-02-14 Pedro Alves <pedro@codesourcery.com>
17100
17101 * server.c (handle_qxfer_traceframe_info): New.
17102 (qxfer_packets): Register "traceframe-info".
17103 (handle_query): Report support for qXfer:traceframe-info:read+.
17104 * tracepoint.c (match_blocktype): New.
17105 (traceframe_find_block_type): Rename to ...
17106 (traceframe_walk_blocks): ... this. Add callback filter argument,
17107 and use it.
17108 (traceframe_find_block_type): New, reimplemented on top of
17109 traceframe_walk_blocks.
17110 (build_traceframe_info_xml): New.
17111 (traceframe_read_info): New.
17112 * server.h (traceframe_read_info): Declare.
17113
17114 2011-02-11 Yao Qi <yao@codesourcery.com>
17115
17116 * configure.ac: Call AC_PROG_RANLIB.
17117 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
17118 * configure: Regenerate.
17119
17120 2011-02-07 Pedro Alves <pedro@codesourcery.com>
17121
17122 * server.c (gdb_read_memory): Change return semantics to allow
17123 partial transfers.
17124 (handle_search_memory_1): Adjust.
17125 (process_serial_event) <'m' packet>: Handle partial transfers.
17126 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
17127
17128 2011-01-28 Pedro Alves <pedro@codesourcery.com>
17129
17130 * regcache.c (init_register_cache): Initialize
17131 regcache->register_status.
17132 (free_register_cache): Release regcache->register_status.
17133 (regcache_cpy): Copy register_status.
17134 (registers_to_string): Print 'x's for unavailable registers.
17135 (supply_register): Mark the register's status valid or
17136 unavailable, depending on whether a buffer was passed in or not.
17137 (supply_register_zeroed): New.
17138 (supply_regblock): Mark the registers' status valid or
17139 unavailable, depending on whether a buffer was passed in or not.
17140 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
17141 (struct regcache): New `register_status' field.
17142 (supply_register_zeroed): Declare.
17143 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
17144 supply_register_zeroed, rather than passing a NULL buffer to
17145 supply_register.
17146 * tracepoint.c (fetch_traceframe_registers): Update comment.
17147
17148 2011-01-28 Pedro Alves <pedro@codesourcery.com>
17149
17150 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
17151 buffer explicit.
17152
17153 2011-01-25 Pedro Alves <pedro@codesourcery.com>
17154
17155 * server.h (decode_xfer_write): Change prototype.
17156 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
17157 and don't extract the annex here.
17158 * server.c (decode_xfer_read): Remove `annex' parameter,
17159 and don't extract the annex here.
17160 (decode_xfer): New.
17161 (struct qxfer): New.
17162 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
17163 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
17164 (handle_qxfer_statictrace): New functions, abstracted out from
17165 handle_query, and made to use the struct qxfer interface.
17166 (handle_threads_qxfer_proper): Rename to ...
17167 (handle_qxfer_threads_proper): ... this.
17168 (handle_threads_qxfer): Rename to ...
17169 (handle_qxfer_threads): ... this. Adjust.
17170 (qxfer_packets): New array.
17171 (handle_qxfer): New function.
17172 (handle_query): Use handle_qxfer.
17173
17174 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
17175
17176 * gdbreplay.c: Shorten lines of >= 80 columns.
17177 * linux-low.c: Ditto.
17178 * linux-ppc-low.c: Ditto.
17179 * linux-s390-low.c: Ditto.
17180 * linux-sparc-low.c: Ditto.
17181 * linux-x86-low.c: Ditto.
17182 * linux-xtensa-low.c: Ditto.
17183 * mem-break.c: Ditto.
17184 * nto-low.c: Ditto.
17185 * regcache.h: Ditto.
17186 * remote-utils.c: Ditto.
17187 * server.c: Ditto.
17188 * server.h: Ditto.
17189 * thread-db.c: Ditto.
17190 * tracepoint.c: Ditto.
17191 * utils.c: Ditto.
17192 * win32-low.h: Ditto.
17193
17194 2011-01-05 Joel Brobecker <brobecker@adacore.com>
17195
17196 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
17197 update.
17198
17199 2011-01-01 Joel Brobecker <brobecker@adacore.com>
17200
17201 * server.c (gdbserver_version): Update copyright year in version
17202 output.
17203 * gdbreplay.c (gdbreplay_version): Ditto.
17204
17205 2010-12-29 Jie Zhang <jie.zhang@analog.com>
17206
17207 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
17208 * linux-bfin-low.c: New file.
17209 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
17210 PT_DATA_ADDR for BFIN targets.
17211 * Makefile.in (SFILES): Add linux-bfin-low.c.
17212 (clean): Remove reg-bfin.c.
17213 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
17214 * README: Mention supported Blackfin targets.
17215
17216 2010-12-23 Mike Frysinger <vapier@gentoo.org>
17217
17218 * .gitignore: New file.
17219
17220 2010-11-16 Mike Frysinger <vapier@gentoo.org>
17221
17222 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
17223
17224 2010-10-22 Jie Zhang <jie@codesourcery.com>
17225
17226 * Makefile.in: Add FLAGS_TO_PASS variable.
17227 (install): Remove dependency of install-only and recursively
17228 invoke make for install-only.
17229
17230 2010-10-04 Doug Evans <dje@google.com>
17231
17232 * Makefile.in (uninstall): Use $(DESTDIR).
17233
17234 2010-09-24 Pedro Alves <pedro@codesourcery.com>
17235
17236 PR gdb/11842
17237
17238 * linux-x86-low.c (compat_siginfo_from_siginfo)
17239 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
17240 si_code is < 0. Check for si_code == SI_TIMER before checking for
17241 si_code < 0.
17242
17243 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17244
17245 * lynx-i386-low.c: New file.
17246 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
17247
17248 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17249
17250 * lynx-low.c (ptrace_request_to_str): Remove handling for
17251 request values that have been removed in LynxOS 5.x.
17252
17253 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17254
17255 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
17256 <ptrace.h>
17257
17258 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
17259
17260 * configure.ac: Add --enable-inprocess-agent option.
17261 * configure: Rebuilt.
17262
17263 2010-09-06 Yao Qi <yao@codesourcery.com>
17264
17265 * linux-low.c (linux_kill): Remove unused variable.
17266 (linux_stabilize_threads): Likewise.
17267 * server.c (start_inferior): Likewise.
17268 (queue_stop_reply_callback): Likewise.
17269 * tracepoint.c (do_action_at_tracepoint): Likewise.
17270
17271 2010-09-06 Yao Qi <yao@codesourcery.com>
17272
17273 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
17274 on return.
17275
17276 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
17277
17278 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
17279
17280 2010-09-06 Pedro Alves <pedro@codesourcery.com>
17281
17282 * Makefile.in (install-only): Replace $IPA_DEPFILES with
17283 "$(IPA_DEPFILES)".
17284
17285 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17286
17287 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
17288 gdbserver/lynx-ppc-low.c: New files.
17289 * Makefile.in (lynx_low_h): New variable.
17290 (lynx-low.o, lynx-ppc-low.o): New rules.
17291 * configure.ac: On LynxOS, link with -lnetinet.
17292 * configure.srv: Add handling of powerpc-*-lynxos* targets.
17293 * configure: regenerate.
17294
17295 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17296
17297 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
17298 * configure.ac: Add check for vasprintf and vsnprintf.
17299 * configure, config.in: Regenerate.
17300 * server.h (vasprintf, vsnprintf): Add conditional declarations.
17301
17302 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17303
17304 * gdbreplay.c: Move include of alloca.h up, next to include of
17305 malloc.h.
17306 * server.h: Add include of malloc.h.
17307 * mem-break.c: Remove include of malloc.h.
17308 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
17309
17310 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17311
17312 * Makefile.in (memmem.o): Build with -Wno-error.
17313
17314 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17315
17316 * utils.c (xsnprintf): Make non-static.
17317 * server.h: Add xsnprintf declaration.
17318 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
17319 replace calls to snprintf by calls to xsnprintf throughout.
17320
17321 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17322
17323 * configure.ac: Add configure check for alloca.
17324 * configure, config.in: Regenerate.
17325 * server.h: Include alloca.h if it exists.
17326 * gdbreplay.c: Include alloca.h if it exists.
17327
17328 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17329
17330 * linux-low.c (__SIGRTMIN): Define if not already defined.
17331 (linux_create_inferior): Check for __ANDROID__ rather than
17332 __SIGRTMIN.
17333 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17334 are already deferred.
17335 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17336 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17337 stopped and already has a pending signal to report.
17338 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17339 a pending signal to report or is moving out of a jump pad.
17340 (linux_init_signals): Check for __ANDROID__ rather than
17341 __SIGRTMIN.
17342
17343 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17344
17345 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17346 debug_threads check. Avoid a linear search when not doing debug
17347 output.
17348
17349 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17350
17351 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17352 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17353 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17354 (process_event): Change local fd's type to gdb_fildes_t.
17355 (create_file_handler): Adjust prototype.
17356 (delete_file_handler): Adjust prototype.
17357 (handle_file_event): Adjust prototype. Use pfildes.
17358 (create_file_event): Adjsut prototype.
17359 * remote-utils.c (remote_desc, listen_desc): Change type to
17360 gdb_fildes_t.
17361 * server.h: New gdb_fildes_t typedef.
17362 [USE_WIN32API]: Include winsock2.h.
17363 (delete_file_handler, add_file_handler): Adjust prototypes.
17364 (pfildes): Declare.
17365 * utils.c (pfildes): New.
17366
17367 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17368
17369 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17370 * configure: Regenerate.
17371
17372 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17373
17374 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17375 (linux_done_accessing_memory): ... this.
17376 (linux_target_ops): Adjust.
17377 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17378 * nto-low.c (nto_target_ops): Adjust comment.
17379 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17380 * spu-low.c (spu_target_ops): Adjust comment.
17381 * target.h (target_ops): Rename unprepare_to_access_memory field
17382 to done_accessing_memory.
17383 (unprepare_to_access_memory): Rename to ...
17384 (done_accessing_memory): ... this.
17385
17386 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17387
17388 * linux-low.c (linux_prepare_to_access_memory): New.
17389 (linux_unprepare_to_access_memory): New.
17390 (linux_target_ops): Install them.
17391 * server.c (read_memory): Rename to ...
17392 (gdb_read_memory): ... this. Use
17393 prepare_to_access_memory/prepare_to_access_memory.
17394 (write_memory): Rename to ...
17395 (gdb_write_memory): ... this. Use
17396 prepare_to_access_memory/prepare_to_access_memory.
17397 (handle_search_memory_1): Adjust.
17398 (process_serial_event): Adjust.
17399 * target.h (struct target_ops): New fields
17400 prepare_to_access_memory and unprepare_to_access_memory.
17401 (prepare_to_access_memory, unprepare_to_access_memory): New.
17402 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17403 prepare_to_access_memory/prepare_to_access_memory.
17404 * nto-low.c (nto_target_ops): Adjust.
17405 * spu-low.c (spu_target_ops): Adjust.
17406 * win32-low.c (win32_target_ops): Adjust.
17407
17408 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17409
17410 * Makefile.in (WARN_CFLAGS): Get it from configure.
17411 (WERROR_CFLAGS): New.
17412 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17413 * configure.ac: Introduce --enable-werror, which adds -Werror to
17414 the compiler command line. Enabled by default. Disable with
17415 --disable-werror. Add -Wdeclaration-after-statement
17416 Wpointer-arith and -Wformat-nonliteral to warning flags.
17417 * configure: Regenerate.
17418
17419 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17420
17421 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17422
17423 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17424
17425 * gdbreplay.c (remote_error): New.
17426 (gdbchar): New.
17427 (expect): Use gdbchar. Check for error reading from GDB.
17428 Clarify sync error output.
17429 (play): Check for errors writing to GDB.
17430 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17431 * remote-utils.c (getpkt): Check for errors writing to the remote
17432 descriptor.
17433
17434 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17435
17436 * linux-low.c (linux_wait_1): Move non-debugging code out of
17437 `debug_threads' control.
17438
17439 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17440
17441 * linux-low.c (linux_wait_1): Don't set last_status here.
17442 * server.c (push_event, queue_stop_reply_callback): Assert we're
17443 not pushing a TARGET_WAITKIND_IGNORE event.
17444 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17445 (myresume, handle_target_event): Set the thread's last_resume_kind
17446 and last_status from the target returned status.
17447
17448 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17449
17450 PR threads/10729
17451
17452 * linux-x86-low.c (update_debug_registers_callback): New.
17453 (i386_dr_low_set_addr): Use it.
17454 (i386_dr_low_get_addr): New.
17455 (i386_dr_low_set_control): Use update_debug_registers_callback.
17456 (i386_dr_low_get_control): New.
17457 (i386_dr_low_get_status): Adjust.
17458 * linux-low.c (linux_stop_lwp): New.
17459 * linux-low.h (linux_stop_lwp): Declare.
17460
17461 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17462 argument instead of a i386_debug_reg_state.
17463 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17464 a i386_debug_reg_state.
17465 (i386_insert_aligned_watchpoint): Adjust.
17466 (i386_remove_aligned_watchpoint): Adjust.
17467 (i386_low_stopped_data_address): Read the debug registers from the
17468 inferior instead of from the mirrors.
17469 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17470 (i386_dr_low_get_addr): Declare.
17471 (i386_dr_low_get_control): Declare.
17472 (i386_dr_low_get_status): Change prototype.
17473
17474 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17475 (i386_dr_low_get_addr): New.
17476 (i386_dr_low_get_control): New.
17477 (i386_dr_low_get_status): Adjust prototype. Return
17478 dr_status_mirror.
17479 (i386_initial_stuff): Clear dr_status_mirror and
17480 dr_control_mirror.
17481 (i386_get_thread_context): Adjust.
17482 (i386_set_thread_context): Adjust.
17483 (i386_thread_added): Adjust.
17484
17485 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17486
17487 * linux-low.h (linux_thread_area): Delete declaration.
17488
17489 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17490
17491 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17492 after its termination.
17493
17494 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17495
17496 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17497 (gdb_wants_all_stopped): Delete.
17498 (linux_wait_1): Don't call them.
17499 * server.c (handle_v_cont): Tag all threads as want-stopped.
17500 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17501 stopped as "client-wants-stopped".
17502
17503 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17504
17505 * Makefile.in (signals_h): New.
17506 (server_h): Depend on it.
17507 (server.o): Don't depend on $(signals_def).
17508 (signals.o): Depend on $(signals_def).
17509
17510 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17511
17512 * Makefile.in (signals_def): New.
17513 (server_h): Append include/gdb/signals.h and signals_def.
17514 (server.o): Append signals_def.
17515
17516 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17517
17518 * server.c (handle_target_event): Use target_signal_to_host for
17519 resume_info.sig initialization.
17520 * target.h (struct thread_resume) <sig>: New comment.
17521
17522 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17523
17524 * server.c (handle_query): strcpy() the returned string from paddress()
17525 instead of sprintf().
17526 * utils.c (paddress): Return phex_nz().
17527
17528 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17529
17530 * server.c (handle_v_cont): Call mourn_inferior if process
17531 just exited.
17532 (myresume): Likewise.
17533
17534 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17535
17536 Static tracepoints, and integration with UST.
17537
17538 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17539 * mem-break.c (uninsert_all_breakpoints)
17540 (reinsert_all_breakpoints): New.
17541 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17542 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17543 (gdb_agent_ust_loaded, helper_thread_id)
17544 (gdb_agent_helper_thread_id): New macros.
17545 (struct ipa_sym_addresses): Add addr_ust_loaded,
17546 addr_helper_thread_id, addr_cmd_buf.
17547 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17548 (in_process_agent_loaded_ust): New.
17549 (write_e_ust_not_loaded): New.
17550 (maybe_write_ipa_ust_not_loaded): New.
17551 (struct collect_static_trace_data_action): New.
17552 (enum tracepoint_type) <static_tracepoint>: New.
17553 (struct tracepoint) <handle>: Mention static tracepoints.
17554 (struct static_tracepoint_ctx): New.
17555 (CMD_BUF_SIZE): New.
17556 (add_tracepoint_action): Handle static tracepoint actions.
17557 (unprobe_marker_at): New.
17558 (clear_installed_tracepoints): Handle static tracepoints.
17559 (cmd_qtdp): Handle static tracepoints.
17560 (probe_marker_at): New.
17561 (cmd_qtstart): Handle static tracepoints.
17562 (response_tracepoint): Handle static tracepoints.
17563 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17564 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17565 (get_context_regcache): Handle static tracepoints.
17566 (do_action_at_tracepoint): Handle static tracepoint actions.
17567 (traceframe_find_block_type): Handle static trace data blocks.
17568 (traceframe_read_sdata): New.
17569 (download_tracepoints): Download static tracepoint actions.
17570 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17571 (GDB_PROBE_NAME): New.
17572 (ust_ops): New.
17573 (GET_UST_SYM): New.
17574 (USTF): New.
17575 (dlsym_ust): New.
17576 (ust_marker_to_static_tracepoint): New.
17577 (gdb_probe): New.
17578 (collect_ust_data_at_tracepoint): New.
17579 (gdb_ust_probe): New.
17580 (UNIX_PATH_MAX, SOCK_DIR): New.
17581 (gdb_ust_connect_sync_socket): New.
17582 (resume_thread, stop_thread): New.
17583 (run_inferior_command): New.
17584 (init_named_socket): New.
17585 (gdb_ust_socket_init): New.
17586 (cstr_to_hexstr): New.
17587 (next_st): New.
17588 (first_marker, next_marker): New.
17589 (response_ust_marker): New.
17590 (cmd_qtfstm, cmd_qtsstm): New.
17591 (unprobe_marker_at, probe_marker_at): New.
17592 (cmd_qtstmat, gdb_ust_thread): New.
17593 (gdb_ust_init): New.
17594 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17595 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17596 (ST_REGENTRY): New.
17597 (x86_64_st_collect_regmap): New.
17598 (X86_64_NUM_ST_COLLECT_GREGS): New.
17599 (AMD64_RIP_REGNUM): New.
17600 (supply_static_tracepoint_registers): New.
17601 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17602 (ST_REGENTRY): New.
17603 (i386_st_collect_regmap): New.
17604 (i386_NUM_ST_COLLECT_GREGS): New.
17605 (supply_static_tracepoint_registers): New.
17606 * server.c (handle_query): Handle qXfer:statictrace:read.
17607 <qSupported>: Report support for StaticTracepoints, and
17608 qXfer:statictrace:read features.
17609 * server.h (traceframe_read_sdata)
17610 (supply_static_tracepoint_registers): Declare.
17611 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17612 (unpack_varlen_hex): Include in IPA build.
17613 * Makefile.in (ustlibs, ustinc): New.
17614 (IPA_OBJS): Add remote-utils-ipa.o.
17615 ($(IPA_LIB)): Link -ldl and -lpthread.
17616 (UST_CFLAGS): New.
17617 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17618 * config.in, configure: Regenerate.
17619
17620 2010-06-20 Ian Lance Taylor <iant@google.com>
17621 Pedro Alves <pedro@codesourcery.com>
17622
17623 * linux-x86-low.c (always_true): Delete.
17624 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17625 trying to fool the compiler with always_true.
17626
17627 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17628
17629 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17630 conditions in gdbserver.
17631
17632 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17633
17634 * spu-low.c (spu_read_memory): Wrap around local store limit.
17635 (spu_write_memory): Likewise.
17636
17637 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17638
17639 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17640 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17641 LONGEST uses.
17642 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17643 uses.
17644 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17645 uses with LONGEST uses.
17646
17647 2010-06-14 Stan Shebs <stan@codesourcery.com>
17648 Pedro Alves <pedro@codesourcery.com>
17649
17650 Bytecode compiler.
17651
17652 * linux-x86-low.c: Include limits.h.
17653 (add_insns): New.
17654 (always_true): New.
17655 (EMIT_ASM): New.
17656 (EMIT_ASM32): New.
17657 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17658 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17659 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17660 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17661 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17662 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17663 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17664 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17665 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17666 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17667 (amd64_emit_void_call_2): New.
17668 (amd64_emit_ops): New.
17669 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17670 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17671 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17672 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17673 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17674 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17675 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17676 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17677 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17678 (i386_emit_stack_adjust, i386_emit_int_call_1)
17679 (i386_emit_void_call_2): New.
17680 (i386_emit_ops): New.
17681 (x86_emit_ops): New.
17682 (the_low_target): Install x86_emit_ops.
17683 * server.h (struct emit_ops): New.
17684 (get_raw_reg_func_addr): Declare.
17685 (current_insn_ptr, emit_error): Declare.
17686 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17687 (set_trace_state_variable_value): New defines.
17688 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17689 addr_get_trace_state_variable_value and
17690 addr_set_trace_state_variable_value.
17691 (symbol_list): New fields for get_raw_reg,
17692 get_trace_state_variable_value and set_trace_state_variable_value.
17693 (condfn): New typedef.
17694 (struct tracepoint): New field `compiled_cond'.
17695 (do_action_at_tracepoint): Clear compiled_cond.
17696 (get_trace_state_variable_value, set_trace_state_variable_value):
17697 Export in the IPA.
17698 (condition_true_at_tracepoint): If there's a compiled condition,
17699 run that.
17700 (current_insn_ptr, emit_error): New globals.
17701 (struct bytecode_address): New.
17702 (get_raw_reg_func_addr): New.
17703 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17704 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17705 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17706 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17707 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17708 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17709 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17710 (compile_tracepoint_condition, compile_bytecodes): New.
17711 * target.h (emit_ops): Forward declare.
17712 (struct target_ops): New field emit_ops.
17713 (target_emit_ops): New.
17714 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17715 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17716 * linux-low.c (linux_emit_ops): New.
17717 (linux_target_ops): Install it.
17718 * linux-low.h (struct linux_target_ops): New field emit_ops.
17719
17720 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17721
17722 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17723 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17724
17725 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17726 Stan Shebs <stan@codesourcery.com>
17727
17728 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17729 (all): Depend on $(extra_libraries).
17730 (install-only): Install the IPA.
17731 (IPA_OBJS, IPA_LIB): New.
17732 (clean): Remove the IPA lib.
17733 (IPAGENT_CFLAGS): New.
17734 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17735 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17736 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17737 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17738 * configure.ac: Check for atomic builtins support in the compiler.
17739 (IPA_DEPFILES, extra_libraries): Define.
17740 * configure.srv (ipa_obj): Add description.
17741 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17742 (i[34567]86-*-linux*): Set ipa_obj.
17743 (x86_64-*-linux*): Set ipa_obj.
17744 * linux-low.c (stabilizing_threads): New.
17745 (supports_fast_tracepoints): New.
17746 (linux_detach): Stabilize threads before detaching.
17747 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17748 the lwp is either not stabilizing, or is moving out of a jump pad.
17749 (linux_fast_tracepoint_collecting): New.
17750 (maybe_move_out_of_jump_pad): New.
17751 (enqueue_one_deferred_signal): New.
17752 (dequeue_one_deferred_signal): New.
17753 (linux_wait_for_event_1): If moving out of a jump pad, defer
17754 pending signals to later.
17755 (linux_stabilize_threads): New.
17756 (linux_wait_1): Check if threads need moving out of jump pads, and
17757 do it if so.
17758 (stuck_in_jump_pad_callback): New.
17759 (move_out_of_jump_pad_callback): New.
17760 (lwp_running): New.
17761 (linux_resume_one_lwp): Handle moving out of jump pads.
17762 (linux_set_resume_request): Dequeue deferred signals.
17763 (need_step_over_p): Also step over fast tracepoint jumps.
17764 (start_step_over): Also uninsert fast tracepoint jumps.
17765 (finish_step_over): Also reinsert fast tracepoint jumps.
17766 (linux_install_fast_tracepoint_jump): New.
17767 (linux_target_ops): Install linux_stabilize_threads and
17768 linux_install_fast_tracepoint_jump_pad.
17769 * linux-low.h (linux_target_ops) <get_thread_area,
17770 install_fast_tracepoint_jump_pad>: New fields.
17771 (struct lwp_info) <collecting_fast_tracepoint,
17772 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17773 (linux_get_thread_area): Declare.
17774 * linux-x86-low.c (jump_insn): New.
17775 (x86_get_thread_area): New.
17776 (append_insns): New.
17777 (push_opcode): New.
17778 (amd64_install_fast_tracepoint_jump_pad): New.
17779 (i386_install_fast_tracepoint_jump_pad): New.
17780 (x86_install_fast_tracepoint_jump_pad): New.
17781 (the_low_target): Install x86_get_thread_area and
17782 x86_install_fast_tracepoint_jump_pad.
17783 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17784 (struct fast_tracepoint_jump): New.
17785 (fast_tracepoint_jump_insn): New.
17786 (fast_tracepoint_jump_shadow): New.
17787 (find_fast_tracepoint_jump_at): New.
17788 (fast_tracepoint_jump_here): New.
17789 (delete_fast_tracepoint_jump): New.
17790 (set_fast_tracepoint_jump): New.
17791 (uninsert_fast_tracepoint_jumps_at): New.
17792 (reinsert_fast_tracepoint_jumps_at): New.
17793 (set_breakpoint_at): Use write_inferior_memory.
17794 (uninsert_raw_breakpoint): Use write_inferior_memory.
17795 (check_mem_read): Mask out fast tracepoint jumps.
17796 (check_mem_write): Mask out fast tracepoint jumps.
17797 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17798 (set_fast_tracepoint_jump): Declare.
17799 (delete_fast_tracepoint_jump)
17800 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17801 (reinsert_fast_tracepoint_jumps_at): Declare.
17802 * regcache.c: Don't compile many functions when building the
17803 in-process agent library.
17804 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17805 the register buffer in the heap.
17806 (free_register_cache): If the register buffer isn't owned by the
17807 regcache, don't free it.
17808 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17809 pre-existing register caches.
17810 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17811 type.
17812 (convert_ascii_to_int): : Constify `from' parameter type.
17813 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17814 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17815 the needed buffer in-place.
17816 (relocate_instruction): New.
17817 * server.c (handle_query) <qSymbols>: If the target supports
17818 tracepoints, give it a chance of looking up symbols. Report
17819 support for fast tracepoints.
17820 (handle_status): Stabilize threads.
17821 (process_serial_event): Adjust.
17822 * server.h (struct fast_tracepoint_jump): Forward declare.
17823 (struct process_info) <fast_tracepoint_jumps>: New field.
17824 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17825 (decode_X_packet, decode_M_packet): Adjust.
17826 (relocate_instruction): Declare.
17827 (in_process_agent_loaded): Declare.
17828 (tracepoint_look_up_symbols): Declare.
17829 (struct fast_tpoint_collect_status): Declare.
17830 (fast_tracepoint_collecting): Declare.
17831 (force_unlock_trace_buffer): Declare.
17832 (handle_tracepoint_bkpts): Declare.
17833 (initialize_low_tracepoint)
17834 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17835 * target.h (struct target_ops) <stabilize_threads,
17836 install_fast_tracepoint_jump_pad>: New fields.
17837 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17838 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17839 [HAVE_STDINT_H]: Include stdint.h.
17840 (trace_debug_1): Rename to ...
17841 (trace_vdebug): ... this.
17842 (trace_debug): Rename to ...
17843 (trace_debug_1): ... this. Add `level' parameter.
17844 (trace_debug): New.
17845 (ATTR_USED, ATTR_NOINLINE): New.
17846 (IP_AGENT_EXPORT): New.
17847 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17848 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17849 (about_to_request_buffer_space, trace_buffer_is_full)
17850 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17851 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17852 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17853 (traceframe_write_count, traceframes_created)
17854 (trace_state_variables)
17855 New renaming defines.
17856 (struct ipa_sym_addresses): New.
17857 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17858 (symbol_list): New.
17859 (ipa_sym_addrs): New.
17860 (all_tracepoint_symbols_looked_up): New.
17861 (in_process_agent_loaded): New.
17862 (write_e_ipa_not_loaded): New.
17863 (maybe_write_ipa_not_loaded): New.
17864 (tracepoint_look_up_symbols): New.
17865 (debug_threads) [IN_PROCESS_AGENT]: New.
17866 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17867 (UNKNOWN_SIDE_EFFECTS): New.
17868 (stop_tracing): New.
17869 (flush_trace_buffer): New.
17870 (stop_tracing_bkpt): New.
17871 (flush_trace_buffer_bkpt): New.
17872 (read_inferior_integer): New.
17873 (read_inferior_uinteger): New.
17874 (read_inferior_data_pointer): New.
17875 (write_inferior_data_pointer): New.
17876 (write_inferior_integer): New.
17877 (write_inferior_uinteger): New.
17878 (struct collect_static_trace_data_action): Delete.
17879 (enum tracepoint_type): New.
17880 (struct tracepoint) <type>: New field `type'.
17881 <actions_str, step_actions, step_actions_str>: Only include in
17882 GDBserver.
17883 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17884 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17885 (tracepoints): Use IP_AGENT_EXPORT.
17886 (last_tracepoint): Don't include in the IPA.
17887 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17888 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17889 (alloced_trace_state_variables): New.
17890 (trace_state_variables): Use IP_AGENT_EXPORT.
17891 (traceframe_t): Delete unused variable.
17892 (circular_trace_buffer): Don't include in the IPA.
17893 (trace_buffer_start): Delete.
17894 (struct trace_buffer_control): New.
17895 (trace_buffer_free): Delete.
17896 (struct ipa_trace_buffer_control): New.
17897 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17898 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17899 New.
17900 (trace_buffer_ctrl): New.
17901 (TRACE_BUFFER_CTRL_CURR): New.
17902 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17903 Reimplement as macros.
17904 (trace_buffer_wrap): Delete.
17905 (traceframe_write_count, traceframe_read_count)
17906 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17907 (struct tracepoint_hit_ctx) <type>: New field.
17908 (struct fast_tracepoint_ctx): New.
17909 (memory_barrier): New.
17910 (cmpxchg): New.
17911 (record_tracepoint_error): Update atomically in the IPA.
17912 (clear_inferior_trace_buffer): New.
17913 (about_to_request_buffer_space): New.
17914 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17915 updating the same buffer.
17916 (add_tracepoint): Default the tracepoint's type to trap
17917 tracepoint, and orig_size to -1.
17918 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17919 internal variables.
17920 (create_trace_state_variable): New parameter `gdb'. Handle it.
17921 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17922 (cmd_qtdp): Handle fast tracepoints.
17923 (cmd_qtdv): Adjust.
17924 (max_jump_pad_size): New.
17925 (gdb_jump_pad_head): New.
17926 (get_jump_space_head): New.
17927 (claim_jump_space): New.
17928 (sort_tracepoints): New.
17929 (MAX_JUMP_SIZE): New.
17930 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17931 IPA.
17932 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17933 support. Upload fast traceframes, and delete internal IPA
17934 breakpoints.
17935 (stop_tracing_handler): New.
17936 (flush_trace_buffer_handler): New.
17937 (cmd_qtstop): Upload fast tracepoints.
17938 (response_tracepoint): Handle fast tracepoints.
17939 (tracepoint_finished_step): Upload fast traceframes. Set the
17940 tracepoint hit context's tracepoint type.
17941 (handle_tracepoint_bkpts): New.
17942 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17943 type. Add comment about fast tracepoints.
17944 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17945 non-existing action_str field.
17946 (get_context_regcache): Handle fast tracepoints.
17947 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17948 to the regcache.
17949 (fast_tracepoint_from_jump_pad_address): New.
17950 (fast_tracepoint_from_ipa_tpoint_address): New.
17951 (collecting_t): New.
17952 (force_unlock_trace_buffer): New.
17953 (fast_tracepoint_collecting): New.
17954 (collecting): New.
17955 (gdb_collect): New.
17956 (write_inferior_data_ptr): New.
17957 (target_tp_heap): New.
17958 (target_malloc): New.
17959 (download_agent_expr): New.
17960 (UALIGN): New.
17961 (download_tracepoints): New.
17962 (download_trace_state_variables): New.
17963 (upload_fast_traceframes): New.
17964 (IPA_FIRST_TRACEFRAME): New.
17965 (IPA_NEXT_TRACEFRAME_1): New.
17966 (IPA_NEXT_TRACEFRAME): New.
17967 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17968 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17969 (gdb_jump_pad_buffer_end): New.
17970 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17971 (initialize_tracepoint): Adjust.
17972 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17973 buffer. Initialize the low module.
17974 * utils.c (PREFIX, TOOLNAME): New.
17975 (malloc_failure): Use PREFIX.
17976 (error): In the IPA, an error causes an exit.
17977 (fatal, warning): Use PREFIX.
17978 (internal_error): Use TOOLNAME.
17979 (NUMCELLS): Increase to 10.
17980 * configure, config.in: Regenerate.
17981
17982 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17983
17984 * server.c (handle_query) <qSupported>: Do two passes over the
17985 qSupported string to avoid nesting strtok.
17986
17987 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17988
17989 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17990 (CDEPS): New.
17991 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17992 -Wl,--dynamic-list.
17993 * configure: Regenerate.
17994 * proc-service.list: New.
17995
17996 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17997
17998 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17999 New comment.
18000
18001 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
18002
18003 * gdbreplay.c (remote_open): Check error return from socket() call by
18004 its equality to -1 not by it being negative.
18005 * remote-utils.c (remote_open): Likewise.
18006
18007 2010-05-23 Pedro Alves <pedro@codesourcery.com>
18008
18009 * config.h: Regenerate.
18010
18011 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
18012
18013 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
18014 doesn't provide PTRACE_GET_THREAD_AREA.
18015
18016 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
18017
18018 * linux-m68k-low.c: Include <asm/ptrace.h>
18019 (ps_get_thread_area): Implement.
18020
18021 2010-05-03 Doug Evans <dje@google.com>
18022
18023 * event-loop.c (struct callback_event): New struct.
18024 (callback_list): New global.
18025 (append_callback_event, delete_callback_event): New functions.
18026 (process_callback): New function.
18027 (start_event_loop): Call it.
18028 * remote-utils.c (NOT_SCHEDULED): Define.
18029 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
18030 moved out of readchar.
18031 (readchar): Rewrite. Call reschedule before returning.
18032 (reset_readchar): New function.
18033 (remote_close): Call it.
18034 (process_remaining, reschedule): New functions.
18035 * server.h (callback_handler_func): New typedef.
18036 (append_callback_event, delete_callback_event): Declare.
18037
18038 2010-05-03 Pedro Alves <pedro@codesourcery.com>
18039
18040 * proc-service.c (ps_pglobal_lookup): Use
18041 thread_db_look_up_one_symbol.
18042 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
18043 parameter. Use it instead of all_symbols_looked_up.
18044 * server.h (struct process_info) <all_symbols_looked_up>: Delete
18045 field.
18046 (all_symbols_looked_up): Don't declare.
18047 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
18048 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
18049 field.
18050 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
18051 Set all_symbols_looked_up here.
18052 (thread_db_look_up_one_symbol): New.
18053 (thread_db_get_tls_address): Adjust.
18054 (thread_db_load_search, try_thread_db_load_1): Always allocate the
18055 thread_db object on the heap, and tentatively set it in the
18056 process structure.
18057 (thread_db_init): Don't set all_symbols_looked_up here.
18058 * linux-low.h (thread_db_look_up_one_symbol): Declare.
18059
18060 2010-05-03 Pedro Alves <pedro@codesourcery.com>
18061
18062 * linux-low.c (linux_kill, linux_detach): Adjust.
18063 (status_pending_p_callback): Remove redundant statement. Check
18064 for !TARGET_WAITIKIND_IGNORE, instead of
18065 TARGET_WAITKIND_STOPPED.
18066 (handle_tracepoints): Make sure LWP is locked. Adjust.
18067 (linux_wait_for_event_1): Adjust.
18068 (linux_cancel_breakpoints): New.
18069 (unsuspend_one_lwp): New.
18070 (unsuspend_all_lwps): New.
18071 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
18072 (send_sigstop_callback): Change return type to int, add new
18073 `except' parameter and handle it.
18074 (suspend_and_send_sigstop_callback): New.
18075 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
18076 pass them down. If SUSPEND, also increment the lwp's suspend
18077 count.
18078 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
18079 (need_step_over_p): Don't consider suspended LWPs.
18080 (start_step_over): Adjust.
18081 (proceed_one_lwp): Change return type to int, add new `except'
18082 parameter and handle it.
18083 (unsuspend_and_proceed_one_lwp): New.
18084 (proceed_all_lwps): Use find_inferior instead of
18085 for_each_inferior.
18086 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
18087 also decrement the suspend count of LWPs. Pass `except' down,
18088 instead of hacking its suspend count.
18089 (linux_pause_all): Add `freeze' parameter. Adjust.
18090 (linux_unpause_all): New.
18091 (linux_target_ops): Install linux_unpause_all.
18092 * server.c (handle_status): Adjust.
18093 * target.h (struct target_ops): New fields `unpause_all' and
18094 `cancel_breakpoints'. Add new parameter to `pause_all'.
18095 (pause_all): Add new `freeze' parameter.
18096 (unpause_all): New.
18097 (cancel_breakpoints): New.
18098 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
18099 cancel breakpoints.
18100 (cmd_qtstart): Pause threads.
18101 (stop_tracing): Pause threads, and cancel breakpoints.
18102 * win32-low.c (win32_target_ops): Adjust.
18103
18104 2010-05-03 Pedro Alves <pedro@codesourcery.com>
18105
18106 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
18107 the inferior right away from here...
18108 (linux_wait_1): ... to here, and adjust to check the thread's
18109 last_resume_kind instead of the lwp's step or stop_expected flags.
18110
18111 2010-05-02 Pedro Alves <pedro@codesourcery.com>
18112
18113 * README: Use consistent `GDB' and `GDBserver' spellings.
18114
18115 2010-05-02 Pedro Alves <pedro@codesourcery.com>
18116
18117 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
18118 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
18119 (linux_detach_one_lwp): Assume the lwp is stopped.
18120 (any_thread_of): Delete.
18121 (linux_detach): Stop all lwps here. Don't blindly delete all
18122 breakpoints.
18123 (delete_lwp_callback): New.
18124 (linux_mourn): Delete all lwps of the process that is gone.
18125 (linux_wait_1): Don't delete the last lwp of the process here.
18126 * mem-break.h (mark_breakpoints_out): Declare.
18127 * mem-break.c (mark_breakpoints_out): New.
18128 (free_all_breakpoints): Use it.
18129 * server.c (handle_target_event): If the process is gone, mark
18130 breakpoints out.
18131 * thread-db.c (struct thread_db) <create_bp>: New field.
18132 (thread_db_enable_reporting): Fix prototype. Store a thread event
18133 breakpoint reference in the thread_db struct.
18134 (thread_db_load_search): Clear the thread_db object.
18135 (try_thread_db_load_1): Ditto.
18136 (switch_to_process): New.
18137 (disable_thread_event_reporting): Use it.
18138 (remove_thread_event_breakpoints): New.
18139 (thread_db_detach, thread_db_mourn): Use it.
18140
18141 2010-05-01 Pedro Alves <pedro@codesourcery.com>
18142
18143 * linux-low.c (linux_enable_event_reporting): New.
18144 (linux_wait_for_event_1, handle_extended_wait): Use it.
18145
18146 2010-04-30 Pedro Alves <pedro@codesourcery.com>
18147
18148 * linux-low.c (linux_kill_one_lwp, linux_kill)
18149 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
18150 (send_sigstop): Take an lwp_info as parameter instead. Queue a
18151 SIGSTOP even if the LWP is stopped.
18152 (send_sigstop_callback): New.
18153 (stop_all_lwps): Use send_sigstop_callback instead.
18154 (linux_resume_one_thread): Adjust.
18155 (proceed_one_lwp): Still proceed an LWP that the client has
18156 requested to stop, if we haven't reported it as stopped yet. Make
18157 sure that LWPs the client want stopped, have a pending SIGSTOP.
18158
18159 2010-04-26 Doug Evans <dje@google.com>
18160
18161 * server.c (handle_general_set): Make static.
18162
18163 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
18164 Print received char after testing for error/eof instead of before.
18165 (input_interrupt): Tweak comment.
18166
18167 2010-04-23 Doug Evans <dje@google.com>
18168
18169 * server.c (start_inferior): Print inferior argv if --debug.
18170
18171 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
18172
18173 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
18174 * nto-x86-low.c: Include server.h
18175
18176 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
18177
18178 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
18179 be consistent with other sources of this directory.
18180 (init_registers_amd64): Correct name of source file of this function
18181 in the comment.
18182
18183 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18184
18185 * configure.srv (x86_64-*-mingw*): New configuration for Windows
18186 64-bit executables.
18187
18188 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18189
18190 * win32-i386-low.c: Add 64-bit support.
18191 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
18192 (init_registers_amd64): Declare.
18193 (mappings): Add 64-bit version of array.
18194 (init_windows_x86): New function.
18195 (the_low_target): Change init_arch field to init_windows_x86.
18196
18197 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18198
18199 * win32-low.c: Adapt to support also 64-bit architecture.
18200 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
18201 (get_image_name): Use SIZE_T type for local variable `done'.
18202 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
18203 (toolhelp_get_dll_name): Idem.
18204 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
18205 Use uintptr_t typecast to avoid warning.
18206 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
18207 (handle_exception): Use phex_nz to avoid warning.
18208 (win32_wait): Remove unused local variable `process'.
18209
18210 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18211
18212 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
18213 `amd64-avx.o'.
18214
18215 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
18216
18217 * configure.ac: Use `ws2_32' library for srv_mingw.
18218 * configure: Regenerate.
18219 * gdbreplay.c: Include winsock2.h instead of winsock.h.
18220 * remote-utils.c: Likewise.
18221
18222 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
18223
18224 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
18225 if __x86_64__ is defined.
18226
18227 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18228
18229 * configure: Regenerate.
18230
18231 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18232
18233 * server.c (handle_query): Handle 'qGetTIBAddr' query.
18234 * target.h (target_ops): New get_tib_address field.
18235 * win32-low.h (win32_thread_info): Add thread_local_base field.
18236 * win32-low.c (child_add_thread): Add tlb argument.
18237 Set thread_local_base field to TLB.
18238 (get_child_debug_event): Adapt to child_add_thread change.
18239 (win32_get_tib_address): New function.
18240 (win32_target_ops): Set get_tib_address field to
18241 win32_get_tib_address.
18242 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
18243
18244 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18245
18246 * linux-low.c (linux_mourn): Also remove the process.
18247 * server.c (handle_target_event): Don't remove the process here.
18248 * nto-low.c (nto_mourn): New.
18249 (nto_target_ops): Install it.
18250 * spu-low.c (spu_mourn): New.
18251 (spu_target_ops): Install it.
18252 * win32-low.c (win32_mourn): New.
18253 (win32_target_ops): Install it.
18254
18255 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18256
18257 * server.h (buffer_xml_printf): Remove redundant `;'.
18258
18259 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18260
18261 * regcache.c (set_register_cache): Invalidate regcaches before
18262 changing the register cache layout.
18263 (regcache_invalidate_one): Allow a NULL regcache.
18264 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
18265 regcaches before changing the register cache layout or the target
18266 regsets.
18267
18268 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
18269
18270 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
18271 variable warning on Linux/x86-64.
18272
18273 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18274
18275 GDBserver disconnected tracing support.
18276
18277 * linux-low.c (linux_remove_process): Delete.
18278 (add_lwp): Don't set last_resume_kind here.
18279 (linux_kill): Use `mourn'.
18280 (linux_detach): Use `thread_db_detach', and `mourn'.
18281 (linux_mourn): New.
18282 (linux_attach_lwp_1): Adjust comment.
18283 (linux_attach): last_resume_kind moved the thread_info; adjust.
18284 (status_pending_p_callback): Adjust.
18285 (linux_wait_for_event_1): Adjust.
18286 (count_events_callback, select_singlestep_lwp_callback)
18287 (select_event_lwp_callback, cancel_breakpoints_callback)
18288 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
18289 (proceed_one_lwp): Adjust.
18290 (linux_async): Add debug output.
18291 (linux_thread_stopped): New.
18292 (linux_pause_all): New.
18293 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
18294 linux_pause_all.
18295 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
18296 (thread_db_free): Delete declaration.
18297 (thread_db_detach, thread_db_mourn): Declare.
18298 * thread-db.c (thread_db_init): Use thread_db_mourn.
18299 (thread_db_free): Delete, split in two.
18300 (disable_thread_event_reporting): New.
18301 (thread_db_detach): New.
18302 (thread_db_mourn): New.
18303
18304 * server.h (struct thread_info) <last_resume_kind>: New field.
18305 <attached>: Add comment.
18306 <gdb_detached>: New field.
18307 (handler_func): Change return type to int.
18308 (handle_serial_event, handle_target_event): Ditto.
18309 (gdb_connected): Declare.
18310 (tracing): Delete.
18311 (disconnected_tracing): Declare.
18312 (stop_tracing): Declare.
18313
18314 * server.c (handle_query) <qSupported>: Report support for
18315 disconnected tracing.
18316 (queue_stop_reply_callback): Account for running threads.
18317 (gdb_wants_thread_stopped): New.
18318 (gdb_wants_all_threads_stopped): New.
18319 (gdb_reattached_process): New.
18320 (handle_status): Clear the `gdb_detached' flag of all processes.
18321 In all-stop, stop all threads.
18322 (main): Be sure to leave tfind mode. Handle disconnected tracing.
18323 (process_serial_event): If the remote connection breaks, or if an
18324 exit was forced with "monitor exit", force an event loop exit.
18325 Handle disconnected tracing on detach.
18326 (handle_serial_event): Adjust.
18327 (handle_target_event): If GDB isn't connected, forward events back
18328 to the inferior, unless the last process exited, in which case,
18329 exit gdbserver. Adjust interface.
18330
18331 * remote-utils.c (remote_open): Don't block in accept. Instead
18332 register an event loop source on the listen socket file
18333 descriptor. Refactor bits into ...
18334 (listen_desc): ... this new global.
18335 (gdb_connected): ... this new function.
18336 (enable_async_notification): ... this new function.
18337 (handle_accept_event): ... this new function.
18338 (remote_close): Clear remote_desc.
18339
18340 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18341
18342 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18343 New fields.
18344 (mourn_inferior): Define.
18345 (target_process_qsupported): Avoid the dangling else problem.
18346 (thread_stopped): Define.
18347 (pause_all): Define.
18348 (target_waitstatus_to_string): Declare.
18349 * target.c (target_waitstatus_to_string): New.
18350
18351 * tracepoint.c (tracing): Make extern.
18352 (disconnected_tracing): New.
18353 (stop_tracing): Make extern. Handle tracing stops due to GDB
18354 disconnecting.
18355 (cmd_qtdisconnected): New.
18356 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18357 (handle_tracepoint_general_set): Handle QTDisconnected.
18358
18359 * event-loop.c (event_handler_func): Change return type to int.
18360 (process_event): Bail out if the event handler wants the event
18361 loop to stop.
18362 (handle_file_event): Ditto.
18363 (start_event_loop): Bail out if the event handler wants the event
18364 loop to stop.
18365
18366 * nto-low.c (nto_target_ops): Adjust.
18367 * spu-low.c (spu_wait): Don't remove the process here.
18368 (spu_target_ops): Adjust.
18369 * win32-low.c (win32_wait): Don't remove the process here.
18370 (win32_target_ops): Adjust.
18371
18372 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18373
18374 * regcache.c (realloc_register_cache): Invalidate inferior's
18375 regcache before recreating it.
18376
18377 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18378
18379 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18380
18381 2010-04-09 Stan Shebs <stan@codesourcery.com>
18382 Pedro Alves <pedro@codesourcery.com>
18383
18384 * server.h (LONGEST): New.
18385 (struct thread_info) <while_stepping>: New field.
18386 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18387 Declare.
18388 (initialize_tracepoint, handle_tracepoint_general_set)
18389 (handle_tracepoint_query, tracepoint_finished_step)
18390 (tracepoint_was_hit, release_while_stepping_state_list):
18391 (current_traceframe): Declare.
18392 * server.c (handle_general_set): Handle tracepoint packets.
18393 (read_memory): New.
18394 (write_memory): New.
18395 (handle_search_memory_1): Use read_memory.
18396 (handle_query): Report support for conditional tracepoints, trace
18397 state variables, and tracepoint sources. Handle tracepoint
18398 queries.
18399 (main): Initialize the tracepoints module.
18400 (process_serial_event): Handle traceframe reads/writes.
18401
18402 * linux-low.c (handle_tracepoints): New.
18403 (linux_wait_1): Call it.
18404 (linux_resume_one_lwp): Handle while-stepping.
18405 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18406 (linux_target_ops): Install them.
18407 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18408 New field.
18409 * linux-x86-low.c (x86_supports_tracepoints): New.
18410 (the_low_target). Install it.
18411
18412 * mem-break.h (delete_breakpoint): Declare.
18413 * mem-break.c (delete_breakpoint): Make external.
18414
18415 * target.h (struct target_ops): Add `supports_tracepoints',
18416 `read_pc', and `write_pc' fields.
18417 (target_supports_tracepoints): Define.
18418 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18419 (phex_nz): New.
18420
18421 * regcache.h (struct regcache) <registers_owned>: New field.
18422 (init_register_cache, regcache_cpy): Declare.
18423 (regcache_read_pc, regcache_write_pc): Declare.
18424 (register_cache_size): Declare.
18425 (supply_regblock): Declare.
18426 * regcache.c (init_register_cache): New.
18427 (new_register_cache): Use it.
18428 (regcache_cpy): New.
18429 (register_cache_size): New.
18430 (supply_regblock): New.
18431 (regcache_read_pc, regcache_write_pc): New.
18432
18433 * tracepoint.c: New.
18434
18435 * Makefile.in (OBS): Add tracepoint.o.
18436 (tracepoint.o): New rule.
18437
18438 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18439
18440 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18441 (i386-mmx.o): New.
18442 (i386-mmx.c): Likewise.
18443 (i386-mmx-linux.o): Likewise.
18444 (i386-mmx-linux.c): Likewise.
18445
18446 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18447 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18448 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18449 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18450
18451 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18452 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18453 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18454
18455 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18456
18457 * Makefile.in (clean): Updated.
18458 (i386-avx.o): New.
18459 (i386-avx.c): Likewise.
18460 (i386-avx-linux.o): Likewise.
18461 (i386-avx-linux.c): Likewise.
18462 (amd64-avx.o): Likewise.
18463 (amd64-avx.c): Likewise.
18464 (amd64-avx-linux.o): Likewise.
18465 (amd64-avx-linux.c): Likewise.
18466
18467 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18468 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18469 (srv_amd64_regobj): Add amd64-avx.o.
18470 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18471 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18472 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18473 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18474 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18475 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18476 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18477
18478 * i387-fp.c: Include "i386-xstate.h".
18479 (i387_xsave): New.
18480 (i387_cache_to_xsave): Likewise.
18481 (i387_xsave_to_cache): Likewise.
18482 (x86_xcr0): Likewise.
18483
18484 * i387-fp.h (i387_cache_to_xsave): Likewise.
18485 (i387_xsave_to_cache): Likewise.
18486 (x86_xcr0): Likewise.
18487
18488 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18489 * linux-crisv32-low.c (target_regsets): Likewise.
18490 * linux-m68k-low.c (target_regsets): Likewise.
18491 * linux-mips-low.c (target_regsets): Likewise.
18492 * linux-ppc-low.c (target_regsets): Likewise.
18493 * linux-s390-low.c (target_regsets): Likewise.
18494 * linux-sh-low.c (target_regsets): Likewise.
18495 * linux-sparc-low.c (target_regsets): Likewise.
18496 * linux-xtensa-low.c (target_regsets): Likewise.
18497
18498 * linux-low.c: Include <sys/uio.h>.
18499 (regsets_fetch_inferior_registers): Support nt_type.
18500 (regsets_store_inferior_registers): Likewise.
18501 (linux_process_qsupported): New.
18502 (linux_target_ops): Add linux_process_qsupported.
18503
18504 * linux-low.h (regset_info): Add nt_type.
18505 (linux_target_ops): Add process_qsupported.
18506
18507 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18508 and <sys/uio.h>.
18509 (init_registers_i386_avx_linux): New.
18510 (init_registers_amd64_avx_linux): Likewise.
18511 (xmltarget_i386_linux_no_xml): Likewise.
18512 (xmltarget_amd64_linux_no_xml): Likewise.
18513 (PTRACE_GETREGSET): Likewise.
18514 (PTRACE_SETREGSET): Likewise.
18515 (x86_fill_xstateregset): Likewise.
18516 (x86_store_xstateregset): Likewise.
18517 (use_xml): Likewise.
18518 (x86_linux_update_xmltarget): Likewise.
18519 (x86_linux_process_qsupported): Likewise.
18520 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18521 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18522 init_registers_i386_linux here. Call
18523 x86_linux_update_xmltarget.
18524 (the_low_target): Add x86_linux_process_qsupported.
18525
18526 * server.c (handle_query): Call target_process_qsupported.
18527
18528 * target.h (target_ops): Add process_qsupported.
18529 (target_process_qsupported): New.
18530
18531 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18532
18533 * inferiors.c (add_thread): Set last_status kind to
18534 TARGET_WAITKIND_IGNORE.
18535 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18536 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18537 (linux_wait_1): Move `thread' local definition to block that uses
18538 it. Don't NULL initialize `event_child'.
18539 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18540 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18541 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18542
18543 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18544
18545 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18546 an extended waitstatus, or by a watchpoint.
18547 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18548 thread was stepping or has been stopped by a watchpoint.
18549
18550 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18551
18552 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18553 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18554 of another, then delete the previous, and validate all
18555 breakpoints.
18556 (validate_inserted_breakpoint): New.
18557 (delete_disabled_breakpoints): New.
18558 (validate_breakpoints): New.
18559 (check_mem_read): Validate breakpoints before trusting their
18560 shadow. Delete disabled breakpoints.
18561 (check_mem_write): Validate breakpoints before trusting they
18562 should be inserted. Delete disabled breakpoints.
18563 * mem-break.h (validate_breakpoints):
18564 * server.c (handle_query): Validate breakpoints when we see a
18565 qSymbol query.
18566
18567 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18568
18569 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18570 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18571 if we could tell there's a GDB breakpoint at stop_pc.
18572 (need_step_over_p): Don't do a step over if we find a GDB
18573 breakpoint at the resume PC.
18574
18575 * mem-break.c (struct raw_breakpoint): New.
18576 (enum bkpt_type): New type `gdb_breakpoint'.
18577 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18578 fields. New field `raw'.
18579 (find_raw_breakpoint_at): New.
18580 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18581 breakpoint instead.
18582 (set_breakpoint_at): Adjust.
18583 (delete_raw_breakpoint): New.
18584 (release_breakpoint): New.
18585 (delete_breakpoint): Rename to...
18586 (delete_breakpoint_1): ... this. Add proc parameter. Use
18587 release_breakpoint. Return ENOENT.
18588 (delete_breakpoint): Reimplement.
18589 (find_breakpoint_at): Delete.
18590 (find_gdb_breakpoint_at): New.
18591 (delete_breakpoint_at): Delete.
18592 (set_gdb_breakpoint_at): New.
18593 (delete_gdb_breakpoint_at): New.
18594 (gdb_breakpoint_here): New.
18595 (set_reinsert_breakpoint): Use release_breakpoint.
18596 (uninsert_breakpoint): Rename to ...
18597 (uninsert_raw_breakpoint): ... this.
18598 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18599 (reinsert_raw_breakpoint): Change parameter type to
18600 raw_breakpoint.
18601 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18602 instead.
18603 (check_breakpoints): Adjust. Use release_breakpoint.
18604 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18605 (breakpoint_inserted_here): Ditto.
18606 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18607 Don't trust the breakpoint's shadow if it is not inserted.
18608 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18609 (delete_all_breakpoints): Adjust.
18610 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18611 use delete_breakpoint_1.
18612
18613 * mem-break.h (breakpoints_supported): Delete declaration.
18614 (set_gdb_breakpoint_at): Declare.
18615 (gdb_breakpoint_here): Declare.
18616 (delete_breakpoint_at): Delete.
18617 (delete_gdb_breakpoint_at): Declare.
18618
18619 * server.h (struct raw_breakpoint): Forward declare.
18620 (struct process_info): New field `raw_breakpoints'.
18621
18622 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18623 breakpoints.
18624
18625 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18626
18627 * linux-low.c (status_pending_p_callback): Fix comment.
18628 (linux_wait_for_event_1): Move most of the internal breakpoint
18629 handling from here...
18630 (linux_wait_1): ... to here.
18631 (count_events_callback): New.
18632 (select_singlestep_lwp_callback): New.
18633 (select_event_lwp_callback): New.
18634 (cancel_breakpoints_callback): New.
18635 (select_event_lwp): New.
18636 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18637 priority to all LWPs that have had events that should be reported
18638 to the client. Cancel breakpoints when about to reporting the
18639 event to the client, not while stopping lwps. No longer cancel
18640 finished single-steps here.
18641 (cancel_finished_single_step): Delete.
18642 (cancel_finished_single_steps): Delete.
18643
18644 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18645
18646 * mem-break.c (enum bkpt_type): New.
18647 (struct breakpoint): New field `type'.
18648 (set_breakpoint_at): Change return type to struct breakpoint
18649 pointer. Set type to `other_breakpoint' by default.
18650 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18651 in the breakpoint list.
18652 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18653 (reinsert_breakpoint): Rename to ...
18654 (reinsert_raw_breakpoint): ... this.
18655 (reinsert_breakpoints_at): Adjust.
18656 * mem-break.h (struct breakpoint): Declare.
18657 (set_breakpoint_at): Change return type to struct breakpoint
18658 pointer.
18659
18660 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18661
18662 * server.c (handle_query): Assign, not compare.
18663
18664 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18665
18666 Teach linux gdbserver to step-over-breakpoints.
18667
18668 * linux-low.c (can_hardware_single_step): New.
18669 (supports_breakpoints): New.
18670 (handle_extended_wait): If stopping threads, read the stop pc of
18671 the new cloned LWP.
18672 (get_pc): New.
18673 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18674 low target doesn't support retrieving the PC.
18675 (add_lwp): Set last_resume_kind to resume_continue.
18676 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18677 (linux_attach): Don't clear stop_expected. Set the lwp's
18678 last_resume_kind to resume_stop.
18679 (linux_detach_one_lwp): Don't check for removed breakpoints.
18680 (check_removed_breakpoint): Delete.
18681 (status_pending_p): Rename to ...
18682 (status_pending_p_callback): ... this. Don't check for removed
18683 breakpoints. Don't consider threads that are stopped from GDB's
18684 perspective.
18685 (linux_wait_for_lwp): Always read the stop_pc here.
18686 (cancel_breakpoint): New.
18687 (step_over_bkpt): New global.
18688 (linux_wait_for_event_1): Implement stepping over breakpoints.
18689 (gdb_wants_lwp_stopped): New.
18690 (gdb_wants_all_stopped): New.
18691 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18692 single-step traps here. Store the thread's last reported target
18693 wait status.
18694 (send_sigstop): Don't clear stop_expected. Always set it,
18695 instead.
18696 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18697 (cancel_finished_single_step): New.
18698 (cancel_finished_single_steps): New.
18699 (wait_for_sigstop): Don't cancel finished single-step traps here.
18700 (linux_resume_one_lwp): Don't check for removed breakpoints.
18701 Don't set `step' on non-hardware step archs.
18702 (linux_set_resume_request): Ignore resume_stop requests if already
18703 stopping or stopped. Set the lwp's last_resume_kind.
18704 (resume_status_pending_p): Don't check for removed breakpoints.
18705 (need_step_over_p): New.
18706 (start_step_over): New.
18707 (finish_step_over): New.
18708 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18709 requests. Clear the thread's last reported target waitstatus.
18710 Don't use the `suspended' flag. Don't consider pending breakpoints.
18711 (linux_resume): Start a step-over if necessary.
18712 (proceed_one_lwp): New.
18713 (proceed_all_lwps): New.
18714 (unstop_all_lwps): New.
18715 * linux-low.h (struct lwp_info): Rewrite comment for the
18716 `suspended' flag. Add the `stop_pc' field. Delete the
18717 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18718 Add `'last_resume_kind' and `need_step_over' fields.
18719 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18720 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18721 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18722 (set_raw_breakpoint_at): New.
18723 (set_breakpoint_at): Rewrite to use it.
18724 (reinsert_breakpoint_handler): Delete.
18725 (set_reinsert_breakpoint): New.
18726 (reinsert_breakpoint_by_bp): Delete.
18727 (delete_reinsert_breakpoints): New.
18728 (uninsert_breakpoint): Rewrite.
18729 (uninsert_breakpoints_at): New.
18730 (reinsert_breakpoint): Rewrite.
18731 (reinsert_breakpoints_at): New.
18732 (check_breakpoints): Rewrite.
18733 (breakpoint_here): New.
18734 (breakpoint_inserted_here): New.
18735 (check_mem_read): Adjust.
18736 * mem-break.h (breakpoints_supported, breakpoint_here)
18737 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18738 (reinsert_breakpoint_by_bp): Delete declaration.
18739 (delete_reinsert_breakpoints): Declare.
18740 (reinsert_breakpoint): Delete declaration.
18741 (reinsert_breakpoints_at): Declare.
18742 (uninsert_breakpoint): Delete declaration.
18743 (uninsert_breakpoints_at): Declare.
18744 (check_breakpoints): Adjust prototype.
18745 * server.h: Adjust include order.
18746 (struct thread_info): Declare here. Add a `last_status' field.
18747
18748 2010-03-23 Michael Snyder <msnyder@vmware.com>
18749
18750 * server.c (crc32): New function.
18751 (handle_query): Add handling for 'qCRC:' request.
18752
18753 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18754
18755 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18756 lwp had been stopped by a watchpoint.
18757
18758 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18759
18760 * server.h (internal_error): Declare.
18761 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18762 * utils.c (internal_error): New function.
18763
18764 2010-03-15 Andreas Schwab <schwab@redhat.com>
18765
18766 * configure.srv: Fix typo setting srv_regobj.
18767
18768 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18769
18770 * linux-low.c (fetch_register): Avoid passing a non string literal
18771 format to `error'.
18772 (usr_store_inferior_registers): Ditto.
18773
18774 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18775
18776 * linux-low.c (linux_write_memory): Bail out early if peeking
18777 memory failed.
18778
18779 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18780
18781 * linux-low.h (struct lwp_info): New fields
18782 `stopped_by_watchpoint' and `stopped_data_address'.
18783 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18784 here, and cache them in the lwp object.
18785 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18786 directly.
18787 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18788 field.
18789 (linux_stopped_by_watchpoint): Rewrite.
18790 (linux_stopped_data_address): Rewrite.
18791
18792 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18793
18794 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18795 switching the current inferior, not before.
18796
18797 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18798
18799 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18800 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18801 i386-linux.c and amd64-linux.c.
18802 (reg-i386.o): Removed.
18803 (reg-i386.c): Likewise.
18804 (reg-i386-linux.o): Likewise.
18805 (reg-i386-linux.c): Likewise.
18806 (reg-x86-64.o): Likewise.
18807 (reg-x86-64.c): Likewise.
18808 (reg-x86-64-linux.o): Likewise.
18809 (reg-x86-64-linux.c): Likewise.
18810 (i386.o): New.
18811 (i386.c): Likewise.
18812 (i386-linux.o): Likewise.
18813 (i386-linux.c): Likewise.
18814 (amd64.o): Likewise.
18815 (amd64.c): Likewise.
18816 (amd64-linux.o): Likewise.
18817 (amd64-linux.c): Likewise.
18818
18819 * configure.srv (srv_i386_regobj): New.
18820 (srv_i386_linux_regobj): Likewise.
18821 (srv_amd64_regobj): Likewise.
18822 (srv_amd64_linux_regobj): Likewise.
18823 (srv_i386_32bit_xmlfiles): Likewise.
18824 (srv_i386_64bit_xmlfiles): Likewise.
18825 (srv_i386_xmlfiles): Likewise.
18826 (srv_amd64_xmlfiles): Likewise.
18827 (srv_i386_linux_xmlfiles): Likewise.
18828 (srv_amd64_linux_xmlfiles): Likewise.
18829 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18830 srv_xmlfiles to $srv_i386_xmlfiles.
18831 (i[34567]86-*-mingw32ce*): Likewise.
18832 (i[34567]86-*-mingw*): Likewise.
18833 (i[34567]86-*-nto*): Likewise.
18834 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18835 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18836 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18837 (x86_64-*-linux*): Likewise.
18838
18839 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18840 (init_registers_amd64_linux): New.
18841 (x86_arch_setup): Replace init_registers_x86_64_linux with
18842 init_registers_amd64_linux.
18843
18844 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18845
18846 * configure.ac: Check for libdl. If it is not available link against
18847 static libthread_db.
18848 * configure: Regenerate.
18849
18850 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18851
18852 PR9605
18853
18854 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18855 handing a read watchpoint.
18856 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18857
18858 2010-02-12 Doug Evans <dje@google.com>
18859
18860 * linux-low.c (linux_supports_tracefork_flag): Document.
18861 (linux_look_up_symbols): Add comment.
18862
18863 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18864
18865 * regcache.c (supply_register): Clear regcache if buf is NULL.
18866
18867 2010-02-02 Nicolas Roche <roche@sourceware.org>
18868 Joel Brobecker <brobecker@adacore.com>
18869
18870 * inferiors.c (find_inferior): Add function documentation.
18871 (unloaded_dll): Handle the case where the unloaded dll has not
18872 been previously registered in the dll list.
18873
18874 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18875
18876 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18877 (thumb2_breakpoint): New.
18878 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18879
18880 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18881
18882 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18883 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18884 breakpoints.
18885
18886 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18887
18888 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18889
18890 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18891
18892 * linux-s390-low.c (s390_collect_ptrace_register)
18893 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18894
18895 2010-01-21 Doug Evans <dje@google.com>
18896
18897 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18898 (PTRACE_ARG4_TYPE): New macro.
18899 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18900 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18901 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18902 (usr_store_inferior_registers): Ditto.
18903 (linux_read_memory, linux_write_memory): Ditto.
18904 (linux_test_for_tracefork): Ditto.
18905
18906 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18907 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18908
18909 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18910
18911 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18912 target.
18913
18914 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18915
18916 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18917 prototype to take a regcache. Adjust.
18918
18919 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18920
18921 * regcache.h (struct thread_info): Forward declare.
18922 (struct regcache): New.
18923 (new_register_cache): Adjust prototype.
18924 (get_thread_regcache): Declare.
18925 (free_register_cache): Adjust prototype.
18926 (registers_to_string, registers_from_string): Ditto.
18927 (supply_register, supply_register_by_name, collect_register)
18928 (collect_register_as_string, collect_register_by_name): Ditto.
18929 * regcache.c (struct inferior_regcache_data): Delete.
18930 (get_regcache): Rename to ...
18931 (get_thread_regcache): ... this. Adjust. Switch inferior before
18932 fetching registers.
18933 (regcache_invalidate_one): Adjust.
18934 (regcache_invalidate): Fix prototype.
18935 (new_register_cache): Return the new register cache.
18936 (free_register_cache): Change prototype.
18937 (realloc_register_cache): Adjust.
18938 (registers_to_string): Change prototype to take a regcache. Adjust.
18939 (registers_from_string): Ditto.
18940 (register_data): Ditto.
18941 (supply_register): Ditto.
18942 (supply_register_by_name): Ditto.
18943 (collect_register): Ditto.
18944 (collect_register_as_string): Ditto.
18945 (collect_register_by_name): Ditto.
18946 * server.c (process_serial_event): Adjust.
18947 * linux-low.h (regset_fill_func, regset_store_func): Change
18948 prototype.
18949 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18950 Change prototype.
18951 * linux-low.c (get_stop_pc): Adjust.
18952 (check_removed_breakpoint): Adjust.
18953 (linux_wait_for_event): Adjust.
18954 (linux_resume_one_lwp): Adjust.
18955 (fetch_register): Add regcache parameter. Adjust.
18956 (usr_store_inferior_registers): Ditto.
18957 (regsets_fetch_inferior_registers): Ditto.
18958 (regsets_store_inferior_registers): Ditto.
18959 (linux_fetch_registers, linux_store_registers): Ditto.
18960 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18961 regcache. Adjust.
18962 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18963 Ditto.
18964 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18965 prototype to take a regcache.
18966 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18967 * remote-utils.c (convert_ascii_to_int, outreg)
18968 (prepare_resume_reply): Change prototype to take a regcache.
18969 Adjust.
18970 * target.h (struct target_ops) <fetch_registers, store_registers>:
18971 Change prototype to take a regcache.
18972 (fetch_inferior_registers, store_inferior_registers): Change
18973 prototype to take a regcache. Adjust.
18974 * proc-service.c (ps_lgetregs): Adjust.
18975 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18976 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18977 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18978 take a regcache. Adjust.
18979 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18980 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18981 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18982 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18983 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18984 (cris_cannot_fetch_register):
18985 (cris_breakpoint_at): Change prototype to take a regcache.
18986 Adjust.
18987 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18988 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18989 to take a regcache. Adjust.
18990 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18991 Adjust.
18992 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18993 take a regcache. Adjust.
18994 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18995 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18996 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18997 * linux-mips-low.c (mips_get_pc):
18998 (mips_set_pc): Change prototype to take a regcache. Adjust.
18999 (mips_reinsert_addr): Adjust.
19000 (mips_collect_register): Change prototype to take a regcache.
19001 Adjust.
19002 (mips_supply_register):
19003 (mips_collect_register_32bit, mips_supply_register_32bit)
19004 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
19005 (mips_store_fpregset): Ditto.
19006 * linux-ppc-low.c (ppc_supply_ptrace_register)
19007 (ppc_supply_ptrace_register): Ditto.
19008 (parse_spufs_run): Adjust.
19009 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
19010 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
19011 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
19012 take a regcache. Adjust.
19013 * linux-s390-low.c (s390_collect_ptrace_register)
19014 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
19015 (s390_set_pc): Change prototype to take a regcache. Adjust.
19016 (s390_arch_setup): Adjust.
19017 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
19018 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
19019 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
19020 (sparc_fill_gregset, sparc_store_gregset_from_stack)
19021 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
19022 regcache. Adjust.
19023 (sparc_breakpoint_at): Adjust.
19024 * linux-xtensa-low.c (xtensa_fill_gregset):
19025 (xtensa_store_gregset):
19026 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
19027 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
19028 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
19029 prototype to take a regcache. Adjust.
19030 * win32-arm-low.c (arm_fetch_inferior_register)
19031 (arm_store_inferior_register): Change prototype to take a
19032 regcache. Adjust.
19033 * win32-i386-low.c (i386_fetch_inferior_register)
19034 (i386_store_inferior_register): Change prototype to take a
19035 regcache. Adjust.
19036 * win32-low.c (child_fetch_inferior_registers)
19037 (child_store_inferior_registers): Change prototype to take a
19038 regcache. Adjust.
19039 (win32_wait): Adjust.
19040 (win32_fetch_inferior_registers): Change prototype to take a
19041 regcache. Adjust.
19042 (win32_store_inferior_registers): Adjust.
19043 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
19044 store_inferior_register>: Change prototype to take a regcache.
19045
19046 2010-01-20 Doug Evans <dje@google.com>
19047
19048 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
19049 #ifdef.
19050 (linux_wait_for_event1, linux_init_signals): Ditto.
19051 (W_STOPCODE): Provide definition if missing.
19052
19053 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
19054
19055 * linux-low.c (linux_core_of_thread): New.
19056 (compare_ints, show_process, list_threads): New.
19057 (linux_qxfer_osdata): Report threads and cores.
19058 (linux_target_op): Register linux_core_of_thread.
19059 * remote-utils.c (prepare_resume_reply): Report the core.
19060 (buffer_xml_printf): Support %d specifier.
19061 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
19062 New.
19063 (handle_query): Handle qXfer:threads. Announce availability
19064 thereof.
19065 * target.h (struct target_ops): New field core_of_thread.
19066
19067 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
19068
19069 * Makefile.in (clean): Remove new generated files.
19070 (reg-s390.o, reg-s390.c): Remove rules.
19071 (reg-s390x.o, reg-s390x.c): Likewise.
19072 (s390-linux32.o, s390-linux32.c): Add rules.
19073 (s390-linux64.o, s390-linux64.c): Likewise.
19074 (s390x-linux64.o, s390x-linux64.c): Likewise.
19075 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
19076 * linux-s390-low.c: Include <elf.h>.
19077 (HWCAP_S390_HIGH_GPRS): Define if undefined.
19078 (init_registers_s390): Remove prototype.
19079 (init_registers_s390x): Likewise.
19080 (init_registers_s390_linux32): Add prototype.
19081 (init_registers_s390_linux64): Likewise.
19082 (init_registers_s390x_linux64): Likewise.
19083 (s390_num_regs_3264): New define.
19084 (s390_regmap_3264): New global variable.
19085 (s390_cannot_fetch_register): Remove obsolete check.
19086 (s390_cannot_store_register): Likewise.
19087 (s390_collect_ptrace_register): Handle upper/lower register halves.
19088 (s390_supply_ptrace_register): Likewise.
19089 (s390_fill_gregset): Update to register number changes.
19090 (s390_get_hwcap): New routine.
19091 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
19092 Install appropriate regmap and register set.
19093
19094 2010-01-01 Joel Brobecker <brobecker@adacore.com>
19095
19096 * server.c (gdbserver_version): Update copyright year to 2010.
19097 * gdbreplay.c (gdbreplay_version): Likewise.
19098
19099 2009-12-28 Doug Evans <dje@google.com>
19100
19101 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
19102 elf/external.h. Include <elf.h> instead but only if necessary.
19103
19104 2009-12-28 Pedro Alves <pedro@codesourcery.com>
19105
19106 * linux-low.c (linux_remove_process): Remove `detaching'
19107 parameter. Don't release/detach from thread_db here.
19108 (linux_kill): Release/detach from thread_db here, ...
19109 (linux_detach): ... and here, before actually detaching.
19110 (linux_wait_1): ... and here, when a process exits.
19111 * thread-db.c (any_thread_of): New.
19112 (thread_db_free): Switch the current inferior to a thread of the
19113 passed in process.
19114
19115 2009-12-21 Doug Evans <dje@google.com>
19116
19117 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
19118
19119 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
19120 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
19121 warning ifndef __NR_tkill. Move setting of errno there too.
19122 Delete unnecessary resetting of errno after syscall.
19123 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
19124
19125 * configure.ac: Check for dladdr.
19126 * config.in: Regenerate.
19127 * configure: Regenerate.
19128 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
19129 (try_thread_db_load): Update.
19130
19131 * linux-low.c (my_waitpid): Delete unnecessary prototype.
19132
19133 2009-12-18 Doug Evans <dje@google.com>
19134
19135 * event-loop.c: Include unistd.h if it exists.
19136
19137 * linux-low.c (my_waitpid): Move definition away from being in
19138 between linux_tracefork_child/linux_test_for_tracefork.
19139
19140 * gdb_proc_service.h (psaddr_t): Fix type.
19141 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
19142 signature to match glibc.
19143
19144 2009-12-16 Doug Evans <dje@google.com>
19145
19146 * linux-low.c (linux_read_memory): Fix argument to read.
19147
19148 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19149
19150 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
19151 events, don't leave current_inferior pointing at null.
19152
19153 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19154
19155 * win32-low.c (LOG): Delete.
19156 (OUTMSG): Output to stderr.
19157 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
19158 on compile time LOG macro.
19159 (win32_wait): Fix debug output.
19160
19161 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19162
19163 * win32-low.c (win32_add_one_solib): If the dll name is
19164 "ntdll.dll", prepend the system directory to the dll path.
19165
19166 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
19167
19168 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
19169
19170 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
19171 Vladimir Prus <vladimir@codesourcery.com>
19172
19173 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
19174 * configure.ac: Check for __mcoldfire__ and set
19175 gdb_cv_m68k_is_coldfire.
19176 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
19177 reg-cf.o and reg-m68k.o.
19178 * configure: Regenerated.
19179
19180 2009-11-16 Pedro Alves <pedro@codesourcery.com>
19181
19182 * linux-low.c (linux_remove_process): Add `detaching' parameter.
19183 Pass it to thread_db_free.
19184 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
19185 proper `detaching' argument to linux_remove_process.
19186 * linux-low.h (thread_db_free): Add `detaching' parameter.
19187 * thread-db.c (thread_db_init): Pass false as `detaching' argument
19188 to thread_db_free.
19189 (thread_db_free): Add `detaching' parameter. Only
19190 call td_ta_clear_event if detaching from process.
19191
19192 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
19193
19194 * thread-db.c (thread_db_free): Fix typo.
19195
19196 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
19197
19198 PR gdb/10838
19199 * thread-db.c (thread_db_free): Call td_ta_clear_event.
19200
19201 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
19202
19203 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
19204 with an i686 compiler.
19205 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
19206 needed.
19207 * configure: Rebuilt.
19208
19209 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
19210
19211 PR gdb/10783
19212
19213 * server.c (handle_search_memory_1): Correct read_addr initialization
19214 in loop for searching subsequent chunks.
19215
19216 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
19217
19218 * configure.ac: New --with-libthread-db option.
19219 * thread-db.c: Allow direct dependence on libthread_db.
19220 (thread_db_free): Adjust.
19221 * config.in: Regenerate.
19222 * configure: Likewise.
19223
19224 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
19225
19226 PR gdb/10757
19227 * thread-db.c (attach_thread): New function.
19228 (maybe_attach_thread): Return success/failure.
19229 (find_new_threads_callback): Adjust.
19230 (thread_db_find_new_threads): Loop until no new threads.
19231
19232 2009-10-13 Pedro Alves <pedro@codesourcery.com>
19233
19234 * proc-service.c (ps_lgetregs): Formatting.
19235
19236 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
19237
19238 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
19239 * configure.ac: Adjust.
19240 * linux-low.h (struct process_info_private): Move members to struct
19241 thread_db.
19242 (thread_db_free, thread_db_handle_monitor_command): New prototype.
19243 * linux-low.c (linux_remove_process): Adjust.
19244 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
19245 * server.c (handle_query): Move code ...
19246 (handle_monitor_command): ... here. New function.
19247 * target.h (struct target_ops): New member.
19248 * thread-db.c (struct thread_db): New.
19249 (libthread_db_search_path): New variable.
19250 (thread_db_create_event, thread_db_enable_reporting)
19251 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
19252 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
19253 (try_thread_db_load_1, dladdr_to_soname): New functions.
19254 (try_thread_db_load, thread_db_load_search): New functions.
19255 (thread_db_init): Search for libthread_db.
19256 (thread_db_free): New function.
19257 (thread_db_handle_monitor_command): Likewise.
19258 * config.in: Regenerate.
19259 * configure: Regenerate.
19260
19261 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
19262
19263 * spu-low.c (spu_kill): Wait for inferior to terminate.
19264 Call clear_inferiors.
19265 (spu_detach): Call clear_inferiors.
19266
19267 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19268
19269 * aclocal.m4: Regenerate.
19270 * config.in: Likewise.
19271 * configure: Likewise.
19272
19273 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19274
19275 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
19276 (parse_spufs_run): New function.
19277 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
19278 (ppc_breakpoint_at): Handle SPU breakpoints.
19279
19280 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19281
19282 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
19283 (SPUFS_MAGIC): Define.
19284 (spu_enumerate_spu_ids): New function.
19285 (linux_qxfer_spu): New function.
19286 (linux_target_ops): Install linux_qxfer_spu.
19287
19288 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19289
19290 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
19291 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
19292 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
19293 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
19294 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
19295 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
19296 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
19297 (init_registers_powerpc_cell32l): Add prototype.
19298 (init_registers_powerpc_cell64l): Likewise.
19299 (ppc_arch_setup): Detect Cell/B.E. architecture.
19300
19301 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19302
19303 * Makefile.in (datarootdir): New variable.
19304
19305 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19306
19307 * linux-low.c (linux_write_memory): Update debugging output.
19308 * Makefile.in (clean): Add new descriptions.
19309 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
19310 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
19311 * configure.srv: Add new files for arm*-*-linux*.
19312 * linux-arm-low.c: Add new declarations.
19313 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
19314 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
19315 (HWCAP_VFPv3D16): New.
19316 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
19317 instead of __IWMMXT__.
19318 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
19319 (arm_arch_setup): New.
19320 (target_regsets): Remove #ifdef. Add VFP regset.
19321 (the_low_target): Use arm_arch_setup.
19322
19323 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19324
19325 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
19326 the main thread again.
19327
19328 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
19329
19330 Adding Neutrino gdbserver.
19331 * configure: Regenerated.
19332 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19333 * configure.srv (i[34567]86-*-nto*): New target.
19334 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19335 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19336 (nto_comctrl) [__QNX__]: New function.
19337 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19338
19339 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19340
19341 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19342 srv_tgtobj.
19343
19344 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19345 Pedro Alves <pedro@codesourcery.com>
19346
19347 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19348 don't support CONTEXT_EXTENDED_REGISTERS.
19349 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19350 (the_low_target): Install them.
19351 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19352 failing with ERROR_PIPE_NOT_CONNECTED.
19353
19354 2009-06-30 Doug Evans <dje@google.com>
19355 Pierre Muller <muller@ics.u-strasbg.fr>
19356
19357 Add h/w watchpoint support to x86-linux, win32-i386.
19358 * Makefile.in (SFILES): Add i386-low.c
19359 (i386_low_h): Define.
19360 (i386-low.o): Add dependencies.
19361 (linux-x86-low.o): Add i386-low.h dependency.
19362 (win32-i386-low.o): Ditto.
19363 * i386-low.c: New file.
19364 * i386-low.h: New file.
19365 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19366 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19367 * linux-low.c (linux_add_process): Initialize arch_private.
19368 (linux_remove_process): Free arch_private.
19369 (add_lwp): Initialize arch_private.
19370 (delete_lwp): Free arch_private.
19371 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19372 provided.
19373 * linux-low.h (process_info_private): New member arch_private.
19374 (lwp_info): New member arch_private.
19375 (linux_target_ops): New members new_process, new_thread,
19376 prepare_to_resume.
19377 (ptid_of): New macro.
19378 * linux-x86-low.c: Include stddef.h, i386-low.h.
19379 (arch_process_info): New struct.
19380 (arch_lwp_info): New struct.
19381 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19382 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19383 (i386_dr_low_get_status): New function.
19384 (x86_insert_point, x86_remove_point): New functions.
19385 (x86_stopped_by_watchpoint): New function.
19386 (x86_stopped_data_address): New function.
19387 (x86_linux_new_process, x86_linux_new_thread): New functions.
19388 (x86_linux_prepare_to_resume): New function.
19389 (the_low_target): Add entries for insert_point, remove_point,
19390 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19391 prepare_to_resume.
19392 * server.c (debug_hw_points): New global.
19393 (monitor_show_help): Document set debug-hw-points.
19394 (handle_query): Process "set debug-hw-points".
19395 * server.h (debug_hw_points): Declare.
19396 (paddress): Declare.
19397 * utils.c (NUMCELLS, CELLSIZE): New macros.
19398 (get_sell, xsnprintf, paddress): New functions.
19399 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19400 remove_point, stopped_by_watchpoint, stopped_data_address.
19401 * win32-i386-low.c: Include i386-low.h.
19402 (debug_reg_state): Replaces dr.
19403 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19404 (i386_dr_low_get_status): New function.
19405 (i386_insert_point, i386_remove_point): New functions.
19406 (i386_stopped_by_watchpoint): New function.
19407 (i386_stopped_data_address): New function.
19408 (i386_initial_stuff): Update.
19409 (get_thread_context,set_thread_context,i386_thread_added): Update.
19410 (the_low_target): Add entries for insert_point,
19411 remove_point, stopped_by_watchpoint, stopped_data_address.
19412 * win32-low.c (win32_insert_watchpoint): New function.
19413 (win32_remove_watchpoint): New function.
19414 (win32_stopped_by_watchpoint): New function.
19415 (win32_stopped_data_address): New function.
19416 (win32_target_ops): Add entries for insert_watchpoint,
19417 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19418 * win32-low.h (win32_target_ops): New members insert_point,
19419 remove_point, stopped_by_watchpoint, stopped_data_address.
19420
19421 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19422
19423 * server.c (process_serial_event): Re-return unsupported, not
19424 error, if the type isn't recognized. Re-allow supporting only
19425 insert or remove packets. Also call require_running for
19426 breakpoints. Add missing break statement to default case. Tidy.
19427 * target.h (struct target_ops): Rename insert_watchpoint to
19428 insert_point, and remove_watchpoint to remove_point.
19429
19430 * linux-low.h (struct linux_target_ops): Likewise.
19431 * linux-low.c (linux_insert_watchpoint): Rename to ...
19432 (linux_insert_point): ... this. Adjust.
19433 (linux_remove_watchpoint): Rename to ...
19434 (linux_remove_point): ... this. Adjust.
19435 (linux_target_ops): Adjust.
19436 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19437 (cris_insert_point): ... this.
19438 (cris_remove_watchpoint): Rename to ...
19439 (cris_remove_point): ... this.
19440 (the_low_target): Adjust.
19441
19442 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19443
19444 * server.c (handle_v_kill): Pass signal_pid to
19445 kill_inferior if multi_process is zero.
19446
19447 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19448
19449 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19450 * target.h (target_ops): Comment for *_watchpoint to make it clear
19451 the functions can get types '0' and '1'.
19452
19453 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19454
19455 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19456 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19457 * regcache.c (get_regcache): Likewise.
19458 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19459 * win32-low.c (child_fetch_inferior_registers): Remove check for
19460 regno 0.
19461
19462 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19463 Pedro Alves <pedro@codesourcery.com>
19464
19465 * target.h (struct target_ops) <supports_multi_process>: New
19466 callback.
19467 (target_supports_multi_process): New.
19468 * server.c (handle_query): Even if GDB reports support, only
19469 enable multi-process if the target also supports it. Report
19470 multi-process support only if the target backend supports it.
19471 * linux-low.c (linux_supports_multi_process): New function.
19472 (linux_target_ops): Install it as target_supports_multi_process
19473 callback.
19474
19475 2009-05-24 Doug Evans <dje@google.com>
19476
19477 Global renaming of find_thread_pid to find_thread_ptid.
19478 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19479 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19480 All callers updated.
19481
19482 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19483 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19484 directly.
19485
19486 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19487 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19488 (linux_resume_one_lwp): Ditto.
19489
19490 2009-05-23 Doug Evans <dje@google.com>
19491
19492 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19493 from struct inferior_list_entry * to struct lwp_info *.
19494 All callers updated.
19495
19496 2009-05-13 Doug Evans <dje@google.com>
19497
19498 * linux-x86-low.c: Don't include assert.h.
19499 (x86_siginfo_fixup): Use fatal, not assert.
19500 (x86_arch_setup): Fix comment.
19501
19502 2009-05-12 Doug Evans <dje@google.com>
19503
19504 Biarch support for i386/amd64 gdbserver.
19505 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19506 Add linux-x86-low.c.
19507 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19508 (linux-x86-low.o): Add.
19509 * linux-x86-64-low.c: Delete.
19510 * linux-i386-low.c: Delete.
19511 * linux-x86-low.c: New file.
19512 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19513 linux-x86-low.o.
19514 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19515 linux-x86-low.o.
19516 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19517 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19518 (linux_child_pid_to_exec_file): New function.
19519 (elf_64_header_p, elf_64_file_p): New functions.
19520 (siginfo_fixup): New function.
19521 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19522 give target a chance to convert layout.
19523 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19524 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19525
19526 2009-05-07 Doug Evans <dje@google.com>
19527
19528 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19529 (regsets_store_inferior_registers): Ditto.
19530
19531 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19532
19533 PR server/10048
19534
19535 * linux-low.c (must_set_ptrace_flags): Delete.
19536 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19537 of the global.
19538 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19539 `lwp->must_set_ptrace_flags' instead.
19540 (linux_wait_for_event_1): Set ptrace options here.
19541 (linux_wait_1): ... not here.
19542
19543 2009-04-30 Doug Evans <dje@google.com>
19544
19545 * inferiors.c (started_inferior_callback): New function.
19546 (attached_inferior_callback): New function.
19547 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19548 * server.c (print_started_pid, print_attached_pid): New functions.
19549 (detach_or_kill_for_exit): New function.
19550 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19551 * server.h (have_started_inferiors_p): Declare.
19552 (have_attached_inferiors_p): Declare.
19553
19554 * inferiors.c (remove_process): Fix memory leak, free process.
19555 * linux-low.c (linux_remove_process): New function.
19556 (linux_kill): Call it instead of remove_process.
19557 (linux_detach, linux_wait_1): Ditto.
19558
19559 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19560
19561 * configure.srv: Add x86 Windows CE target.
19562
19563 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19564
19565 * inferiors.c (get_thread_process): Make global.
19566 * server.h (get_thread_process): Add prototype.
19567 * thread-db.c (find_one_thread): Use get_thread_process
19568 instead of current_process.
19569 (thread_db_get_tls_address): Do not crash if called when
19570 thread layer is not yet initialized.
19571
19572 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19573
19574 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19575 * spu-low.c (current_tid): Rename to ...
19576 (current_ptid): ... this.
19577 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19578 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19579 ptid_get_lwp (current_ptid) instead of current_tid.
19580 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19581 instead of current_tid. Use find_process_pid to verify pid
19582 argument is valid. Pass proper argument to remove_process.
19583 (spu_thread_alive): Compare current_ptid instead of current_tid.
19584 (spu_resume): Likewise.
19585
19586 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19587
19588 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19589 variable.
19590
19591 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19592
19593 Implement the multiprocess extensions, and add linux multiprocess
19594 support.
19595
19596 * server.h (ULONGEST): Declare.
19597 (struct ptid, ptid_t): New.
19598 (minus_one_ptid, null_ptid): Declare.
19599 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19600 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19601 (struct inferior_list_entry): Change `id' type from unsigned from
19602 to ptid_t.
19603 (struct sym_cache, struct breakpoint, struct
19604 process_info_private): Forward declare.
19605 (struct process_info): Declare.
19606 (current_process): Declare.
19607 (all_processes): Declare.
19608 (initialize_inferiors): Declare.
19609 (add_thread): Adjust to use ptid_t.
19610 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19611 (add_process, remove_process, find_thread_pid): Declare.
19612 (find_inferior_id): Adjust to use ptid_t.
19613 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19614 (multi_process): Declare.
19615 (push_event): Adjust to use ptid_t.
19616 (read_ptid, write_ptid): Declare.
19617 (prepare_resume_reply): Adjust to use ptid_t.
19618 (clear_symbol_cache): Declare.
19619 * inferiors.c (all_processes): New.
19620 (null_ptid, minus_one_ptid): New.
19621 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19622 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19623 (add_thread): Change unsigned long to ptid. Remove gdb_id
19624 parameter. Adjust.
19625 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19626 (gdb_id_to_thread): Rename to ...
19627 (find_thread_pid): ... this. Change unsigned long to ptid.
19628 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19629 (loaded_dll, pull_pid_from_list): Adjust.
19630 (add_process, remove_process, find_process_pid)
19631 (get_thread_process, current_process, initialize_inferiors): New.
19632 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19633 (struct target_waitstatus) <related_pid>: Ditto.
19634 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19635 return type to int.
19636 (struct target_ops) <join>: Add `pid' argument.
19637 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19638 (struct target_ops) <wait>: Add `ptid' field. Change return type
19639 to ptid.
19640 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19641 (mywait): Add `ptid' argument. Change return type to ptid_t.
19642 (target_pid_to_str): Declare.
19643 * target.c (set_desired_inferior): Adjust to use ptids.
19644 (mywait): Add new `ptid' argument. Adjust.
19645 (target_pid_to_str): New.
19646 * mem-break.h (free_all_breakpoints): Declare.
19647 * mem-break.c (breakpoints): Delelete.
19648 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19649 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19650 to use per-process breakpoint list.
19651 (free_all_breakpoints): New.
19652 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19653 (symbol_cache, all_symbols_looked_up): Delete.
19654 (hexchars): New.
19655 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19656 read_ptid): New.
19657 (prepare_resume_reply): Change ptid argument's type from unsigned
19658 long to ptid_t. Adjust. Implement W;process and X;process.
19659 (free_sym_cache, clear_symbol_cache): New.
19660 (look_up_one_symbol): Adjust to per-process symbol cache. *
19661 * server.c (cont_thread, general_thread, step_thread): Change type
19662 to ptid_t.
19663 (attached): Delete.
19664 (multi_process): New.
19665 (last_ptid): Change type to ptid_t.
19666 (struct vstop_notif) <ptid>: Change type to ptid_t.
19667 (queue_stop_reply, push_event): Change `ptid' argument's type to
19668 ptid_t.
19669 (discard_queued_stop_replies): Add `pid' argument.
19670 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19671 changes. Don't reference the `attached' global.
19672 (attach_inferior): Adjust to mywait interface changes.
19673 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19674 features. Handle and report "multiprocess+". Handle
19675 "qAttached:PID".
19676 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19677 changes.
19678 (handle_v_kill): New.
19679 (handle_v_stopped): Adjust to use target_pid_to_str.
19680 (handle_v_requests): Allow multiple attaches and runs when
19681 multiprocess extensions are in effect. Handle "vKill".
19682 (myresume): Adjust to use ptids.
19683 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19684 (handle_status): Adjust to discard_queued_stop_replies interface
19685 change.
19686 (first_thread_of, kill_inferior_callback)
19687 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19688 (main): Call initialize_inferiors. Adjust to use ptids, killing
19689 and detaching from all inferiors. Handle multiprocess packet
19690 variants.
19691 * linux-low.h: Include gdb_proc_service.h.
19692 (struct process_info_private): New.
19693 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19694 <lwpid_of>: Use ptid_get_lwp.
19695 (get_lwp_thread): Adjust.
19696 (struct lwp_info): Add `dead' member.
19697 (find_lwp_pid): Declare.
19698 * linux-low.c (thread_db_active): Delete.
19699 (new_inferior): Adjust comment.
19700 (inferior_pid): Delete.
19701 (linux_add_process): New.
19702 (handle_extended_wait): Adjust.
19703 (add_lwp): Change unsigned long to ptid.
19704 (linux_create_inferior): Add process to processes table. Adjust
19705 to use ptids. Don't set new_inferior here.
19706 (linux_attach_lwp): Rename to ...
19707 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19708 it. Adjust to use ptids.
19709 (linux_attach_lwp): New.
19710 (linux_attach): Add process to processes table. Don't set
19711 new_inferior here.
19712 (struct counter): New.
19713 (second_thread_of_pid_p, last_thread_of_process_p): New.
19714 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19715 multiple processes.
19716 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19717 processes. Remove process from process table.
19718 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19719 to multiple processes.
19720 (any_thread_of): New.
19721 (linux_detach): Add `pid' argument, and handle it. Remove process
19722 from processes table.
19723 (linux_join): Add `pid' argument. Handle it.
19724 (linux_thread_alive): Change unsighed long argument to ptid_t.
19725 Consider dead lwps as not being alive.
19726 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19727 threads we're not interested in.
19728 (same_lwp, find_lwp_pid): New.
19729 (linux_wait_for_lwp): Change `pid' argument's type from int to
19730 ptid_t. Adjust.
19731 (linux_wait_for_event): Rename to ...
19732 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19733 from int to ptid_t. Adjust.
19734 (linux_wait_for_event): New.
19735 (linux_wait_1): Add `ptid' argument. Change return type to
19736 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19737 that exit from the process table.
19738 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19739 Adjust.
19740 (mark_lwp_dead): New.
19741 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19742 stopping all threads, mark its main lwp as dead.
19743 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19744 ptids.
19745 (fetch_register, usr_store_inferior_registers)
19746 (regsets_fetch_inferior_registers)
19747 (regsets_store_inferior_registers, linux_read_memory)
19748 (linux_write_memory): Inline `inferior_pid'.
19749 (linux_look_up_symbols): Adjust to use per-process
19750 `thread_db_active'.
19751 (linux_request_interrupt): Adjust to use ptids.
19752 (linux_read_auxv): Inline `inferior_pid'.
19753 (initialize_low): Don't reference thread_db_active.
19754 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19755 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19756 (ps_getpid): Return the pid of the current inferior.
19757 * thread-db.c (proc_handle, thread_agent): Delete.
19758 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19759 per-process data.
19760 (find_one_thread): Change argument type to ptid_t. Adjust to
19761 per-process data.
19762 (maybe_attach_thread): Adjust to per-process data and ptids.
19763 (thread_db_find_new_threads): Ditto.
19764 (thread_db_init): Ditto.
19765 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19766 processes table. Adjust to use ptids.
19767 (spu_kill, spu_detach): Adjust interface. Remove process from
19768 processes table.
19769 (spu_join, spu_thread_alive): Adjust interface.
19770 (spu_wait): Adjust interface. Remove process from processes
19771 table. Adjust to use ptids.
19772 * win32-low.c (current_inferior_tid): Delete.
19773 (current_inferior_ptid): New.
19774 (debug_event_ptid): New.
19775 (thread_rec): Take a ptid. Adjust.
19776 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19777 (child_delete_thread): Ditto.
19778 (do_initial_child_stuff): Add `attached' argument. Add process to
19779 processes table.
19780 (child_fetch_inferior_registers, child_store_inferior_registers):
19781 Adjust.
19782 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19783 (win32_attach): Pass 1 to do_initial_child_stuff.
19784 (win32_kill): Adjust interface. Remove process from processes
19785 table.
19786 (win32_detach): Ditto.
19787 (win32_join): Adjust interface.
19788 (win32_thread_alive): Take a ptid.
19789 (win32_resume): Adjust to use ptids.
19790 (get_child_debug_event): Ditto.
19791 (win32_wait): Adjust interface. Remove exiting process from
19792 processes table.
19793
19794 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19795
19796 Non-stop mode support.
19797
19798 * server.h (non_stop): Declare.
19799 (gdb_client_data, handler_func): Declare.
19800 (delete_file_handler, add_file_handler, start_event_loop):
19801 Declare.
19802 (handle_serial_event, handle_target_event, push_event)
19803 (putpkt_notif): Declare.
19804 * target.h (enum resume_kind): New.
19805 (struct thread_resume): Replace `step' field by `kind' field.
19806 (TARGET_WNOHANG): Define.
19807 (struct target_ops) <wait>: Add `options' argument.
19808 <supports_non_stop, async, start_non_stop>: New fields.
19809 (target_supports_non_stop, target_async): New.
19810 (start_non_stop): Declare.
19811 (mywait): Add `options' argument.
19812 * target.c (mywait): Add `options' argument. Print child exit
19813 notifications here.
19814 (start_non_stop): New.
19815 * server.c (non_stop, own_buf, mem_buf): New globals.
19816 (struct vstop_notif): New.
19817 (notif_queue): New global.
19818 (queue_stop_reply, push_event, discard_queued_stop_replies)
19819 (send_next_stop_reply): New.
19820 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19821 interface changes.
19822 (attach_inferior): In non-stop mode, don't wait for the target
19823 here.
19824 (handle_general_set): Handle QNonStop.
19825 (handle_query): When handling qC, return the current general
19826 thread, instead of the first thread of the list.
19827 (handle_query): If the backend supports non-stop mode, include
19828 QNonStop+ in the qSupported query response.
19829 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19830 and non-stop mode.
19831 (handle_v_attach, handle_v_run): Handle non-stop mode.
19832 (handle_v_stopped): New.
19833 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19834 (myresume): Adjust to use resume_kind. Handle non-stop.
19835 (queue_stop_reply_callback): New.
19836 (handle_status): Handle non-stop mode.
19837 (main): Clear non_stop flag on reconnection. Use the event-loop.
19838 Refactor serial protocol handling from here ...
19839 (process_serial_event): ... to this new function. When GDB
19840 selects any thread, select one here. In non-stop mode, wait until
19841 GDB acks all pending events before exiting.
19842 (handle_serial_event, handle_target_event): New.
19843 * remote-utils.c (remote_open): Install remote_desc in the event
19844 loop.
19845 (remote_close): Remove remote_desc from the event loop.
19846 (putpkt_binary): Rename to...
19847 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19848 (putpkt_binary): New as wrapper around putpkt_binary_1.
19849 (putpkt_notif): New.
19850 (prepare_resume_reply): In non-stop mode, don't change the
19851 general_thread.
19852 * event-loop.c: New.
19853 * Makefile.in (OBJ): Add event-loop.o.
19854 (event-loop.o): New rule.
19855
19856 * linux-low.h (pid_of): Moved here.
19857 (lwpid_of): New.
19858 (get_lwp_thread): Use lwpid_of.
19859 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19860 * linux-low.c (pid_of): Delete.
19861 (inferior_pid): Use lwpid_of.
19862 (linux_event_pipe): New.
19863 (target_is_async_p): New.
19864 (delete_lwp): New.
19865 (handle_extended_wait): Use lwpid_of.
19866 (add_lwp): Don't set lwpid field.
19867 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19868 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19869 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19870 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19871 first. Adjust to linux_wait_for_event interface changes. Use
19872 lwpid_of.
19873 (linux_detach): Don't delete the main lwp here.
19874 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19875 (status_pending_p): Don't consider explicitly suspended lwps.
19876 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19877 pointer. Add OPTIONS argument. Change return type to int. Use
19878 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19879 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19880 pointer. Add status pointer argument. Return a pid instead of a
19881 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19882 changes. In non-stop mode, don't switch to a random thread.
19883 (linux_wait): Rename to...
19884 (linux_wait_1): ... this. Add target_options argument, and handle
19885 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19886 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19887 clean exit and signal exit code. Don't stop all threads in
19888 non-stop mode. In all-stop mode, only stop all threads when
19889 reporting a stop to GDB. Handle explicit thread stop requests.
19890 (async_file_flush, async_file_mark): New.
19891 (linux_wait): New.
19892 (send_sigstop): Use lwpid_of.
19893 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19894 interface changes. In non-stop mode, don't switch to a random
19895 thread.
19896 (linux_resume_one_lwp): Use lwpid_of.
19897 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19898 (linux_resume_one_thread): ... this. Handle resume_stop. In
19899 non-stop mode, don't look for pending flag in all threads.
19900 (resume_status_pending_p): Don't consider explicitly suspended
19901 threads.
19902 (my_waitpid): Reimplement. Emulate __WALL.
19903 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19904 Use lwpid_of.
19905 (sigchld_handler, linux_supports_non_stop, linux_async)
19906 (linux_start_non_stop): New.
19907 (linux_target_ops): Register linux_supports_non_stop, linux_async
19908 and linux_start_non_stop.
19909 (initialize_low): Install SIGCHLD handler.
19910 * thread-db.c (thread_db_create_event, find_one_thread)
19911 (thread_db_get_tls_address): Use lwpid_of.
19912 * win32-low.c (win32_detach): Adjust to use resume_kind.
19913 (win32_wait): Add `options' argument.
19914 * spu-low.c (spu_resume): Adjust to use resume_kind.
19915 (spu_wait): Add `options' argument.
19916
19917 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19918
19919 Decouple target code from remote protocol.
19920
19921 * target.h (enum target_waitkind): New.
19922 (struct target_waitstatus): New.
19923 (struct target_ops) <wait>: Return an unsigned long. Take a
19924 target_waitstatus pointer instead of a char pointer.
19925 (mywait): Likewise.
19926 * target.c (mywait): Change prototype to return an unsigned long.
19927 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19928 * server.h (thread_from_wait, old_thread_from_wait): Delete
19929 declarations.
19930 (prepare_resume_reply): Change prototype to take a
19931 target_waitstatus.
19932 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19933 (last_status, last_ptid): New.
19934 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19935 pid instead of a signal.
19936 (attach_inferior): Remove "status" and "signal" parameters.
19937 Adjust.
19938 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19939 not as an address.
19940 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19941 (handle_v_requests, myresume): Remove "status" and "signal"
19942 parameters. Adjust.
19943 (handle_status): New.
19944 (main): Delete local `status'. Adjust.
19945 * remote-utils.c: Include target.h.
19946 (prepare_resume_reply): Change prototype to take a
19947 target_waitstatus. Adjust.
19948
19949 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19950 interface.
19951 * spu-low.c (spu_wait): Adjust.
19952 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19953 Delete.
19954 (win32_wait): Adjust.
19955
19956 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19957
19958 * target.h (struct thread_resume): Delete leave_stopped member.
19959 (struct target_ops): Add a `n' argument to the `resume' callback.
19960 * server.c (start_inferior): Adjust.
19961 (handle_v_cont, myresume): Adjust.
19962 * linux-low.c (check_removed_breakpoint): Adjust to resume
19963 interface change, and to removed leave_stopped field.
19964 (resume_ptr): Delete.
19965 (struct thread_resume_array): New.
19966 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19967 resume interface change.
19968 (linux_continue_one_thread, linux_queue_one_thread)
19969 (resume_status_pending_p): Check if the resume field is NULL
19970 instead of checking the leave_stopped member.
19971 (linux_resume): Adjust to the target resume interface change.
19972 * spu-low.c (spu_resume): Adjust to the target resume interface
19973 change.
19974 * win32-low.c (win32_detach, win32_resume): Ditto.
19975
19976 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19977
19978 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19979 flag.
19980 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19981 pending.
19982 (linux_continue_one_thread): Only preserve the stepping flag if
19983 there's a pending breakpoint.
19984
19985 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19986
19987 * server.c (main): After the inferior having exited, call
19988 remote_close before exiting gdbserver.
19989
19990 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19991
19992 Fix size of FPSCR in Power 7 processors.
19993 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19994 (PPC_FEATURE_HAS_DFP): New #define.
19995 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19996 size of the FPSCR.
19997
19998 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19999
20000 * server.c (handle_query) Whitespace and formatting.
20001
20002 2009-03-22 Pedro Alves <pedro@codesourcery.com>
20003
20004 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
20005 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
20006 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
20007 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
20008 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
20009 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
20010 Makefile.in, configure.ac: Fix whitespace throughout.
20011 * configure: Regenerate.
20012
20013 2009-03-22 Pedro Alves <pedro@codesourcery.com>
20014
20015 * inferiors.c (find_inferior): Make it safe for the callback
20016 function to delete the currently iterated inferior.
20017
20018 2009-03-22 Pedro Alves <pedro@codesourcery.com>
20019
20020 * Makefile.in (linuw_low_h): Move higher.
20021 (thread-db.o): Depend on $(linux_low_h).
20022
20023 2009-03-17 Pedro Alves <pedro@codesourcery.com>
20024
20025 Rename "process" to "lwp" throughout.
20026
20027 * linux-low.c (all_processes): Rename to...
20028 (all_lwps): ... this.
20029 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
20030 (add_process): Rename to ...
20031 (add_lwp): ... this. Adjust.
20032 (linux_create_inferior): Adjust.
20033 (linux_attach_lwp): Adjust.
20034 (linux_attach): Adjust.
20035 (linux_kill_one_process): Rename to ...
20036 (linux_kill_one_lwp): ... this. Adjust.
20037 (linux_kill): Adjust.
20038 (linux_detach_one_process): Rename to ...
20039 (linux_detach_one_lwp): ... this. Adjust.
20040 (linux_detach): Adjust.
20041 (check_removed_breakpoint): Adjust.
20042 (status_pending_p): Adjust.
20043 (linux_wait_for_process): Rename to ...
20044 (linux_wait_for_lwp): ... this. Adjust.
20045 (linux_wait_for_event): Adjust.
20046 (send_sigstop): Adjust.
20047 (wait_for_sigstop): Adjust.
20048 (stop_all_processes): Rename to ...
20049 (stop_all_lwps): ... this.
20050 (linux_resume_one_process): Rename to ...
20051 (linux_resume_one_lwp): ... this. Adjust.
20052 (linux_set_resume_request, linux_continue_one_thread)
20053 (linux_queue_one_thread, resume_status_pending_p)
20054 (usr_store_inferior_registers, regsets_store_inferior_registers)
20055 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
20056 Adjust.
20057 * linux-low.h (get_process): Rename to ...
20058 (get_lwp): ... this. Adjust.
20059 (get_thread_process): Rename to ...
20060 (get_thread_lwp): ... this. Adjust.
20061 (get_process_thread): Rename to ...
20062 (get_lwp_thread): ... this. Adjust.
20063 (struct process_info): Rename to ...
20064 (struct lwp_info): ... this.
20065 (all_processes): Rename to ...
20066 (all_lwps): ... this.
20067 * proc-service.c (ps_lgetregs): Adjust.
20068 * thread-db.c (thread_db_create_event, find_one_thread)
20069 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
20070
20071 2009-03-14 Pedro Alves <pedro@codesourcery.com>
20072
20073 * server.c (handle_query): Handle "qAttached".
20074
20075 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
20076
20077 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
20078 GPLv3, update license URL.
20079
20080 2009-03-01 Doug Evans <dje@google.com>
20081
20082 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
20083 (server_h): Add gdb_signals.h.
20084 (signals.o): Update.
20085 * server.h (target_signal_from_host,target_signal_to_host_p)
20086 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
20087
20088 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
20089
20090 * remote-utils.c (getpkt): Also generate remote-debug
20091 information if noack_mode is set.
20092
20093 2009-02-06 Pedro Alves <pedro@codesourcery.com>
20094
20095 * server.c (handle_query): Report qXfer:siginfo:read and
20096 qXfer:siginfo:write as supported and handle them.
20097 * target.h (struct target_ops) <qxfer_siginfo>: New field.
20098 * linux-low.c (linux_xfer_siginfo): New.
20099 (linux_target_ops): Set it.
20100
20101 2009-01-26 Pedro Alves <pedro@codesourcery.com>
20102
20103 * server.c (gdbserver_usage): Mention --remote-debug.
20104 (main): Accept '--remote-debug' switch.
20105
20106 2009-01-18 Doug Evans <dje@google.com>
20107
20108 * regcache.c (new_register_cache): No need to check result of xcalloc.
20109 * server.c (handle_search_memory): Back out calls to xmalloc,
20110 result is checked and error is returned to user upon failure.
20111 (handle_query): Ditto. Add more checks for result of malloc.
20112 (handle_v_cont): Check result of malloc, report error back to
20113 user upon failure.
20114 (handle_v_run): Ditto. Call freeargv.
20115 * server.h (freeargv): Declare.
20116 * utils.c (freeargv): New fn.
20117
20118 2009-01-15 Doug Evans <dje@google.com>
20119
20120 * gdbreplay.c (perror_with_name): Make arg const char *.
20121 * server.h (target_signal_to_name): Make return type const char *.
20122 * thread-db.c (thread_db_err_str): Make return type const char *.
20123 * utils.c (perror_with_name): Make arg const char *.
20124
20125 2009-01-14 Pedro Alves <pedro@codesourcery.com>
20126
20127 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
20128 when handling a EXIT_PROCESS_DEBUG_EVENT.
20129
20130 2009-01-06 Joel Brobecker <brobecker@adacore.com>
20131
20132 * gdbreplay.c (gdbreplay_version): Update copyright year.
20133 * server.c (gdbserver_version): Likewise.
20134
20135 2009-01-05 Doug Evans <dje@google.com>
20136
20137 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
20138 (handle_extended_wait): Improve comment.
20139
20140 2008-12-13 Doug Evans <dje@google.com>
20141
20142 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
20143 * server.h (ATTR_MALLOC): New macro.
20144 (xmalloc,xcalloc,xstrdup): Declare.
20145 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
20146 * inferiors.c: Ditto.
20147 * linux-low.c: Ditto.
20148 * mem-break.c: Ditto.
20149 * regcache.c: Ditto.
20150 * remote-utils.c: Ditto.
20151 * server.c: Ditto.
20152 * target.c: Ditto.
20153 * win32-low.c: Ditto.
20154
20155 2008-12-12 Doug Evans <dje@google.com>
20156
20157 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
20158 in debugging printf.
20159
20160 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
20161
20162 2008-12-09 Doug Evans <dje@google.com>
20163
20164 * linux-low.h (struct process_info): Delete member tid, unused.
20165 * thread-db.c (find_one_thread): Update.
20166 (maybe_attach_thread): Update.
20167
20168 2008-12-02 Pedro Alves <pedro@codesourcery.com>
20169
20170 * target.h (struct target_ops): Add qxfer_osdata member.
20171 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
20172 and dirent.h.
20173 (linux_qxfer_osdata): New functions.
20174 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
20175 callback.
20176 * server.c (handle_query): Handle "qXfer:osdata:read:".
20177 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
20178 (buffer_xml_printf): New functions.
20179 * server.h (struct buffer): New.
20180 (buffer_grow_str, buffer_grow_str0): New macros.
20181 (buffer_grow, buffer_free, buffer_init, buffer_finish)
20182 (buffer_xml_printf): Declare.
20183
20184 2008-11-24 Doug Evans <dje@google.com>
20185
20186 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
20187
20188 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
20189
20190 * server.c (handle_v_run): Always use the supplied argument list.
20191
20192 2008-11-19 Bob Wilson <bob.wilson@acm.org>
20193
20194 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
20195 (xtensa_regmap_table): Add entry for scompare1.
20196
20197 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
20198
20199 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
20200 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
20201 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
20202 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
20203 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
20204 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
20205 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
20206 XML target descriptions.
20207 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
20208 when inferior is running on an ISA 2.05 or later processor. Add
20209 special case to return offset for full 64-bit slot of FPSCR when
20210 in 32-bits.
20211
20212 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
20213
20214 * Makefile.in (SFILES, clean): Added sparc64 files.
20215 (reg-sparc64.o, reg-sparc64.c): New.
20216 * configure.srv (sparc*-*-linux*): New configuration.
20217 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
20218 syscall arguments for SPARC.
20219 (regsets_store_inferior_registers): Likewise.
20220 * linux-sparc-low.c: New file.
20221
20222 2008-10-21 Doug Evans <dje@google.com>
20223
20224 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
20225 (READLINE_DIR,READLINE_DEP): Delete.
20226 (INTERNAL_CFLAGS): Update.
20227 (LINTFLAGS): Update.
20228
20229 2008-10-10 Pedro Alves <pedro@codesourcery.com>
20230
20231 * server.c (handle_v_run): If GDB didn't specify an argv, use the
20232 whole argv from the last run, not just argv[0].
20233
20234 2008-09-08 Pedro Alves <pedro@codesourcery.com>
20235
20236 * regcache.c (new_register_cache): Return NULL if the register
20237 cache size isn't known yet.
20238 (free_register_cache): Avoid dereferencing a NULL regcache.
20239
20240 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20241
20242 * configure.srv: Merge MIPS and MIPS64.
20243
20244 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
20245
20246 * Makefile.in (uninstall): Apply $(EXEEXT) too.
20247
20248 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
20249
20250 * Makefile.in: Add required vsx dependencies.
20251
20252 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
20253 Declare init_registers_powerpc_vsx32l.
20254 Declare init_registers_powerpc_vsx64l.
20255 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
20256 (ppc_arch_setup): Check for VSX in hwcap.
20257 (ppc_fill_vsxregset): New function.
20258 (ppc_store_vsxregset): New function.
20259 Add new VSX entry in regset_info target_regsets.
20260
20261 * configure.srv: Add new VSX dependencies.
20262
20263 2008-08-12 Pedro Alves <pedro@codesourcery.com>
20264
20265 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
20266 (remote_open): Set or clear transport_is_reliable.
20267 (putpkt_binary): Don't expect acks in noack mode.
20268 (getpkt): Don't send ack/nac in noack mode.
20269 * server.c (handle_general_set): Handle QStartNoAckMode.
20270 (handle_query): If connected by tcp pass QStartNoAckMode+ in
20271 qSupported.
20272 (main): Reset noack_mode on every connection.
20273 * server.h (noack_mode): Declare.
20274
20275 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
20276
20277 * Makefile.in (GDBREPLAY_OBS): New variable.
20278 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
20279
20280 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
20281 Daniel Jacobowitz <dan@codesourcery.com>
20282
20283 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
20284 (usr_store_inferior_registers): Likewise.
20285 (regsets_store_inferior_registers): Likewise.
20286
20287 2008-07-31 Rolf Jansen <rj@surtec.com>
20288 Pedro Alves <pedro@codesourcery.com>
20289
20290 * configure.ac: Check for memmem declaration.
20291 * server.c [HAVE_MALLOC_H]: Include malloc.h.
20292 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
20293 (disable_packet_qfThreadInfo): Unconditionally compile.
20294 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
20295 * configure, config.in: Regenerate.
20296
20297 2008-07-28 Doug Kwan <dougkwan@google.com>
20298
20299 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
20300 (linux_write_memory): Remove declaration of errno.
20301
20302 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
20303
20304 * linux-low.c (handle_extended_wait): Do not use "status"
20305 variable uninitialized.
20306
20307 2008-07-07 Pedro Alves <pedro@codesourcery.com>
20308
20309 * server.c (handle_v_attach): Inhibit reporting dll changes.
20310
20311 2008-06-27 Pedro Alves <pedro@codesourcery.com>
20312
20313 * remote-utils.c (prepare_resume_reply): If requested, don't
20314 output "thread:TID" in the T stop reply.
20315
20316 * server.c (disable_packet_vCont, disable_packet_Tthread)
20317 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
20318 (handle_query): If requested, disable support for qC, qfThreadInfo
20319 and qsThreadInfo.
20320 (handle_v_requests): If requested, disable support for vCont.
20321 (gdbserver_show_disableable): New.
20322 (main): Handle --disable-packet and --disable-packet=LIST.
20323
20324 * server.h (disable_packet_vCont, disable_packet_Tthread)
20325 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
20326
20327 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
20328
20329 * server.c (gdbserver_usage): Mention --version.
20330
20331 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20332
20333 * Makefile.in (gdbreplay.o): New rule.
20334
20335 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20336
20337 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20338 message, not gdbserver.
20339
20340 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20341 Nathan Sidwell <nathan@codesourcery.com>
20342 Joseph Myers <joseph@codesourcery.com>
20343
20344 * acinclude.m4: Include ../../config/acx.m4.
20345 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20346 * configure, config.in: Regenerate.
20347 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20348 * server.c (gdbserver_version): Print PKGVERSION.
20349 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20350 (main): Adjust gdbserver_usage calls.
20351 * gdbreplay.c (version, host_name): Add declarations.
20352 (gdbreplay_version, gdbreplay_usage): New.
20353 (main): Accept --version and --help options.
20354
20355 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20356
20357 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20358 (arm_breakpoint_at): Handle Thumb.
20359 (the_low_target): Add comment.
20360
20361 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20362
20363 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20364
20365 2008-05-09 Doug Evans <dje@google.com>
20366
20367 * server.h (decode_search_memory_packet): Declare.
20368 * remote-utils.c (decode_search_memory_packet): New fn.
20369 * server.c (handle_search_memory_1): New fn.
20370 (handle_search_memory): New fn.
20371 (handle_query): Process qSearch:memory packets.
20372
20373 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20374
20375 * regcache.c (registers_length): Remove.
20376 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20377 full register packet.
20378 * regcache.h (registers_length): Remove prototype.
20379 * server.h (PBUFSIZ): Define to 16384.
20380
20381 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20382
20383 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20384 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20385 powerpc-64l.o, and powerpc-altivec64l.o.
20386 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20387 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20388 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20389 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20390 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20391 to srv_xmlfiles.
20392
20393 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20394 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20395 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20396 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20397 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20398 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20399 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20400 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20401 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20402 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20403 (clean): Update.
20404
20405 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20406 (init_registers_powerpc_32l): ... this new prototype.
20407 (init_registers_powerpc_32): Remove, replace by ...
20408 (init_registers_powerpc_altivec32l): ... this new prototype.
20409 (init_registers_powerpc_e500): Remove, replace by ...
20410 (init_registers_powerpc_e500l): ... this new prototype.
20411 (init_registers_ppc64): Remove, replace by ...
20412 (init_registers_powerpc_64l): ... this new prototype.
20413 (init_registers_powerpc_64): Remove, replace by ...
20414 (init_registers_powerpc_altivec64l): ... this new prototype.
20415 (ppc_num_regs): Set to 73.
20416 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20417 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20418 (ppc_cannot_store_register): Handle orig_r3 and trap.
20419 (ppc_arch_setup): Update init_registers_... calls.
20420 (ppc_fill_gregset): Handle orig_r3 and trap.
20421
20422 * inferiors.c (clear_inferiors): Reset current_inferior.
20423
20424 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20425
20426 * acinclude.m4: Add override.m4.
20427 * configure: Regenerate.
20428
20429 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20430
20431 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20432 initial call to init_register_ppc64.
20433
20434 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20435
20436 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20437 single powerpc*-*-linux* case.
20438 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20439
20440 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20441
20442 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20443 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20444 from reg_xmlfiles.
20445 * linux-ppc-low.c: Include <elf.h>.
20446 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20447 (ppc_hwcap): New global variable.
20448 (ppc_regmap): Remove __SPE__ #ifdef sections.
20449 (ppc_regmap_e500): New global variable.
20450 (ppc_cannot_store_register): Update __SPE__ special case.
20451 (ppc_get_hwcap): New function.
20452 (ppc_arch_setup): Use it to determine whether inferior supports
20453 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20454 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20455 Do not access registers if target does not support AltiVec.
20456 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20457 Do not access registers if target does not support SPE.
20458 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20459
20460 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20461
20462 * linux-low.c (disabled_regsets, num_regsets): New.
20463 (use_regsets_p): Delete.
20464 (linux_wait_for_process): Clear disabled_regsets.
20465 (regsets_fetch_inferior_registers): Check and set it.
20466 (regsets_store_inferior_registers): Likewise.
20467 (linux_fetch_registers, linux_store_registers): Do not use
20468 use_regsets_p.
20469 (initialize_low): Allocate disabled_regsets.
20470
20471 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20472
20473 * Makefile.in (LIBOBJS): New.
20474 (OBS): Use LIBOBJS.
20475 (memmem.o): New rule.
20476 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20477 * configure: Regenerated.
20478
20479 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20480
20481 * server.c (handle_query): Never return "unsupported" for
20482 qXfer:features:read queries.
20483
20484 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20485
20486 * server.c (get_features_xml): Fix inverted condition.
20487 (handle_query): Always support qXfer:feature:read.
20488
20489 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20490
20491 * server.c (wrapper_argv): New.
20492 (start_inferior): Handle wrapper_argv. If set, expect an extra
20493 trap.
20494 (gdbserver_usage): Document --wrapper.
20495 (main): Parse --wrapper.
20496
20497 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20498
20499 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20500 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20501 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20502 (ppc_set_pc): Likewise.
20503 (ppc_arch_setup): New function.
20504 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20505 of collect_register.
20506 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20507
20508 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20509
20510 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20511 instead of linux-ppc64-low.o.
20512 * linux-ppc64-low.c: Remove file.
20513 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20514 (linux-ppc64-low.o): Remove rule.
20515
20516 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20517 (init_registers_powerpc_64): Likewise.
20518 (ppc_regmap): Conditionally define depending on __powerpc64__.
20519 (ppc_cannot_store_register): Do not special-case "fpscr" when
20520 compiled on __powerpc64__.
20521 (ppc_collect_ptrace_register): New function.
20522 (ppc_supply_ptrace_register): New function.
20523 (ppc_breakpoint): Change type to "unsigned int".
20524 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20525 (the_low_target): Conditionally provide initializers for the
20526 arch_setup member depending on __powerpc64__. Install
20527 collect_ptrace_register and supply_ptrace_register members.
20528
20529 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20530
20531 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20532 * server.c (gdbserver_xmltarget): Define.
20533 (get_features_xml): Use it to replace "target.xml" and arch_string.
20534
20535 * configure.srv: Remove srv_xmltarget. Add XML files that were
20536 mentioned there to srv_xmlfiles instead. Remove conditional tests
20537 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20538 srv_xmlfiles and srv_regobj to include all possible choices.
20539 * configure.ac (srv_xmltarget): Remove.
20540 (srv_xmlfiles): Do not add "target.xml".
20541 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20542 checks for supplementary target information.
20543 * configure: Regenerate.
20544 * Makefile.in (XML_TARGET): Remove.
20545 (target.xml): Remove rule.
20546 (clean): Do not clean up target.xml.
20547 (.PRECIOUS): Do not mention target.xml.
20548
20549 * target.h (struct target_ops): Remove arch_string member.
20550 * linux-low.c (linux_arch_string): Remove.
20551 (linux_target_ops): Remove arch_string initializer.
20552 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20553 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20554 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20555 * spu-low.c (spu_arch_string): Remove.
20556 (spu_target_ops): Remove arch_string initializer.
20557 * win32-low.c (win32_arch_string): Remove.
20558 (win32_target_ops): Remove arch_string initializer.
20559 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20560 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20561 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20562
20563 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20564
20565 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20566 by collect_ptrace_register and supply_ptrace_register hooks.
20567 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20568 instead of checking for the_low_target.left_pad_xfer.
20569 (usr_store_inferior_registers): Use collect_ptrace_register callback
20570 instead of checking for the_low_target.left_pad_xfer.
20571
20572 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20573 (s390_supply_ptrace_register): Likewise.
20574 (s390_fill_gregset): Call s390_collect_ptrace_register.
20575 (the_low_target): Update.
20576
20577 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20578 (ppc_supply_ptrace_register): Likewise.
20579 (the_low_target): Update.
20580
20581 * linux-i386-low.c (the_low_target): Update.
20582 * linux-x86-64-low.c (the_low_target): Update.
20583
20584 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20585
20586 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20587 reg-s390.o and reg-s390x.o.
20588
20589 * linux-low.c (new_inferior): New global variable.
20590 (linux_create_inferior, linux_attach): Set it.
20591 (linux_wait_for_process): Call the_low_target.arch_setup after the
20592 target has stopped for the first time.
20593 (initialize_low): Do not call the_low_target.arch_setup.
20594
20595 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20596 (s390_set_pc): Likewise.
20597 (s390_arch_setup): New function.
20598 (the_low_target): Use s390_arch_setup as arch_setup routine.
20599
20600 * regcache.c (realloc_register_cache): New function.
20601 (set_register_cache): Call it for each existing regcache.
20602
20603 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20604
20605 * server.h (init_registers): Remove prototype.
20606
20607 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20608 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20609 instead of init_registers ().
20610 * linux-arm-low.c (init_registers_arm): Add prototype.
20611 (init_registers_arm_with_iwmmxt): Likewise.
20612 (the_low_target): Add initializer for arch_setup field.
20613 * linux-cris-low.c (init_registers_cris): Add prototype.
20614 (the_low_target): Add initializer for arch_setup field.
20615 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20616 (the_low_target): Add initializer for arch_setup field.
20617 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20618 (the_low_target): Add initializer for arch_setup field.
20619 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20620 (the_low_target): Add initializer for arch_setup field.
20621 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20622 (the_low_target): Add initializer for arch_setup field.
20623 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20624 (the_low_target): Add initializer for arch_setup field.
20625 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20626 (init_registers_mips64_linux): Likewise.
20627 (the_low_target): Add initializer for arch_setup field.
20628 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20629 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20630 (the_low_target): Add initializer for arch_setup field.
20631 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20632 (init_registers_powerpc_64): Likewise.
20633 (the_low_target): Add initializer for arch_setup field.
20634 * linux-s390-low.c (init_registers_s390): Add prototype.
20635 (init_registers_s390x): Likewise.
20636 (the_low_target): Add initializer for arch_setup field.
20637 * linux-sh-low.c (init_registers_sh): Add prototype.
20638 (the_low_target): Add initializer for arch_setup field.
20639 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20640 (the_low_target): Add initializer for arch_setup field.
20641 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20642 (the_low_target): Add initializer for arch_setup field.
20643
20644 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20645 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20646 instead of init_registers ().
20647 * win32-arm-low.c (init_registers_arm): Add prototype.
20648 (the_low_target): Add initializer for arch_setup field.
20649 * win32-i386-low.c (init_registers_i386): Add prototype.
20650 (the_low_target): Add initializer for arch_setup field.
20651
20652 * spu-low.c (init_registers_spu): Add prototype.
20653 (initialize_low): Call initialie_registers_spu () instead of
20654 initialize_registers ().
20655
20656 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20657
20658 * server.c (handle_v_requests): When handling the vRun and vAttach
20659 packets, if already debugging a process, don't kill it. Return an
20660 error instead.
20661
20662 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20663
20664 * server.c (handle_query): Correct length check.
20665
20666 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20667
20668 * win32-low.c (do_initial_child_stuff): Add process handle
20669 parameter. Set current_process_handle and current_process_id from the
20670 parameters. Clear globals.
20671 (win32_create_inferior): Don't set current_process_handle and
20672 current_process_id here. Instead pass them on the call to
20673 do_initial_child_stuff.
20674 (win32_attach): Likewise.
20675 (win32_clear_inferiors): New.
20676 (win32_kill): Don't close the current process handle or the
20677 current thread handle here. Instead call win32_clear_inferiors.
20678 (win32_detach): Don't open a new handle to the process. Call
20679 win32_clear_inferiors.
20680 (win32_join): Don't rely on current_process_handle; open a new
20681 handle using the process id.
20682 (win32_wait): Call win32_clear_inferiors when the inferior process
20683 has exited.
20684
20685 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20686
20687 * server.c (monitor_show_help): Add "exit".
20688
20689 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20690
20691 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20692 (clean): Add reg-xtensa.c.
20693 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20694 * configure.srv (xtensa*-*-linux*) New target.
20695 * linux-xtensa-low.c: New.
20696 * xtensa-xtregs.c: New.
20697
20698 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20699
20700 * hostio.c: Don't include errno.h.
20701 (errno_to_fileio_errno): Move to hostio-errno.
20702 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20703 error number outputting to the target->hostio_last_error callback.
20704 (hostio_packet_error): Use FILEIO_EINVAL directly.
20705 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20706 calls to hostio_error.
20707 * hostio-errno.c: New.
20708 * server.h (hostio_last_error_from_errno): Declare.
20709 * target.h (target_ops): Add hostio_last_error member.
20710 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20711 as hostio_last_error handler.
20712 * spu-low.c (spu_target_ops): Likewise.
20713 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20714 (wince_hostio_last_error): New functions.
20715 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20716 as hostio_last_error handler.
20717 (win32_target_ops) [!_WIN32_WCE]: Register
20718 hostio_last_error_from_errno as hostio_last_error handler.
20719 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20720 (hostio-errno.o): New rule.
20721 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20722 * configure.srv (srv_hostio_err_objs): New variable. Default to
20723 hostio-errno.o.
20724 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20725 * configure: Regenerate.
20726
20727 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20728
20729 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20730 (linux_kill, linux_detach): Clean up the process list.
20731 * remote-utils.c (remote_open): Improve port number parsing.
20732 (putpkt_binary, input_interrupt): Only send interrupts if the target
20733 is running.
20734 * server.c (extended_protocol): Make static.
20735 (attached): Define earlier.
20736 (exit_requested, response_needed, program_argv): New variables.
20737 (target_running): New.
20738 (start_inferior): Clear attached here.
20739 (attach_inferior): Set attached here.
20740 (require_running): Define.
20741 (handle_query): Use require_running and target_running. Implement
20742 "monitor exit".
20743 (handle_v_attach, handle_v_run): New.
20744 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20745 (gdbserver_usage): Update.
20746 (main): Redo argument parsing. Handle --debug and --multi. Handle
20747 --attach along with other options or after the port. Save
20748 program_argv. Support no initial program. Resynchronize
20749 communication with GDB after an error. Handle "monitor exit".
20750 Use require_running and target_running. Always allow the extended
20751 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20752 restart in extended mode.
20753 * README: Refer to the GDB manual. Update --attach usage.
20754
20755 2007-12-20 Andreas Schwab <schwab@suse.de>
20756
20757 * linux-low.c (STACK_SIZE): Define.
20758 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20759 (linux_test_for_tracefork): Likewise.
20760
20761 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20762
20763 * linux-low.c (linux_wait_for_event): Update messages. Do not
20764 reinsert auto-delete breakpoints.
20765 * mem-break.c (struct breakpoint): Change return type of handler to
20766 int.
20767 (set_breakpoint_at): Update handler type.
20768 (reinsert_breakpoint_handler): Return 1 instead of calling
20769 delete_breakpoint.
20770 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20771 setting a new one.
20772 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20773 * mem-break.h (set_breakpoint_at): Update handler type.
20774 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20775 * win32-low.c (auto_delete_breakpoint): New.
20776 (get_child_debug_event): Use it.
20777
20778 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20779
20780 * configure.ac: Check for pread and pwrite.
20781 * hostio.c (handle_pread): Fall back to lseek and read.
20782 (handle_pwrite): Fall back to lseek and write.
20783 * config.in, configure: Regenerated.
20784
20785 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20786
20787 * server.c (myresume): Add own_buf argument.
20788 (main): Update calls.
20789
20790 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20791
20792 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20793 * remote-utils.c (remote_open): Do not call disable_async_io.
20794 (block_async_io): Delete.
20795 (unblock_async_io): Make static.
20796 (initialize_async_io): New.
20797 * server.c (handle_v_cont): Handle async I/O here.
20798 (myresume): Likewise. Move other common resume tasks here...
20799 (main): ... from here. Call initialize_async_io. Disable async
20800 I/O before the main loop.
20801 * server.h (initialize_async_io): Declare.
20802 (block_async_io, unblock_async_io): Delete prototypes.
20803 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20804
20805 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20806
20807 * remote-utils.c (readchar): Allow binary data in received messages.
20808
20809 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20810
20811 * win32-low.c (attaching): New global.
20812 (win32_create_inferior): Clear the `attaching' global.
20813 (win32_attach): Set the `attaching' global.
20814 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20815 attaching. Only set a breakpoint at the entry point if not
20816 attaching.
20817
20818 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20819
20820 * server.c (main): Don't report dll events on the initial
20821 connection on attaches.
20822
20823 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20824
20825 * server.c (main): Relax numerical bases supported for the pid of
20826 the --attach command line argument.
20827
20828 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20829
20830 * win32-low.c (win32_attach): Call OpenProcess before
20831 DebugActiveProcess, not after. Add last error output to error
20832 call.
20833
20834 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20835
20836 * win32-low.c (win32_get_thread_context)
20837 (win32_set_thread_context): New functions.
20838 (thread_rec): Use win32_get_thread_context.
20839 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20840 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20841 field.
20842
20843 2007-12-03 Leo Zayas
20844 Pedro Alves <pedro_alves@portugalmail.pt>
20845
20846 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20847 global variables.
20848 (child_add_thread): Minor cleanup.
20849 (child_continue): Resume artificially suspended threads before
20850 calling ContinueDebugEvent.
20851 (suspend_one_thread): New.
20852 (fake_breakpoint_event): New.
20853 (get_child_debug_event): Change return type to int. Check here if
20854 gdb sent an interrupt request. If a soft interrupt was requested,
20855 fake a breakpoint event. Return 0 if there is no event to handle,
20856 and 1 otherwise.
20857 (win32_wait): Don't check here if gdb sent an interrupt request.
20858 Ensure there is a valid event to handle.
20859 (win32_request_interrupt): Add soft interruption method as last
20860 resort.
20861
20862 2007-12-03 Leo Zayas
20863 Pedro Alves <pedro_alves@portugalmail.pt>
20864
20865 * win32-low.h (win32_thread_info): Add descriptions to the
20866 structure members. Replace `suspend_count' counter by a
20867 `suspended' flag.
20868 * win32-low.c (thread_rec): Update condition of when to get the
20869 context from the inferior. Rely on ContextFlags being set if it
20870 has already been retrieved. Only suspend the inferior thread if
20871 we haven't already. Warn if that fails.
20872 (continue_one_thread): s/suspend_count/suspended/. Only call
20873 ResumeThread once. Warn if that fails.
20874
20875 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20876
20877 * win32-low.c (win32_wait): Don't read from the inferior when it
20878 has already exited.
20879
20880 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20881
20882 * Makefile.in (win32_low_h): New variable.
20883 (win32-low.o): Add dependency on $(win32_low_h).
20884 (win32-arm-low.o, win32-i386-low.o): New rules.
20885
20886 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20887
20888 * hostio.c: Correct copyright year.
20889
20890 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20891
20892 * Makefile.in (OBS): Add hostio.o.
20893 (hostio.o): New rule.
20894 * server.h (handle_vFile): Declare.
20895 * hostio.c: New file.
20896 * server.c (handle_v_requests): Take packet_len and new_packet_len
20897 for binary packets. Call handle_vFile.
20898 (main): Update call to handle_v_requests.
20899
20900 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20901
20902 * linux-low.c: Include <sched.h>.
20903
20904 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20905
20906 * linux-low.c (linux_tracefork_grandchild): New.
20907 (linux_tracefork_child): Use clone.
20908 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20909
20910 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20911
20912 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20913
20914 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20915
20916 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20917
20918 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20919
20920 * inferiors.c (change_inferior_id): Delete.
20921 (add_pid_to_list, pull_pid_from_list): New.
20922 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20923 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20924 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20925 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20926 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20927 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20928 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20929 (using_threads): Always set to 1.
20930 (handle_extended_wait): New.
20931 (add_process): Do not set TID.
20932 (linux_create_inferior): Set must_set_ptrace_flags.
20933 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20934 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20935 (linux_thread_alive): Rename TID argument to LWPID.
20936 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20937 (linux_wait_for_event): Do not use TID or check using_threads. Update
20938 call to dead_thread_notify. Call handle_extended_wait.
20939 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20940 (send_sigstop): Delete sigstop_sent.
20941 (wait_for_sigstop): Avoid TID.
20942 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20943 (linux_test_for_tracefork): New.
20944 (linux_lookup_signals): Use thread_db_active and
20945 linux_supports_tracefork_flag.
20946 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20947 * linux-low.h (get_process_thread): Avoid TID.
20948 (struct process_ifo): Move thread_known and tid to the end. Remove
20949 sigstop_sent.
20950 (linux_attach_lwp, thread_db_init): Update prototypes.
20951 * server.h (change_inferior_id): Delete prototype.
20952 (add_pid_to_list, pull_pid_from_list): New prototypes.
20953 * thread-db.c (thread_db_use_events): New.
20954 (find_first_thread): Rename to...
20955 (find_one_thread): ...this. Update callers and messages. Do not
20956 call fatal. Check thread_db_use_events. Do not call
20957 change_inferior_id or new_thread_notify.
20958 (maybe_attach_thread): Update. Do not call new_thread_notify.
20959 (thread_db_init): Set thread_db_use_events. Check use_events.
20960 * utils.c (fatal, warning): Correct message prefix.
20961
20962 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20963
20964 * Makefile.in (clean): Remove new files.
20965 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20966 (powerpc-64.o, powerpc-64.c): New rules.
20967 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20968 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20969 with SPE.
20970 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20971 SPE targets.
20972 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20973 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20974 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20975 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20976 (target_regsets): Add AltiVec and SPE register sets.
20977 * configure.ac: Check for AltiVec and SPE.
20978 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20979 (ppc_fill_vrregset, ppc_store_vrregset): New.
20980 (target_regsets): Add AltiVec register set.
20981 * configure: Regenerated.
20982
20983 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20984
20985 * linux-low.c (O_LARGEFILE): Define.
20986 (linux_read_memory): Use /proc/PID/mem.
20987 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20988 * configure, config.in: Regenerated.
20989
20990 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20991
20992 * linux-low.c (linux_wait_for_event): Do not pass signals while
20993 single-stepping.
20994
20995 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20996
20997 * win32-low.c (create_process): New.
20998 (win32_create_inferior): Use create_process instead of
20999 CreateProcess. If create_process failed retry appending an ".exe"
21000 suffix. Store the GetLastError result immediatelly after
21001 create_process calls and use it on the call to error.
21002
21003 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
21004
21005 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
21006
21007 2007-08-23 Joel Brobecker <brobecker@adacore.com>
21008
21009 * configure.ac: Switch license to GPLv3.
21010
21011 2007-08-01 Michael Snyder <msnyder@access-company.com>
21012
21013 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
21014
21015 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
21016
21017 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
21018 typedef.
21019 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
21020 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
21021 CloseToolhelp32Snapshot.
21022 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
21023 CloseToolhelp32Snapshot.
21024
21025 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
21026
21027 * server.c (main): Check for inferior exit before main loop.
21028
21029 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
21030
21031 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
21032 instead of on tmp_desc.
21033
21034 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
21035 Daniel Jacobowitz <dan@codesourcery.com>
21036
21037 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
21038 (add_thread): Minor cleanups.
21039 (clear_inferiors): Move lower in the file. Clear the DLL
21040 list.
21041 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
21042 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
21043 (xml_escape_text): New.
21044 * server.c (handle_query): Handle qXfer:libraries:read. Report it
21045 for qSupported.
21046 (handle_v_cont): Report errors.
21047 (gdbserver_version): Update.
21048 (main): Correct size of own_buf. Do not report initial DLL events.
21049 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
21050 (unloaded_dll, xml_escape_text): New.
21051 * win32-low.c (enum target_waitkind): Update comments.
21052 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
21053 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
21054 (win32_EnumProcessModules, win32_GetModuleInformation)
21055 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
21056 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
21057 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
21058 (win32_Module32First, win32_Module32Next, load_toolhelp)
21059 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
21060 (get_child_debug_event): Handle DLL events.
21061 (win32_wait): Likewise.
21062
21063 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21064
21065 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
21066 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
21067
21068 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
21069
21070 * win32-low.c (handle_output_debug_string): Ignore event if not
21071 waiting.
21072
21073 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
21074
21075 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
21076
21077 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
21078
21079 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
21080
21081 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
21082
21083 * inferiors.c (change_inferior_id): Add comment.
21084 * linux-low.c (check_removed_breakpoint): Add an early
21085 prototype. Improve debug output.
21086 (linux_attach): Doc update.
21087 (linux_detach_one_process, linux_detach): Clean up before releasing
21088 each process.
21089 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
21090 * linux-low.h (struct process_info): Doc improvement.
21091 * mem-break.c (delete_all_breakpoints): New.
21092 * mem-break.h (delete_all_breakpoints): New prototype.
21093 * thread-db.c (find_first_thread): New.
21094 (thread_db_create_event): Call it instead of
21095 thread_db_find_new_threads. Clean up unused variables.
21096 (maybe_attach_thread): Remove first thread handling.
21097 (thread_db_find_new_threads): Use find_first_thread.
21098 (thread_db_get_tls_address): Likewise.
21099
21100 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
21101
21102 * thread-db.c (thread_db_find_new_threads): Add prototype.
21103 (thread_db_create_event): Check for the main thread before adding
21104 a new thread.
21105 (maybe_attach_thread): Only enable event reporting if TID == 0.
21106 (thread_db_get_tls_address): Check for new threads.
21107
21108 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
21109
21110 * linux-low.c (linux_create_inferior): Try execv before execvp.
21111 * spu-low.c (spu_create_inferior): Likewise.
21112
21113 2007-06-13 Mike Frysinger <vapier@gentoo.org>
21114
21115 * linux-low.c (linux_create_inferior): Change execv to execvp.
21116 * spu-low.c (spu_create_inferior): Likewies.
21117
21118 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
21119
21120 * Makefile.in (clean): Clean new files instead of deleted ones.
21121 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
21122 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
21123 rules.
21124 * configure.srv: Specify XML files and new regformats for MIPS and
21125 MIPS64 GNU/Linux.
21126 * linux-mips-low.c (mips_num_regs): Set to only used registers.
21127 (mips_regmap): Do not fetch $0. Remove unused registers. Add
21128 an entry for the restart register.
21129 (mips_cannot_fetch_register, mips_cannot_store_register)
21130 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
21131 register names to match the XML descriptions.
21132 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
21133 restart register instead of $0.
21134
21135 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
21136 Markus Deuling <deuling@de.ibm.com>
21137
21138 * remote-utils.c (decode_xfer_write): New function.
21139 * server.h (decode_xfer_write): Add prototype.
21140 * server.c (handle_query): Add PACKET_LEN argument. Support
21141 qXfer:spu:read and qXfer:spu:write packets.
21142 (main): Pass packet_len to handle_query.
21143 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
21144 * target.h (target_ops): Add qxfer_spu.
21145
21146 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
21147
21148 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
21149 accessing non-seekable spufs files.
21150
21151 2007-05-16 Markus Deuling <deuling@de.ibm.com>
21152
21153 * server.c (handle_query): Add reply for qC packet.
21154
21155 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21156 Leo Zayas <lerele@champenstudios@com>
21157
21158 * server.h (check_remote_input_interrupt_request): New function.
21159 * remote_utils.c (INVALID_DESCRIPTOR): New define.
21160 (remote_desc): Initialize with INVALID_DESCRIPTOR.
21161 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
21162 (check_remote_input_interrupt_request): New function.
21163 * server.h (check_remote_input_interrupt_request): Declare.
21164 * win32-low.c (winapi_DebugBreakProcess,
21165 winapi_GenerateConsoleCtrlEvent): New typedefs.
21166 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
21167 to 250 ms.
21168 (win32_wait): Check for remote interrupt request
21169 with check_remote_input_interrupt_request.
21170 (win32_request_interrupt): New function.
21171 (win32_target_op): Set request_interrupt to win32_request_interrupt.
21172
21173 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21174
21175 * win32-low.c (debug_registers_changed,
21176 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
21177 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
21178 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
21179 (thread_rec): Get context using the low target.
21180 (child_add_thread): Call thread_added on the low target,
21181 which does the same thing.
21182 (regptr): Delete.
21183 (do_initial_child_stuff): Remove debug registers references.
21184 Set context using the low target. Resume threads after
21185 setting the contexts.
21186 (child_continue): Remove dead variable. Remove debug
21187 registers references.
21188 (child_fetch_inferior_registers): Go through the low target.
21189 (do_child_store_inferior_registers): Remove.
21190 (child_store_inferior_registers): Go through the low target.
21191 (win32_resume): Remove debug registers references.
21192 Set context using the low target.
21193 (handle_exception): Change return type to void. Don't record
21194 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
21195 first chance exception.
21196 (get_child_debug_event): Change return type to void. Remove
21197 goto loop. Always return after waiting for debug event.
21198 (win32_wait): Convert to switch statement. Handle spurious
21199 events.
21200
21201 * win32-i386-low.c (debug_registers_changed,
21202 debug_registers_used): New.
21203 (initial_stuff): Rename to ...
21204 (i386_initial_stuff): ... this. Clear debug registers
21205 state variables.
21206 (store_debug_registers): Delete.
21207 (i386_get_thread_context): New.
21208 (load_debug_registers): Delete.
21209 (i386_set_thread_context): New.
21210 (i386_thread_added): New.
21211 (single_step): Rename to ...
21212 (i386_single_step): ... this.
21213 (do_fetch_inferior_registers): Rename to ...
21214 (i386_fetch_inferior_register): ... this.
21215 (i386_store_inferior_register): New.
21216 (the_low_target): Adapt to new interface.
21217
21218 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
21219 (arm_get_thread_context): New.
21220 (arm_set_thread_context): New.
21221 (regptr): New.
21222 (do_fetch_inferior_registers): Rename to ...
21223 (arm_fetch_inferior_register): ... this.
21224 (arm_store_inferior_register): New.
21225 (arm_wince_breakpoint): Reimplement as unsigned long.
21226 (arm_wince_breakpoint_len): Define.
21227 (the_low_target): Adapt to new interface.
21228
21229 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
21230 load_debug_registers. Add get_thread_context, set_thread_context,
21231 thread_added and store_inferior_register. Rename
21232 fetch_inferior_registers to fetch_inferior_register.
21233 (regptr): Remove declaration.
21234
21235 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21236
21237 * linux-low.c (linux_detach): Change return type to int. Return 0.
21238 * spu-low.c (spu_detach): Likewise.
21239
21240 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21241
21242 * target.h (target_ops): Change return type of detach to int.
21243 Add join.
21244 (join_inferior): New.
21245 * server.c (main): Don't skip detach support on mingw32.
21246 If the inferior doesn't support detaching return error.
21247 Call join_inferior instead of using waitpid.
21248 * linux-low.c (linux_join): New.
21249 (linux_target_op): Add linux_join.
21250 * spu-low.c (spu_join): New.
21251 (spu_target_ops): Add spu_join.
21252 * win32-low.c (win32_detach): Adapt to new interface.
21253 Reopen current_process_handle before detaching. Issue a child
21254 resume before detaching.
21255 (win32_join): New.
21256 (win32_target_op): Add win32_join.
21257
21258 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21259
21260 * win32-low.c (win32-attach): Fix return value.
21261 * target.h (target_ops): Describe ATTACH return values.
21262
21263 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21264
21265 * win32-low.c (GETPROCADDRESS): Define.
21266 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
21267 (winapi_DebugSetProcessKillOnExit): Likewise.
21268 (win32_create_inferior): Force usage of ansi CreateProcessA.
21269 (win32_attach): Use GETPROCADDRESS.
21270 (win32_detach): Likewise.
21271
21272 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21273
21274 * win32-low.c (win32_wait): Don't use WSTOPSIG.
21275
21276 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
21277
21278 * win32-low.c: Commit leftover changes from 2007-03-29.
21279
21280 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21281
21282 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
21283 fields short instead of int. Add explicit padding.
21284 (i387_cache_to_fsave): Remove unnecessary casts.
21285 (i387_fsave_to_cache): Doc fix.
21286 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
21287
21288 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21289
21290 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
21291 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
21292
21293 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21294
21295 * configure.srv (arm*-*-mingw32ce*): Move near the other
21296 arm targets.
21297
21298 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21299
21300 * configure.ac: Add errno checking.
21301 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
21302 sys/file.h and malloc.h.
21303 (AC_CHECK_DECLS): Add perror.
21304 (srv_mingwce): Handle.
21305 * configure.srv (i[34567]86-*-cygwin*): Add
21306 win32-i386-low.o to srv_tgtobj.
21307 (i[34567]86-*-mingw*): Likewise.
21308 (arm*-*-mingw32ce*): Add case.
21309 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21310 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
21311 [__MINGW32CE__] (strerror): New function.
21312 [__MINGW32CE__] (errno): Define to GetLastError.
21313 [__MINGW32CE__] (COUNTOF): New macro.
21314 (remote_open): Remove extra close call.
21315 * mem-break.c (delete_breakpoint_at): New function.
21316 * mem-break.h (delete_breakpoint_at): Declare.
21317 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21318 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
21319 [USE_WIN32API] (read, write): Add char* casts.
21320 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
21321 * server.h: Include wincecompat.h on Windows CE.
21322 [HAVE_ERRNO_H]: Check.
21323 (perror): Declare if not declared.
21324 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
21325 (perror_with_name): Remove errno declaration.
21326 * wincecompat.h: New.
21327 * wincecompat.c: New.
21328 * win32-low.h: New.
21329 * win32-arm-low.c: New.
21330 * win32-i386-low.c: New.
21331 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21332 (OUTMSG2): Make it safe.
21333 (_T): New macro.
21334 (COUNTOF): New macro.
21335 (NUM_REGS): Get it from the low target.
21336 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21337 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21338 (thread_rec): Let low target handle debug registers.
21339 (child_add_thread): Likewise.
21340 (child_init_thread_list): Likewise.
21341 (continue_one_thread): Likewise.
21342 (regptr): New.
21343 (do_child_fetch_inferior_registers): Move to ...
21344 * win32-i386-low.c: ... here, and rename to ...
21345 (do_fetch_inferior_registers): ... this.
21346 * win32-low.c (child_fetch_inferior_registers):
21347 Go through the low target.
21348 (do_child_store_inferior_registers): Use regptr.
21349 (strwinerror): New function.
21350 (win32_create_inferior): Handle Windows CE.
21351 Use strwinerror instead of strerror on Windows error
21352 codes. Add program to the error output.
21353 Don't close the main thread handle on Windows CE.
21354 (win32_attach): Use coredll.dll on Windows CE.
21355 (win32_kill): Close current process and current
21356 thread handles.
21357 (win32_detach): Use coredll.dll on Windows CE.
21358 (win32_resume): Let low target handle debug registers, and
21359 step request.
21360 (handle_exception): Add/Remove initial breakpoint. Avoid
21361 non-existant WSTOPSIG on Windows CE.
21362 (win32_read_inferior_memory): Cast to remove warning.
21363 (win32_arch_string): Go through the low target.
21364 (initialize_low): Call set_breakpoint_data with the low
21365 target's breakpoint.
21366 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21367 FOP_REGNUM, mappings): Move to ...
21368 * win32-i386-low.c: ... here.
21369 * win32-low.c (win32_thread_info): Move to ...
21370 * win32-low.h: ... here.
21371 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21372 win32-arm-low.c and wincecompat.c.
21373 (all:): Add $EXEEXT.
21374 (install-only:): Likewise.
21375 (gdbserver:): Likewise.
21376 (gdbreplay:): Likewise.
21377 * config.in: Regenerate.
21378 * configure: Regenerate.
21379
21380 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21381
21382 * win32-low.c: Rename typedef thread_info to
21383 win32_thread_info throughout.
21384
21385 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21386
21387 * win32-i386-low.c: Rename to ...
21388 * win32-low.c: ... this.
21389 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21390 * Makefile.in: Likewise.
21391
21392 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21393
21394 * remote-utils.c (monitor_output): Constify msg parameter.
21395 * server.h (monitor_output): Likewise.
21396 * win32-i386-low.c (handle_output_debug_string): New.
21397 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21398 handle_output_debug_string.
21399 (get_child_debug_event): Likewise.
21400
21401 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21402
21403 * server.c (main): Correct strtoul check.
21404
21405 2007-03-27 Jon Ringle <jon@ringle.org>
21406
21407 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21408
21409 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21410
21411 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21412
21413 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21414
21415 * terminal.h: Check HAVE_SGTTY_H.
21416
21417 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21418
21419 * remote-utils.c (remote_open): Print out the assigned port number.
21420
21421 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21422
21423 * remote-utils.c (monitor_output): New function.
21424 * server.c (debug_threads): Define here.
21425 (monitor_show_help): New function.
21426 (handle_query): Handle qRcmd.
21427 (main): Do not handle 'd' packet.
21428 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21429 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21430 of debug_threads.
21431
21432 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21433
21434 * Makefile.in (EXEEXT): New.
21435 (clean): Use $(EXEEXT).
21436
21437 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21438
21439 * target.h (target_ops): Rename send_signal to request_interrupt,
21440 and remove enum target_signal parameter.
21441 * linux-low.c (linux_request_interrupt): Rename from
21442 linux_send_signal, and always send SIGINT.
21443 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21444 and always send SIGINT.
21445 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21446 of send_signal.
21447 (input_interrupt): Likewise.
21448
21449 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21450
21451 * server.c (get_features_xml): Check if target implemented
21452 arch_string.
21453 * win32-i386-low.c (win32_arch_string): New.
21454 (win32_target_ops): Add win32_arch_string as arch_string member.
21455
21456 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21457
21458 * spu-low.c (spu_arch_string): New.
21459 (spu_target_ops): Add spu_arch_string.
21460
21461 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21462
21463 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21464 * configure.ac: Do not check for terminal.h.
21465 * configure, config.in: Regenerated.
21466
21467 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21468
21469 * Makefile.in (OBS): Add $(XML_BUILTIN).
21470 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21471 (clean): Update.
21472 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21473 (arm-with-iwmmxt.c): New.
21474 * config.in, configure: Regenerate.
21475 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21476 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21477 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21478 (arm*-*-linux*): Add iWMMXt and regset support.
21479 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21480 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21481 (arm_store_wmmxregset, target_regsets): New.
21482 * server.c (get_features_xml): Take annex argument. Check builtin
21483 XML documents.
21484 (handle_query): Handle multiple annexes.
21485
21486 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21487
21488 * remote-utils.c [USE_WIN32API] (read, write): Define.
21489 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21490 write.
21491
21492 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21493
21494 * linux-i386-low.c (the_low_target): Set arch_string.
21495 * linux-x86-64-low.c (the_low_target): Likewise.
21496 * linux-low.c (linux_arch_string): New.
21497 (linux_target_ops): Add it.
21498 * linux-low.h (struct linux_target_ops): Add arch_string.
21499 * server.c (write_qxfer_response): Use const void * for DATA.
21500 (get_features_xml): New.
21501 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21502 * target.h (struct target_ops): Add arch_string method.
21503
21504 2007-01-03 Denis Pilat <denis.pilat@st.com>
21505 Daniel Jacobowitz <dan@codesourcery.com>
21506
21507 * linux-low.c (linux_kill): Handle being called with no threads.
21508 * win32-i386-low.c (win32_kill): Likewise.
21509 (get_child_debug_event): Clear current_process_handle.
21510
21511 2006-12-30 Denis PILAT <denis.pilat@st.com>
21512 Daniel Jacobowitz <dan@codesourcery.com>
21513
21514 * remote-utils.c (remote_open): Check the type of specified
21515 serial port devices before opening them.
21516 * server.c (main): Kill the inferior if an error occurs during
21517 the first remote_open.
21518
21519 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21520
21521 * README: Update supported targets.
21522
21523 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21524
21525 * Makefile.in (clean): Remove reg-mips64.c.
21526 (reg-mips64.c, reg-mips64.o): New rules.
21527 * configure.srv: Handle mips64. Include regset support for mips.
21528 * linux-mips-low.c (union mips_register): New.
21529 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21530 (mips_breakpoint, mips_breakpoint_at): Use int.
21531 (mips_collect_register, mips_supply_register)
21532 (mips_collect_register_32bit, mips_supply_register_32bit)
21533 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21534 (mips_store_fpregset, target_regsets): New.
21535 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21536
21537 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21538
21539 * configure.srv: Add target "spu*-*-*".
21540 * Makefile.in (clean): Remove reg-spu.c.
21541 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21542 * spu-low.c: New file.
21543
21544 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21545
21546 * configure.ac: Correct td_thr_tls_get_addr test.
21547 * configure: Regenerated.
21548
21549 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21550
21551 * linux-low.c (linux_wait_for_event): Reformat. Use the
21552 pass_signals array.
21553 * remote-utils.c (decode_address_to_semicolon): New.
21554 * server.c (pass_signals, handle_general_set): New.
21555 (handle_query): Mention QPassSignals for qSupported.
21556 (main): Call handle_general_set.
21557 * server.h (pass_signals, decode_address_to_semicolon): New.
21558
21559 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21560
21561 * server.c (handle_query): Correct error handling for read_auxv.
21562
21563 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21564
21565 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21566 and srv_linux_thread_db to yes.
21567 * linux-s390-low.c (s390_fill_gregset): New function.
21568 (target_regsets): Define data structure.
21569
21570 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21571
21572 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21573 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21574 * config.in, configure: Regenerated.
21575 * inferiors.c (gdb_id_to_thread): New function.
21576 (gdb_id_to_thread_id): Use it.
21577 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21578 * linux-low.h (struct process_info): Add th member.
21579 (thread_db_get_tls_address): New prototype.
21580 * remote-utils.c (decode_address): Make non-static.
21581 * server.c (handle_query): Handle qGetTLSAddr.
21582 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21583 * target.h (struct target_ops): Add get_tls_address.
21584 * thread-db.c (maybe_attach_thread): Save the thread handle.
21585 (thread_db_get_tls_address): New.
21586
21587 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21588
21589 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21590 (linux_resume_one_process): Take a siginfo_t *. Update all
21591 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21592 (struct pending_signals): Add a siginfo_t.
21593 (linux_wait_for_process): Always set last_status.
21594 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21595 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21596 * linux-low.h (struct process_info): Add last_status.
21597
21598 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21599
21600 * remote-utils.c (try_rle): New function.
21601 (putpkt_binary): Use it.
21602
21603 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21604
21605 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21606 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21607 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21608 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21609 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21610 point registers.
21611
21612 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21613
21614 * server.c (terminal_fd): New variable.
21615 (old_foreground_pgrp): Likewise.
21616 (restore_old_foreground_pgrp): New function.
21617 (start_inferior): Record the terminal file descriptor in terminal_fd
21618 and its original foreground group in old_foreground_pgrp. Register
21619 restore_old_foreground_pgrp with atexit().
21620
21621 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21622
21623 * server.c (handle_query): Correct qPart to qXfer.
21624
21625 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21626
21627 * configure.ac: Check for more headers which are missing on
21628 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21629 * configure.srv: Add Cygwin and mingw32.
21630 * remote-utils.c: Don't include headers unconditionally which
21631 are missing on mingw32. Include <winsock.h> for mingw32.
21632 (remote_open): Adjust for mingw32 support. Flush
21633 standard error after writing to it.
21634 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21635 (unblock_async_io, enable_async_io, disable_async_io)
21636 (readchar, getpkt): Update for Winsock support.
21637 (prepare_resume_reply): Expect a protocol signal number.
21638 * server.c: Disable <sys/wait.h> on mingw32.
21639 (start_inferior): Adjust for mingw32 support. Flush
21640 standard error after writing to it.
21641 (attach_inferior): Likewise. Use protocol signal
21642 numbers.
21643 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21644 and names.
21645 * win32-i386-low.c: New file.
21646 * Makefile.in (XM_CLIBS): Set.
21647 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21648 (win32-i386-low.o): New dependency rule.
21649 * linux-low.c (linux_wait): Use target signal numbers.
21650 * target.h (struct target_ops): Doc fix.
21651 * server.h (target_signal_to_name): New prototype.
21652 * gdbreplay.c: Don't include headers unconditionally which
21653 are missing on mingw32. Include <winsock.h> for mingw32.
21654 (remote_close, remote_open): Adjust for Winsock support.
21655 * configure, config.in: Regenerated.
21656
21657 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21658
21659 * server.c (decode_xfer_read, write_qxfer_response): New.
21660 (handle_query): Take a packet length argument. Handle
21661 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21662 the qSupported response.
21663 (main): Update call to handle_query.
21664
21665 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21666
21667 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21668 (putpkt_binary): Renamed from putpkt and adjusted for binary
21669 data.
21670 (putpkt): New wrapper for putpkt_binary.
21671 (readchar): Don't mask off the high bit.
21672 (decode_X_packet): New function.
21673 * server.c (main): Call putpkt_binary if a handler sets the packet
21674 length. Save the length of the incoming packet. Handle 'X'.
21675 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21676
21677 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21678
21679 * server.c (handle_query): Handle qSupported.
21680
21681 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21682
21683 * remote-utils.c (all_symbols_looked_up): New variable.
21684 (look_up_one_symbol): Check it.
21685 * server.h (look_up_one_symbol): New declaration.
21686 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21687
21688 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21689
21690 * Makefile.in (linux-arm-low.o): Update dependencies.
21691 * linux-arm-low.c: Include "gdb_proc_service.h".
21692 (PTRACE_GET_THREAD_AREA): Define.
21693 (ps_get_thread_area): New function.
21694
21695 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21696
21697 * configure.srv (m68k*-*-uclinux*): New target.
21698 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21699 (linux_resume_one_process): Remove extraneous cast.
21700 (linux_read_offsets): New.
21701 (linux_target_op): Add linux_read_offsets on mmuless systems.
21702 * server.c (handle_query): Add qOffsets logic.
21703 * target.h (struct target_ops): Add read_offsets.
21704
21705 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21706
21707 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21708 (PTRACE_GET_THREAD_AREA): Define.
21709 (ps_get_thread_area): New function.
21710 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21711 (linux-x86-64-low.o): Update.
21712
21713 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21714
21715 * configure.ac: Remove checks for prfpregset_t.
21716 * gdb_proc_service.h: New file.
21717 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21718 new "gdb_proc_service.h".
21719 * proc-service.c: Likewise.
21720 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21721 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21722 * Makefile.in (gdb_proc_service_h): Updated.
21723 * configure, config.in: Regenerated.
21724
21725 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21726
21727 * remote-utils.c (prepare_resume_reply): Move declaration
21728 of gdb_id_from_wait to the top of the block.
21729
21730 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21731
21732 * linux-low.c (regsets_store_inferior_registers): Read the regset
21733 from the target before filling it.
21734
21735 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21736
21737 * server.c (attach_inferior): Return SIGTRAP for a successful
21738 attach.
21739
21740 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21741
21742 * Makefile.in (OBS): Add version.o.
21743 (STAGESTUFF): Delete.
21744 (version.o): Add dependencies.
21745 (version.c): Replace rule.
21746 (clean): Remove version.c.
21747 * server.c (gdbserver_version): New.
21748 (gdbserver_usage): Use printf.
21749 (main): Handle --version and --help.
21750 * server.h (version, host_name): Add declarations.
21751
21752 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21753
21754 * linux-arm-low.c:
21755 * linux-arm-low.c:
21756 * inferiors.c:
21757 * i387-fp.h:
21758 * i387-fp.c:
21759 * gdbreplay.c:
21760 * regcache.c:
21761 * proc-service.c:
21762 * mem-break.h:
21763 * mem-break.c:
21764 * linux-x86-64-low.c:
21765 * linux-sh-low.c:
21766 * linux-s390-low.c:
21767 * linux-ppc64-low.c:
21768 * linux-ppc-low.c:
21769 * linux-mips-low.c:
21770 * linux-m68k-low.c:
21771 * linux-m32r-low.c:
21772 * linux-low.h:
21773 * linux-low.c:
21774 * linux-ia64-low.c:
21775 * linux-i386-low.c:
21776 * linux-crisv32-low.c:
21777 * thread-db.c:
21778 * terminal.h:
21779 * target.h:
21780 * target.c:
21781 * server.h:
21782 * server.c:
21783 * remote-utils.c:
21784 * regcache.h:
21785 * utils.c:
21786 * Makefile.in:
21787 * configure.ac:
21788 * gdbserver.1: Add (C) after Copyright. Update the FSF
21789 address.
21790
21791 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21792
21793 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21794 (arm_breakpoint_at): Recognize both breakpoints.
21795 (the_low_target): Use the correct breakpoint instruction.
21796
21797 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21798
21799 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21800 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21801 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21802 (the_low_target): Update.
21803
21804 2005-10-25 Andreas Schwab <schwab@suse.de>
21805
21806 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21807
21808 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21809 (ia64_num_regs): Reduce to 462.
21810
21811 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21812
21813 * acinclude.m4: Correct quoting.
21814 * aclocal.m4: Regenerated.
21815
21816 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21817 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21818 (thread_db_init): Call thread_db_err_str.
21819 * configure.ac: Check for TD_VERSION.
21820 * config.in, configure: Regenerated.
21821
21822 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21823
21824 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21825
21826 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21827
21828 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21829 is not available. Define HAVE_PTRACE_GETREGS if it is.
21830 * config.in, configure: Regenerated.
21831 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21832 * linux-i386-low.c, linux-m68k-low.c: Update to use
21833 HAVE_PTRACE_GETREGS.
21834 * linux-low.c (regsets_fetch_inferior_registers)
21835 (regsets_store_inferior_registers): Only return 0 if we processed
21836 GENERAL_REGS.
21837 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21838 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21839
21840 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21841
21842 * inferiors.c (struct thread_info): Add gdb_id.
21843 (add_thread): Add gdb_id argument.
21844 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21845 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21846 calls to add_thread.
21847 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21848 * server.c (handle_query): Use thread_to_gdb_id.
21849 (handle_v_cont, main): Use gdb_id_to_thread_id.
21850 * server.h (add_thread): Update prototype.
21851 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21852 prototypes.
21853
21854 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21855
21856 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21857 left-padded registers.
21858 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21859 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21860
21861 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21862
21863 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21864 * configure: Regenerate.
21865 * config.in: Regenerate.
21866 * server.h (NEED_DECLARATION_STRERROR):
21867 Replace with !HAVE_DECL_STRERROR.
21868
21869 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21870
21871 * linux-low.c (linux_wait, linux_send_signal): Don't test
21872 an unsigned long variable for > 0 if it could be MAX_ULONG.
21873 * server.c (myresume): Likewise.
21874 * target.c (set_desired_inferior): Likewise.
21875
21876 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21877
21878 * configure.ac: Simplify and improve check for socklen_t.
21879 * configure, config.in: Regenerate.
21880
21881 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21882
21883 * acconfig.h: Remove.
21884 * configure.ac: Add a test for socklen_t. Use three-argument
21885 AC_DEFINE throughout.
21886 * config.in: Regenerated using autoheader 2.59.
21887 * configure: Regenerated.
21888
21889 * gdbreplay.c (socklen_t): Provide a default.
21890 (remote_open): Use socklen_t.
21891 * remote-utils.c (socklen_t): Provide a default.
21892 (remote_open): Use socklen_t.
21893 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21894 unsigned char.
21895
21896 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21897 char for buffers.
21898 * linux-low.c (linux_read_memory, linux_write_memory)
21899 (linux_read_auxv): Likewise.
21900 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21901 (check_mem_write): Likewise.
21902 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21903 Likewise.
21904 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21905 (registers_from_string, register_data): Likewise.
21906 * server.c (handle_query, main): Likewise.
21907 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21908 (decode_M_packet): Likewise.
21909 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21910 * target.h (struct target_ops): Update read_memory, write_memory,
21911 and read_auxv.
21912 (read_inferior_memory, write_inferior_memory): Update.
21913 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21914 to unsigned char *.
21915 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21916 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21917 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21918 linux-s390-low.c, linux-sh-low.c: Update for changes in
21919 read_inferior_memory and the_low_target->breakpoint.
21920
21921 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21922
21923 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21924 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21925 * configure.srv: Add powerpc64-*-linux*.
21926 * linux-ppc64-low.c: New file.
21927
21928 2005-05-23 Orjan Friberg <orjanf@axis.com>
21929
21930 * linux-cris-low.c: New file with support for CRIS.
21931 * linux-crisv32-low.c: Ditto for CRISv32.
21932 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21933 (clean): Add reg-cris.c and reg-crisv32.c.
21934 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21935 reg-crisv32.o, and reg-crisv32.c to make rules.
21936 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21937 recognized targets.
21938
21939 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21940
21941 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21942 of sizeof (PTRACE_XFER_TYPE).
21943 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21944
21945 2005-05-12 Orjan Friberg <orjanf@axis.com>
21946
21947 * target.h (struct target_ops): Add insert_watchpoint,
21948 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21949 pointers for hardware watchpoint support.
21950 * linux-low.h (struct linux_target_ops): Ditto.
21951 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21952 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21953 to linux_target_ops.
21954 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21955 reply packet.
21956 * server.c (main): Recognize 'Z' and 'z' packets.
21957
21958 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21959
21960 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21961 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21962 (the_low_target): Add new members.
21963
21964 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21965
21966 * proc-service.c (ps_lgetregs): Search all_processes instead of
21967 all_threads.
21968
21969 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21970
21971 * server.c (start_inferior): Change return type to int.
21972 (attach_inferior): Change sigptr to int *.
21973 (handle_v_cont, handle_v_requests): Change signal to int *.
21974 (main): Change signal to int.
21975
21976 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21977
21978 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21979 * configure.srv: Add m32r*-*-linux*.
21980 * linux-m32r-low.c: New file.
21981
21982 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21983
21984 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21985
21986 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21987
21988 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21989 Take unsigned long arguments for PIDs.
21990 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21991 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21992 (wait_for_sigstop, linux_resume_one_process)
21993 (regsets_fetch_inferior_registers, linux_send_signal)
21994 (linux_read_auxv): Likewise. Update the types of variables holding
21995 PIDs. Update format string specifiers.
21996 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21997 * remote-utils.c (prepare_resume_reply): Likewise.
21998 * server.c (cont_thread, general_thread, step_thread)
21999 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
22000 unsigned long.
22001 (handle_query): Update format specifiers.
22002 (handle_v_cont, main): Use strtoul for thread IDs.
22003 * server.h (struct inferior_list_entry): Use unsigned long for ID.
22004 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
22005 (general_thread, step_thread, thread_from_wait)
22006 (old_thread_from_wait): Update.
22007 * target.h (struct thread_resume): Use unsigned long for THREAD.
22008 (struct target_ops): Use unsigned long for arguments to attach and
22009 thread_alive.
22010
22011 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
22012
22013 * acinclude.m4: Include bfd/bfd.m4 directly.
22014 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
22015 <agriffis@toolchain.org>.
22016 * aclocal.m4, configure: Regenerated.
22017
22018 2005-01-07 Andrew Cagney <cagney@gnu.org>
22019
22020 * configure.ac: Rename configure.in, require autoconf 2.59.
22021 * configure: Re-generate.
22022
22023 2004-12-08 Daniel Jacobowitz <dan@debian.org>
22024
22025 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
22026 LIBS when finished.
22027 * aclocal.m4: Regenerated.
22028 * configure: Regenerated.
22029
22030 2004-11-21 Andreas Schwab <schwab@suse.de>
22031
22032 * linux-m68k-low.c (m68k_num_gregs): Define.
22033 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
22034 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
22035 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
22036 (m68k_breakpoint_at): New. Add to the_low_target.
22037
22038 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
22039 srv_linux_thread_db to yes.
22040
22041 2004-10-20 Joel Brobecker <brobecker@gnat.com>
22042
22043 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
22044 (ARCH_SET_FS): Likewise.
22045 (ARCH_GET_FS): Likewise.
22046 (ARCH_GET_GS): Likewise.
22047
22048 2004-10-16 Daniel Jacobowitz <dan@debian.org>
22049
22050 * linux-i386-low.c (ps_get_thread_area): New.
22051 * linux-x86-64-low.c (ps_get_thread_area): New.
22052 * linux-low.c: Include <sys/syscall.h>.
22053 (linux_kill_one_process): Don't kill the first thread here.
22054 (linux_kill): Kill the first thread here.
22055 (kill_lwp): New function.
22056 (send_sigstop, linux_send_signal): Use it.
22057 * proc-service.c: Clean up #ifdefs.
22058 (fpregset_info): Delete.
22059 (ps_lgetregs): Update and enable implementation.
22060 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
22061 implementations.
22062 * remote-utils.c (struct sym_cache, symbol_cache): New.
22063 (input_interrupt): Print a clearer message.
22064 (async_io_enabled): New variable.
22065 (enable_async_io, disable_async_io): Use it. Update comments.
22066 (look_up_one_symbol): Use the symbol cache.
22067 * thread-db.c (thread_db_look_up_symbols): New function.
22068 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
22069
22070 2004-10-16 Daniel Jacobowitz <dan@debian.org>
22071
22072 * configure.in: Test for -rdynamic.
22073 * configure: Regenerated.
22074 * Makefile (INTERNAL_LDFLAGS): New.
22075 (gdbserver, gdbreplay): Use it.
22076
22077 2004-09-02 Andrew Cagney <cagney@gnu.org>
22078
22079 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
22080
22081 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
22082
22083 * linux-low.c (linux_wait): Clear all_processes list also.
22084
22085 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
22086
22087 * linux-low.c: Include <errno.h>. Remove extern declaration of
22088 errno.
22089
22090 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
22091
22092 * gdbreplay.c, server.h, utils.c: Update copyright years.
22093
22094 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
22095
22096 * server.c (main): Print child status or termination signal from
22097 variable 'signal', not 'sig'.
22098
22099 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
22100
22101 * linux-low.c (linux_read_memory): Change return type to
22102 int. Check for and return error from ptrace().
22103 * target.c (read_inferior_memory): Change return type to int. Pass
22104 back return status from the_target->read_memory().
22105 * target.h (struct target_ops): Adapt *read_memory() prototype.
22106 Update comment.
22107 (read_inferior_memory): Adapt prototype.
22108 * server.c (main): Return an error packet if
22109 read_inferior_memory() returns an error.
22110
22111 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
22112
22113 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
22114 Unify with other clean targets.
22115
22116 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22117
22118 * server.c (handle_v_cont): Call set_desired_inferior.
22119
22120 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22121
22122 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
22123
22124 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22125
22126 * linux-low.c (linux_wait): Unblock async I/O.
22127 (linux_resume): Block and enable async I/O.
22128 * remote-utils.c (block_async_io, unblock_async_io): New functions.
22129 * server.h (block_async_io, unblock_async_io): Add prototypes.
22130
22131 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22132
22133 * remote-utils.c (remote_open): Print a status notice after
22134 opening a TCP port.
22135 * server.c (attach_inferior): Print a status notice after
22136 attaching.
22137
22138 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22139
22140 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
22141
22142 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
22143
22144 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
22145 error packet.
22146 * server.c, target.h: Update copyright years.
22147
22148 2004-02-25 Roland McGrath <roland@redhat.com>
22149
22150 * target.h (struct target_ops): New member `read_auxv'.
22151 * server.c (handle_query): Handle qPart:auxv:read: query using that.
22152 * linux-low.c (linux_read_auxv): New function.
22153 (linux_target_ops): Initialize `read_auxv' member to that.
22154
22155 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
22156
22157 Committed by Jim Blandy <jimb@redhat.com>.
22158
22159 * linux-s390-low.c (s390_num_regs): Update.
22160 (s390_regmap): Remove control registers. Use __s390x__ predefine
22161 instead of GPR_SIZE to distiguish s390 and s390x targets.
22162
22163 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
22164
22165 * linux-low.c: Update copyright year.
22166 (check_removed_breakpoint): Clear pending_is_breakpoint.
22167 (linux_set_resume_request, linux_queue_one_thread)
22168 (resume_status_pending_p): New functions.
22169 (linux_continue_one_thread): Use process->resume.
22170 (linux_resume): Only resume threads if there are no pending events.
22171 * linux-low.h (struct process_info): Add resume request
22172 pointer.
22173
22174 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
22175
22176 * regcache.c (new_register_cache): Clear the allocated register
22177 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
22178
22179 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
22180
22181 * linux-low.c (linux_resume): Take a struct thread_resume *
22182 argument.
22183 (linux_wait): Update call.
22184 (resume_ptr): New static variable.
22185 (linux_continue_one_thread): Renamed from
22186 linux_continue_one_process. Use resume_ptr.
22187 (linux_resume): Use linux_continue_one_thread.
22188 * server.c (handle_v_cont, handle_v_requests): New functions.
22189 (myresume): New function.
22190 (main): Handle 'v' case.
22191 * target.h (struct thread_resume): New type.
22192 (struct target_ops): Change argument of "resume" to struct
22193 thread_resume *.
22194 (myresume): Delete macro.
22195
22196 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
22197
22198 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
22199 (uninstall): Support DESTDIR.
22200
22201 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
22202
22203 * configure.srv: Add xscale*linux copy of arm*linux entry.
22204
22205 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
22206
22207 * linux-arm-low.c (arm_reinsert_addr): New function.
22208 (the_low_target): Add arm_reinsert_addr.
22209
22210 2003-07-08 Mark Kettenis <kettenis@gnu.org>
22211
22212 * mem-break.c: Remove whitespace at end of file.
22213
22214 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22215
22216 * configure.in: Check whether we need to prototype strerror.
22217 * server.h: Optionally prototype strerror.
22218 * gdbreplay.c (perror_with_name): Use strerror.
22219 * linux-low.c (linux_attach_lwp): Use strerror.
22220 * utils.c (perror_with_name): Use strerror.
22221 * config.in, configure: Regenerated.
22222
22223 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22224
22225 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
22226 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
22227
22228 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
22229
22230 * Makefile.in (SFILES): Update.
22231 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
22232 low-sun3.c: Remove files.
22233
22234 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
22235
22236 * linux-low.c: Move comment to linux_thread_alive where it belonged.
22237 (linux_detach_one_process, linux_detach): New functions.
22238 (linux_target_ops): Add linux_detach.
22239 * server.c (main): Handle 'D' packet.
22240 * target.h (struct target_ops): Add "detach" member.
22241 (detach_inferior): Define.
22242
22243 2003-06-13 Mark Kettenis <kettenis@gnu.org>
22244
22245 From Kelley Cook <kelleycook@wideopenwest.com>:
22246 * configure.srv: Accept i[34567]86 variants.
22247
22248 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
22249
22250 * linux-low.c (linux_wait_for_event): Correct comment typos.
22251 (linux_resume_one_process): Call check_removed_breakpoint.
22252 (linux_send_signal): New function.
22253 (linux_target_ops): Add linux_send_signal.
22254 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
22255 of kill.
22256 * target.h (struct target_ops): Add send_signal.
22257
22258 2003-05-29 Jim Blandy <jimb@redhat.com>
22259
22260 * linux-low.c (usr_store_inferior_registers): Transfer buf in
22261 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
22262 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
22263 away part of the register's value.
22264
22265 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
22266
22267 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
22268 (linux_wait_for_event, linux_init_signals): Likewise.
22269
22270 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
22271
22272 * configure.in: Check for stdlib.h.
22273 * configure: Regenerated.
22274 * config.in: Regenerated.
22275
22276 2003-01-04 Andreas Schwab <schwab@suse.de>
22277
22278 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
22279
22280 2003-01-02 Andrew Cagney <ac131313@redhat.com>
22281
22282 * Makefile.in: Remove obsolete code.
22283
22284 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
22285
22286 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
22287 defined(PT_FPR0_HI).
22288
22289 2002-11-17 Stuart Hughes <seh@zee2.com>
22290
22291 * linux-arm-low.c (arm_num_regs): Increase.
22292 (arm_regmap): Include status register.
22293
22294 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
22295
22296 * linux-low.c (register_addr): Remove incorrect -1 check.
22297
22298 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
22299
22300 * linux-low.c (linux_create_inferior): Call setpgid. Return
22301 the new PID.
22302 (unstopped_p, linux_signal_pid): Remove.
22303 (linux_target_ops): Remove linux_signal_pid.
22304 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
22305 global instead of target method.
22306 * target.h (struct target_ops): Remove signal_pid. Update comment
22307 for create_inferior.
22308 * server.c (signal_pid): New variable.
22309 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
22310 gdbserver. Set the child to be the foreground process group.
22311 (attach_inferior): Set signal_pid.
22312
22313 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
22314
22315 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
22316
22317 2002-08-20 Jim Blandy <jimb@redhat.com>
22318
22319 * Makefile.in (LDFLAGS): Allow the configure script to establish a
22320 default for this.
22321
22322 2002-08-01 Andrew Cagney <cagney@redhat.com>
22323
22324 * Makefile.in: Make chill references obsolete.
22325
22326 2002-07-24 Kevin Buettner <kevinb@redhat.com>
22327
22328 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
22329 * configure: Regenerate.
22330 * config.in: Regenerate.
22331
22332 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22333
22334 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22335 (perror_with_name, remote_close, remote_open, expect, play): Static.
22336
22337 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22338
22339 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22340 byte offsets instead of an array of indexes.
22341 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22342
22343 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22344
22345 * regcache.c: Add comment.
22346
22347 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22348
22349 * thread-db.c: New file.
22350 * proc-service.c: New file.
22351 * acinclude.m4: New file.
22352 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22353 proc-service.o, and thread-db.o.
22354 (linux-low.o): Add USE_THREAD_DB.
22355 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22356 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22357 * aclocal.m4: Regenerated.
22358 * config.in: Regenerated.
22359 * configure: Regenerated.
22360 * configure.in: Check for proc_service.h, sys/procfs.h,
22361 thread_db.h, and linux/elf.h headrs.
22362 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22363 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22364 Check for -lthread_db and thread support.
22365 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22366 PowerPC, and SuperH.
22367 * i387-fp.c: Constify arguments.
22368 * i387-fp.h: Likewise.
22369 * inferiors.c: (struct thread_info): Renamed from
22370 `struct inferior_info'. Remove PID member. Use generic inferior
22371 list header. All uses updated.
22372 (inferiors, signal_pid): Removed.
22373 (all_threads): New variable.
22374 (get_thread): Define.
22375 (add_inferior_to_list): New function.
22376 (for_each_inferior): New function.
22377 (change_inferior_id): New function.
22378 (add_inferior): Removed.
22379 (remove_inferior): New function.
22380 (add_thread): New function.
22381 (free_one_thread): New function.
22382 (remove_thread): New function.
22383 (clear_inferiors): Use for_each_inferior and free_one_thread.
22384 (find_inferior): New function.
22385 (find_inferior_id): New function.
22386 (inferior_target_data): Update argument type.
22387 (set_inferior_target_data): Likewise.
22388 (inferior_regcache_data): Likewise.
22389 (set_inferior_regcache_data): Likewise.
22390 * linux-low.c (linux_bp_reinsert): Remove.
22391 (all_processes, stopping_threads, using_thrads)
22392 (struct pending_signals, debug_threads, pid_of): New.
22393 (inferior_pid): Replace with macro.
22394 (struct inferior_linux_data): Remove.
22395 (get_stop_pc, add_process): New functions.
22396 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22397 Use add_process and add_thread.
22398 (linux_attach_lwp): New function, based on old linux_attach. Use
22399 add_process and add_thread. Set stop_expected for new threads.
22400 (linux_attach): New function.
22401 (linux_kill_one_process): New function.
22402 (linux_kill): Kill all LWPs.
22403 (linux_thread_alive): Use find_inferior_id.
22404 (check_removed_breakpoints, status_pending_p): New functions.
22405 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22406 Update. Use WNOHANG. Wait for cloned processes also. Update process
22407 struct for the found process.
22408 (linux_wait_for_event): New function.
22409 (linux_wait): Use it. Support LWPs.
22410 (send_sigstop, wait_for_sigstop, stop_all_processes)
22411 (linux_resume_one_process, linux_continue_one_process): New functions.
22412 (linux_resume): Support LWPs.
22413 (REGISTER_RAW_SIZE): Remove.
22414 (fetch_register): Use register_size instead. Call supply_register.
22415 (usr_store_inferior_registers): Likewise. Call collect_register.
22416 Fix recursive case.
22417 (regsets_fetch_inferior_registers): Improve error message.
22418 (regsets_store_inferior_registers): Add debugging.
22419 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22420 (unstopped_p, linux_signal_pid): New functions.
22421 (linux_target_ops): Add linux_signal_pid.
22422 (linux_init_signals): New function.
22423 (initialize_low): Call it. Initialize using_threads.
22424 * regcache.c (inferior_regcache_data): Add valid
22425 flag.
22426 (get_regcache): Fetch registers lazily. Add fetch argument
22427 and update all callers.
22428 (regcache_invalidate_one, regcache_invalidate): New
22429 functions.
22430 (new_register_cache): Renamed from create_register_cache.
22431 Return the new regcache.
22432 (free_register_cache): Change argument to a void *.
22433 (registers_to_string, registers_from_string): Call get_regcache
22434 with fetch flag set.
22435 (register_data): Make static. Pass fetch flag to get_regcache.
22436 (supply_register): Call get_regcache with fetch flag clear.
22437 (collect_register): Call get_regcache with fetch flag set.
22438 (collect_register_as_string): New function.
22439 * regcache.h: Update.
22440 * remote-utils.c (putpkt): Flush after debug output and use
22441 stderr.
22442 Handle input interrupts while waiting for an ACK.
22443 (input_interrupt): Use signal_pid method.
22444 (getpkt): Flush after debug output and use stderr.
22445 (outreg): Use collect_register_as_string.
22446 (new_thread_notify, dead_thread_notify): New functions.
22447 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22448 and general_thread.
22449 (look_up_one_symbol): Flush after debug output.
22450 * server.c (step_thread, server_waiting): New variables.
22451 (start_inferior): Don't use signal_pid. Update call to mywait.
22452 (attach_inferior): Update call to mywait.
22453 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22454 (main): Don't fetch/store registers explicitly. Use
22455 set_desired_inferior. Support proposed ``Hs'' packet. Update
22456 calls to mywait.
22457 * server.h: Update.
22458 (struct inferior_list, struct_inferior_list_entry): New.
22459 * target.c (set_desired_inferior): New.
22460 (write_inferior_memory): Constify.
22461 (mywait): New function.
22462 * target.h: Update.
22463 (struct target_ops): New signal_pid method.
22464 (mywait): Removed macro, added prototype.
22465
22466 * linux-low.h (regset_func): Removed.
22467 (regset_fill_func, regset_store_func): New.
22468 (enum regset_type): New.
22469 (struct regset_info): Add type field. Use new operation types.
22470 (struct linux_target_ops): stop_pc renamed to get_pc.
22471 Add decr_pc_after_break and breakpoint_at.
22472 (get_process, get_thread_proess, get_process_thread)
22473 (strut process_info, all_processes, linux_attach_lwp)
22474 (thread_db_init): New.
22475
22476 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22477 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22478 (the_low_target): Add new members.
22479 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22480 (i386_store_fpxregset): Constify.
22481 (target_regsets): Add new kind identifier.
22482 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22483 (i386_set_pc): Add debugging.
22484 (i386_breakpoint_at): New function.
22485 (the_low_target): Add new members.
22486 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22487 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22488 (mips_breakpoint_at): New.
22489 (the_low_target): Add new members.
22490 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22491 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22492 (the_low_target): Add new members.
22493 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22494 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22495 (the_low_target): Add new members.
22496 * linux-x86-64-low.c (target_regsets): Add new kind
22497 identifier.
22498
22499 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22500
22501 From Martin Pool <mbp@samba.org>:
22502 * server.c (gdbserver_usage): New function.
22503 (main): Call it.
22504
22505 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22506
22507 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22508 stop_at -> stop_pc.
22509
22510 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22511
22512 * Makefile.in: Remove obsolete code.
22513
22514 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22515
22516 * linux-low.c (regsets_fetch_inferior_registers),
22517 (regsets_store_inferior_registers): Removed cast to int from
22518 ptrace() calls.
22519 * regcache.h: Added declaration of struct inferior_info.
22520
22521 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22522
22523 * inferiors.c (struct inferior_info): Add regcache_data.
22524 (add_inferior): Call create_register_cache.
22525 (clear_inferiors): Call free_register_cache.
22526 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22527 * regcache.c (struct inferior_regcache_data): New.
22528 (registers): Remove.
22529 (get_regcache): New function.
22530 (create_register_cache, free_register_cache): New functions.
22531 (set_register_cache): Don't initialize the register cache here.
22532 (registers_to_string, registers_from_string, register_data): Call
22533 get_regcache.
22534 * regcache.h: Add prototypes.
22535 * server.h: Likewise.
22536
22537 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22538
22539 * mem-break.c: New file.
22540 * mem-break.h: New file.
22541 * Makefile.in: Add mem-break.o rule; update server.h
22542 dependencies.
22543 * inferiors.c (struct inferior_info): Add target_data
22544 member.
22545 (clear_inferiors): Free target_data member if set.
22546 (inferior_target_data, set_inferior_target_data): New functions.
22547 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22548 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22549 * linux-low.c (linux_bp_reinsert): New variable.
22550 (struct inferior_linux_data): New.
22551 (linux_create_inferior): Use set_inferior_target_data.
22552 (linux_attach): Likewise. Call add_inferior.
22553 (linux_wait_for_one_inferior): New function.
22554 (linux_wait): Call it.
22555 (linux_write_memory): Add const.
22556 (initialize_low): Call set_breakpoint_data.
22557 * linux-low.h (struct linux_target_ops): Add breakpoint
22558 handling members.
22559 * server.c (attach_inferior): Remove extra add_inferior
22560 call.
22561 * server.h: Include mem-break.h. Update inferior.c
22562 prototypes.
22563 * target.c (read_inferior_memory)
22564 (write_inferior_memory): New functions.
22565 * target.h (read_inferior_memory)
22566 (write_inferior_memory): Change macros to prototypes.
22567 (struct target_ops): Update comments. Add const to write_memory
22568 definition.
22569
22570 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22571
22572 * linux-low.c (usr_store_inferior_registers): Support
22573 registers which are allowed to fail to store.
22574 * linux-low.h (linux_target_ops): Likewise.
22575 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22576 (ppc_cannot_store_register): FPSCR may not be storable.
22577
22578 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22579
22580 * server.h: Include <string.h> if HAVE_STRING_H.
22581 * ChangeLog: Correct paths in last ChangeLog entry.
22582
22583 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22584
22585 * linux-low.h: Remove obsolete prototypes.
22586 (struct linux_target_ops): New.
22587 (extern the_low_target): New.
22588 * linux-low.c (num_regs, regmap): Remove declarations.
22589 (register_addr): Use the_low_target explicitly.
22590 (fetch_register): Likewise.
22591 (usr_fetch_inferior_registers): Likewise.
22592 (usr_store_inferior_registers): Likewise.
22593 * linux-arm-low.c (num_regs): Remove.
22594 (arm_num_regs): Define.
22595 (arm_regmap): Renamed from regmap, made static.
22596 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22597 made static.
22598 (arm_cannot_store_register): Renamed from cannot_store_register,
22599 made static.
22600 (the_low_target): New.
22601 * linux-i386-low.c (num_regs): Remove.
22602 (i386_num_regs): Define.
22603 (i386_regmap): Renamed from regmap, made static.
22604 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22605 made static.
22606 (i386_cannot_store_register): Renamed from cannot_store_register,
22607 made static.
22608 (the_low_target): New.
22609 * linux-ia64-low.c (num_regs): Remove.
22610 (ia64_num_regs): Define.
22611 (ia64_regmap): Renamed from regmap, made static.
22612 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22613 made static.
22614 (ia64_cannot_store_register): Renamed from cannot_store_register,
22615 made static.
22616 (the_low_target): New.
22617 * linux-m68k-low.c (num_regs): Remove.
22618 (m68k_num_regs): Define.
22619 (m68k_regmap): Renamed from regmap, made static.
22620 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22621 made static.
22622 (m68k_cannot_store_register): Renamed from cannot_store_register,
22623 made static.
22624 (the_low_target): New.
22625 * linux-mips-low.c (num_regs): Remove.
22626 (mips_num_regs): Define.
22627 (mips_regmap): Renamed from regmap, made static.
22628 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22629 made static.
22630 (mips_cannot_store_register): Renamed from cannot_store_register,
22631 made static.
22632 (the_low_target): New.
22633 * linux-ppc-low.c (num_regs): Remove.
22634 (ppc_num_regs): Define.
22635 (ppc_regmap): Renamed from regmap, made static.
22636 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22637 made static.
22638 (ppc_cannot_store_register): Renamed from cannot_store_register,
22639 made static.
22640 (the_low_target): New.
22641 * linux-s390-low.c (num_regs): Remove.
22642 (s390_num_regs): Define.
22643 (s390_regmap): Renamed from regmap, made static.
22644 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22645 made static.
22646 (s390_cannot_store_register): Renamed from cannot_store_register,
22647 made static.
22648 (the_low_target): New.
22649 * linux-sh-low.c (num_regs): Remove.
22650 (sh_num_regs): Define.
22651 (sh_regmap): Renamed from regmap, made static.
22652 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22653 made static.
22654 (sh_cannot_store_register): Renamed from cannot_store_register,
22655 made static.
22656 (the_low_target): New.
22657 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22658 (the_low_target): New.
22659
22660 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22661
22662 * Makefile.in: Add stamp-h target.
22663 * configure.in: Create stamp-h.
22664 * configure: Regenerated.
22665
22666 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22667
22668 * inferiors.c: New file.
22669 * target.c: New file.
22670 * target.h: New file.
22671 * Makefile.in: Add target.o and inferiors.o. Update
22672 dependencies.
22673 * linux-low.c (inferior_pid): New static variable,
22674 moved from server.c.
22675 (linux_create_inferior): Renamed from create_inferior.
22676 Call add_inferior. Return 0 on success instead of a PID.
22677 (linux_attach): Renamed from myattach.
22678 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22679 (linux_thread_alive): Renamed from mythread_alive.
22680 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22681 child dies.
22682 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22683 (regsets_store_inferior_registers): Correct error message.
22684 Add missing ``return 0''.
22685 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22686 (linux_store_registers): Renamed from store_inferior_registers.
22687 (linux_read_memory): Renamed from read_inferior_memory.
22688 (linux_write_memory): Renamed from write_inferior_memory.
22689 (linux_target_ops): New structure.
22690 (initialize_low): Call set_target_ops ().
22691 * remote-utils.c (unhexify): New function.
22692 (hexify): New function.
22693 (input_interrupt): Send signals to ``signal_pid''.
22694 * server.c (inferior_pid): Remove.
22695 (start_inferior): Update create_inferior call.
22696 (attach_inferior): Call add_inferior.
22697 (handle_query): New function.
22698 (main): Call handle_query for `q' packets.
22699 * server.h: Include "target.h". Remove obsolete prototypes.
22700 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22701
22702 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22703
22704 * Makefile.in: Add WARN_CFLAGS. Update configury
22705 dependencies.
22706 * configure.in: Check for <string.h>
22707 * configure: Regenerate.
22708 * config.in: Regenerate.
22709 * gdbreplay.c: Include needed system headers.
22710 (remote_open): Remove strchr prototype.
22711 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22712 * regcache.c (supply_register): Change buf argument to const void *.
22713 (supply_register_by_name): Likewise.
22714 (collect_register): Change buf argument to void *.
22715 (collect_register_by_name): Likewise.
22716 * regcache.h: Add missing prototypes.
22717 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22718 * server.c (handle_query): New function.
22719 (attached): New static variable, moved out of main.
22720 (main): Quiet longjmp clobber warnings.
22721 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22722 * utils.c (error): Remove NORETURN.
22723 (fatal): Likewise.
This page took 0.534008 seconds and 5 git commands to generate.