Unit tests for gdbserver memory tagging remote packets
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2021-03-24 Luis Machado <luis.machado@linaro.org>
2
3 * server.cc (test_memory_tagging_functions): New function.
4 (captured_main): Register test_memory_tagging_functions.
5
6 2021-03-24 Luis Machado <luis.machado@linaro.org>
7
8 * remote-utils.cc (decode_m_packet_params): Renamed from ...
9 (decode_m_packet): ... this, which now calls decode_m_packet_params.
10 Make char * param/return const char *.
11 (decode_M_packet): Use decode_m_packet_params and make char * param
12 const char *.
13 * remote-utils.h (decode_m_packet_params): New prototype.
14 (decode_m_packet): Constify char pointers.
15 (decode_M_packet): Likewise.
16 * server.cc (create_fetch_memtags_reply)
17 (parse_store_memtags_request): New
18 functions.
19 (handle_general_set): Handle the QMemTags packet.
20 (parse_fetch_memtags_request): New function.
21 (handle_query): Handle the qMemTags packet and advertise memory
22 tagging support.
23 (captured_main): Initialize memory tagging flag.
24 * server.h (struct client_state): Initialize memory tagging flag.
25 * target.cc (process_stratum_target::supports_memory_tagging)
26 (process_stratum_target::fetch_memtags)
27 (process_stratum_target::store_memtags): New methods.
28 * target.h: Include gdbsupport/byte-vector.h.
29 (class process_stratum_target) <supports_memory_tagging>
30 <fetch_memtags, store_memtags>: New class virtual methods.
31 (target_supports_memory_tagging): Define.
32
33 2021-03-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
34
35 * inferiors.h (struct process_info) <all_dlls, dlls_changed>: New
36 fields.
37 * dll.h (loaded_dll)
38 (unloaded_dll): Declare an overloaded version that takes a proc
39 parameter.
40 * dll.cc (loaded_dll)
41 (unloaded_dll): Implement the overloaded versions.
42 (clear_dlls): Clear all process' dll lists.
43 (all_dlls, dlls_changed): Remove the global variables.
44 * remote-utils.cc (prepare_resume_reply): Update to consider a dll
45 list per proc.
46 * server.cc (handle_qxfer_libraries): Ditto.
47 (handle_v_attach): Ditto.
48 (captured_main): Ditto.
49
50 2021-02-23 Simon Marchi <simon.marchi@polymtl.ca>
51
52 * linux-low.cc (linux_process_target::filter_event): Return
53 void.
54 * linux-low.h (class linux_process_target) <filter_event>:
55 Return void.
56
57 2021-02-12 Tom Tromey <tromey@adacore.com>
58
59 * gdbreplay.cc (remote_desc): Remove.
60 (remote_desc_in, remote_desc_out): New globals.
61 (remote_close): Update.
62 (remote_open): Handle "-".
63 (remote_open): Update.
64 (logchar): Log to stderr.
65 (expect, play): Update.
66
67 2021-02-12 Tom Tromey <tromey@adacore.com>
68
69 * gdbreplay.cc (remote_open): Constify.
70
71 2021-02-05 Paul E. Murphy <murphyp@linux.ibm.com>
72
73 * Makefile.in (UNDO_GNULIB_CFLAGS): Disable
74 gnulib free replacement too.
75 * common-defs.h [USE_WIN32API](read, write): Undefine
76 gnulib versions before defining these macros.
77
78 2021-02-03 Pedro Alves <pedro@palves.net>
79
80 * linux-low.cc (linux_process_target::complete_ongoing_step_over):
81 Discard step SIGTRAP, unless GDB wanted the thread to step.
82
83 2021-02-03 Pedro Alves <pedro@palves.net>
84
85 * server.cc (discard_queued_stop_replies): Don't ever discard the
86 notification at the head of the list.
87
88 2021-01-20 Simon Marchi <simon.marchi@polymtl.ca>
89
90 * ax.cc (bytecode_address_table): Make static.
91 * debug.cc (debug_file): Make static.
92 * linux-low.cc (stopping_threads): Make static.
93 (step_over_bkpt): Make static.
94 * linux-x86-low.cc (amd64_emit_ops, i386_emit_ops): Make static.
95 * tracepoint.cc (stop_tracing_bkpt, flush_trace_buffer_bkpt,
96 alloced_trace_state_variables, trace_buffer_ctrl,
97 tracing_start_time, tracing_stop_time, tracing_user_name,
98 tracing_notes, tracing_stop_note): Make static.
99
100 2021-01-20 Tom de Vries <tdevries@suse.de>
101
102 * linux-x86-low.cc (collect_register_i386): New function.
103 (x86_fill_gregset): Remove memset. Use collect_register_i386.
104
105 2021-01-07 Tom de Vries <tdevries@suse.de>
106
107 * Makefile.in (LIBIBERTY_NORMAL, LIBIBERTY_NOASAN, LIBIBERTY_PIC):
108 (LIBIBERTY_FOR_SHLIB): New var.
109 (LIBIBERTY): Set using $(LIBIBERTY_NORMAL).
110 (IPA_LIB): Use LIBIBERTY_FOR_SHLIB instead of LIBIBERTY in target rule.
111
112 2021-01-04 Simon Marchi <simon.marchi@efficios.com>
113
114 * debug.cc (debug_print_depth): New.
115
116 2021-01-01 Joel Brobecker <brobecker@adacore.com>
117
118 * server.cc (gdbserver_version): Update copyright year.
119 * gdbreplay.cc (gdbreplay_version): Likewise.
120
121 2020-12-16 Luis Machado <luis.machado@linaro.org>
122
123 * linux-aarch64-low.cc (address_significant): New function.
124 (aarch64_target::low_stopped_data_address): Handle the TBI.
125
126 2020-12-11 Andrew Burgess <andrew.burgess@embecosm.com>
127
128 * Makefile.in (IPA_LIB): Include libiberty library.
129
130 2020-11-11 Andrew Burgess <andrew.burgess@embecosm.com>
131
132 * server.cc (gdbserver_usage): Add missing option to usage text.
133 (gdbserver_show_disableable): Likewise.
134
135 2020-11-02 Simon Marchi <simon.marchi@efficios.com>
136
137 * ax.cc: Fix indentation.
138 * dll.cc: Fix indentation.
139 * inferiors.h: Fix indentation.
140 * linux-low.cc: Fix indentation.
141 * linux-nios2-low.cc: Fix indentation.
142 * linux-ppc-ipa.cc: Fix indentation.
143 * linux-ppc-low.cc: Fix indentation.
144 * linux-x86-low.cc: Fix indentation.
145 * linux-xtensa-low.cc: Fix indentation.
146 * regcache.cc: Fix indentation.
147 * server.cc: Fix indentation.
148 * tracepoint.cc: Fix indentation.
149
150 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
151
152 * acinclude.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
153 AC_LANG_PROGRAM.
154 * configure: Re-generate.
155
156 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
157
158 * configure: Re-generate.
159
160 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
161
162 * configure: Re-generate.
163
164 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
165
166 * configure: Re-generate.
167
168 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
169
170 * configure: Re-generate.
171
172 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
173
174 * configure.ac: Modernize.
175 * configure: Re-generate.
176
177 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
178
179 * configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
180 AC_CANONICAL_SYSTEM.
181 * configure: Re-generate.
182
183 2020-10-26 Pedro Alves <pedro@palves.net>
184
185 * netbsd-low.cc (netbsd_waitpid, netbsd_process_target::kill)
186 (netbsd_qxfer_libraries_svr4): Use gdb::handle_eintr without
187 explicit type.
188
189 2020-10-25 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * acinclude.m4: Update ptrace.m4 path.
192
193 2020-10-24 Simon Marchi <simon.marchi@polymtl.ca>
194
195 * config.in: Re-generate.
196 * configure: Re-generate.
197
198 2020-10-21 Simon Marchi <simon.marchi@polymtl.ca>
199
200 * server.cc (handle_general_set): Don't use sprintf with
201 argument overlapping buffer.
202
203 2020-10-20 Tom Tromey <tromey@adacore.com>
204
205 PR gdb/26742:
206 * inferiors.cc (remove_thread): Clear current_thread before
207 freeing the thread.
208
209 2020-10-13 Kamil Rytarowski <n54@gmx.com>x
210
211 * netbsd-low.cc (netbsd_tdesc): Remove.
212 (netbsd_add_process): Likewise.
213 (netbsd_process_target::create_inferior): Update.
214
215 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
216
217 * linux-arc-low.cc (arc_linux_read_description): Release the
218 unique_ptr returned from arc_create_target_description.
219
220 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
221
222 * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
223 or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
224
225 2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
226
227 * linux-low.cc (linux_process_target::handle_extended_wait):
228 Release the unique_ptr returned from allocate_target_description.
229 * linux-riscv-low.cc (riscv_target::low_arch_setup): Likewise.
230 * linux-x86-low.cc (tdesc_amd64_linux_no_xml): Change type.
231 (tdesc_i386_linux_no_xml): Change type.
232 (x86_linux_read_description): Borrow pointer from unique_ptr
233 object.
234 (x86_target::get_ipa_tdesc_idx): Likewise.
235 (initialize_low_arch): Likewise.
236 * tdesc.cc (allocate_target_description): Update return type.
237
238 2020-10-07 Tom Tromey <tromey@adacore.com>
239
240 * server.cc (handle_search_memory): Remove dead code.
241
242 2020-10-07 Tom Tromey <tromey@adacore.com>
243
244 * server.cc (handle_search_memory_1): Remove.
245 (handle_search_memory): Use simple_search_memory.
246
247 2020-10-07 Simon Marchi <simon.marchi@efficios.com>
248
249 * Makefile.in (COMPILE): Add CXXFLAGS.
250 (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
251 (gdbserver$(EXEEXT)): Add CXXFLAGS.
252 (gdbreplay$(EXEEXT)): Add CXXFLAGS.
253 ($(IPA_LIB)): Add CXXFLAGS.
254 (IPAGENT_COMPILE): Add CXXFLAGS.
255
256 2020-10-07 Anton Kolesov <anton.kolesov@synopsys.com>
257
258 * configure.srv: Support ARC architecture.
259 * Makefile.in: Add linux-arc-low.cc and arch/arc.o.
260 * linux-arc-low.cc: New file.
261
262 2020-10-07 Kamil Rytarowski <n54@gmx.com>
263
264 * netbsd-low.cc (get_dynamic, get_r_debug, read_one_ptr)
265 (netbsd_qxfer_libraries_svr4): Remove "target" argument and update.
266 (netbsd_process_target::qxfer_libraries_svr4): Update.
267
268 2020-10-07 Kamil Rytarowski <n54@gmx.com>
269
270 * netbsd-low.cc: Fix whitespace formatting.
271 * netbsd-amd64-low.cc: Likewise.
272
273 2020-10-07 Kamil Rytarowski <n54@gmx.com>
274
275 * netbsd-low.cc (netbsd_process_target::read_memory)
276 (netbsd_process_target::write_memory): Update.
277
278 2020-10-07 Kamil Rytarowski <n54@gmx.com>
279
280 * netbsd-aarch64-low.cc: Add.
281 * Makefile.in (SFILES): Register "netbsd-aarch64-low.c".
282 * configure.srv: Add aarch64*-*-netbsd*.
283
284 2020-10-06 Shahab Vahedi <shahab@synopsys.com>
285
286 * regcache.cc (register_data): Remove unused "fetch" argument.
287
288 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
289
290 * server.cc (handle_monitor_command): Handle "set
291 debug-event-loop".
292 (captured_main): Handle "--debug-event-loop".
293 (monitor_show_help): Mention new setting.
294 (gdbserver_usage): Mention new flag.
295
296 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
297
298 * linux-low.cc (linux_process_target::async): Pass name to
299 add_file_handler.
300 * remote-utils.cc (handle_accept_event): Likewise.
301 (remote_open): Likewise.
302
303 2020-10-01 Kamil Rytarowski <n54@gmx.com>
304
305 * netbsd-i386-low.cc: Add.
306 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
307 * configure.srv: Add i[34567]86-*-netbsd*.
308
309 2020-10-01 Kamil Rytarowski <n54@gmx.com>
310
311 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
312 (netbsd_target_regsets): Now const.
313 (the_low_target): Remove.
314 (class netbsd_amd64_target, the_netbsd_amd64_target)
315 (the_netbsd_target): Add.
316 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
317 low_arch_setup ().
318 (netbsd_process_target::fetch_registers)
319 (netbsd_process_target::store_registers, initialize_low): Update.
320 (the_netbsd_target): Remove.
321 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
322 (the_low_target, netbsd_tdesc): Remove.
323 (netbsd_process_target::get_regs_info)
324 (netbsd_process_target::low_arch_setup): Add.
325
326 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
327
328 * win32-low.cc: Remove local wow64_process variable.
329 * win32-low.h: Remove local wow64_process variable.
330
331 2020-09-18 Tom Tromey <tromey@adacore.com>
332
333 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
334 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
335 (netbsd_process_target::wait): Change type of target_options.
336 * win32-low.h (class win32_process_target) <wait>: Update.
337 * win32-low.cc (win32_process_target::wait): Update.
338 * target.h (class process_stratum_target) <wait>: Update.
339 (mywait): Update.
340 * target.cc (mywait, target_wait): Change type of "options".
341 * linux-low.h (class linux_process_target) <wait, wait_1>:
342 Update.
343 * linux-low.cc (linux_process_target::wait)
344 (linux_process_target::wait_1): Update.
345
346 2020-09-15 Tom Tromey <tromey@adacore.com>
347
348 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
349 (xmltarget_amd64_linux_no_xml): Now arrays.
350
351 2020-09-14 Tom Tromey <tromey@adacore.com>
352
353 * tracepoint.cc (eval_result_names): Now const.
354 * ax.cc (gdb_agent_op_names): Now const.
355
356 2020-09-10 Kamil Rytarowski <n54@gmx.com>
357
358 * netbsd-low.cc: Add.
359 * netbsd-low.h: Likewise.
360 * netbsd-amd64-low.cc: Likewise.
361 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
362 "netbsd-amd64-low.cc".
363 * configure.srv: Add x86_64-*-netbsd*.
364
365 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
366
367 * server.cc (captured_main): Accept multiple `--selftest=`
368 options. Pass all `--selftest=` arguments to run_tests.
369
370 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
371
372 * configure, config.in: Regenerate.
373
374 2020-07-26 Eli Zaretskii <eliz@gnu.org>
375
376 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
377 When checking whether socklen_t type is defined, use ws2tcpip.h if
378 it is available and sys/socket.h isn't.
379 * configure: Regenerate.
380 * config.in: Regenerate.
381
382 2020-07-22 Pedro Alves <pedro@palves.net>
383
384 * inferiors.cc (switch_to_process): New, moved here from
385 thread-db.cc, and made extern.
386 * inferiors.h (switch_to_process): Declare.
387 * server.cc: Include "gdbsupport/scoped_restore.h".
388 (handle_qxfer_threads_proper): Now returns bool. Prepare to
389 access memory around target calls.
390 (handle_qxfer_threads): Handle errors.
391 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
392
393 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
394
395 * linux-low.cc (stopped_pids): Make static.
396
397 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
398
399 * tdesc.cc (allocate_target_description): Add header comment.
400 (target_desc_deleter::operator()): New function.
401 * tdesc.h (struct target_desc): Declare as final.
402
403 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
404
405 * server.cc (handle_query): Use std::vector of
406 std::string for `qsupported` vector. Use separate
407 vector for unknowns.
408 * target.h (class process_stratum_target) <process_qsupported>:
409 Change parameters to array_view of const char *.
410 (target_process_qsupported): Remove `count` parameter.
411 * target.cc (process_stratum_target::process_qsupported): Change
412 parameters to array_view of const char *.
413 * linux-x86-low.cc (class x86_target) <process_qsupported>:
414 Likewise.
415
416 2020-06-29 Tom de Vries <tdevries@suse.de>
417
418 * ax.h: Include gdbsupport/debug_agent.h.
419
420 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
421
422 * tdesc.cc (struct tdesc_compatible_info): New struct.
423 (tdesc_compatible_info_list): New function.
424 (tdesc_compatible_info_arch_name): New function.
425
426 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
427
428 Use std::list to stop pending signal instead of manually-created
429 linked list.
430 * linux-low.h: Include <list>.
431 (struct pending_signal): Move here from linux-low.cc.
432 (struct lwp_info) <pending_signals>
433 <pending_signals_to_report>: Update the type.
434 * linux-low.cc (struct pending_signals): Remove.
435 (linux_process_target::delete_lwp)
436 (linux_process_target::add_lwp)
437 (enqueue_one_deferred_signal)
438 (dequeue_one_deferred_signal)
439 (enqueue_pending_signal)
440 (linux_process_target::resume_one_lwp_throw)
441 (linux_process_target::thread_needs_step_over)
442 (linux_process_target::resume_one_thread)
443 (linux_process_target::proceed_one_lwp): Update the use of pending
444 signal list.
445
446 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
447
448 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
449 Remove.
450
451 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
452
453 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
454 * configure.srv: Remove mingw32ce cases.
455 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
456 * win32-low.h (to_back_slashes): Remove.
457 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
458
459 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
460
461 * Makefile.in (SFILES): linux-tile-low.cc.
462 * configure.srv: Remove tilegx case.
463 * linux-tile-low.cc: Remove.
464
465 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
466
467 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
468 * configure.srv: Remove m32r case.
469 * linux-m32r-low.cc: Remove.
470
471 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
472
473 * Makefile.in (SFILES): Remove linux-cris-low.c.
474 * configure.srv: Remove cris cases.
475 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
476
477 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
478
479 * Makefile.in (SFILES): Remove linux-bfin-low.c.
480 * configure.srv: Remove bfin case.
481 * linux-bfin-low.cc: Remove.
482 * linux-low.cc: Remove BFIN-conditional code.
483
484 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
485
486 * configure: Re-generate.
487 * configure.ac: Remove srv_qnx test.
488 * configure.srv: Remove nto case.
489 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
490 * remote-utils.c: Remove __QNX__-guarded code.
491
492 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
493
494 * configure: Re-generate.
495 * configure.ac: Remove srv_lynxos test.
496 * configure.srv: Remove lynxos cases.
497 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
498 Remove.
499
500 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
501
502 * README: Fix a few outdated or incoherent things.
503
504 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
505
506 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
507 (win32_clear_inferiors): Use open_process_used.
508 (get_child_debug_event): Likewise.
509
510 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
511
512 PR gdbserver/25893
513 * linux-low.cc (linux_process_target::create_inferior),
514 lynx-low.cc (lynx_process_target::create_inferior),
515 win32-low.cc (win32_process_target::create_inferior): Use
516 construct_inferior_arguments instead of stringify_argv
517 to get string representation which properly escapes
518 special characters.
519 * server.cc (handle_v_run): Just pass empty program arg
520 as such, since any further processing is now handled via
521 construct_inferior_arguments.
522
523 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
524
525 * nto-low.cc (nto_process_target::create_inferior): Pass
526 argv to spawnp function as char **.
527
528 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
529
530 * server.cc (captured_main), (handle_v_run): No longer
531 insert extra NULL element to args vector.
532
533 2020-05-23 Pedro Alves <palves@redhat.com>
534
535 * gdb-safe-ctype.h: New.
536
537 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
538
539 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
540 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
541 (ia64_target::low_breakpoint_at): Ditto.
542
543 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
544
545 * win32-i386-low.cc (i386_supports_z_point_type): Handle
546 Z_PACKET_HW_BP z_type.
547 (i386_insert_point): Handle raw_bkpt_type type.
548 (i386_remove_point): Likewise.
549
550 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
551
552 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
553 Add arch/i386.o.
554 * win32-arm-low.cc (arm_num_regs): New function.
555 (struct win32_target_ops): Use arm_num_regs.
556 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
557 processes.
558 (i386_get_thread_context): Likewise.
559 (i386_prepare_to_resume): Likewise.
560 (i386_thread_added): Likewise.
561 (i386_single_step): Likewise.
562 (i386_fetch_inferior_register): Likewise.
563 (i386_store_inferior_register): Likewise.
564 (i386_arch_setup): Likewise.
565 (i386_win32_num_regs): New function.
566 (struct win32_target_ops): Use i386_win32_num_regs.
567 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
568 processes.
569 (win32_require_context): Likewise.
570 (child_add_thread): Likewise.
571 (do_initial_child_stuff): Likewise.
572 (continue_one_thread): Likewise.
573 (win32_process_target::resume): Likewise.
574 (load_psapi): Likewise.
575 (win32_add_all_dlls): Likewise.
576 (maybe_adjust_pc): Likewise.
577 (win32_process_target::qxfer_siginfo): Likewise.
578 (initialize_low): Likewise.
579 * win32-low.h (struct win32_target_ops): Change num_regs to
580 callback function.
581
582 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
583
584 * configure.ac: Remove check for fs_base/gs_base in
585 user_regs_struct.
586 * configure: Re-generate.
587 * config.in: Re-generate.
588 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
589 x86_store_gregset): Adjust.
590
591 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
592
593 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
594 comparison.
595
596 2020-04-16 Tom Tromey <tromey@adacore.com>
597
598 * win32-low.cc (windows_nat::handle_access_violation): New
599 function.
600
601 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
602
603 * win32-low.cc (get_child_debug_event): Fix format string warning.
604
605 2020-04-13 Tom Tromey <tom@tromey.com>
606
607 * server.h (gdb_fildes_t): Remove typedef.
608 * remote-utils.c (remote_desc, list_desc): Now int.
609 (INVALID_DESCRIPTOR): Remove.
610 (gdb_connected, remote_close)
611 (check_remote_input_interrupt_request): Update.
612 * utils.h (pfildes): Don't declare.
613 * utils.c (pfildes): Remove.
614
615 2020-04-13 Tom Tromey <tom@tromey.com>
616
617 * server.h (handle_serial_event, handle_target_event): Update.
618 * server.c: Don't call initialize_event_loop.
619 (keep_processing_events): New global.
620 (handle_serial_event): Return void. Set keep_processing_events.
621 (handle_target_event): Return void.
622 (start_event_loop): Move from event-loop.c. Rewrite.
623 * remote-utils.c (handle_accept_event): Return void.
624 (reset_readchar): Use delete_timer.
625 (process_remaining): Return void.
626 (reschedule): Use create_timer.
627 * event-loop.h: Remove.
628 * event-loop.cc: Remove.
629 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
630
631 2020-04-13 Tom Tromey <tom@tromey.com>
632
633 * server.c (invoke_async_signal_handlers)
634 (check_async_event_handlers, flush_streams, gdb_select): New
635 functions.
636
637 2020-04-13 Tom Tromey <tom@tromey.com>
638
639 * configure: Rebuild.
640 * config.in: Rebuild.
641
642 2020-04-08 Tom Tromey <tromey@adacore.com>
643
644 PR gdb/22992
645 * win32-low.c (child_continue): Call matching_pending_stop.
646 (get_child_debug_event): Call fetch_pending_stop. Push pending
647 stop when needed.
648
649 2020-04-08 Tom Tromey <tromey@adacore.com>
650
651 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
652 (win32_process_target::supports_stopped_by_sw_breakpoint):
653 Declare.
654 * win32-low.c (win32_supports_z_point_type): Always handle
655 Z_PACKET_SW_BP.
656 (win32_insert_point): Call insert_memory_breakpoint when needed.
657 (win32_remove_point): Call remove_memory_breakpoint when needed.
658 (win32_process_target::stopped_by_sw_breakpoint)
659 (win32_process_target::supports_stopped_by_sw_breakpoint): New
660 methods.
661 (win32_target_ops): Update.
662 (maybe_adjust_pc): New function.
663 (win32_wait): Call maybe_adjust_pc.
664
665 2020-04-08 Tom Tromey <tromey@adacore.com>
666
667 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
668 field.
669 * win32-i386-low.c (the_low_target): Update.
670 * win32-arm-low.c (the_low_target): Update.
671
672 2020-04-08 Tom Tromey <tromey@adacore.com>
673
674 * win32-low.h (win32_process_target::read_pc)
675 (win32_process_target::write_pc): Declare.
676 * win32-low.c (win32_process_target::read_pc)
677 (win32_process_target::write_pc): New methods.
678 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
679 functions.
680 (the_low_target): Update.
681 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
682 functions.
683 (the_low_target): Update.
684
685 2020-04-08 Tom Tromey <tromey@adacore.com>
686
687 * win32-low.c (win32_kill, get_child_debug_event): Use
688 wait_for_debug_event.
689
690 2020-04-08 Tom Tromey <tromey@adacore.com>
691
692 * win32-low.c (child_continue): Call continue_last_debug_event.
693
694 2020-04-08 Tom Tromey <tromey@adacore.com>
695
696 * win32-low.c (handle_exception): Remove.
697 (windows_nat::handle_ms_vc_exception): New function.
698 (get_child_debug_event): Add "continue_status" parameter.
699 Update.
700 (win32_wait): Update.
701
702 2020-04-08 Tom Tromey <tromey@adacore.com>
703
704 * win32-low.c (windows_nat::handle_load_dll): Rename from
705 handle_load_dll. No longer static.
706 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
707 No longer static.
708
709 2020-04-08 Tom Tromey <tromey@adacore.com>
710
711 * win32-low.c (handle_output_debug_string): Add parameter. Change
712 return type.
713 (win32_kill, get_child_debug_event): Update.
714
715 2020-04-08 Tom Tromey <tromey@adacore.com>
716
717 * win32-low.c (current_process_handle, current_process_id)
718 (main_thread_id, last_sig, current_event, siginfo_er): Move to
719 nat/windows-nat.c.
720
721 2020-04-08 Tom Tromey <tromey@adacore.com>
722
723 * win32-low.c (get_image_name): Remove.
724 (handle_load_dll): Update.
725
726 2020-04-08 Tom Tromey <tromey@adacore.com>
727
728 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
729 No longer static. Change parameters.
730 (child_add_thread, child_fetch_inferior_registers)
731 (child_store_inferior_registers, win32_resume)
732 (win32_get_tib_address): Update.
733
734 2020-04-08 Tom Tromey <tromey@adacore.com>
735
736 * win32-low.h (struct win32_target_ops): Use qualified names where
737 needed.
738 * win32-i386-low.c: Add "using namespace".
739 * win32-low.c: Add "using namespace".
740 * win32-arm-low.c: Add "using namespace".
741
742 2020-04-08 Tom Tromey <tromey@adacore.com>
743
744 * win32-low.c (delete_thread_info): Don't call CloseHandle.
745
746 2020-04-08 Tom Tromey <tromey@adacore.com>
747
748 * win32-low.c (win32_require_context, suspend_one_thread): Use
749 windows_thread_info::suspend.
750 (continue_one_thread): Use windows_thread_info::resume.
751 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
752
753 2020-04-08 Tom Tromey <tromey@adacore.com>
754
755 * win32-i386-low.c (update_debug_registers)
756 (i386_prepare_to_resume, i386_thread_added): Update.
757
758 2020-04-08 Tom Tromey <tromey@adacore.com>
759
760 * win32-low.c (child_add_thread): Use new.
761 (delete_thread_info): Use delete.
762
763 2020-04-08 Tom Tromey <tromey@adacore.com>
764
765 * win32-low.h (struct windows_thread_info): Remove.
766
767 2020-04-08 Tom Tromey <tromey@adacore.com>
768
769 * win32-low.h (struct windows_thread_info): Rename from
770 win32_thread_info. Remove typedef.
771 (struct win32_target_ops, win32_require_context): Update.
772 * win32-low.c (win32_get_thread_context)
773 (win32_set_thread_context, win32_prepare_to_resume)
774 (win32_require_context, thread_rec, child_add_thread)
775 (delete_thread_info, continue_one_thread)
776 (child_fetch_inferior_registers, child_store_inferior_registers)
777 (win32_resume, suspend_one_thread, win32_get_tib_address):
778 Update.
779 * win32-i386-low.c (update_debug_registers)
780 (win32_get_current_dr, i386_get_thread_context)
781 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
782 (i386_fetch_inferior_register, i386_store_inferior_register):
783 Update.
784 * win32-arm-low.c (arm_get_thread_context)
785 (arm_fetch_inferior_register, arm_store_inferior_register):
786 Update.
787
788 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
789
790 * linux-low.h (struct linux_target_ops): Remove.
791 (the_low_target): Remove.
792 * linux-x86-low.cc (the_low_target): Remove.
793 * linux-aarch64-low.cc (the_low_target): Ditto.
794 * linux-arm-low.cc (the_low_target): Ditto.
795 * linux-bfin-low.cc (the_low_target): Ditto.
796 * linux-cris-low.cc (the_low_target): Ditto.
797 * linux-crisv32-low.cc (the_low_target): Ditto.
798 * linux-ia64-low.cc (the_low_target): Ditto.
799 * linux-m32r-low.cc (the_low_target): Ditto.
800 * linux-m68k-low.cc (the_low_target): Ditto.
801 * linux-mips-low.cc (the_low_target): Ditto.
802 * linux-nios2-low.cc (the_low_target): Ditto.
803 * linux-ppc-low.cc (the_low_target): Ditto.
804 * linux-riscv-low.cc (the_low_target): Ditto.
805 * linux-s390-low.cc (the_low_target): Ditto.
806 * linux-sh-low.cc (the_low_target): Ditto.
807 * linux-sparc-low.cc (the_low_target): Ditto.
808 * linux-tic6x-low.cc (the_low_target): Ditto.
809 * linux-tile-low.cc (the_low_target): Ditto.
810 * linux-xtensa-low.cc (the_low_target): Ditto.
811
812 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
813
814 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
815 linux target define the op by overriding the declaration in
816 process_stratum_target.
817
818 * linux-low.h (struct linux_target_ops): Remove the op.
819 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
820 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
821 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
822 (x86_get_ipa_tdesc_idx): Turn into...
823 (x86_target::get_ipa_tdesc_idx): ...this.
824 (the_low_target): Remove the op field.
825 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
826 (ppc_get_ipa_tdesc_idx): Turn into...
827 (ppc_target::get_ipa_tdesc_idx): ...this.
828 (the_low_target): Remove the op field.
829 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
830 (s390_get_ipa_tdesc_idx): Turn into...
831 (s390_target::get_ipa_tdesc_idx): ...this.
832 (the_low_target): Remove the op field.
833
834 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
835
836 Turn the 'get_syscall_trapinfo' linux target op into a method
837 of process_stratum_target.
838
839 * linux-low.h (struct linux_target_ops): Remove the op.
840 (class linux_process_target) <get_syscall_trapinfo>
841 <gdb_catch_this_syscall>
842 <low_supports_catch_syscall>
843 <low_get_syscall_trapinfo>: Declare.
844 * linux-low.cc (get_syscall_trapinfo): Turn into...
845 (linux_process_target::get_syscall_trapinfo): ...this.
846 (linux_process_target::low_get_syscall_trapinfo): Define.
847 (gdb_catch_this_syscall_p): Turn into...
848 (linux_process_target::gdb_catch_this_syscall): ...this.
849 (linux_process_target::low_supports_catch_syscall): Define.
850
851 Update the callers below.
852
853 (linux_process_target::wait_1)
854 (linux_process_target::supports_catch_syscall)
855
856 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
857 <low_get_syscall_trapinfo>: Declare.
858 (x86_target::low_supports_catch_syscall): Define.
859 (x86_get_syscall_trapinfo): Turn into...
860 (x86_target::low_get_syscall_trapinfo): ...this.
861 (the_low_target): Remove the op field.
862 * linux-aarch64-low.cc (class aarch64_target)
863 <low_supports_catch_syscall>
864 <low_get_syscall_trapinfo>: Declare.
865 (aarch64_target::low_supports_catch_syscall): Define.
866 (aarch64_get_syscall_trapinfo): Turn into...
867 (aarch64_target::low_get_syscall_trapinfo): ...this.
868 (the_low_target): Remove the op field.
869 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
870 <low_get_syscall_trapinfo>: Declare.
871 (arm_target::low_supports_catch_syscall): Define.
872 (arm_get_syscall_trapinfo): Turn into...
873 (arm_target::low_get_syscall_trapinfo): ...this.
874 (the_low_target): Remove the op field.
875 * linux-ppc-low.cc (the_low_target): Remove the op field.
876 * linux-s390-low.cc (the_low_target): Remove the op field.
877
878 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
879
880 Remove the 'supports_hardware_single_step' linux target op and
881 override the process_stratum_target's op definition in
882 linux_process_target to return true.
883
884 * linux-low.h (struct linux_target_ops): Remove the op.
885 (class linux_process_target) <finish_step_over>
886 <maybe_hw_step>: Declare.
887 * linux-low.cc (can_hardware_single_step): Remove.
888 (maybe_hw_step): Turn into...
889 (linux_process_target::maybe_hw_step): ...this.
890 (finish_step_over): Turn into...
891 (linux_process_target::finish_step_over): ...this.
892 (linux_process_target::supports_hardware_single_step): Update
893 to return true.
894
895 Update the callers below.
896
897 (linux_process_target::single_step)
898 (linux_process_target::resume_one_lwp_throw)
899
900 * linux-arm-low.cc (class arm_target)
901 <supports_hardware_single_step>: Declare.
902 (arm_supports_hardware_single_step): Turn into...
903 (arm_target::supports_hardware_single_step): ...this.
904 (the_low_target): Remove the op field.
905 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
906 (the_low_target): Remove the op field.
907 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
908 Remove.
909 (the_low_target): Remove the op field.
910 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
911 (the_low_target): Remove the op field.
912 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
913 (the_low_target): Remove the op field.
914 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
915 (the_low_target): Remove the op field.
916 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
917 (the_low_target): Remove the op field.
918 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
919 (the_low_target): Remove the op field.
920 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
921 (the_low_target): Remove the op field.
922 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
923 (the_low_target): Remove the op field.
924 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
925 (the_low_target): Remove the op field.
926 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
927 (the_low_target): Remove the op field.
928 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
929 Remove.
930 (the_low_target): Remove the op field.
931
932 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
933
934 Turn the 'supports_range_stepping' linux target op into a method
935 of linux_process_target.
936
937 * linux-low.h (struct linux_target_ops): Remove the op.
938 (class linux_process_target) <low_supports_range_stepping>: Declare.
939 * linux-low.cc (linux_process_target::low_supports_range_stepping):
940 Define.
941 (linux_process_target::supports_range_stepping): Update the call
942 site.
943 * linux-x86-low.cc (class x86_target)
944 <low_supports_range_stepping>: Declare.
945 (x86_supports_range_stepping): Turn into...
946 (x86_target::low_supports_range_stepping): ...this.
947 (the_low_target): Remove the op field.
948 * linux-aarch64-low.cc (class aarch64_target)
949 <low_supports_range_stepping>: Declare.
950 (aarch64_supports_range_stepping): Turn into...
951 (aarch64_target::low_supports_range_stepping): ...this.
952 (the_low_target): Remove the op field.
953 * linux-arm-low.cc (the_low_target): Remove the op field.
954 * linux-bfin-low.cc (the_low_target): Ditto.
955 * linux-crisv32-low.cc (the_low_target): Ditto.
956 * linux-m32r-low.cc (the_low_target): Ditto.
957 * linux-m68k-low.cc (the_low_target): Ditto.
958 * linux-ppc-low.cc (the_low_target): Ditto.
959 * linux-s390-low.cc (the_low_target): Ditto.
960 * linux-sh-low.cc (the_low_target): Ditto.
961 * linux-tic6x-low.cc (the_low_target): Ditto.
962 * linux-tile-low.cc (the_low_target): Ditto.
963 * linux-xtensa-low.cc (the_low_target): Ditto.
964
965 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
966
967 Remove the 'emit_ops' linux target ops and let the concrete
968 linux target define the op by overriding the declaration of
969 process_stratum_target.
970
971 * linux-low.h (struct linux_target_ops): Remove the op.
972 (class linux_process_target) <emit_ops>: Remove.
973 * linux-low.cc (linux_process_target::emit_ops): Remove.
974 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
975 (x86_emit_ops): Turn into...
976 (x86_target::emit_ops): ...this.
977 (the_low_target): Remove the op field.
978 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
979 (aarch64_emit_ops): Turn into...
980 (aarch64_target::emit_ops): ...this.
981 (the_low_target): Remove the op field.
982 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
983 (ppc_emit_ops): Turn into...
984 (ppc_target::emit_ops): ...this.
985 (the_low_target): Remove the op field.
986 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
987 (s390_emit_ops): Turn into...
988 (s390_target::emit_ops): ...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-sh-low.cc (the_low_target): Ditto.
996 * linux-tic6x-low.cc (the_low_target): Ditto.
997 * linux-tile-low.cc (the_low_target): Ditto.
998 * linux-xtensa-low.cc (the_low_target): Ditto.
999
1000 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1001
1002 Remove the 'install_fast_tracepoint_jump_pad' and
1003 'get_min_fast_tracepoint_insn_len' linux target ops to let the
1004 concrete linux target define the ops by overriding the declarations
1005 of process_stratum_target.
1006
1007 * linux-low.h (struct linux_target_ops): Remove the ops.
1008 (class linux_process_target) <supports_fast_tracepoints>
1009 <install_fast_tracepoint_jump_pad>
1010 <get_min_fast_tracepoint_insn_len>: Remove.
1011 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
1012 (linux_process_target::install_fast_tracepoint_jump_pad)
1013 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
1014 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
1015 <install_fast_tracepoint_jump_pad>
1016 <get_min_fast_tracepoint_insn_len>: Declare.
1017 (x86_target::supports_fast_tracepoints): Define.
1018 (x86_install_fast_tracepoint_jump_pad): Turn into...
1019 (x86_target::install_fast_tracepoint_jump_pad): ...this.
1020 (x86_get_min_fast_tracepoint_insn_len): Turn into...
1021 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
1022 (the_low_target): Remove the op fields.
1023 * linux-aarch64-low.cc (class aarch64_target)
1024 <supports_fast_tracepoints>
1025 <install_fast_tracepoint_jump_pad>
1026 <get_min_fast_tracepoint_insn_len>: Declare.
1027 (aarch64_target::supports_fast_tracepoints): Define.
1028 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
1029 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
1030 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
1031 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
1032 (the_low_target): Remove the op fields.
1033 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
1034 <install_fast_tracepoint_jump_pad>
1035 <get_min_fast_tracepoint_insn_len>: Declare.
1036 (ppc_target::supports_fast_tracepoints): Define.
1037 (ppc_install_fast_tracepoint_jump_pad): Turn into...
1038 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
1039 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
1040 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
1041 (the_low_target): Remove the op fields.
1042 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
1043 <install_fast_tracepoint_jump_pad>
1044 <get_min_fast_tracepoint_insn_len>: Declare.
1045 (s390_target::supports_fast_tracepoints): Define.
1046 (s390_install_fast_tracepoint_jump_pad): Turn into...
1047 (s390_target::install_fast_tracepoint_jump_pad): ...this.
1048 (s390_get_min_fast_tracepoint_insn_len): Turn into...
1049 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
1050 (the_low_target): Remove the op fields.
1051 * linux-arm-low.cc (the_low_target): Remove the op fields.
1052 * linux-bfin-low.cc (the_low_target): Ditto.
1053 * linux-crisv32-low.cc (the_low_target): Ditto.
1054 * linux-m32r-low.cc (the_low_target): Ditto.
1055 * linux-m68k-low.cc (the_low_target): Ditto.
1056 * linux-sh-low.cc (the_low_target): Ditto.
1057 * linux-tic6x-low.cc (the_low_target): Ditto.
1058 * linux-tile-low.cc (the_low_target): Ditto.
1059 * linux-xtensa-low.cc (the_low_target): Ditto.
1060
1061 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1062
1063 Turn the 'get_thread_area' linux target op into a method of
1064 process_stratum_target.
1065
1066 * linux-low.h (struct linux_target_ops): Remove the op.
1067 (class linux_process_target) <stuck_in_jump_pad>
1068 <linux_fast_tracepoint_collecting>
1069 <low_get_thread_area>: Declare.
1070 * linux-low.cc (supports_fast_tracepoints): Remove.
1071 (linux_fast_tracepoint_collecting): Turn into...
1072 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
1073 (linux_process_target::low_get_thread_area): Define.
1074 (stuck_in_jump_pad_callback): Turn into...
1075 (linux_process_target::stuck_in_jump_pad): ...this.
1076
1077 Update the caller below.
1078
1079 (linux_process_target::stabilize_threads)
1080
1081 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
1082 Declare.
1083 (x86_get_thread_area): Turn into...
1084 (x86_target::low_get_thread_area): ...this.
1085 (the_low_target): Remove the op field.
1086 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
1087 Declare.
1088 (aarch64_get_thread_area): Turn into...
1089 (aarch64_target::low_get_thread_area): ...this.
1090 (the_low_target): Remove the op field.
1091 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
1092 Declare.
1093 (ppc_get_thread_area): Turn into...
1094 (ppc_target::low_get_thread_area): ...this.
1095 (the_low_target): Remove the op field.
1096 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
1097 Declare.
1098 (s390_get_thread_area): Turn into...
1099 (s390_target::low_get_thread_area): ...this.
1100 (the_low_target): Remove the op field.
1101 * linux-arm-low.cc (the_low_target): Remove the op field.
1102 * linux-bfin-low.cc (the_low_target): Ditto.
1103 * linux-crisv32-low.cc (the_low_target): Ditto.
1104 * linux-m32r-low.cc (the_low_target): Ditto.
1105 * linux-m68k-low.cc (the_low_target): Ditto.
1106 * linux-sh-low.cc (the_low_target): Ditto.
1107 * linux-tic6x-low.cc (the_low_target): Ditto.
1108 * linux-tile-low.cc (the_low_target): Ditto.
1109 * linux-xtensa-low.cc (the_low_target): Ditto.
1110
1111 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1112
1113 Remote the 'supports_tracepoints' linux target op and let the
1114 concrete linux target define it by overriding the op declared in
1115 process_stratum_target.
1116
1117 * linux-low.h (struct linux_target_ops): Remove the op.
1118 (class linux_process_target) <supports_tracepoints>: Remove.
1119 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
1120 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
1121 Declare.
1122 (x86_supports_tracepoints): Turn into...
1123 (x86_target::supports_tracepoints): ...this.
1124 (the_low_target): Remove the op field.
1125 * linux-aarch64-low.cc (class aarch64_target)
1126 <supports_tracepoints>: Declare.
1127 (aarch64_supports_tracepoints): Turn into...
1128 (aarch64_target::supports_tracepoints): ...this.
1129 (the_low_target): Remove the op field.
1130 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
1131 Declare.
1132 (ppc_supports_tracepoints): Turn into...
1133 (ppc_target::supports_tracepoints): ...this.
1134 (the_low_target): Remove the op field.
1135 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
1136 Declare.
1137 (s390_supports_tracepoints): Turn into...
1138 (s390_target::supports_tracepoints): ...this.
1139 (the_low_target): Remove the op field.
1140 * linux-arm-low.cc (the_low_target): Remove the op field.
1141 * linux-bfin-low.cc (the_low_target): Ditto.
1142 * linux-crisv32-low.cc (the_low_target): Ditto.
1143 * linux-m32r-low.cc (the_low_target): Ditto.
1144 * linux-m68k-low.cc (the_low_target): Ditto.
1145 * linux-sh-low.cc (the_low_target): Ditto.
1146 * linux-tic6x-low.cc (the_low_target): Ditto.
1147 * linux-tile-low.cc (the_low_target): Ditto.
1148 * linux-xtensa-low.cc (the_low_target): Ditto.
1149
1150 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1151
1152 Remove the 'process_qsupported' linux target op and let a concrete
1153 linux target define the op by overriding the op declaration in
1154 process_stratum_target.
1155
1156 * linux-low.h (struct linux_target_ops): Remove the op.
1157 (class linux_process_target) <process_qsupported>: Remove.
1158 * linux-low.cc (linux_process_target::process_qsupported): Remove.
1159 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
1160 (x86_linux_process_qsupported): Turn into...
1161 (x86_target::process_qsupported): ...this.
1162 (the_low_target): Remove the op field.
1163 * linux-aarch64-low.cc (the_low_target): Remove the op
1164 field.
1165 * linux-arm-low.cc (the_low_target): Ditto.
1166 * linux-bfin-low.cc (the_low_target): Ditto.
1167 * linux-crisv32-low.cc (the_low_target): Ditto.
1168 * linux-m32r-low.cc (the_low_target): Ditto.
1169 * linux-m68k-low.cc (the_low_target): Ditto.
1170 * linux-ppc-low.cc (the_low_target): Ditto.
1171 * linux-s390-low.cc (the_low_target): Ditto.
1172 * linux-sh-low.cc (the_low_target): Ditto.
1173 * linux-tic6x-low.cc (the_low_target): Ditto.
1174 * linux-tile-low.cc (the_low_target): Ditto.
1175 * linux-xtensa-low.cc (the_low_target): Ditto.
1176
1177 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1178
1179 Turn the 'prepare_to_resume' linux target op into a method of
1180 linux_process_target.
1181
1182 * linux-low.h (struct linux_target_ops): Remove the op.
1183 (class linux_process_target) <low_prepare_to_resume>: Declare.
1184 * linux-low.cc (linux_process_target::low_prepare_to_resume):
1185 Define.
1186
1187 Update the callers below:
1188
1189 (linux_process_target::resume_one_lwp_throw)
1190 (linux_process_target::low_prepare_to_resume)
1191
1192 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
1193 Declare.
1194 (x86_target::low_prepare_to_resume): Define.
1195 (the_low_target): Remove the op field.
1196 * linux-aarch64-low.cc (class aarch64_target)
1197 <low_prepare_to_resume>: Declare.
1198 (aarch64_target::low_prepare_to_resume): Define.
1199 (the_low_target): Remove the op field.
1200 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
1201 Declare.
1202 (arm_prepare_to_resume): Turn into...
1203 (arm_target::low_prepare_to_resume): ...this.
1204 (the_low_target): Remove the op field.
1205 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
1206 Declare.
1207 (mips_linux_prepare_to_resume): Turn into...
1208 (mips_target::low_prepare_to_resume): ...this.
1209 (the_low_target): Remove the op field.
1210 * linux-bfin-low.cc (the_low_target): Remove the op field.
1211 * linux-crisv32-low.cc (the_low_target): Ditto.
1212 * linux-m32r-low.cc (the_low_target): Ditto.
1213 * linux-m68k-low.cc (the_low_target): Ditto.
1214 * linux-ppc-low.cc (the_low_target): Ditto.
1215 * linux-s390-low.cc (the_low_target): Ditto.
1216 * linux-sh-low.cc (the_low_target): Ditto.
1217 * linux-tic6x-low.cc (the_low_target): Ditto.
1218 * linux-tile-low.cc (the_low_target): Ditto.
1219 * linux-xtensa-low.cc (the_low_target): Ditto.
1220
1221 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1222
1223 Turn the 'new_process', 'delete_process', 'new_thread',
1224 'delete_thread', and 'new_fork' linux target ops into methods
1225 of linux_process_target.
1226
1227 * linux-low.h (struct linux_target_ops): Remove the ops.
1228 (class linux_process_target) <add_linux_process>
1229 <add_lwp>
1230 <delete_lwp>
1231 <attach_lwp>
1232 <detach_one_lwp>
1233 <check_zombie_leaders>
1234 <filter_exit_event>
1235 <low_new_process>
1236 <low_delete_process>
1237 <low_new_thread>
1238 <low_delete_thread>
1239 <low_new_fork>: Declare.
1240 * linux-low.cc (delete_lwp): Turn into...
1241 (linux_process_target::delete_lwp): ...this.
1242 (linux_process_target::low_delete_thread): Define.
1243 (linux_add_process): Turn into...
1244 (linux_process_target::add_linux_process): ...this.
1245 (linux_process_target::low_new_process): Define.
1246 (linux_process_target::low_delete_process): Define.
1247 (linux_process_target::low_new_fork): Define.
1248 (add_lwp): Turn into...
1249 (linux_process_target::add_lwp): ...this.
1250 (linux_process_target::low_new_thread): Define.
1251 (linux_attach_lwp): Turn into...
1252 (linux_process_target::attach_lwp): ...this.
1253 (linux_detach_one_lwp): Turn into...
1254 (linux_process_target::detach_one_lwp): ...this.
1255 (linux_detach_lwp_callback): Remove and inline...
1256 (linux_process_target::detach): ...here.
1257 (check_zombie_leaders): Turn into...
1258 (linux_process_target::check_zombie_leaders): ...this.
1259 (filter_exit_event): Turn into...
1260 (linux_process_target::filter_exit_event): ...this.
1261
1262 Update the callers below.
1263
1264 (linux_process_target::handle_extended_wait)
1265 (linux_process_target::create_inferior)
1266 (attach_proc_task_lwp_callback)
1267 (linux_process_target::attach)
1268 (linux_process_target::detach)
1269 (linux_process_target::mourn)
1270 * thread-db.cc (attach_thread)
1271
1272 * linux-x86-low.cc (class x86_target) <low_new_process>
1273 <low_delete_process>
1274 <low_new_thread>
1275 <low_delete_thread>
1276 <low_new_fork>: Declare.
1277 (x86_linux_new_process): Turn into...
1278 (x86_target::low_new_process): ...this.
1279 (x86_linux_delete_process): Turn into...
1280 (x86_target::low_delete_process): ...this.
1281 (x86_target::low_new_thread): Define.
1282 (x86_target::low_delete_thread): Define.
1283 (x86_linux_new_fork): Turn into...
1284 (x86_target::low_new_fork): ...this.
1285 (the_low_target): Remove the op fields.
1286 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
1287 <low_delete_process>
1288 <low_new_thread>
1289 <low_delete_thread>
1290 <low_new_fork>: Declare.
1291 (aarch64_linux_new_process): Turn into...
1292 (aarch64_target::low_new_process): ...this.
1293 (aarch64_linux_delete_process): Turn into...
1294 (aarch64_target::low_delete_process): ...this.
1295 (aarch64_target::low_new_thread): Define.
1296 (aarch64_target::low_delete_thread): Define.
1297 (aarch64_linux_new_fork): Turn into...
1298 (aarch64_target::low_new_fork): ...this.
1299 (the_low_target): Remove the op fields.
1300 * linux-arm-low.cc (class arm_target) <low_new_process>
1301 <low_delete_process>
1302 <low_new_thread>
1303 <low_delete_thread>
1304 <low_new_fork>: Declare.
1305 (arm_new_process): Turn into...
1306 (arm_target::low_new_process): ...this.
1307 (arm_delete_process): Turn into...
1308 (arm_target::low_delete_process): ...this.
1309 (arm_new_thread): Turn into...
1310 (arm_target::low_new_thread): ...this.
1311 (arm_delete_thread): Turn into...
1312 (arm_target::low_delete_thread): ...this.
1313 (arm_new_fork): Turn into...
1314 (arm_target::low_new_fork): ...this.
1315 (the_low_target): Remove the op fields.
1316 * linux-mips-low.cc (class mips_target) <low_new_process>
1317 <low_delete_process>
1318 <low_new_thread>
1319 <low_delete_thread>
1320 <low_new_fork>: Declare.
1321 (mips_linux_new_process): Turn into...
1322 (mips_target::low_new_process): ...this.
1323 (mips_linux_delete_process): Turn into...
1324 (mips_target::low_delete_process): ...this.
1325 (mips_linux_new_thread): Turn into...
1326 (mips_target::low_new_thread): ...this.
1327 (mips_linux_delete_thread): Turn into...
1328 (mips_target::low_delete_thread): ...this.
1329 (mips_linux_new_fork): Turn into...
1330 (mips_target::low_new_fork): ...this.
1331 (the_low_target): Remove the op fields.
1332 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1333 * linux-crisv32-low.cc (the_low_target): Ditto.
1334 * linux-m32r-low.cc (the_low_target): Ditto.
1335 * linux-m68k-low.cc (the_low_target): Ditto.
1336 * linux-ppc-low.cc (the_low_target): Ditto.
1337 * linux-s390-low.cc (the_low_target): Ditto.
1338 * linux-sh-low.cc (the_low_target): Ditto.
1339 * linux-tic6x-low.cc (the_low_target): Ditto.
1340 * linux-tile-low.cc (the_low_target): Ditto.
1341 * linux-xtensa-low.cc (the_low_target): Ditto.
1342
1343 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1344
1345 Turn the 'siginfo_fixup' linux target op into a method of
1346 linux_process_target.
1347
1348 * linux-low.h (struct linux_target_ops): Remove the op.
1349 (class linux_process_target) <siginfo_fixup>
1350 <low_siginfo_fixup>: Declare.
1351 * linux-low.cc (siginfo_fixup): Turn into...
1352 (linux_process_target::siginfo_fixup): ...this.
1353 (linux_process_target::low_siginfo_fixup): Define.
1354 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1355 (x86_siginfo_fixup): Turn into...
1356 (x86_target::low_siginfo_fixup): ...this.
1357 (the_low_target): Remove the op field.
1358 * linux-aarch64-low.cc (class aarch64_target):
1359 <low_siginfo_fixup>: Declare.
1360 (aarch64_linux_siginfo_fixup): Turn into...
1361 (aarch64_target::low_siginfo_fixup): ...this.
1362 (the_low_target): Remove the op field.
1363 * linux-arm-low.cc (the_low_target): Remove the op field.
1364 * linux-bfin-low.cc (the_low_target): Ditto.
1365 * linux-crisv32-low.cc (the_low_target): Ditto.
1366 * linux-m32r-low.cc (the_low_target): Ditto.
1367 * linux-m68k-low.cc (the_low_target): Ditto.
1368 * linux-mips-low.cc (the_low_target): Ditto.
1369 * linux-ppc-low.cc (the_low_target): Ditto.
1370 * linux-s390-low.cc (the_low_target): Ditto.
1371 * linux-sh-low.cc (the_low_target): Ditto.
1372 * linux-tic6x-low.cc (the_low_target): Ditto.
1373 * linux-tile-low.cc (the_low_target): Ditto.
1374 * linux-xtensa-low.cc (the_low_target): Ditto.
1375
1376 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1377
1378 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1379 linux target ops into methods of linux_process_target.
1380
1381 * linux-low.h (struct linux_target_ops): Remove the ops.
1382 (class linux_process_target) <low_collect_ptrace_register>
1383 <low_store_ptrace_register>: Declare.
1384 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1385 (linux_process_target::low_supply_ptrace_register): Define.
1386
1387 Update the callers below.
1388
1389 (linux_process_target::fetch_register)
1390 (linux_process_target::store_register)
1391
1392 * linux-x86-low.cc (the_low_target): Remove the op fields.
1393 * linux-aarch64-low.cc (the_low_target): Ditto.
1394 * linux-arm-low.cc (the_low_target): Ditto.
1395 * linux-bfin-low.cc (the_low_target): Ditto.
1396 * linux-crisv32-low.cc (the_low_target): Ditto.
1397 * linux-m32r-low.cc (the_low_target): Ditto.
1398 * linux-m68k-low.cc (the_low_target): Ditto.
1399 * linux-sh-low.cc (the_low_target): Ditto.
1400 * linux-sparc-low.cc (the_low_target): Ditto.
1401 * linux-tic6x-low.cc (the_low_target): Ditto.
1402 * linux-tile-low.cc (the_low_target): Ditto.
1403 * linux-xtensa-low.cc (the_low_target): Ditto.
1404 * linux-mips-low.cc (class mips_target)
1405 <low_collect_ptrace_register>
1406 <low_supply_ptrace_register>: Declare.
1407 (mips_collect_ptrace_register): Turn into ...
1408 (mips_target::low_collect_ptrace_register): ...this.
1409 (mips_supply_ptrace_register): Turn into...
1410 (mips_target::low_supply_ptrace_register): ...this.
1411 (the_low_target): Remove the op fields.
1412 * linux-ppc-low.cc (class ppc_target)
1413 <low_collect_ptrace_register>
1414 <low_supply_ptrace_register>: Declare.
1415 (ppc_collect_ptrace_register): Turn into ...
1416 (ppc_target::low_collect_ptrace_register): ...this.
1417 (ppc_supply_ptrace_register): Turn into ...
1418 (ppc_target::low_supply_ptrace_register): ...this.
1419 (ppc_fill_gregset): Update for the calls to
1420 low_collect_ptrace_register.
1421 (the_low_target): Remove the op fields.
1422 * linux-s390-low.cc (class s390_target)
1423 <low_collect_ptrace_register>
1424 <low_supply_ptrace_register>: Declare.
1425 (s390_collect_ptrace_register): Turn into ...
1426 (s390_target::low_collect_ptrace_register): ...this.
1427 (s390_supply_ptrace_register): Turn into ...
1428 (s390_target::low_supply_ptrace_register): ...this.
1429 (s390_fill_gregset): Update for the calls to
1430 low_collect_ptrace_register.
1431 (the_low_target): Remove the op fields.
1432
1433 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1434
1435 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1436 target ops into methods of linux_process_target.
1437
1438 * linux-low.h (struct linux_target_ops): Remove the ops.
1439 (class linux_process_target) <check_stopped_by_watchpoint>
1440 <low_stopped_by_watchpoint>
1441 <low_stopped_data_address>: Declare.
1442 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1443 (linux_process_target::check_stopped_by_watchpoint): ...this.
1444 (linux_process_target::low_stopped_by_watchpoint): Define.
1445 (linux_process_target::low_stopped_data_address): Define.
1446 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1447 <low_stopped_data_address>: Declare.
1448 (x86_stopped_by_watchpoint): Turn into...
1449 (x86_target::low_stopped_by_watchpoint): ...this.
1450 (x86_stopped_data_address): Turn into...
1451 (x86_target::low_stopped_data_address): ...this.
1452 (the_low_target): Remove the op fields.
1453 * linux-aarch64-low.cc (class aarch64_target)
1454 <low_stopped_by_watchpoint>
1455 <low_stopped_data_address>: Declare.
1456 (aarch64_stopped_by_watchpoint): Turn into...
1457 (aarch64_target::low_stopped_by_watchpoint): ...this.
1458 (aarch64_stopped_data_address): Turn into...
1459 (aarch64_target::low_stopped_data_address): ...this.
1460 (the_low_target): Remove the op fields.
1461 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1462 <low_stopped_data_address>: Declare.
1463 (arm_stopped_by_watchpoint): Turn into...
1464 (arm_target::low_stopped_by_watchpoint): ...this.
1465 (arm_stopped_data_address): Turn into...
1466 (arm_target::low_stopped_data_address): ...this.
1467 (the_low_target): Remove the op fields.
1468 * linux-crisv32-low.cc (class crisv32_target)
1469 <low_stopped_by_watchpoint>
1470 <low_stopped_data_address>: Declare.
1471 (cris_stopped_by_watchpoint): Turn into...
1472 (crisv32_target::low_stopped_by_watchpoint): ...this.
1473 (cris_stopped_data_address): Turn into...
1474 (crisv32_target::low_stopped_data_address): ...this.
1475 (the_low_target): Remove the op fields.
1476 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1477 <low_stopped_data_address>: Declare.
1478 (mips_stopped_by_watchpoint): Turn into...
1479 (mips_target::low_stopped_by_watchpoint): ...this.
1480 (mips_stopped_data_address): Turn into...
1481 (mips_target::low_stopped_data_address): ...this.
1482 (the_low_target): Remove the op fields.
1483 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1484 * linux-m32r-low.cc (the_low_target): Ditto.
1485 * linux-m68k-low.cc (the_low_target): Ditto.
1486 * linux-ppc-low.cc (the_low_target): Ditto.
1487 * linux-s390-low.cc (the_low_target): Ditto.
1488 * linux-sh-low.cc (the_low_target): Ditto.
1489 * linux-sparc-low.cc (the_low_target): Ditto.
1490 * linux-tic6x-low.cc (the_low_target): Ditto.
1491 * linux-tile-low.cc (the_low_target): Ditto.
1492 * linux-xtensa-low.cc (the_low_target): Ditto.
1493
1494 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1495
1496 Turn the 'insert_point' and 'remove_point' linux target ops into
1497 methods of linux_process_target.
1498
1499 * linux-low.h (struct linux_target_ops): Remove the ops.
1500 (class linux_process_target) <low_insert_point>
1501 <low_remove_point>: Declare.
1502 * linux-low.cc (linux_process_target::low_insert_point)
1503 (linux_process_target::low_remove_point): Define.
1504 (linux_process_target::insert_point)
1505 (linux_process_target::remove_point): Update for calls to
1506 low_insert_point and low_remove_point.
1507 * linux-x86-low.cc (class x86_target) <low_insert_point>
1508 <low_remove_point>: Declare.
1509 (x86_insert_point): Turn into...
1510 (x86_target::low_insert_point): ...this.
1511 (x86_remove_point): Turn into...
1512 (x86_target::low_remove_point): ...this.
1513 (the_low_target): Remove the op fields.
1514 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1515 <low_remove_point>: Declare.
1516 (aarch64_insert_point): Turn into...
1517 (aarch64_target::low_insert_point): ...this.
1518 (aarch64_remove_point): Turn into...
1519 (aarch64_target::low_remove_point): ...this.
1520 (the_low_target): Remove the op fields.
1521 * linux-arm-low.cc (class arm_target) <low_insert_point>
1522 <low_remove_point>: Declare.
1523 (arm_insert_point): Turn into...
1524 (arm_target::low_insert_point): ...this.
1525 (arm_remove_point): Turn into...
1526 (arm_target::low_remove_point): ...this.
1527 (the_low_target): Remove the op fields.
1528 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1529 <low_remove_point>: Declare.
1530 (crisv32_insert_point): Turn into...
1531 (crisv32_target::low_insert_point): ...this.
1532 (crisv32_remove_point): Turn into...
1533 (crisv32_target::low_remove_point): ...this.
1534 (the_low_target): Remove the op fields.
1535 * linux-mips-low.cc (class mips_target) <low_insert_point>
1536 <low_remove_point>: Declare.
1537 (mips_insert_point): Turn into...
1538 (mips_target::low_insert_point): ...this.
1539 (mips_remove_point): Turn into...
1540 (mips_target::low_remove_point): ...this.
1541 (the_low_target): Remove the op fields.
1542 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1543 <low_remove_point>: Declare.
1544 (ppc_insert_point): Turn into...
1545 (ppc_target::low_insert_point): ...this.
1546 (ppc_remove_point): Turn into...
1547 (ppc_target::low_remove_point): ...this.
1548 (the_low_target): Remove the op fields.
1549 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1550 * linux-m32r-low.cc (the_low_target): Ditto.
1551 * linux-m68k-low.cc (the_low_target): Ditto.
1552 * linux-s390-low.cc (the_low_target): Ditto.
1553 * linux-sh-low.cc (the_low_target): Ditto.
1554 * linux-sparc-low.cc (the_low_target): Ditto.
1555 * linux-tic6x-low.cc (the_low_target): Ditto.
1556 * linux-tile-low.cc (the_low_target): Ditto.
1557 * linux-xtensa-low.cc (the_low_target): Ditto.
1558
1559 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1560
1561 Remove the 'supports_z_point_type' linux target op and let the
1562 concrete linux target define it by overriding the op declared in
1563 process_stratum_target.
1564
1565 * linux-low.cc (linux_process_target::supports_z_point_type):
1566 Remove.
1567 * linux-low.h (struct linux_target_ops): Remove the op.
1568 (class linux_process_target) <supports_z_point_type>: Remove.
1569 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1570 Declare.
1571 (x86_supports_z_point_type): Turn into...
1572 (x86_target::supports_z_point_type): ...this.
1573 (the_low_target): Remove the op field.
1574 * linux-aarch64-low.cc (class aarch64_target)
1575 <supports_z_point_type>: Declare.
1576 (aarch64_supports_z_point_type): Turn into...
1577 (aarch64_target::supports_z_point_type): ...this.
1578 (the_low_target): Remove the op field.
1579 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1580 Declare.
1581 (arm_supports_z_point_type): Turn into...
1582 (arm_target::supports_z_point_type): ...this.
1583 (the_low_target): Remove the op field.
1584 * linux-crisv32-low.cc (class crisv32_target)
1585 <supports_z_point_type>: Declare.
1586 (cris_supports_z_point_type): Turn into...
1587 (crisv32_target::supports_z_point_type): ...this.
1588 (the_low_target): Remove the op field.
1589 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1590 Declare.
1591 (mips_supports_z_point_type): Turn into...
1592 (mips_target::supports_z_point_type): ...this.
1593 (the_low_target): Remove the op field.
1594 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1595 Declare.
1596 (ppc_supports_z_point_type): Turn into...
1597 (ppc_target::supports_z_point_type): ...this.
1598 (the_low_target): Remove the op field.
1599 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1600 Declare.
1601 (s390_supports_z_point_type): Turn into...
1602 (s390_target::supports_z_point_type): ...this.
1603 (the_low_target): Remove the op field.
1604 * linux-bfin-low.cc (the_low_target): Remove the op field.
1605 * linux-m32r-low.cc (the_low_target): Ditto.
1606 * linux-m68k-low.cc (the_low_target): Ditto.
1607 * linux-sh-low.cc (the_low_target): Ditto.
1608 * linux-sparc-low.cc (the_low_target): Ditto.
1609 * linux-tic6x-low.cc (the_low_target): Ditto.
1610 * linux-tile-low.cc (the_low_target): Ditto.
1611 * linux-xtensa-low.cc (the_low_target): Ditto.
1612
1613 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1614
1615 Turn the 'breakpoint_at' linux target op into a method of
1616 linux_process_target.
1617
1618 * linux-low.h (struct linux_target_ops): Remove the op.
1619 (class linux_process_target) <low_breakpoint_at>: Declare.
1620
1621 Update the callers below:
1622
1623 * linux-low.cc (linux_process_target::save_stop_reason)
1624 (linux_process_target::thread_still_has_status_pending)
1625 (linux_process_target::wait_1)
1626
1627 * linux-x86-low.cc (class x86_target)
1628 <low_breakpoint_at>: Declare.
1629 (x86_breakpoint_at): Turn into...
1630 (x86_target::low_breakpoint_at): ...this.
1631 (the_low_target): Remove the op field.
1632 * linux-aarch64-low.cc (class aarch64_target)
1633 <low_breakpoint_at>: Declare.
1634 (aarch64_breakpoint_at): Turn into...
1635 (aarch64_target::low_breakpoint_at): ...this.
1636 (the_low_target): Remove the op field.
1637 * linux-arm-low.cc (class arm_target)
1638 <low_breakpoint_at>: Declare.
1639 (arm_target::low_breakpoint_at): Define.
1640 (the_low_target): Remove the op field.
1641 * linux-bfin-low.cc (class bfin_target)
1642 <low_breakpoint_at>: Declare.
1643 (bfin_breakpoint_at): Turn into...
1644 (bfin_target::low_breakpoint_at): ...this.
1645 (the_low_target): Remove the op field.
1646 * linux-cris-low.cc (class cris_target)
1647 <low_breakpoint_at>: Declare.
1648 (cris_breakpoint_at): Turn into...
1649 (cris_target::low_breakpoint_at): ...this.
1650 (the_low_target): Remove the op field.
1651 * linux-crisv32-low.cc (class crisv32_target)
1652 <low_breakpoint_at>: Declare.
1653 (crisv32_breakpoint_at): Turn into...
1654 (crisv32_target::low_breakpoint_at): ...this.
1655 (the_low_target): Remove the op field.
1656 * linux-ia64-low.cc (class ia64_target)
1657 <low_breakpoint_at>: Declare.
1658 (ia64_target::low_breakpoint_at): Define.
1659 * linux-m32r-low.cc (class m32r_target)
1660 <low_breakpoint_at>: Declare.
1661 (m32r_breakpoint_at): Turn into...
1662 (m32r_target::low_breakpoint_at): ...this.
1663 (the_low_target): Remove the op field.
1664 * linux-m68k-low.cc (class m68k_target)
1665 <low_breakpoint_at>: Declare.
1666 (m68k_breakpoint_at): Turn into...
1667 (m68k_target::low_breakpoint_at): ...this.
1668 (the_low_target): Remove the op field.
1669 * linux-mips-low.cc (class mips_target)
1670 <low_breakpoint_at>: Declare.
1671 (mips_breakpoint_at): Turn into...
1672 (mips_target::low_breakpoint_at): ...this.
1673 (the_low_target): Remove the op field.
1674 * linux-nios2-low.cc (class nios2_target)
1675 <low_breakpoint_at>: Declare.
1676 (nios2_breakpoint_at): Turn into...
1677 (nios2_target::low_breakpoint_at): ...this.
1678 (the_low_target): Remove the op field.
1679 * linux-ppc-low.cc (class ppc_target)
1680 <low_breakpoint_at>: Declare.
1681 (ppc_breakpoint_at): Turn into...
1682 (ppc_target::low_breakpoint_at): ...this.
1683 (the_low_target): Remove the op field.
1684 * linux-riscv-low.cc (class riscv_target)
1685 <low_breakpoint_at>: Declare.
1686 (riscv_breakpoint_at): Turn into...
1687 (riscv_target::low_breakpoint_at): ...this.
1688 (the_low_target): Remove the op field.
1689 * linux-s390-low.cc (class s390_target)
1690 <low_breakpoint_at>: Declare.
1691 (s390_breakpoint_at): Turn into...
1692 (s390_target::low_breakpoint_at): ...this.
1693 (the_low_target): Remove the op field.
1694 * linux-sh-low.cc (class sh_target)
1695 <low_breakpoint_at>: Declare.
1696 (sh_breakpoint_at): Turn into...
1697 (sh_target::low_breakpoint_at): ...this.
1698 (the_low_target): Remove the op field.
1699 * linux-sparc-low.cc (class sparc_target)
1700 <low_breakpoint_at>: Declare.
1701 (sparc_breakpoint_at): Turn into...
1702 (sparc_target::low_breakpoint_at): ...this.
1703 (the_low_target): Remove the op field.
1704 * linux-tic6x-low.cc (class tic6x_target)
1705 <low_breakpoint_at>: Declare.
1706 (tic6x_breakpoint_at): Turn into...
1707 (tic6x_target::low_breakpoint_at): ...this.
1708 (the_low_target): Remove the op field.
1709 * linux-tile-low.cc (class tile_target)
1710 <low_breakpoint_at>: Declare.
1711 (tile_breakpoint_at): Turn into...
1712 (tile_target::low_breakpoint_at): ...this.
1713 (the_low_target): Remove the op field.
1714 * linux-xtensa-low.cc (class xtensa_target)
1715 <low_breakpoint_at>: Declare.
1716 (xtensa_breakpoint_at): Turn into...
1717 (xtensa_target::low_breakpoint_at): ...this.
1718 (the_low_target): Remove the op field.
1719
1720 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1721
1722 Turn the 'decr_pc_after_break' linux_target_ops field into
1723 a method of linux_process_target.
1724
1725 * linux-low.h (struct linux_target_ops)
1726 <decr_pc_after_break>: Remove.
1727 (class linux_process_target) <low_decr_pc_after_break>: New method
1728 declaration.
1729 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1730 New method implementation.
1731
1732 Update the users below.
1733
1734 (linux_process_target::save_stop_reason)
1735 (linux_process_target::wait_1)
1736 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1737 New declaration.
1738 (x86_target::low_decr_pc_after_break): New method implementation.
1739 (the_low_target): Remove the field.
1740 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1741 New declaration.
1742 (bfin_target::low_decr_pc_after_break): New method implementation.
1743 (the_low_target): Remove the field.
1744 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1745 New declaration.
1746 (m68k_target::low_decr_pc_after_break): New method implementation.
1747 (the_low_target): Remove the field.
1748 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1749 New declaration.
1750 (s390_target::low_decr_pc_after_break): New method implementation.
1751 (the_low_target): Remove the field.
1752 * linux-aarch64-low.cc (the_low_target): Remove the field.
1753 * linux-arm-low.cc (the_low_target): Remove the field.
1754 * linux-cris-low.cc (the_low_target): Remove the field.
1755 * linux-crisv32-low.cc (the_low_target): Remove the field.
1756 * linux-m32r-low.cc (the_low_target): Remove the field.
1757 * linux-mips-low.cc (the_low_target): Remove the field.
1758 * linux-nios2-low.cc (the_low_target): Remove the field.
1759 * linux-ppc-low.cc (the_low_target): Remove the field.
1760 * linux-riscv-low.cc (the_low_target): Remove the field.
1761 * linux-sh-low.cc (the_low_target): Remove the field.
1762 * linux-sparc-low.cc (the_low_target): Remove the field.
1763 * linux-tic6x-low.cc (the_low_target): Remove the field.
1764 * linux-tile-low.cc (the_low_target): Remove the field.
1765 * linux-xtensa-low.cc (the_low_target): Remove the field.
1766
1767 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1768
1769 Remove the 'supports_software_single_step' linux target op and let
1770 the concrete linux target define it by overriding the op in
1771 process_stratum_target.
1772 Turn the 'get_next_pcs' linux target op into a method of
1773 linux_process_target.
1774
1775 * linux-low.h (struct linux_target_ops): Remove the ops.
1776 (class linux_process_target) <supports_software_single_step>:
1777 Remove.
1778 <low_get_next_pcs>: Declare.
1779 * linux-low.cc (can_software_single_step): Remove.
1780 (linux_process_target::low_get_next_pcs): Define.
1781 (linux_process_target::supports_software_single_step): Remove.
1782
1783 Update the callers below.
1784
1785 (linux_process_target::handle_extended_wait)
1786 (linux_process_target::wait_1)
1787 (linux_process_target::install_software_single_step_breakpoints)
1788 (linux_process_target::single_step)
1789 (linux_process_target::thread_needs_step_over)
1790 (linux_process_target::proceed_one_lwp)
1791 (linux_process_target::supports_range_stepping)
1792
1793 * linux-x86-low.cc (the_low_target): Remove the op field.
1794 * linux-aarch64-low.cc (the_low_target): Ditto.
1795 * linux-bfin-low.cc (the_low_target): Ditto.
1796 * linux-cris-low.cc (the_low_target): Ditto.
1797 * linux-crisv32-low.cc (the_low_target): Ditto.
1798 * linux-m32r-low.cc (the_low_target): Ditto.
1799 * linux-m68k-low.cc (the_low_target): Ditto.
1800 * linux-mips-low.cc (the_low_target): Ditto.
1801 * linux-nios2-low.cc (the_low_target): Ditto.
1802 * linux-ppc-low.cc (the_low_target): Ditto.
1803 * linux-riscv-low.cc (the_low_target): Ditto.
1804 * linux-s390-low.cc (the_low_target): Ditto.
1805 * linux-sh-low.cc (the_low_target): Ditto.
1806 * linux-sparc-low.cc (the_low_target): Ditto.
1807 * linux-tic6x-low.cc (the_low_target): Ditto.
1808 * linux-tile-low.cc (the_low_target): Ditto.
1809 * linux-xtensa-low.cc (the_low_target): Ditto.
1810 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1811 <supports_software_single_step>: Declare.
1812 (arm_target::supports_software_single_step): Define.
1813 (arm_gdbserver_get_next_pcs): Turn into...
1814 (arm_target::low_get_next_pcs): ...this.
1815 (the_low_target): Remove the op field.
1816
1817 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1818
1819 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1820 the concrete linux target define it by overriding the op
1821 in process_stratum_target.
1822
1823 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1824 Remove.
1825 * linux-low.h (struct linux_target_ops): Remove the op.
1826 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1827 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1828 Declare.
1829 (x86_sw_breakpoint_from_kind): Turn into...
1830 (x86_target::sw_breakpoint_from_kind): ...this.
1831 (the_low_target): Remove the op field.
1832 * linux-aarch64-low.cc (class aarch64_target)
1833 <sw_breakpoint_from_kind>: Declare.
1834 (aarch64_sw_breakpoint_from_kind): Turn into...
1835 (aarch64_target::sw_breakpoint_from_kind): ...this.
1836 (the_low_target): Remove the op field.
1837 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1838 Declare.
1839 (arm_target::sw_breakpoint_from_kind): Define.
1840 (the_low_target): Remove the op field.
1841 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1842 Declare.
1843 (bfin_sw_breakpoint_from_kind): Turn into...
1844 (bfin_target::sw_breakpoint_from_kind): ...this.
1845 (the_low_target): Remove the op field.
1846 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1847 Declare.
1848 (cris_sw_breakpoint_from_kind): Turn into...
1849 (cris_target::sw_breakpoint_from_kind): ...this.
1850 (the_low_target): Remove the op field.
1851 * linux-crisv32-low.cc (class crisv32_target)
1852 <sw_breakpoint_from_kind>: Declare.
1853 (cris_sw_breakpoint_from_kind): Turn into...
1854 (crisv32_target::sw_breakpoint_from_kind): ...this.
1855 (the_low_target): Remove the op field.
1856 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1857 Declare.
1858 (ia64_target::sw_breakpoint_from_kind): Define.
1859 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1860 Declare.
1861 (m32r_sw_breakpoint_from_kind): Turn into...
1862 (m32r_target::sw_breakpoint_from_kind): ...this.
1863 (the_low_target): Remove the op field.
1864 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1865 Declare.
1866 (m68k_sw_breakpoint_from_kind): Turn into...
1867 (m68k_target::sw_breakpoint_from_kind): ...this.
1868 (the_low_target): Remove the op field.
1869 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1870 Declare.
1871 (mips_sw_breakpoint_from_kind): Turn into...
1872 (mips_target::sw_breakpoint_from_kind): ...this.
1873 (the_low_target): Remove the op field.
1874 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1875 Declare.
1876 (nios2_sw_breakpoint_from_kind): Turn into...
1877 (nios2_target::sw_breakpoint_from_kind): ...this.
1878 (the_low_target): Remove the op field.
1879 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1880 Declare.
1881 (ppc_sw_breakpoint_from_kind): Turn into...
1882 (ppc_target::sw_breakpoint_from_kind): ...this.
1883 (the_low_target): Remove the op field.
1884 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1885 Declare.
1886 (riscv_sw_breakpoint_from_kind): Turn into...
1887 (riscv_target::sw_breakpoint_from_kind): ...this.
1888 (the_low_target): Remove the op field.
1889 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1890 Declare.
1891 (s390_sw_breakpoint_from_kind): Turn into...
1892 (s390_target::sw_breakpoint_from_kind): ...this.
1893 (the_low_target): Remove the op field.
1894 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1895 Declare.
1896 (sh_sw_breakpoint_from_kind): Turn into...
1897 (sh_target::sw_breakpoint_from_kind): ...this.
1898 (the_low_target): Remove the op field.
1899 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1900 Declare.
1901 (sparc_sw_breakpoint_from_kind): Turn into...
1902 (sparc_target::sw_breakpoint_from_kind): ...this.
1903 (the_low_target): Remove the op field.
1904 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1905 Declare.
1906 (tic6x_sw_breakpoint_from_kind): Turn into...
1907 (tic6x_target::sw_breakpoint_from_kind): ...this.
1908 (the_low_target): Remove the op field.
1909 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1910 Declare.
1911 (tile_sw_breakpoint_from_kind): Turn into...
1912 (tile_target::sw_breakpoint_from_kind): ...this.
1913 (the_low_target): Remove the op field.
1914 * linux-xtensa-low.cc (class xtensa_target)
1915 <sw_breakpoint_from_kind>: Declare.
1916 (xtensa_sw_breakpoint_from_kind): Turn into...
1917 (xtensa_target::sw_breakpoint_from_kind): ...this.
1918 (the_low_target): Remove the op field.
1919
1920 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1921
1922 Remove the 'breakpoint_kind_from_pc' and
1923 'breakpoint_kind_from_current_state' linux target ops, and let the
1924 concrete linux target define them by overriding the ops of
1925 process_stratum_target.
1926
1927 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1928 Remove.
1929 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1930 * linux-low.h (struct linux_target_ops): Remove ops.
1931 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1932 <breakpoint_kind_from_current_state>: Remove.
1933 * linux-x86-low.cc (the_low_target): Remove the op fields.
1934 * linux-bfin-low.cc (the_low_target): Ditto.
1935 * linux-cris-low.cc (the_low_target): Ditto.
1936 * linux-crisv32-low.cc (the_low_target): Ditto.
1937 * linux-m32r-low.cc (the_low_target): Ditto.
1938 * linux-m68k-low.cc (the_low_target): Ditto.
1939 * linux-mips-low.cc (the_low_target): Ditto.
1940 * linux-nios2-low.cc (the_low_target): Ditto.
1941 * linux-ppc-low.cc (the_low_target): Ditto.
1942 * linux-s390-low.cc (the_low_target): Ditto.
1943 * linux-sh-low.cc (the_low_target): Ditto.
1944 * linux-sparc-low.cc (the_low_target): Ditto.
1945 * linux-tic6x-low.cc (the_low_target): Ditto.
1946 * linux-tile-low.cc (the_low_target): Ditto.
1947 * linux-xtensa-low.cc (the_low_target): Ditto.
1948 * linux-aarch64-low.cc (class aarch64_target)
1949 <breakpoint_kind_from_pc>
1950 <breakpoint_kind_from_current_state>: Declare.
1951 (aarch64_breakpoint_kind_from_pc): Turn into...
1952 (aarch64_target::breakpoint_kind_from_pc): ...this.
1953 (aarch64_breakpoint_kind_from_current_state): Turn into...
1954 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1955 (the_low_target): Remove the op fields.
1956 * linux-arm-low.cc (class arm_target):
1957 <breakpoint_kind_from_pc>
1958 <breakpoint_kind_from_current_state>: Declare.
1959 (arm_target::breakpoint_kind_from_pc): Define.
1960 (arm_target::breakpoint_kind_from_current_state): Define.
1961 (the_low_target): Remove the op fields.
1962 * linux-riscv-low.cc (class riscv_target):
1963 <breakpoint_kind_from_pc>: Declare.
1964 (riscv_breakpoint_kind_from_pc): Turn into...
1965 (riscv_target::breakpoint_kind_from_pc): ...this.
1966 (the_low_target): Remove the op fields.
1967
1968 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1969
1970 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1971 of linux_process_target.
1972
1973 * linux-low.h (struct linux_target_ops): Remove the ops.
1974 (class linux_process_target) <low_supports_breakpoints>
1975 <low_get_pc>
1976 <low_set_pc>: Declare.
1977 * linux-low.cc (supports_breakpoints): Turn into...
1978 (linux_process_target::low_supports_breakpoints): ...this.
1979 (linux_process_target::low_get_pc): Define.
1980 (linux_process_target::low_set_pc): Define.
1981
1982 Update the callers below.
1983
1984 (linux_process_target::get_pc)
1985 (linux_process_target::save_stop_reason)
1986 (linux_process_target::maybe_move_out_of_jump_pad)
1987 (linux_process_target::wait_1)
1988 (linux_process_target::resume_one_lwp_throw)
1989 (linux_process_target::resume)
1990 (linux_process_target::proceed_all_lwps)
1991 (linux_process_target::read_pc)
1992 (linux_process_target::write_pc)
1993
1994 * linux-x86-low.cc (class linux_process_target)
1995 <low_supports_breakpoints>
1996 <low_get_pc>
1997 <low_set_pc>: Declare.
1998 (x86_target::low_supports_breakpoints): Define.
1999 (x86_get_pc): Turn into...
2000 (x86_target::low_get_pc): ...this.
2001 (x86_set_pc): Turn into...
2002 (x86_target::low_set_pc): ...this.
2003 (the_low_target): Remove the op fields.
2004 * linux-arm-low.cc (class arm_target)
2005 <low_supports_breakpoints>
2006 <low_get_pc>
2007 <low_set_pc>: Declare.
2008 (arm_target::low_supports_breakpoints)
2009 (arm_target::low_get_pc)
2010 (arm_target::low_set_pc): Define.
2011 (the_low_target): Remove the op fields.
2012 * linux-bfin-low.cc (class bfin_target)
2013 <low_supports_breakpoints>
2014 <low_get_pc>
2015 <low_set_pc>: Declare.
2016 (bfin_target::low_supports_breakpoints)
2017 (bfin_target::low_get_pc)
2018 (bfin_target::low_set_pc): Define.
2019 (the_low_target): Remove the op fields.
2020 * linux-cris-low.cc (class cris_target)
2021 <low_supports_breakpoints>
2022 <low_get_pc>
2023 <low_set_pc>: Declare.
2024 (cris_target::low_supports_breakpoints)
2025 (cris_target::low_get_pc)
2026 (cris_target::low_set_pc): Define.
2027 (the_low_target): Remove the op fields.
2028 * linux-crisv32-low.cc (class crisv32_target)
2029 <low_supports_breakpoints>
2030 <low_get_pc>
2031 <low_set_pc>: Declare.
2032 (crisv32_target::low_supports_breakpoints)
2033 (crisv32_target::low_get_pc)
2034 (crisv32_target::low_set_pc): Define.
2035 (the_low_target): Remove the op fields.
2036 * linux-m32r-low.cc (class m32r_target)
2037 <low_supports_breakpoints>
2038 <low_get_pc>
2039 <low_set_pc>: Declare.
2040 (m32r_target::low_supports_breakpoints)
2041 (m32r_target::low_get_pc)
2042 (m32r_target::low_set_pc): Define.
2043 (the_low_target): Remove the op fields.
2044 * linux-m68k-low.cc (class m68k_target)
2045 <low_supports_breakpoints>
2046 <low_get_pc>
2047 <low_set_pc>: Declare.
2048 (m68k_target::low_supports_breakpoints)
2049 (m68k_target::low_get_pc)
2050 (m68k_target::low_set_pc): Define.
2051 (the_low_target): Remove the op fields.
2052 * linux-nios2-low.cc (class nios2_target)
2053 <low_supports_breakpoints>
2054 <low_get_pc>
2055 <low_set_pc>: Declare.
2056 (nios2_target::low_supports_breakpoints)
2057 (nios2_target::low_get_pc)
2058 (nios2_target::low_set_pc): Define.
2059 (the_low_target): Remove the op fields.
2060 * linux-sh-low.cc (class sh_target)
2061 <low_supports_breakpoints>
2062 <low_get_pc>
2063 <low_set_pc>: Declare.
2064 (sh_target::low_supports_breakpoints)
2065 (sh_target::low_get_pc)
2066 (sh_target::low_set_pc): Define.
2067 (the_low_target): Remove the op fields.
2068 * linux-xtensa-low.cc (class xtensa_target)
2069 <low_supports_breakpoints>
2070 <low_get_pc>
2071 <low_set_pc>: Declare.
2072 (xtensa_target::low_supports_breakpoints)
2073 (xtensa_target::low_get_pc)
2074 (xtensa_target::low_set_pc): Define.
2075 (the_low_target): Remove the op fields.
2076 * linux-sparc-low.cc (class sparc_target)
2077 <low_supports_breakpoints>
2078 <low_get_pc>: Declare.
2079 (sparc_target::low_supports_breakpoints)
2080 (sparc_target::low_get_pc): Define.
2081 (the_low_target): Remove the op fields.
2082 * linux-tile-low.cc (class tile_target)
2083 <low_supports_breakpoints>
2084 <low_get_pc>
2085 <low_set_pc>: Declare.
2086 (tile_target::low_supports_breakpoints)
2087 (tile_target::low_get_pc)
2088 (tile_target::low_set_pc): Define.
2089 (the_low_target): Remove the op fields.
2090 * linux-aarch64-low.cc (class aarch64_target)
2091 <low_supports_breakpoints>
2092 <low_get_pc>
2093 <low_set_pc>: Declare.
2094 (aarch64_target::low_supports_breakpoints): Define.
2095 (aarch64_get_pc): Turn into...
2096 (aarch64_target::low_get_pc): ...this.
2097 (aarch64_set_pc): Turn into...
2098 (aarch64_target::low_set_pc): ...this.
2099 (the_low_target): Remove the op fields.
2100 * linux-mips-low.cc (class mips_target)
2101 <low_supports_breakpoints>
2102 <low_get_pc>
2103 <low_set_pc>: Declare.
2104 (mips_target::low_supports_breakpoints): Define.
2105 (mips_get_pc): Turn into...
2106 (mips_target::low_get_pc): ...this.
2107 (mips_set_pc): Turn into...
2108 (mips_target::low_set_pc): ...this.
2109 (the_low_target): Remove the op fields.
2110 * linux-ppc-low.cc (class ppc_target)
2111 <low_supports_breakpoints>
2112 <low_get_pc>
2113 <low_set_pc>: Declare.
2114 (ppc_target::low_supports_breakpoints): Define.
2115 (ppc_get_pc): Turn into...
2116 (ppc_target::low_get_pc): ...this.
2117 (ppc_set_pc): Turn into...
2118 (ppc_target::low_set_pc): ...this.
2119 (the_low_target): Remove the op fields.
2120 * linux-riscv-low.cc (class riscv_target)
2121 <low_supports_breakpoints>
2122 <low_get_pc>
2123 <low_set_pc>: Declare.
2124 (riscv_target::low_supports_breakpoints): Define.
2125 (riscv_get_pc): Turn into...
2126 (riscv_target::low_get_pc): ...this.
2127 (riscv_set_pc): Turn into...
2128 (riscv_target::low_set_pc): ...this.
2129 (the_low_target): Remove the op fields.
2130 * linux-s390-low.cc (class s390_target)
2131 <low_supports_breakpoints>
2132 <low_get_pc>
2133 <low_set_pc>: Declare.
2134 (s390_target::low_supports_breakpoints): Define.
2135 (s390_get_pc): Turn into...
2136 (s390_target::low_get_pc): ...this.
2137 (s390_set_pc): Turn into...
2138 (s390_target::low_set_pc): ...this.
2139 (the_low_target): Remove the op fields.
2140 * linux-tic6x-low.cc (class tic6x_target)
2141 <low_supports_breakpoints>
2142 <low_get_pc>
2143 <low_set_pc>: Declare.
2144 (tic6x_target::low_supports_breakpoints): Define.
2145 (tic6x_get_pc): Turn into...
2146 (tic6x_target::low_get_pc): ...this.
2147 (tic6x_set_pc): Turn into...
2148 (tic6x_target::low_set_pc): ...this.
2149 (the_low_target): Remove the op fields.
2150
2151 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2152
2153 Turn some more static methods in linux-low into private methods
2154 of linux_process_target.
2155
2156 * linux-low.cc (get_pc): Turn into...
2157 (linux_process_target::get_pc): ...this.
2158 (save_stop_reason): Turn into...
2159 (linux_process_target::save_stop_reason): ...this.
2160 (thread_still_has_status_pending_p): Turn into...
2161 (linux_process_target::thread_still_has_status_pending): ...this.
2162 (status_pending_p_callback): Turn into...
2163 (linux_process_target::status_pending_p_callback): ...this.
2164 (resume_stopped_resumed_lwps): Turn into...
2165 (linux_process_target::resume_stopped_resumed_lwps): ...this.
2166 (install_software_single_step_breakpoints): Turn into...
2167 (linux_process_target::install_software_single_step_breakpoints):
2168 ...this.
2169 (single_step): Turn into...
2170 (linux_process_target::single_step): ...this.
2171 (linux_resume_one_lwp_throw): Turn into...
2172 (linux_process_target::resume_one_lwp_throw): ...this.
2173 (linux_resume_one_lwp): Turn into...
2174 (linux_process_target::resume_one_lwp): ...this.
2175 (resume_status_pending_p): Turn into...
2176 (linux_process_target::resume_status_pending): ...this.
2177 (need_step_over_p): Turn into...
2178 (linux_process_target::thread_needs_step_over): ...this.
2179 (linux_resume_one_thread): Turn into...
2180 (linux_process_target::resume_one_thread): ...this.
2181 (proceed_one_lwp): Turn into...
2182 (linux_process_target::proceed_one_lwp): ...this.
2183 (unsuspend_and_proceed_one_lwp): Turn into...
2184 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
2185
2186 Update the calls/references to the above functions below.
2187
2188 (linux_process_target::handle_extended_wait)
2189 (linux_process_target::filter_event)
2190 (linux_process_target::wait_for_event_filtered)
2191 (linux_process_target::wait_1)
2192 (linux_process_target::move_out_of_jump_pad)
2193 (linux_process_target::start_step_over)
2194 (linux_process_target::resume)
2195 (linux_process_target::proceed_all_lwps)
2196 (regsets_store_inferior_registers)
2197 (linux_process_target::store_register)
2198
2199 * linux-low.h (class linux_process_target)
2200 <get_pc>
2201 <save_stop_reason>
2202 <thread_still_has_status_pending>
2203 <status_pending_p_callback>
2204 <resume_stopped_resumed_lwps>
2205 <install_software_single_step_breakpoints>
2206 <single_step>
2207 <resume_one_lwp_throw>
2208 <resume_one_lwp>
2209 <resume_status_pending>
2210 <thread_needs_step_over>
2211 <resume_one_thread>
2212 <proceed_one_lwp>
2213 <unsuspend_and_proceed_one_lwp>: Declare.
2214
2215 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2216
2217 Turn the 'fetch_register' linux target op into a method of
2218 linux_process_target.
2219
2220 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
2221 (class linux_process_target) <low_fetch_register>: Declare.
2222 * linux-x86-low.cc (the_low_target)
2223 * linux-aarch64-low.cc (the_low_target)
2224 * linux-arm-low.cc (the_low_target)
2225 * linux-bfin-low.cc (the_low_target)
2226 * linux-cris-low.cc (the_low_target)
2227 * linux-crisv32-low.cc (the_low_target)
2228 * linux-m32r-low.cc (the_low_target)
2229 * linux-m68k-low.cc (the_low_target)
2230 * linux-nios2-low.cc (the_low_target)
2231 * linux-ppc-low.cc (the_low_target)
2232 * linux-s390-low.cc (the_low_target)
2233 * linux-sh-low.cc (the_low_target)
2234 * linux-sparc-low.cc (the_low_target)
2235 * linux-tic6x-low.cc (the_low_target)
2236 * linux-tile-low.cc (the_low_target)
2237 * linux-xtensa-low.cc (the_low_target): Remove the op field.
2238 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
2239 Declare.
2240 (ia64_fetch_register): Turn into...
2241 (ia64_target::low_fetch_register): ...this.
2242 (the_low_target): Remove the op field.
2243 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
2244 Declare.
2245 (mips_fetch_register): Turn into...
2246 (mips_target::low_fetch_register): ...this.
2247 (the_low_target): Remove the op field.
2248 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
2249 Declare.
2250 (riscv_fetch_register): Turn into...
2251 (riscv_target::low_fetch_register): ...this.
2252 (the_low_target): Remove the op field.
2253
2254 Update the callers below.
2255
2256 * linux-low.cc (linux_process_target::fetch_registers)
2257 (linux_process_target::low_fetch_register)
2258
2259 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2260
2261 Turn the 'cannot_fetch_register' and 'cannot_store_register'
2262 linux target ops into methods of linux_process_target.
2263
2264 * linux-low.h (struct linux_target_ops): Remove the low target ops.
2265 (class linux_process_target) <fetch_register>
2266 <store_register>
2267 <usr_fetch_inferior_registers>
2268 <usr_store_inferior_registers>
2269 <low_cannot_fetch_register>
2270 <low_cannot_fetch_register> Declare.
2271 * linux-low.cc (fetch_register): Turn into...
2272 (linux_process_target::fetch_register): ...this.
2273 (store_register): Turn into ...
2274 (linux_process_target::store_register): ...this.
2275 (usr_fetch_inferior_registers): Turn into...
2276 (linux_process_target::usr_fetch_inferior_registers): ...this.
2277 (usr_store_inferior_registers): Turn into...
2278 (linux_process_target::usr_store_inferior_registers): ...this.
2279 * linux-x86-low.cc (class x86_target)
2280 <low_cannot_fetch_register>
2281 <low_cannot_store_register>: Declare.
2282 (x86_cannot_store_register): Turn into...
2283 (x86_target::low_cannot_store_register): ...this.
2284 (x86_cannot_fetch_register): Turn into...
2285 (x86_target::low_cannot_fetch_register): ...this.
2286 (the_low_target): Remove the target op fields.
2287 * linux-aarch64-low.cc (class aarch64_target)
2288 <low_cannot_fetch_register>
2289 <low_cannot_store_register>: Declare.
2290 (aarch64_target::low_cannot_fetch_register)
2291 (aarch64_target::low_cannot_store_register): Define.
2292 (the_low_target): Remove the op fields.
2293 * linux-arm-low.cc (class arm_target)
2294 <low_cannot_fetch_register>
2295 <low_cannot_store_register>: Declare.
2296 (arm_cannot_fetch_register): Turn into...
2297 (arm_target::low_cannot_fetch_register): ...this.
2298 (arm_cannot_store_register): Turn into...
2299 (arm_target::low_cannot_store_register): ...this.
2300 (the_low_target): Remove the op fields.
2301 * linux-bfin-low.cc (class bfin_target)
2302 <low_cannot_fetch_register>
2303 <low_cannot_store_register>: Declare.
2304 (bfin_cannot_fetch_register): Turn into...
2305 (bfin_target::low_cannot_fetch_register): ...this.
2306 (bfin_cannot_store_register): Turn into...
2307 (bfin_target::low_cannot_store_register): ...this.
2308 (the_low_target): Remove the op fields.
2309 * linux-cris-low.cc (class cris_target)
2310 <low_cannot_fetch_register>
2311 <low_cannot_store_register>: Declare.
2312 (cris_cannot_fetch_register): Turn into...
2313 (cris_target::low_cannot_fetch_register): ...this.
2314 (cris_cannot_store_register): Turn into...
2315 (cris_target::low_cannot_store_register): ...this.
2316 (the_low_target): Remove the op fields.
2317 * linux-crisv32-low.cc (class crisv32_target)
2318 <low_cannot_fetch_register>
2319 <low_cannot_store_register>: Declare.
2320 (crisv32_target::low_cannot_fetch_register)
2321 (crisv32_target::low_cannot_store_register): Define.
2322 (the_low_target): Remove the op fields.
2323 * linux-ia64-low.cc (class ia64_target)
2324 <low_cannot_fetch_register>
2325 <low_cannot_store_register>: Declare.
2326 (ia64_cannot_fetch_register): Turn into...
2327 (ia64_target::low_cannot_fetch_register): ...this.
2328 (ia64_cannot_store_register): Turn into...
2329 (ia64_target::low_cannot_store_register): ...this.
2330 (the_low_target): Remove the op fields.
2331 * linux-m32r-low.cc (class m32r_target)
2332 <low_cannot_fetch_register>
2333 <low_cannot_store_register>: Declare.
2334 (m32r_cannot_fetch_register): Turn into...
2335 (m32r_target::low_cannot_fetch_register): ...this.
2336 (m32r_cannot_store_register): Turn into...
2337 (m32r_target::low_cannot_store_register): ...this.
2338 (the_low_target): Remove the op fields.
2339 * linux-m68k-low.cc (class m68k_target)
2340 <low_cannot_fetch_register>
2341 <low_cannot_store_register>: Declare.
2342 (m68k_cannot_fetch_register): Turn into...
2343 (m68k_target::low_cannot_fetch_register): ...this.
2344 (m68k_cannot_store_register): Turn into...
2345 (m68k_target::low_cannot_store_register): ...this.
2346 (the_low_target): Remove the op fields.
2347 * linux-mips-low.cc (class mips_target)
2348 <low_cannot_fetch_register>
2349 <low_cannot_store_register>: Declare.
2350 (mips_cannot_fetch_register): Turn into...
2351 (mips_target::low_cannot_fetch_register): ...this.
2352 (mips_cannot_store_register): Turn into...
2353 (mips_target::low_cannot_store_register): ...this.
2354 (get_usrregs_info): Inline at the call sites in
2355 low_cannot_fetch_register and low_cannot_store_register,
2356 and remove.
2357 (the_low_target): Remove the op fields.
2358 * linux-nios2-low.cc (class nios2_target)
2359 <low_cannot_fetch_register>
2360 <low_cannot_store_register>: Declare.
2361 (nios2_cannot_fetch_register): Turn into...
2362 (nios2_target::low_cannot_fetch_register): ...this.
2363 (nios2_cannot_store_register): Turn into...
2364 (nios2_target::low_cannot_store_register): ...this.
2365 (the_low_target): Remove the op fields.
2366 * linux-ppc-low.cc (class ppc_target)
2367 <low_cannot_fetch_register>
2368 <low_cannot_store_register>: Declare.
2369 (ppc_cannot_fetch_register): Turn into...
2370 (ppc_target::low_cannot_fetch_register): ...this.
2371 (ppc_cannot_store_register): Turn into...
2372 (ppc_target::low_cannot_store_register): ...this.
2373 (the_low_target): Remove the op fields.
2374 * linux-riscv-low.cc (class riscv_target)
2375 <low_cannot_fetch_register>
2376 <low_cannot_store_register>: Declare.
2377 (riscv_target::low_cannot_fetch_register)
2378 (riscv_target::low_cannot_store_register): Define.
2379 (the_low_target): Remove the op fields.
2380 * linux-s390-low.cc (class s390_target)
2381 <low_cannot_fetch_register>
2382 <low_cannot_store_register>: Declare.
2383 (s390_cannot_fetch_register): Turn into...
2384 (s390_target::low_cannot_fetch_register): ...this.
2385 (s390_cannot_store_register): Turn into...
2386 (s390_target::low_cannot_store_register): ...this.
2387 (the_low_target): Remove the op fields.
2388 * linux-sh-low.cc (class sh_target)
2389 <low_cannot_fetch_register>
2390 <low_cannot_store_register>: Declare.
2391 (sh_cannot_fetch_register): Turn into...
2392 (sh_target::low_cannot_fetch_register): ...this.
2393 (sh_cannot_store_register): Turn into...
2394 (sh_target::low_cannot_store_register): ...this.
2395 (the_low_target): Remove the op fields.
2396 * linux-sparc-low.cc (class sparc_target)
2397 <low_cannot_fetch_register>
2398 <low_cannot_store_register>: Declare.
2399 (sparc_cannot_fetch_register): Turn into...
2400 (sparc_target::low_cannot_fetch_register): ...this.
2401 (sparc_cannot_store_register): Turn into...
2402 (sparc_target::low_cannot_store_register): ...this.
2403 (the_low_target): Remove the op fields.
2404 * linux-tic6x-low.cc (class tic6x_target)
2405 <low_cannot_fetch_register>
2406 <low_cannot_store_register>: Declare.
2407 (tic6x_cannot_fetch_register): Turn into...
2408 (tic6x_target::low_cannot_fetch_register): ...this.
2409 (tic6x_cannot_store_register): Turn into...
2410 (tic6x_target::low_cannot_store_register): ...this.
2411 (the_low_target): Remove the op fields.
2412 * linux-tile-low.cc (class tile_target)
2413 <low_cannot_fetch_register>
2414 <low_cannot_store_register>: Declare.
2415 (tile_cannot_fetch_register): Turn into...
2416 (tile_target::low_cannot_fetch_register): ...this.
2417 (tile_cannot_store_register): Turn into...
2418 (tile_target::low_cannot_store_register): ...this.
2419 (the_low_target): Remove the op fields.
2420 * linux-xtensa-low.cc (class xtensa_target)
2421 <low_cannot_fetch_register>
2422 <low_cannot_store_register>: Declare.
2423 (xtensa_target::low_cannot_fetch_register)
2424 (xtensa_target::low_cannot_store_register): Define.
2425 (the_low_target): Remove the op fields.
2426
2427 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2428
2429 Turn the 'regs_info' linux target op into a method of
2430 linux_process_target.
2431
2432 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2433 (class linux_process_target) <get_regs_info>: Define.
2434
2435 Update the callers below.
2436
2437 * linux-low.cc (linux_process_target::fetch_registers)
2438 (linux_process_target::store_registers)
2439 * proc-service.cc (gregset_info)
2440
2441 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2442 (x86_linux_regs_info): Turn into ...
2443 (x86_target::get_regs_info): ...this.
2444 (the_low_target): Remove the op field.
2445 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2446 Declare.
2447 (aarch64_regs_info): Turn into ...
2448 (aarch64_target::get_regs_info): ...this.
2449 (the_low_target): Remove the op field.
2450 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2451 (arm_regs_info): Turn into ...
2452 (arm_target::get_regs_info): ...this.
2453 (the_low_target): Remove the op field.
2454 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2455 (bfin_regs_info): Turn into ...
2456 (bfin_target::get_regs_info): ...this.
2457 (the_low_target): Remove the op field.
2458 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2459 (cris_regs_info): Turn into ...
2460 (cris_target::get_regs_info): ...this.
2461 (the_low_target): Remove the op field.
2462 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2463 Declare.
2464 (crisv32_regs_info): Turn into ...
2465 (crisv32_target::get_regs_info): ...this.
2466 (the_low_target): Remove the op field.
2467 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2468 (ia64_regs_info): Turn into ...
2469 (ia64_target::get_regs_info): ...this.
2470 (the_low_target): Remove the op field.
2471 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2472 (m32r_regs_info): Turn into ...
2473 (m32r_target::get_regs_info): ...this.
2474 (the_low_target): Remove the op field.
2475 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2476 (m68k_regs_info): Turn into ...
2477 (m68k_target::get_regs_info): ...this.
2478 (the_low_target): Remove the op field.
2479 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2480 (mips_regs_info): Turn into ...
2481 (mips_target::get_regs_info): ...this.
2482 (the_low_target): Remove the op field.
2483 (get_usrregs_info): Update the call to the op.
2484 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2485 (nios2_regs_info): Turn into ...
2486 (nios2_target::get_regs_info): ...this.
2487 (the_low_target): Remove the op field.
2488 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2489 (ppc_regs_info): Turn into ...
2490 (ppc_target::get_regs_info): ...this.
2491 (the_low_target): Remove the op field.
2492 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2493 (riscv_regs_info): Turn into ...
2494 (riscv_target::get_regs_info): ...this.
2495 (the_low_target): Remove the op field.
2496 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2497 (s390_regs_info): Turn into ...
2498 (s390_target::get_regs_info): ...this.
2499 (the_low_target): Remove the op field.
2500 (s390_collect_ptrace_register)
2501 (s390_supply_ptrace_register)
2502 (s390_fill_gregset): Update the call to the op.
2503 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2504 (sh_regs_info): Turn into ...
2505 (sh_target::get_regs_info): ...this.
2506 (the_low_target): Remove the op field.
2507 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2508 (sparc_regs_info): Turn into ...
2509 (sparc_target::get_regs_info): ...this.
2510 (the_low_target): Remove the op field.
2511 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2512 (tic6x_regs_info): Turn into ...
2513 (tic6x_target::get_regs_info): ...this.
2514 (the_low_target): Remove the op field.
2515 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2516 (tile_regs_info): Turn into ...
2517 (tile_target::get_regs_info): ...this.
2518 (the_low_target): Remove the op field.
2519 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2520 Declare.
2521 (xtensa_regs_info): Turn into ...
2522 (xtensa_target::get_regs_info): ...this.
2523 (the_low_target): Remove the op field.
2524
2525 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2526
2527 Turn the 'arch_setup' linux target op into a method of
2528 linux_process_target.
2529
2530 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2531 (class linux_process_target) <arch_setup_thread>
2532 <low_arch_setup>: New declarations.
2533 * linux-low.cc (linux_arch_setup): Delete.
2534 (linux_arch_setup_thread): Turn into...
2535 (linux_process_target::arch_setup_thread): ... this.
2536
2537 Update the callers below.
2538
2539 (linux_process_target::handle_extended_wait)
2540 (linux_process_target::post_create_inferior)
2541 (linux_process_target::filter_event)
2542
2543 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2544 declaration.
2545 (x86_linux_update_xmltarget): Turn into...
2546 (x86_target::update_xmltarget): ...this.
2547 (x86_linux_process_qsupported): Update the call to
2548 x86_linux_update_xmltarget.
2549 (x86_arch_setup): Turn into ...
2550 (x86_target::low_arch_setup): ...this.
2551 (the_low_target): Remove the op field.
2552 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2553 declaration.
2554 (aarch64_arch_setup): Turn into ...
2555 (aarch64_target::low_arch_setup): ...this.
2556 (the_low_target): Remove the op field.
2557 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2558 declaration.
2559 (arm_arch_setup): Turn into ...
2560 (arm_target::low_arch_setup): ...this.
2561 (the_low_target): Remove the op field.
2562 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2563 declaration.
2564 (bfin_arch_setup): Turn into ...
2565 (bfin_target::low_arch_setup): ...this.
2566 (the_low_target): Remove the op field.
2567 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2568 declaration.
2569 (cris_arch_setup): Turn into ...
2570 (cris_target::low_arch_setup): ...this.
2571 (the_low_target): Remove the op field.
2572 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2573 declaration.
2574 (crisv32_arch_setup): Turn into ...
2575 (crisv32_target::low_arch_setup): ...this.
2576 (the_low_target): Remove the op field.
2577 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2578 declaration.
2579 (ia64_arch_setup): Turn into ...
2580 (ia64_target::low_arch_setup): ...this.
2581 (the_low_target): Remove the op field.
2582 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2583 declaration.
2584 (m32r_arch_setup): Turn into ...
2585 (m32r_target::low_arch_setup): ...this.
2586 (the_low_target): Remove the op field.
2587 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2588 declaration.
2589 (m68k_arch_setup): Turn into ...
2590 (m68k_target::low_arch_setup): ...this.
2591 (the_low_target): Remove the op field.
2592 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2593 declaration.
2594 (mips_arch_setup): Turn into ...
2595 (mips_target::low_arch_setup): ...this.
2596 (the_low_target): Remove the op field.
2597 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2598 declaration.
2599 (nios2_arch_setup): Turn into ...
2600 (nios2_target::low_arch_setup): ...this.
2601 (the_low_target): Remove the op field.
2602 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2603 declaration.
2604 (ppc_arch_setup): Turn into ...
2605 (ppc_target::low_arch_setup): ...this.
2606 (the_low_target): Remove the op field.
2607 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2608 declaration.
2609 (riscv_arch_setup): Turn into ...
2610 (riscv_target::low_arch_setup): ...this.
2611 (the_low_target): Remove the op field.
2612 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2613 declaration.
2614 (s390_arch_setup): Turn into ...
2615 (s390_target::low_arch_setup): ...this.
2616 (the_low_target): Remove the op field.
2617 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2618 declaration.
2619 (sh_arch_setup): Turn into ...
2620 (sh_target::low_arch_setup): ...this.
2621 (the_low_target): Remove the op field.
2622 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2623 declaration.
2624 (sparc_arch_setup): Turn into ...
2625 (sparc_target::low_arch_setup): ...this.
2626 (the_low_target): Remove the op field.
2627 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2628 declaration.
2629 (tic6x_arch_setup): Turn into ...
2630 (tic6x_target::low_arch_setup): ...this.
2631 (the_low_target): Remove the op field.
2632 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2633 declaration.
2634 (tile_arch_setup): Turn into ...
2635 (tile_target::low_arch_setup): ...this.
2636 (the_low_target): Remove the op field.
2637 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2638 declaration.
2639 (xtensa_arch_setup): Turn into ...
2640 (xtensa_target::low_arch_setup): ...this.
2641 (the_low_target): Remove the op field.
2642
2643 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2644
2645 * linux-low.h (the_linux_target): New extern declaration.
2646 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2647 'the_target'.
2648 (the_linux_target): Remove.
2649 * linux-x86-low.cc (class x86_target): New class.
2650 (the_x86_target): New static object.
2651 (the_linux_target): Define as pointer to the_x86_target.
2652 * linux-aarch64-low.cc (class aarch64_target): New class.
2653 (the_aarch64_target): New static object.
2654 (the_linux_target): Define as pointer to the_aarch64_target.
2655 * linux-arm-low.cc (class arm_target): New class.
2656 (the_arm_target): New static object.
2657 (the_linux_target): Define as pointer to the_arm_target.
2658 * linux-bfin-low.cc (class bfin_target): New class.
2659 (the_bfin_target): New static object.
2660 (the_linux_target): Define as pointer to the_bfin_target.
2661 * linux-cris-low.cc (class cris_target): New class.
2662 (the_cris_target): New static object.
2663 (the_linux_target): Define as pointer to the_cris_target.
2664 * linux-crisv32-low.cc (class crisv32_target): New class.
2665 (the_crisv32_target): New static object.
2666 (the_linux_target): Define as pointer to the_crisv32_target.
2667 * linux-ia64-low.cc (class ia64_target): New class.
2668 (the_ia64_target): New static object.
2669 (the_linux_target): Define as pointer to the_ia64_target.
2670 * linux-m32r-low.cc (class m32r_target): New class.
2671 (the_m32r_target): New static object.
2672 (the_linux_target): Define as pointer to the_m32r_target.
2673 * linux-m68k-low.cc (class m68k_target): New class.
2674 (the_m68k_target): New static object.
2675 (the_linux_target): Define as pointer to the_m68k_target.
2676 * linux-mips-low.cc (class mips_target): New class.
2677 (the_mips_target): New static object.
2678 (the_linux_target): Define as pointer to the_mips_target.
2679 * linux-nios2-low.cc (class nios2_target): New class.
2680 (the_nios2_target): New static object.
2681 (the_linux_target): Define as pointer to the_nios2_target.
2682 * linux-ppc-low.cc (class ppc_target): New class.
2683 (the_ppc_target): New static object.
2684 (the_linux_target): Define as pointer to the_ppc_target.
2685 * linux-riscv-low.cc (class riscv_target): New class.
2686 (the_riscv_target): New static object.
2687 (the_linux_target): Define as pointer to the_riscv_target.
2688 * linux-s390-low.cc (class s390_target): New class.
2689 (the_s390_target): New static object.
2690 (the_linux_target): Define as pointer to the_s390_target.
2691 * linux-sh-low.cc (class sh_target): New class.
2692 (the_sh_target): New static object.
2693 (the_linux_target): Define as pointer to the_sh_target.
2694 * linux-sparc-low.cc (class sparc_target): New class.
2695 (the_sparc_target): New static object.
2696 (the_linux_target): Define as pointer to the_sparc_target.
2697 * linux-tic6x-low.cc (class tic6x_target): New class.
2698 (the_tic6x_target): New static object.
2699 (the_linux_target): Define as pointer to the_tic6x_target.
2700 * linux-tile-low.cc (class tile_target): New class.
2701 (the_tile_target): New static object.
2702 (the_linux_target): Define as pointer to the_tile_target.
2703 * linux-xtensa-low.cc (class xtensa_target): New class.
2704 (the_xtensa_target): New static object.
2705 (the_linux_target): Define as pointer to the_xtensa_target.
2706
2707 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2708
2709 Turn some static functions in linux-low.cc into private methods of
2710 linux_process_target.
2711
2712 * linux-low.cc (handle_extended_wait): Turn into ...
2713 (linux_process_target::handle_extended_wait): ...this. Call
2714 'mourn' on 'this' object instead of 'the_target'.
2715 (maybe_move_out_of_jump_pad): Turn into...
2716 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2717 (linux_low_filter_event): Turn into...
2718 (linux_process_target::filter_event): ...this.
2719 (linux_wait_for_event_filtered): Turn into...
2720 (linux_process_target::wait_for_event_filtered): ...this.
2721 (linux_wait_for_event): Turn into...
2722 (linux_process_target::wait_for_event): ...this.
2723 (linux_wait_1): Turn into...
2724 (linux_process_target::wait_1): ...this.
2725 (wait_for_sigstop): Turn into...
2726 (linux_process_target::wait_for_sigstop): ...this.
2727 (move_out_of_jump_pad_callback): Turn into...
2728 (linux_process_target::move_out_of_jump_pad): ...this.
2729 (stop_all_lwps): Turn into...
2730 (linux_process_target::stop_all_lwps): ...this.
2731 (start_step_over): Turn into...
2732 (linux_process_target::start_step_over): ...this.
2733 (complete_ongoing_step_over): Turn into...
2734 (linux_process_target::complete_ongoing_step_over): ...this.
2735 (proceed_all_lwps): Turn into...
2736 (linux_process_target::proceed_all_lwps): ...this.
2737 (unstop_all_lwps): Turn into...
2738 (linux_process_target::unstop_all_lwps): ...this.
2739
2740 * linux-low.h (class linux_process_target)
2741 <handle_extended_wait>
2742 <maybe_move_out_of_jump_pad>
2743 filter_event>
2744 <wait_for_event_filtered>
2745 <wait_for_event>
2746 <wait_1>
2747 <wait_for_sigstop>
2748 <move_out_of_jump_pad>
2749 <stop_all_lwps>
2750 <start_step_over>
2751 <complete_ongoing_step_over>
2752 <proceed_all_lwps>
2753 <unstop_all_lwps>: Declare.
2754
2755 Update the callers below.
2756
2757 * linux-low.cc (linux_process_target::attach): Update.
2758 (linux_process_target::stabilize_threads): Ditto.
2759 (linux_process_target::wait): Ditto.
2760
2761 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2762
2763 * linux-low.h (struct linux_target_ops): Update the comment for
2764 'cannot_store_register' to return 0 or 1.
2765 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2766 of 2.
2767
2768 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2769
2770 * config.in: Re-generate.
2771 * configure: Re-generate.
2772
2773 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2774
2775 * regcache.cc (find_register_by_number): Update.
2776 * tdesc.cc (init_target_desc): Likewise.
2777 * tdesc.h (target_desc::reg_defs): Likewise.
2778
2779 2020-03-12 Tom Tromey <tom@tromey.com>
2780
2781 * configure: Rebuild.
2782 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2783 (WIN32APILIBS): New subst.
2784 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2785 gdbsupport files.
2786 (gdbsupport/%.o): Remove target.
2787 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2788 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2789 (WIN32APILIBS): New variable.
2790 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2791 (gdbreplay$(EXEEXT)): Likewise.
2792
2793 2020-03-12 Tom Tromey <tom@tromey.com>
2794
2795 * config.in, configure: Rebuild.
2796 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2797 * acinclude.m4: Include gettext-sister.m4.
2798 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2799 variables.
2800 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2801 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2802
2803 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2804
2805 * acinclude.m4: Update path to selftest.m4.
2806
2807 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2808
2809 * configure.ac: Don't source bfd/development.sh, move
2810 GDB_AC_COMMON higher.
2811 * configure: Re-generate.
2812
2813 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2814
2815 * configure: Re-generate.
2816
2817 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2818
2819 * configure: Re-generate.
2820
2821 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2822
2823 * .dir-locals.el: New file.
2824
2825 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2826
2827 * .gitattributes: New file.
2828
2829 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2830
2831 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2832 reply into an S reply.
2833 * server.cc (disable_packet_T): New global.
2834 (captured_main): Set new global when appropriate.
2835 * server.h (disable_packet_T): Declare.
2836
2837 2020-02-21 Tom Tromey <tom@tromey.com>
2838
2839 * Makefile.in (mostlyclean): New target.
2840
2841 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2842
2843 * target.h (struct process_stratum_target): Remove.
2844 (class process_target): Rename to ...
2845 (class process_stratum_target): ... this.
2846 * linux-low.h (class linux_process_target): Derive from
2847 'process_stratum_target'.
2848 * linux-low.cc (linux_target_ops): Remove.
2849 (initialize_low): Set the_target to the singleton instance of
2850 linux_process_target.
2851 * lynx-low.h (class lynx_process_target): Derive from
2852 'process_stratum_target'.
2853 * lynx-low.cc (lynx_target_ops): Remove.
2854 (initialize_low): Set the_target to the singleton instance of
2855 lynx_process_target.
2856 * nto-low.h (class nto_process_target): Derive from
2857 'process_stratum_target'.
2858 * nto-low.cc (nto_target_ops): Remove.
2859 (initialize_low): Set the_target to the singleton instance of
2860 nto_process_target.
2861 * win32-low.h (class win32_process_target): Derive from
2862 'process_stratum_target'.
2863 * win32-low.cc (win32_target_ops): Remove.
2864 (initialize_low): Set the_target to the singleton instance of
2865 win32_process_target.
2866
2867 Replace 'the_target->pt' with 'the_target' in the uses below.
2868
2869 * hostio.cc (hostio_error)
2870 (handle_setfs)
2871 (handle_open)
2872 (handle_unlink)
2873 (handle_readlink)
2874 * linux-aarch32-low.cc (arm_breakpoint_at)
2875 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2876 * linux-arm-low.cc (arm_sigreturn_next_pc)
2877 (arm_get_hwcap)
2878 (arm_get_syscall_trapinfo)
2879 * linux-cris-low.cc (cris_breakpoint_at)
2880 * linux-crisv32-low.cc (cris_breakpoint_at)
2881 * linux-low.cc (handle_extended_wait)
2882 (linux_wait_1)
2883 (linux_read_memory)
2884 (linux_process_target::breakpoint_kind_from_pc)
2885 (linux_get_auxv)
2886 * linux-m32r-low.cc (m32r_breakpoint_at)
2887 * linux-mips-low.cc (mips_breakpoint_at)
2888 * linux-nios2-low.cc (nios2_breakpoint_at)
2889 * linux-ppc-low.cc (ppc_breakpoint_at)
2890 * linux-s390-low.cc (s390_get_hwcap)
2891 * linux-sh-low.cc (sh_breakpoint_at)
2892 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2893 (sparc_store_gregset_from_stack)
2894 (sparc_breakpoint_at)
2895 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2896 * linux-tile-low.cc (tile_breakpoint_at)
2897 * linux-x86-low.cc (x86_breakpoint_at)
2898 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2899 * mem-break.cc (bp_size)
2900 (bp_opcode)
2901 (insert_memory_breakpoint)
2902 (set_raw_breakpoint_at)
2903 (delete_raw_breakpoint)
2904 (z_type_supported)
2905 (uninsert_raw_breakpoint)
2906 (reinsert_raw_breakpoint)
2907 (validate_inserted_breakpoint)
2908 * regcache.cc (regcache_read_pc)
2909 (regcache_write_pc)
2910 * remote-utils.cc (putpkt_binary_1)
2911 (input_interrupt)
2912 (getpkt)
2913 (prepare_resume_reply)
2914 * server.cc (handle_general_set)
2915 (handle_detach)
2916 (handle_qxfer_auxv)
2917 (handle_qxfer_exec_file)
2918 (handle_qxfer_libraries_svr4)
2919 (handle_qxfer_osdata)
2920 (handle_qxfer_siginfo)
2921 (handle_qxfer_fdpic)
2922 (handle_query)
2923 (resume)
2924 (handle_v_requests)
2925 (queue_stop_reply_callback)
2926 (captured_main)
2927 * target.cc (prepare_to_access_memory)
2928 (done_accessing_memory)
2929 (read_inferior_memory)
2930 (target_write_memory)
2931 (target_stop_and_wait)
2932 (target_wait)
2933 (target_mourn_inferior)
2934 (target_continue_no_signal)
2935 (target_continue)
2936 (target_supports_multi_process)
2937 (kill_inferior)
2938 * target.h
2939 (target_create_inferior)
2940 (target_post_create_inferior)
2941 (myattach)
2942 (target_supports_fork_events)
2943 (target_supports_vfork_events)
2944 (target_supports_exec_events)
2945 (target_handle_new_gdb_connection)
2946 (detach_inferior)
2947 (mythread_alive)
2948 (fetch_inferior_registers)
2949 (store_inferior_registers)
2950 (join_inferior)
2951 (target_supports_non_stop)
2952 (target_async)
2953 (target_process_qsupported)
2954 (target_supports_catch_syscall)
2955 (target_get_ipa_tdesc_idx)
2956 (target_supports_tracepoints)
2957 (target_supports_fast_tracepoints)
2958 (target_get_min_fast_tracepoint_insn_len)
2959 (target_thread_stopped)
2960 (target_pause_all)
2961 (target_unpause_all)
2962 (target_stabilize_threads)
2963 (target_install_fast_tracepoint_jump_pad)
2964 (target_emit_ops)
2965 (target_supports_disable_randomization)
2966 (target_supports_agent)
2967 (target_enable_btrace)
2968 (target_disable_btrace)
2969 (target_read_btrace)
2970 (target_read_btrace_conf)
2971 (target_supports_range_stepping)
2972 (target_supports_stopped_by_sw_breakpoint)
2973 (target_stopped_by_sw_breakpoint)
2974 (target_supports_stopped_by_hw_breakpoint)
2975 (target_supports_hardware_single_step)
2976 (target_stopped_by_hw_breakpoint)
2977 (target_breakpoint_kind_from_pc)
2978 (target_breakpoint_kind_from_current_state)
2979 (target_supports_software_single_step)
2980 (target_core_of_thread)
2981 (target_thread_name)
2982 (target_thread_handle)
2983 * win32-low.cc (do_initial_child_stuff)
2984
2985 Rename target op default definitions listed below.
2986
2987 * target.cc (process_target::post_create_inferior): Rename as ...
2988 (process_stratum_target::post_create_inferior): ... this.
2989 (process_target::prepare_to_access_memory): Rename as ...
2990 (process_stratum_target::prepare_to_access_memory): ... this.
2991 (process_target::done_accessing_memory): Rename as ...
2992 (process_stratum_target::done_accessing_memory): ... this.
2993 (process_target::look_up_symbols): Rename as ...
2994 (process_stratum_target::look_up_symbols): ... this.
2995 (process_target::supports_read_auxv): Rename as ...
2996 (process_stratum_target::supports_read_auxv): ... this.
2997 (process_target::read_auxv): Rename as ...
2998 (process_stratum_target::read_auxv): ... this.
2999 (process_target::supports_z_point_type): Rename as ...
3000 (process_stratum_target::supports_z_point_type): ... this.
3001 (process_target::insert_point): Rename as ...
3002 (process_stratum_target::insert_point): ... this.
3003 (process_target::remove_point): Rename as ...
3004 (process_stratum_target::remove_point): ... this.
3005 (process_target::stopped_by_sw_breakpoint): Rename as ...
3006 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
3007 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
3008 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
3009 (process_target::stopped_by_hw_breakpoint): Rename as ...
3010 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
3011 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
3012 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
3013 (process_target::supports_hardware_single_step): Rename as ...
3014 (process_stratum_target::supports_hardware_single_step): ... this.
3015 (process_target::stopped_by_watchpoint): Rename as ...
3016 (process_stratum_target::stopped_by_watchpoint): ... this.
3017 (process_target::stopped_data_address): Rename as ...
3018 (process_stratum_target::stopped_data_address): ... this.
3019 (process_target::supports_read_offsets): Rename as ...
3020 (process_stratum_target::supports_read_offsets): ... this.
3021 (process_target::read_offsets): Rename as ...
3022 (process_stratum_target::read_offsets): ... this.
3023 (process_target::supports_get_tls_address): Rename as ...
3024 (process_stratum_target::supports_get_tls_address): ... this.
3025 (process_target::get_tls_address): Rename as ...
3026 (process_stratum_target::get_tls_address): ... this.
3027 (process_target::hostio_last_error): Rename as ...
3028 (process_stratum_target::hostio_last_error): ... this.
3029 (process_target::supports_qxfer_osdata): Rename as ...
3030 (process_stratum_target::supports_qxfer_osdata): ... this.
3031 (process_target::qxfer_osdata): Rename as ...
3032 (process_stratum_target::qxfer_osdata): ... this.
3033 (process_target::supports_qxfer_siginfo): Rename as ...
3034 (process_stratum_target::supports_qxfer_siginfo): ... this.
3035 (process_target::qxfer_siginfo): Rename as ...
3036 (process_stratum_target::qxfer_siginfo): ... this.
3037 (process_target::supports_non_stop): Rename as ...
3038 (process_stratum_target::supports_non_stop): ... this.
3039 (process_target::async): Rename as ...
3040 (process_stratum_target::async): ... this.
3041 (process_target::start_non_stop): Rename as ...
3042 (process_stratum_target::start_non_stop): ... this.
3043 (process_target::supports_multi_process): Rename as ...
3044 (process_stratum_target::supports_multi_process): ... this.
3045 (process_target::supports_fork_events): Rename as ...
3046 (process_stratum_target::supports_fork_events): ... this.
3047 (process_target::supports_vfork_events): Rename as ...
3048 (process_stratum_target::supports_vfork_events): ... this.
3049 (process_target::supports_exec_events): Rename as ...
3050 (process_stratum_target::supports_exec_events): ... this.
3051 (process_target::handle_new_gdb_connection): Rename as ...
3052 (process_stratum_target::handle_new_gdb_connection): ... this.
3053 (process_target::handle_monitor_command): Rename as ...
3054 (process_stratum_target::handle_monitor_command): ... this.
3055 (process_target::core_of_thread): Rename as ...
3056 (process_stratum_target::core_of_thread): ... this.
3057 (process_target::supports_read_loadmap): Rename as ...
3058 (process_stratum_target::supports_read_loadmap): ... this.
3059 (process_target::read_loadmap): Rename as ...
3060 (process_stratum_target::read_loadmap): ... this.
3061 (process_target::process_qsupported): Rename as ...
3062 (process_stratum_target::process_qsupported): ... this.
3063 (process_target::supports_tracepoints): Rename as ...
3064 (process_stratum_target::supports_tracepoints): ... this.
3065 (process_target::read_pc): Rename as ...
3066 (process_stratum_target::read_pc): ... this.
3067 (process_target::write_pc): Rename as ...
3068 (process_stratum_target::write_pc): ... this.
3069 (process_target::supports_thread_stopped): Rename as ...
3070 (process_stratum_target::supports_thread_stopped): ... this.
3071 (process_target::thread_stopped): Rename as ...
3072 (process_stratum_target::thread_stopped): ... this.
3073 (process_target::supports_get_tib_address): Rename as ...
3074 (process_stratum_target::supports_get_tib_address): ... this.
3075 (process_target::get_tib_address): Rename as ...
3076 (process_stratum_target::get_tib_address): ... this.
3077 (process_target::pause_all): Rename as ...
3078 (process_stratum_target::pause_all): ... this.
3079 (process_target::unpause_all): Rename as ...
3080 (process_stratum_target::unpause_all): ... this.
3081 (process_target::stabilize_threads): Rename as ...
3082 (process_stratum_target::stabilize_threads): ... this.
3083 (process_target::supports_fast_tracepoints): Rename as ...
3084 (process_stratum_target::supports_fast_tracepoints): ... this.
3085 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
3086 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
3087 (process_target::emit_ops): Rename as ...
3088 (process_stratum_target::emit_ops): ... this.
3089 (process_target::supports_disable_randomization): Rename as ...
3090 (process_stratum_target::supports_disable_randomization): ... this.
3091 (process_target::supports_qxfer_libraries_svr4): Rename as ...
3092 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
3093 (process_target::qxfer_libraries_svr4): Rename as ...
3094 (process_stratum_target::qxfer_libraries_svr4): ... this.
3095 (process_target::supports_agent): Rename as ...
3096 (process_stratum_target::supports_agent): ... this.
3097 (process_target::enable_btrace): Rename as ...
3098 (process_stratum_target::enable_btrace): ... this.
3099 (process_target::disable_btrace): Rename as ...
3100 (process_stratum_target::disable_btrace): ... this.
3101 (process_target::read_btrace): Rename as ...
3102 (process_stratum_target::read_btrace): ... this.
3103 (process_target::read_btrace_conf): Rename as ...
3104 (process_stratum_target::read_btrace_conf): ... this.
3105 (process_target::supports_range_stepping): Rename as ...
3106 (process_stratum_target::supports_range_stepping): ... this.
3107 (process_target::supports_pid_to_exec_file): Rename as ...
3108 (process_stratum_target::supports_pid_to_exec_file): ... this.
3109 (process_target::pid_to_exec_file): Rename as ...
3110 (process_stratum_target::pid_to_exec_file): ... this.
3111 (process_target::supports_multifs): Rename as ...
3112 (process_stratum_target::supports_multifs): ... this.
3113 (process_target::multifs_open): Rename as ...
3114 (process_stratum_target::multifs_open): ... this.
3115 (process_target::multifs_unlink): Rename as ...
3116 (process_stratum_target::multifs_unlink): ... this.
3117 (process_target::multifs_readlink): Rename as ...
3118 (process_stratum_target::multifs_readlink): ... this.
3119 (process_target::breakpoint_kind_from_pc): Rename as ...
3120 (process_stratum_target::breakpoint_kind_from_pc): ... this.
3121 (process_target::breakpoint_kind_from_current_state): Rename as ...
3122 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
3123 (process_target::thread_name): Rename as ...
3124 (process_stratum_target::thread_name): ... this.
3125 (process_target::thread_handle): Rename as ...
3126 (process_stratum_target::thread_handle): ... this.
3127 (process_target::supports_software_single_step): Rename as ...
3128 (process_stratum_target::supports_software_single_step): ... this.
3129 (process_target::supports_catch_syscall): Rename as ...
3130 (process_stratum_target::supports_catch_syscall): ... this.
3131 (process_target::get_ipa_tdesc_idx): Rename as ...
3132 (process_stratum_target::get_ipa_tdesc_idx): ... this.
3133
3134 2020-02-20 Pedro Alves <palves@redhat.com>
3135
3136 * target.cc (set_target_ops): Simply copy the given target pointer
3137 instead of creating a copy of the pointed object.
3138
3139 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3140
3141 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
3142 of process_target.
3143
3144 * target.h (struct process_stratum_target): Remove the target op.
3145 (class process_target): Add the target op.
3146 (target_get_ipa_tdesc_idx): Update the macro.
3147 * target.cc (process_target::get_ipa_tdesc_idx): Define.
3148
3149 Update the derived classes and callers below.
3150
3151 * linux-low.cc (linux_target_ops): Update.
3152 (linux_get_ipa_tdesc_idx): Turn into ...
3153 (linux_process_target::get_ipa_tdesc_idx): ... this.
3154 * linux-low.h (class linux_process_target): Update.
3155 * lynx-low.cc (lynx_target_ops): Update.
3156 * nto-low.cc (nto_target_ops): Update.
3157 * win32-low.cc (win32_target_ops): Update.
3158
3159 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3160
3161 Turn process_stratum_target's supports_catch_syscall op into a
3162 method of process_target.
3163
3164 * target.h (struct process_stratum_target): Remove the target op.
3165 (class process_target): Add the target op.
3166 (target_supports_catch_syscall): Update the macro.
3167 * target.cc (process_target::supports_catch_syscall): Define.
3168
3169 Update the derived classes and callers below.
3170
3171 * linux-low.cc (linux_target_ops): Update.
3172 (linux_supports_catch_syscall): Turn into ...
3173 (linux_process_target::supports_catch_syscall): ... this.
3174 * linux-low.h (class linux_process_target): Update.
3175 * lynx-low.cc (lynx_target_ops): Update.
3176 * nto-low.cc (nto_target_ops): Update.
3177 * win32-low.cc (win32_target_ops): Update.
3178
3179 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3180
3181 Turn process_stratum_target's supports_software_single_step op
3182 into a method of process_target.
3183
3184 * target.h (struct process_stratum_target): Remove the target op.
3185 (class process_target): Add the target op.
3186 (target_supports_software_single_step): Update the macro.
3187 * target.cc (process_target::supports_software_single_step): Define.
3188
3189 Update the derived classes and callers below.
3190
3191 * linux-low.cc (linux_target_ops): Update.
3192 (linux_supports_software_single_step): Turn into ...
3193 (linux_process_target::supports_software_single_step): ... this.
3194 * linux-low.h (class linux_process_target): Update.
3195 * lynx-low.cc (lynx_target_ops): Update.
3196 * nto-low.cc (nto_target_ops): Update.
3197 * win32-low.cc (win32_target_ops): Update.
3198
3199 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3200
3201 Turn process_stratum_target's thread_name and thread_handle ops
3202 into methods of process_target.
3203
3204 * target.h (struct process_stratum_target): Remove the target ops.
3205 (class process_target): Add the target ops.
3206 (target_thread_name): Update the macro.
3207 (target_thread_handle): Update the macro.
3208 * target.cc (process_target::thread_name): Define.
3209 (process_target::thread_handle): Define.
3210
3211 Update the derived classes and callers below.
3212
3213 * linux-low.cc (linux_target_ops): Update.
3214 (linux_process_target::thread_name): Define.
3215 (linux_process_target::thread_handle): Define.
3216 * linux-low.h (class linux_process_target): Update.
3217 * lynx-low.cc (lynx_target_ops): Update.
3218 * nto-low.cc (nto_target_ops): Update.
3219 * win32-low.cc (win32_target_ops): Update.
3220
3221 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3222
3223 Turn process_stratum_target's breakpoint_kind_from_pc,
3224 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
3225 ops into methods of process_target.
3226
3227 * target.h (struct process_stratum_target): Remove the target op.
3228 (class process_target): Add the target op.
3229 (target_breakpoint_kind_from_pc): Update the macro.
3230 (target_breakpoint_kind_from_current_state): Update the macro.
3231 (default_breakpoint_kind_from_pc): Remove declaration.
3232 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
3233 (process_target::breakpoint_kind_from_pc): ... this.
3234 (process_target::breakpoint_kind_from_current_state): Define.
3235
3236 Update the derived classes and callers below.
3237
3238 * mem-break.cc (bp_size): Update.
3239 (bp_opcode): Update.
3240 * linux-low.cc (linux_target_ops): Update.
3241 (linux_wait_1): Update.
3242 (linux_breakpoint_kind_from_pc): Turn into ...
3243 (linux_process_target::breakpoint_kind_from_pc): ... this.
3244 (linux_sw_breakpoint_from_kind): Turn into ...
3245 (linux_process_target::sw_breakpoint_from_kind): ... this.
3246 (linux_breakpoint_kind_from_current_state): Turn into ...
3247 (linux_process_target::breakpoint_kind_from_current_state): ... this.
3248 * linux-low.h (class linux_process_target): Update.
3249 * lynx-low.cc (lynx_target_ops): Update.
3250 (lynx_process_target::sw_breakpoint_from_kind): Define.
3251 * lynx-low.h (class lynx_process_target): Update.
3252 * nto-low.cc (nto_target_ops): Update.
3253 (nto_sw_breakpoint_from_kind): Turn into ...
3254 (nto_process_target::sw_breakpoint_from_kind): ... this.
3255 * nto-low.h (class nto_process_target): Update.
3256 * win32-low.cc (win32_target_ops): Update.
3257 (win32_sw_breakpoint_from_kind): Turn into ...
3258 (win32_process_target::sw_breakpoint_from_kind): ... this.
3259 * win32-low.h (class win32_process_target): Update.
3260
3261 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3262
3263 Turn process_stratum_target's multifs_open, multifs_readlink,
3264 multifs_unlink ops into methods of process_target.
3265
3266 * target.h (struct process_stratum_target): Remove the target ops.
3267 (class process_target): Add the target ops. Also add
3268 'supports_multifs'.
3269 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
3270 "sys/stat.h".
3271 (process_target::supports_multifs): Define.
3272 (process_target::multifs_open): Define.
3273 (process_target::multifs_readlink): Define.
3274 (process_target::multifs_unlink): Define.
3275
3276 Update the derived classes and callers below.
3277
3278 * hostio.cc (handle_setfs): Update.
3279 (handle_open): Update.
3280 (handle_unlink): Update.
3281 (handle_readlink): Update.
3282 * linux-low.cc (linux_target_ops): Update.
3283 (linux_process_target::supports_multifs): Define.
3284 (linux_process_target::multifs_open): Define.
3285 (linux_process_target::multifs_readlink): Define.
3286 (linux_process_target::multifs_unlink): Define.
3287 * linux-low.h (class linux_process_target): Update.
3288 * lynx-low.cc (lynx_target_ops): Update.
3289 * nto-low.cc (nto_target_ops): Update.
3290 * win32-low.cc (win32_target_ops): Update.
3291
3292 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3293
3294 Turn process_stratum_target's pid_to_exec_file op into a method
3295 of process_target.
3296
3297 * target.h (struct process_stratum_target): Remove the target op.
3298 (class process_target): Add the target op. Also add
3299 'supports_pid_to_exec_file'.
3300 * target.cc (process_target::pid_to_exec_file): Define.
3301 (process_target::supports_pid_to_exec_file): Define.
3302
3303 Update the derived classes and callers below.
3304
3305 * server.cc (handle_qxfer_exec_file): Update.
3306 (handle_query): Update.
3307 * linux-low.cc (linux_target_ops): Update.
3308 (linux_process_target::supports_pid_to_exec_file): Define.
3309 (linux_process_target::pid_to_exec_file): Define.
3310 * linux-low.h (class linux_process_target): Update.
3311 * lynx-low.cc (lynx_target_ops): Update.
3312 * nto-low.cc (nto_target_ops): Update.
3313 * win32-low.cc (win32_target_ops): Update.
3314
3315 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3316
3317 Turn process_stratum_target's supports_range_stepping op into a
3318 method of process_target.
3319
3320 * target.h (struct process_stratum_target): Remove the target op.
3321 (class process_target): Add the target op.
3322 (target_supports_range_stepping): Update the macro.
3323 * target.cc (process_target::supports_range_stepping): Define.
3324
3325 Update the derived classes and callers below.
3326
3327 * linux-low.cc (linux_target_ops): Update.
3328 (linux_supports_range_stepping): Turn into ...
3329 (linux_process_target::supports_range_stepping): ... this.
3330 * linux-low.h (class linux_process_target): Update.
3331 * lynx-low.cc (lynx_target_ops): Update.
3332 * nto-low.cc (nto_target_ops): Update.
3333 * win32-low.cc (win32_target_ops): Update.
3334
3335 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3336
3337 Turn process_stratum_target's btrace-related ops (enable_btrace,
3338 disable_btrace, read_btrace, read_btrace_conf) into methods of
3339 process_target.
3340
3341 * target.h (struct process_stratum_target): Remove the target ops.
3342 (class process_target): Add the target ops.
3343 (target_enable_btrace): Update.
3344 (target_disable_btrace): Update.
3345 (target_read_btrace): Update.
3346 (target_read_btrace_conf): Update.
3347 * target.cc (process_target::enable_btrace): Define.
3348 (process_target::disable_btrace): Define.
3349 (process_target::read_btrace): Define.
3350 (process_target::read_btrace_conf): Define.
3351
3352 Update the derived classes and callers below.
3353
3354 * linux-low.cc (linux_target_ops): Update.
3355 (linux_process_target:enable_btrace): Define as a wrapper around
3356 linux_enable_btrace.
3357 (linux_low_disable_btrace): Turn into ...
3358 (linux_process_target::disable_btrace): ... this.
3359 (linux_low_read_btrace): Turn into ...
3360 (linux_process_target::read_btrace): ... this.
3361 (linux_low_btrace_conf): Turn into ...
3362 (linux_process_target::read_btrace_conf): ... this.
3363 * linux-low.h (class linux_process_target): Update.
3364 * lynx-low.cc (lynx_target_ops): Update.
3365 * nto-low.cc (nto_target_ops): Update.
3366 * win32-low.cc (win32_target_ops): Update.
3367
3368 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3369
3370 Turn process_stratum_target's supports_agent op into a method of
3371 process_target.
3372
3373 * target.h (struct process_stratum_target): Remove the target op.
3374 (class process_target): Add the target op.
3375 (target_supports_agent): Update the macro.
3376 * target.cc (process_target::supports_agent): Define.
3377
3378 Update the derived classes and callers below.
3379
3380 * linux-low.cc (linux_target_ops): Update.
3381 (linux_supports_agent): Turn into ...
3382 (linux_process_target::supports_agent): ... this.
3383 * linux-low.h (class linux_process_target): Update.
3384 * lynx-low.cc (lynx_target_ops): Update.
3385 * nto-low.cc (nto_target_ops): Update.
3386 * win32-low.cc (win32_target_ops): Update.
3387
3388 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3389
3390 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3391 method of process_target.
3392
3393 * target.h (struct process_stratum_target): Remove the target op.
3394 (class process_target): Add the target op. Also add
3395 'supports_qxfer_libraries_svr4'.
3396 * target.cc (process_target::qxfer_libraries_svr4): Define.
3397 (process_target::supports_qxfer_libraries_svr4): Define.
3398
3399 Update the derived classes and callers below.
3400
3401 * server.cc (handle_qxfer_libraries_svr4): Update.
3402 (handle_query): Update.
3403 * linux-low.cc (linux_target_ops): Update.
3404 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3405 (linux_qxfer_libraries_svr4): Turn into ...
3406 (linux_process_target::qxfer_libraries_svr4): ... this.
3407 * linux-low.h (class linux_process_target): Update.
3408 * lynx-low.cc (lynx_target_ops): Update.
3409 * nto-low.cc (nto_target_ops): Update.
3410 * win32-low.cc (win32_target_ops): Update.
3411
3412 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3413
3414 Turn process_stratum_target's supports_disable_randomization op
3415 into a method of process_target.
3416
3417 * target.h (struct process_stratum_target): Remove the target op.
3418 (class process_target): Add the target op.
3419 (target_supports_disable_randomization): Update the macro.
3420 * target.cc (process_target::supports_disable_randomization): Define.
3421
3422 Update the derived classes and callers below.
3423
3424 * linux-low.cc (linux_target_ops): Update.
3425 (linux_supports_disable_randomization): Turn into ...
3426 (linux_process_target::supports_disable_randomization): ... this.
3427 * linux-low.h (class linux_process_target): Update.
3428 * lynx-low.cc (lynx_target_ops): Update.
3429 * nto-low.cc (nto_target_ops): Update.
3430 * win32-low.cc (win32_target_ops): Update.
3431
3432 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3433
3434 Turn process_stratum_target's emit_ops op into a method of
3435 process_target.
3436
3437 * target.h (struct process_stratum_target): Remove the target op.
3438 (class process_target): Add the target op.
3439 (target_emit_ops): Update the macro.
3440 * target.cc (process_target::emit_ops): Define.
3441
3442 Update the derived classes and callers below.
3443
3444 * linux-low.cc (linux_target_ops): Update.
3445 (linux_emit_ops): Turn into ...
3446 (linux_process_target::emit_ops): ... this.
3447 * linux-low.h (class linux_process_target): Update.
3448 * lynx-low.cc (lynx_target_ops): Update.
3449 * nto-low.cc (nto_target_ops): Update.
3450 * win32-low.cc (win32_target_ops): Update.
3451
3452 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3453
3454 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3455 and get_min_fast_tracepoint_insn_len ops into methods of
3456 process_target.
3457
3458 * target.h (struct process_stratum_target): Remove the target ops.
3459 (class process_target): Add the target ops. Also add
3460 'supports_fast_tracepoints'.
3461 (target_supports_fast_tracepoints): Update the macro.
3462 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3463 (install_fast_tracepoint_jump_pad): Update and rename the macro
3464 to ...
3465 (target_install_fast_tracepoint_jump_pad): ... this.
3466 * target.cc (process_target::supports_fast_tracepoints): Define.
3467 (process_target::install_fast_tracepoint_jump_pad): Define.
3468 (process_target::get_min_fast_tracepoint_insn_len): Define.
3469
3470 Update the derived classes and callers below.
3471
3472 * tracepoint.cc (install_fast_tracepoint): Update.
3473 * linux-low.cc (linux_target_ops): Update.
3474 (linux_process_target::supports_fast_tracepoints): Define.
3475 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3476 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3477 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3478 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3479 * linux-low.h (class linux_process_target): Update.
3480 * lynx-low.cc (lynx_target_ops): Update.
3481 * nto-low.cc (nto_target_ops): Update.
3482 * win32-low.cc (win32_target_ops): Update.
3483
3484 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3485
3486 Turn process_stratum_target's stabilize_threads op into a
3487 method of process_target.
3488
3489 * target.h (struct process_stratum_target): Remove the target op.
3490 (class process_target): Add the target op.
3491 (target_stabilize_threads): Update the macro.
3492 * target.cc (process_target::stabilize_threads): Define.
3493
3494 Update the derived classes and callers below.
3495
3496 * server.cc (handle_status): Update.
3497 * tracepoint.cc (cmd_qtdp): Update.
3498 (cmd_qtstart): Update.
3499 * linux-low.cc (linux_target_ops): Update.
3500 (linux_stabilize_threads): Turn into ...
3501 (linux_process_target::stabilize_threads): ... this.
3502 (linux_wait_1): Update.
3503 * linux-low.h (class linux_process_target): Update.
3504 * lynx-low.cc (lynx_target_ops): Update.
3505 * nto-low.cc (nto_target_ops): Update.
3506 * win32-low.cc (win32_target_ops): Update.
3507
3508 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3509
3510 Turn process_stratum_target's pause_all and unpause_all ops
3511 into methods of process_target.
3512
3513 * target.h (struct process_stratum_target): Remove the target ops.
3514 (class process_target): Add the target ops.
3515 (pause_all): Update the macro and rename to...
3516 (target_pause_all): ... this.
3517 (unpause_all): Update the macro and rename to...
3518 (target_unpause_all): ... this.
3519 * target.cc (process_target::pause_all): Define.
3520 (process_target::unpause_all): Define.
3521
3522 Update the derived classes and callers below.
3523
3524 * server.cc (handle_status): Update.
3525 * tracepoint.cc (clear_installed_tracepoints): Update.
3526 (cmd_qtdp): Update.
3527 (cmd_qtstart): Update.
3528 (stop_tracing): Update.
3529 (cmd_qtstatus): Update.
3530 (upload_fast_traceframes): Update.
3531 (run_inferior_command): Update.
3532 * linux-low.cc (linux_target_ops): Update.
3533 (linux_pause_all): Turn into ...
3534 (linux_process_target::pause_all): ... this.
3535 (linux_unpause_all): Turn into ...
3536 (linux_process_target::unpause_all): ... this.
3537 (linux_process_target::prepare_to_access_memory): Update.
3538 (linux_process_target::done_accessing_memory): Update.
3539 * linux-low.h (class linux_process_target): Update.
3540 * lynx-low.cc (lynx_target_ops): Update.
3541 * nto-low.cc (nto_target_ops): Update.
3542 * win32-low.cc (win32_target_ops): Update.
3543
3544 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3545
3546 Turn process_stratum_target's get_tib_address op into a method of
3547 process_target.
3548
3549 * target.h (struct process_stratum_target): Remove the target op.
3550 (class process_target): Add the target op. Also add
3551 'supports_get_tib_address'.
3552 * target.cc (process_target::get_tib_address): Define.
3553 (process_target::supports_get_tib_address): Define.
3554
3555 Update the derived classes and callers below.
3556
3557 * server.cc (handle_query): Update.
3558 * linux-low.cc (win32_target_ops): Update.
3559 * lynx-low.cc (lynx_target_ops): Update.
3560 * nto-low.cc (nto_target_ops): Update.
3561 * win32-low.cc (win32_target_ops): Update.
3562 (win32_process_target::supports_get_tib_address): Define.
3563 (win32_get_tib_address): Turn into ...
3564 (win32_process_target::get_tib_address): ... this.
3565 * win32-low.h (class win32_process_target): Update.
3566
3567 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3568
3569 Turn process_stratum_target's thread_stopped op into a method of
3570 process_target.
3571
3572 * target.h (struct process_stratum_target): Remove the target op.
3573 (class process_target): Add the target op. Also add
3574 'supports_thread_stopped'.
3575 (target_thread_stopped): Update the macro.
3576 * target.cc (process_target::thread_stopped): Define.
3577 (process_target::supports_thread_stopped): Define.
3578 (prepare_to_access_memory): Update.
3579
3580 Update the derived classes and callers below.
3581
3582 * server.cc (queue_stop_reply_callback): Update.
3583 * linux-low.cc (linux_target_ops): Update.
3584 (linux_process_target::supports_thread_stopped): Define.
3585 (linux_thread_stopped): Turn into ...
3586 (linux_process_target::thread_stopped): ... this.
3587 * linux-low.h (class linux_process_target): Update.
3588 * lynx-low.cc (lynx_target_ops): Update.
3589 * nto-low.cc (nto_target_ops): Update.
3590 * win32-low.cc (win32_target_ops): Update.
3591
3592 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3593
3594 Turn process_stratum_target's read_pc and write_pc ops into
3595 methods of process_target.
3596
3597 * target.h (struct process_stratum_target): Remove the target ops.
3598 (class process_target): Add the target ops.
3599 * target.cc (process_target::read_pc): Define.
3600 (process_target::write_pc): Define.
3601
3602 Update the derived classes and callers below.
3603
3604 * regcache.cc (regcache_read_pc): Update.
3605 (regcache_write_pc): Update.
3606 * linux-low.cc (linux_target_ops): Update.
3607 (linux_read_pc): Turn into ...
3608 (linux_process_target::read_pc): ... this.
3609 (linux_write_pc): Turn into ...
3610 (linux_process_target::write_pc): ... this.
3611 * linux-low.h (class linux_process_target): Update.
3612 * lynx-low.cc (lynx_target_ops): Update.
3613 * nto-low.cc (nto_target_ops): Update.
3614 * win32-low.cc (win32_target_ops): Update.
3615
3616 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3617
3618 Turn process_stratum_target's supports_tracepoints op into a
3619 method of process_target.
3620
3621 * target.h (struct process_stratum_target): Remove the target op.
3622 (class process_target): Add the target op.
3623 (target_supports_tracepoints): Update the macro.
3624 * target.cc (process_target::supports_tracepoints): Define.
3625
3626 Update the derived classes and callers below.
3627
3628 * linux-low.cc (linux_target_ops): Update.
3629 (linux_supports_tracepoints): Turn into ...
3630 (linux_process_target::supports_tracepoints): ... this.
3631 * linux-low.h (class linux_process_target): Update.
3632 * lynx-low.cc (lynx_target_ops): Update.
3633 * nto-low.cc (nto_target_ops): Update.
3634 * win32-low.cc (win32_target_ops): Update.
3635
3636 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3637
3638 Turn process_stratum_target's process_qsupported op into a method
3639 of process_target.
3640
3641 * target.h (struct process_stratum_target): Remove the target op.
3642 (class process_target): Add the target op.
3643 (target_process_qsupported): Update the macro.
3644 * target.cc (process_target::process_qsupported): Define.
3645
3646 Update the derived classes and callers below.
3647
3648 * linux-low.cc (linux_target_ops): Update.
3649 (linux_process_qsupported): Turn into ...
3650 (linux_process_target::process_qsupported): ... this.
3651 * linux-low.h (class linux_process_target): Update.
3652 * lynx-low.cc (lynx_target_ops): Update.
3653 * nto-low.cc (nto_target_ops): Update.
3654 * win32-low.cc (win32_target_ops): Update.
3655
3656 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3657
3658 Turn process_stratum_target's read_loadmap op into a method of
3659 process_target.
3660
3661 * target.h (struct process_stratum_target): Remove the target op.
3662 (class process_target): Add the target op. Also add
3663 'supports_read_loadmap'.
3664 * target.cc (process_target::read_loadmap): Define.
3665 (process_target::supports_read_loadmap): Define.
3666
3667 Update the derived classes and callers below.
3668
3669 * server.cc (handle_qxfer_fdpic): Update.
3670 (handle_query): Update.
3671 * linux-low.cc (linux_target_ops): Update.
3672 (linux_process_target::supports_read_loadmap): Define.
3673 (linux_read_loadmap): Turn into ...
3674 (linux_process_target::read_loadmap): ... this.
3675 * linux-low.h (class linux_process_target): Update.
3676 * lynx-low.cc (lynx_target_ops): Update.
3677 * nto-low.cc (nto_target_ops): Update.
3678 * win32-low.cc (win32_target_ops): Update.
3679
3680 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3681
3682 Turn process_stratum_target's core_of_thread op into a method of
3683 process_target.
3684
3685 * target.h (struct process_stratum_target): Remove the target op.
3686 (class process_target): Add the target op.
3687 (target_core_of_thread): Update the macro.
3688 * target.cc (process_target::core_of_thread): Define.
3689
3690 Update the derived classes and callers below.
3691
3692 * linux-low.cc (linux_target_ops): Update.
3693 (linux_process_target::core_of_thread): Define.
3694 * linux-low.h (class linux_process_target): Update.
3695 * lynx-low.cc (lynx_target_ops): Update.
3696 * nto-low.cc (nto_target_ops): Update.
3697 * win32-low.cc (win32_target_ops): Update.
3698
3699 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3700
3701 Turn process_stratum_target's handle_monitor_command op into a
3702 method of process_target.
3703
3704 * target.h (struct process_stratum_target): Remove the target op.
3705 (class process_target): Add the target op.
3706 (target_handle_monitor_command): Update the macro.
3707 * target.cc (process_target::handle_monitor_command): Define.
3708
3709 Update the derived classes and callers below.
3710
3711 * server.cc (handle_query): Update.
3712 * linux-low.cc (linux_target_ops): Update.
3713 (linux_process_target::handle_monitor_command): Define.
3714 * linux-low.h (class linux_process_target): Update.
3715 * lynx-low.cc (lynx_target_ops): Update.
3716 * nto-low.cc (nto_target_ops): Update.
3717 * win32-low.cc (win32_target_ops): Update.
3718
3719 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3720
3721 Turn process_stratum_target's handle_new_gdb_connection op into a
3722 method of process_target.
3723
3724 * target.h (struct process_stratum_target): Remove the target op.
3725 (class process_target): Add the target op.
3726 (target_handle_new_gdb_connection): Update the macro.
3727 * target.cc (process_target::handle_new_gdb_connection): Define.
3728
3729 Update the derived classes and callers below.
3730
3731 * linux-low.cc (linux_target_ops): Update.
3732 (linux_handle_new_gdb_connection): Turn into ...
3733 (linux_process_target::handle_new_gdb_connection): ... this.
3734 * linux-low.h (class linux_process_target): Update.
3735 * lynx-low.cc (lynx_target_ops): Update.
3736 * nto-low.cc (nto_target_ops): Update.
3737 * win32-low.cc (win32_target_ops): Update.
3738
3739 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3740
3741 Turn process_stratum_target's supports_fork_events,
3742 supports_vfork_events, and supports_exec_events ops into methods
3743 of process_target.
3744
3745 * target.h (struct process_stratum_target): Remove the target ops.
3746 (class process_target): Add the target ops.
3747 (target_supports_fork_events): Update the macro.
3748 (target_supports_vfork_events): Update the macro.
3749 (target_supports_exec_events): Update the macro.
3750 * target.cc (process_target::supports_fork_events): Define.
3751 (process_target::supports_vfork_events): Define.
3752 (process_target::supports_exec_events): Define.
3753
3754 Update the derived classes and callers below.
3755
3756 * linux-low.cc (linux_target_ops): Update.
3757 (linux_supports_fork_events): Turn into ...
3758 (linux_process_target::supports_fork_events): ... this.
3759 (linux_supports_vfork_events): Turn into ...
3760 (linux_process_target::supports_vfork_events): ... this.
3761 (linux_supports_exec_events): Turn into ...
3762 (linux_process_target::supports_exec_events): ... this.
3763 * linux-low.h (class linux_process_target): Update.
3764 * lynx-low.cc (lynx_target_ops): Update.
3765 * nto-low.cc (nto_target_ops): Update.
3766 * win32-low.cc (win32_target_ops): Update.
3767
3768 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3769
3770 Turn process_stratum_target's supports_multi_process op into a
3771 method of process_target.
3772
3773 * target.h (struct process_stratum_target): Remove the target op.
3774 (class process_target): Add the target op.
3775 * target.cc (process_target::supports_multi_process): Define.
3776 (target_supports_multi_process): Update.
3777
3778 Update the derived classes and callers below.
3779
3780 * linux-low.cc (linux_target_ops): Update.
3781 (linux_supports_multi_process): Turn into ...
3782 (linux_process_target::supports_multi_process): ... this.
3783 * linux-low.h (class linux_process_target): Update.
3784 * lynx-low.cc (lynx_target_ops): Update.
3785 * nto-low.cc (nto_target_ops): Update.
3786 * win32-low.cc (win32_target_ops): Update.
3787
3788 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3789
3790 Turn process_stratum_target's supports_non_stop, async, and
3791 start_non_stop ops into methods of process_target.
3792
3793 * target.h (struct process_stratum_target): Remove the target ops.
3794 (class process_target): Add the target ops.
3795 (target_supports_non_stop): Update the macro.
3796 (target_async): Update the macro.
3797 (start_non_stop): Remove declaration.
3798 * target.cc (process_target::supports_non_stop): Define.
3799 (process_target::async): Define.
3800 (process_target::start_non_stop): Define.
3801 (start_non_stop): Remove.
3802
3803 Update the derived classes and callers below.
3804
3805 * server.cc (handle_qxfer_siginfo): Update.
3806 (handle_query): Update.
3807 * linux-low.cc (linux_target_ops): Update.
3808 (linux_supports_non_stop): Turn into ...
3809 (linux_process_target::supports_non_stop): ... this.
3810 (linux_async): Turn into ...
3811 (linux_process_target::async): ... this.
3812 (linux_start_non_stop): Turn into ...
3813 (linux_process_target::start_non_stop): ... this.
3814 * linux-low.h (class linux_process_target): Update.
3815 * lynx-low.cc (lynx_target_ops): Update.
3816 * nto-low.cc (nto_target_ops): Update.
3817 (nto_supports_non_stop): Remove; rely on the default behavior
3818 instead.
3819 * win32-low.cc (win32_target_ops): Update.
3820
3821 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3822
3823 Turn process_stratum_target's qxfer_siginfo op into a method of
3824 process_target.
3825
3826 * target.h (struct process_stratum_target): Remove the target op.
3827 (class process_target): Add the target op. Also add
3828 'supports_qxfer_siginfo'.
3829 * target.cc (process_target::qxfer_siginfo): Define.
3830 (process_target::supports_qxfer_siginfo): Define.
3831
3832 Update the derived classes and callers below.
3833
3834 * server.cc (handle_qxfer_siginfo): Update.
3835 (handle_query): Update.
3836 * linux-low.cc (linux_target_ops): Update.
3837 (linux_process_target::supports_qxfer_siginfo): Define.
3838 (linux_xfer_siginfo): Turn into ...
3839 (linux_process_target::qxfer_siginfo): ... this.
3840 * linux-low.h (class linux_process_target): Update.
3841 * lynx-low.cc (lynx_target_ops): Update.
3842 * nto-low.cc (nto_target_ops): Update.
3843 * win32-low.cc (win32_target_ops): Update.
3844
3845 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3846
3847 Turn process_stratum_target's qxfer_osdata op into a method of
3848 process_target.
3849
3850 * target.h (struct process_stratum_target): Remove the target op.
3851 (class process_target): Add the target op. Also add
3852 'supports_qxfer_osdata'.
3853 * target.cc (process_target::qxfer_osdata): Define.
3854 (process_target::supports_qxfer_osdata): Define.
3855
3856 Update the derived classes and callers below.
3857
3858 * server.cc (handle_qxfer_osdata): Update.
3859 (handle_query): Update.
3860 * linux-low.cc (linux_target_ops): Update.
3861 (linux_process_target::supports_qxfer_osdata): Define.
3862 (linux_qxfer_osdata): Turn into ...
3863 (linux_process_target::qxfer_osdata): ... this.
3864 * linux-low.h (class linux_process_target): Update.
3865 * lynx-low.cc (lynx_target_ops): Update.
3866 * nto-low.cc (nto_target_ops): Update.
3867 * win32-low.cc (win32_target_ops): Update.
3868
3869 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3870
3871 Turn process_stratum_target's hostio_last_error op into a
3872 method of process_target.
3873
3874 * target.h (struct process_stratum_target): Remove the target op.
3875 (class process_target): Add the target op.
3876 * target.cc: Add "hostio.h" to includes.
3877 (process_target::hostio_last_error): Define.
3878
3879 Update the derived classes and callers below.
3880
3881 * hostio.cc (hostio_error): Update.
3882 * linux-low.cc: Remove "hostio.h" from includes.
3883 (linux_target_ops): Update.
3884 * lynx-low.cc (lynx_target_ops): Update.
3885 * nto-low.cc (nto_target_ops): Update.
3886 * win32-low.h (class win32_process_target): Update.
3887 * win32-low.cc (win32_target_ops): Update.
3888 (wince_hostio_last_error): Turn into ...
3889 (win32_process_target::hostio_last_error): ... this.
3890
3891 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3892
3893 Turn process_stratum_target's get_tls_address op into a method of
3894 process_target.
3895
3896 * target.h (struct process_stratum_target): Remove the target op.
3897 (class process_target): Add the target op. Also add
3898 'supports_get_tls_address'.
3899 * target.cc (process_target::get_tls_address): Define.
3900 (process_target::supports_get_tls_address): Define.
3901
3902 Update the derived classes and callers below.
3903
3904 * server.cc (handle_query): Update.
3905 * linux-low.cc (linux_target_ops): Update.
3906 (linux_process_target::supports_get_tls_address): Define.
3907 (linux_process_target::get_tls_address): Define.
3908 * linux-low.h (class linux_process_target): Update.
3909 * lynx-low.cc (lynx_target_ops): Update.
3910 * nto-low.cc (nto_target_ops): Update.
3911 * win32-low.cc (win32_target_ops): Update.
3912
3913 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3914
3915 Turn process_stratum_target's read_offsets op into a method of
3916 process_target.
3917
3918 * target.h (struct process_stratum_target): Remove the target op.
3919 (class process_target): Add the target op. Also add
3920 'supports_read_offsets'.
3921 * target.cc (process_target::read_offsets): Define.
3922 (process_target::supports_read_offsets): Define.
3923
3924 Update the derived classes and callers below.
3925
3926 * server.cc (handle_query): Update.
3927 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3928 (linux_target_ops): Update.
3929 (linux_process_target::supports_read_offsets): Define.
3930 (linux_read_offsets): Turn into ...
3931 (linux_process_target::read_offsets): ... this.
3932 * linux-low.h (class linux_process_target): Update.
3933 * lynx-low.cc (lynx_target_ops): Update.
3934 * nto-low.cc (nto_target_ops): Update.
3935 * win32-low.cc (win32_target_ops): Update.
3936
3937 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3938
3939 Turn process_stratum_target's stopped_by_watchpoint and
3940 stopped_data_address ops into methods of process_target.
3941
3942 * target.h (struct process_stratum_target): Remove the target ops.
3943 (class process_target): Add the target ops.
3944 * target.cc (process_target::stopped_by_watchpoint): Define.
3945 (process_target::stopped_data_address): Define.
3946
3947 Update the derived classes and callers below.
3948
3949 * remote-utils.cc (prepare_resume_reply): Update.
3950 * linux-low.cc (linux_target_ops): Update.
3951 (linux_stopped_by_watchpoint): Turn into ...
3952 (linux_process_target::stopped_by_watchpoint): ... this.
3953 (linux_stopped_data_address): Turn into ...
3954 (linux_process_target::stopped_data_address): ... this.
3955 * linux-low.h (class linux_process_target): Update.
3956 * lynx-low.cc (lynx_target_ops): Update.
3957 * nto-low.cc (nto_target_ops): Update.
3958 (nto_stopped_by_watchpoint): Turn into ...
3959 (nto_process_target::stopped_by_watchpoint): ... this.
3960 (nto_stopped_data_address): Turn into ...
3961 (nto_process_target::stopped_data_address): ... this.
3962 * nto-low.h (class nto_process_target): Update.
3963 * win32-low.cc (win32_target_ops): Update.
3964 (win32_stopped_by_watchpoint): Turn into ...
3965 (win32_process_target::stopped_by_watchpoint): ... this.
3966 (win32_stopped_data_address): Turn into ...
3967 (win32_process_target::stopped_data_address): ... this.
3968 * win32-low.h (class win32_process_target): Update.
3969
3970 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3971
3972 Turn process_stratum_target's supports_hardware_single_step op into
3973 a method of process_target.
3974
3975 * target.h (struct process_stratum_target): Remove the target op.
3976 (class process_target): Add the target op.
3977 (target_supports_hardware_single_step): Update the macro.
3978 (target_can_do_hardware_single_step): Remove declaration.
3979 * target.cc (process_target::supports_hardware_single_step): Define.
3980 (target_can_do_hardware_single_step): Remove.
3981
3982 Update the derived classes and callers below.
3983
3984 * linux-low.h (class linux_process_target): Update.
3985 * linux-low.cc (linux_target_ops): Update.
3986 (linux_supports_hardware_single_step): Turn into ...
3987 (linux_process_target::supports_hardware_single_step): ... this.
3988 * lynx-low.h (class lynx_process_target): Update.
3989 * lynx-low.cc (lynx_target_ops): Update.
3990 (lynx_process_target::supports_hardware_single_step): Define.
3991 * nto-low.h (class nto_process_target): Update.
3992 * nto-low.cc (nto_target_ops): Update.
3993 (nto_process_target::supports_hardware_single_step): Define.
3994 * win32-low.h (class win32_process_target): Update.
3995 * win32-low.cc (win32_target_ops): Update.
3996 (win32_process_target::supports_hardware_single_step): Define.
3997
3998 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3999
4000 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
4001 ops into methods of process_target.
4002
4003 * target.h (struct process_stratum_target): Remove the target ops.
4004 (class process_target): Add the target ops.
4005 (target_stopped_by_hw_breakpoint): Update the macro.
4006 (target_supports_stopped_by_hw_breakpoint): Update the macro.
4007 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
4008 (process_target::supports_stopped_by_hw_breakpoint): Define.
4009
4010 Update the derived classes and callers below.
4011
4012 * linux-low.cc (linux_target_ops): Update.
4013 (linux_stopped_by_hw_breakpoint): Turn into ...
4014 (linux_process_target::stopped_by_hw_breakpoint): ... this.
4015 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
4016 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
4017 * linux-low.h (class linux_process_target): Update.
4018 * lynx-low.cc (lynx_target_ops): Update.
4019 * nto-low.cc (nto_target_ops): Update.
4020 * win32-low.cc (win32_target_ops): Update.
4021
4022 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4023
4024 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
4025 ops into methods of process_target.
4026
4027 * target.h (struct process_stratum_target): Remove the target ops.
4028 (class process_target): Add the target ops.
4029 (target_stopped_by_sw_breakpoint): Update the macro.
4030 (target_supports_stopped_by_sw_breakpoint): Update the macro.
4031 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
4032 (process_target::supports_stopped_by_sw_breakpoint): Define.
4033
4034 Update the derived classes and callers below.
4035
4036 * linux-low.cc (linux_target_ops): Update.
4037 (linux_stopped_by_sw_breakpoint): Turn into ...
4038 (linux_process_target::stopped_by_sw_breakpoint): ... this.
4039 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
4040 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
4041 * linux-low.h (class linux_process_target): Update.
4042 * lynx-low.cc (lynx_target_ops): Update.
4043 * nto-low.cc (nto_target_ops): Update.
4044 * win32-low.cc (win32_target_ops): Update.
4045
4046 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4047
4048 Turn process_stratum_target's insert_point and remove_point ops
4049 into methods of process_target.
4050
4051 * target.h (struct process_stratum_target): Remove the target ops.
4052 (class process_target): Add the target ops.
4053 * target.cc (process_target::insert_point): Define.
4054 (process_target::remove_point): Define.
4055
4056 Update the derived classes and callers below.
4057
4058 * mem-break.cc (set_raw_breakpoint_at): Update.
4059 (delete_raw_breakpoint): Update.
4060 (uninsert_raw_breakpoint): Update.
4061 (reinsert_raw_breakpoint): Update.
4062 * linux-low.cc (linux_target_ops): Update.
4063 (linux_insert_point): Turn into ...
4064 (linux_process_target::insert_point): ... this.
4065 (linux_remove_point): Turn into ...
4066 (linux_process_target::remove_point): ... this.
4067 * linux-low.h (class linux_process_target): Update.
4068 * lynx-low.cc (lynx_target_ops): Update.
4069 * nto-low.cc (nto_target_ops): Update.
4070 (nto_insert_point): Turn into ...
4071 (nto_process_target::insert_point): ... this.
4072 (nto_remove_point): Turn into ...
4073 (nto_process_target::remove_point): ... this.
4074 * nto-low.h (class nto_process_target): Update.
4075 * win32-low.cc (win32_target_ops): Update.
4076 (win32_insert_point): Turn into ...
4077 (win32_process_target::insert_point): ... this.
4078 (win32_remove_point): Turn into ...
4079 (win32_process_target::remove_point): ... this.
4080 * win32-low.h (class win32_process_target): Update.
4081
4082 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4083
4084 Turn process_stratum_target's supports_z_point_type op into a
4085 method of process_target.
4086
4087 * target.h (struct process_stratum_target): Remove the target op.
4088 (class process_target): Add the target op.
4089 * target.cc (process_target::supports_z_point_type): Define.
4090
4091 Update the derived classes and callers below.
4092
4093 * mem-break.cc (z_type_supported): Update.
4094 * linux-low.cc (linux_target_ops): Update.
4095 (linux_supports_z_point_type): Turn into ...
4096 (linux_process_target::supports_z_point_type): ... this.
4097 * linux-low.h (class linux_process_target): Update.
4098 * lynx-low.cc (lynx_target_ops): Update.
4099 * nto-low.cc (nto_target_ops): Update.
4100 (nto_supports_z_point_type): Turn into ...
4101 (nto_process_target::supports_z_point_type): ... this.
4102 * nto-low.h (class nto_process_target): Update.
4103 * win32-low.cc (win32_target_ops): Update.
4104 (win32_supports_z_point_type): Turn into ...
4105 (win32_process_target::supports_z_point_type): ... this.
4106 * win32-low.h (class win32_process_target): Update.
4107
4108 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4109
4110 Turn process_stratum_target's read_auxv op into a method of
4111 process_target.
4112
4113 * target.h (class process_stratum_target): Remove the target op.
4114 (struct process_target): Add the target op. Also add
4115 'supports_read_auxv'.
4116 * target.cc (process_target::read_auxv): Define.
4117 (process_target::supports_read_auxv): Define.
4118
4119 Update the derived classes and callers below.
4120
4121 * server.cc (handle_qxfer_auxv): Update.
4122 (handle_query): Update.
4123 * linux-low.cc (linux_target_ops): Update.
4124 (linux_process_target::supports_read_auxv): Define.
4125 (linux_read_auxv): Turn into ...
4126 (linux_process_target::read_auxv): ... this.
4127 * linux-low.h (class linux_process_target): Update.
4128 * lynx-low.cc (lynx_target_ops): Update.
4129 * nto-low.cc (nto_target_ops): Update.
4130 (nto_process_target::supports_read_auxv): Define.
4131 (nto_read_auxv): Turn into ...
4132 (nto_process_target::read_auxv): ... this.
4133 * nto-low.h (class nto_process_target): Update.
4134 * win32-low.cc (win32_target_ops): Update.
4135
4136 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4137
4138 Turn process_stratum_target's request_interrupt op into a method of
4139 process_target.
4140
4141 * target.h (struct process_stratum_target): Remove the target op.
4142 (class process_target): Add the target op.
4143
4144 Update the derived classes and callers below.
4145
4146 * remote-utils.cc (putpkt_binary_1): Update.
4147 (input_interrupt): Update.
4148 (getpkt): Update.
4149 * server.cc (handle_v_requests): Update.
4150 * linux-low.cc (linux_target_ops): Update.
4151 (linux_request_interrupt): Turn into ...
4152 (linux_process_target::request_interrupt): ... this.
4153 * linux-low.h (class linux_process_target): Update.
4154 * lynx-low.cc (lynx_target_ops): Update.
4155 (lynx_request_interrupt): Turn into ...
4156 (lynx_process_target::request_interrupt): ... this.
4157 * lynx-low.h (class lynx_process_target): Update.
4158 * nto-low.cc (nto_target_ops): Update.
4159 (nto_request_interrupt): Turn into ...
4160 (nto_process_target::request_interrupt): ... this.
4161 * nto-low.h (class nto_process_target): Update.
4162 * win32-low.cc (win32_target_ops): Update.
4163 (win32_request_interrupt): Turn into ...
4164 (win32_process_target::request_interrupt): ... this.
4165 * win32-low.h (class win32_process_target): Update.
4166
4167 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4168
4169 Turn process_stratum_target's look_up_symbols op into a method of
4170 process_target.
4171
4172 * target.h (struct process_stratum_target): Remove the target op.
4173 (class process_target): Add the target op.
4174 * target.cc (process_target::look_up_symbols): Define.
4175
4176 Update the derived classes and callers below.
4177
4178 * server.cc (handle_query): Update.
4179 * linux-low.cc (linux_target_ops): Update.
4180 (linux_look_up_symbols): Turn into ...
4181 (linux_process_target::look_up_symbols): ... this.
4182 * linux-low.h (class linux_process_target): Update.
4183 * lynx-low.cc (lynx_target_ops): Update.
4184 * nto-low.cc (nto_target_ops): Update.
4185 * win32-low.cc (win32_target_ops): Update.
4186
4187 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4188
4189 Turn process_stratum_target's read_memory and write_memory
4190 ops into methods of process_target.
4191
4192 * target.h (struct process_stratum_target): Remove the target ops.
4193 (class process_target): Add the target ops.
4194
4195 Update the derived classes and callers below.
4196
4197 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
4198 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
4199 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
4200 (arm_get_syscall_trapinfo): Update.
4201 * linux-cris-low.cc (cris_breakpoint_at): Update.
4202 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
4203 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
4204 * linux-mips-low.cc (mips_breakpoint_at): Update.
4205 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
4206 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
4207 * linux-sh-low.cc (sh_breakpoint_at): Update.
4208 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
4209 (sparc_store_gregset_from_stack): Update.
4210 (sparc_breakpoint_at): Update.
4211 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
4212 * linux-tile-low.cc (tile_breakpoint_at): Update.
4213 * linux-x86-low.cc (x86_breakpoint_at): Update.
4214 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
4215 * mem-brea.cc (insert_memory_breakpoint): Update.
4216 (validate_inserted_breakpoint): Update.
4217 * target.cc (read_inferior_memory): Update.
4218 (target_write_memory): Update.
4219 * linux-low.cc (linux_target_ops): Update.
4220 (linux_read_memory): Make a wrapper around the read_memory target
4221 op call.
4222 (linux_process_target::read_memory): Rename from linux_read_memory.
4223 (linux_write_memory): Turn into ...
4224 (linux_process_target::write_memory): ... this.
4225 * linux-low.h (class linux_process_target): Update.
4226 * lynx-low.cc (lynx_target_ops): Update.
4227 (lynx_read_memory): Turn into ...
4228 (lynx_process_target::read_memory): ... this.
4229 (lynx_write_memory): Turn into ...
4230 (lynx_process_target::write_memory): ... this.
4231 * lynx-low.h (class lynx_process_target): Update.
4232 * nto-low.cc (nto_target_ops): Update.
4233 (nto_read_memory): Turn into ...
4234 (nto_process_target::read_memory): ... this.
4235 (nto_write_memory): Turn into ...
4236 (nto_process_target::write_memory): ... this.
4237 * nto-low.h (class nto_process_target): Update.
4238 * win32-low.cc (win32_target_ops): Update.
4239 (win32_read_inferior_memory): Turn into ...
4240 (win32_process_target::read_memory): ... this.
4241 (win32_write_inferior_memory): Turn into ...
4242 (win32_process_target::write_memory): ... this.
4243 * win32-low.h (class win32_process_target): Update.
4244
4245 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4246
4247 Turn process_stratum_target's prepare_to_access_memory and
4248 done_accessing_memory ops into methods of process_target.
4249
4250 * target.h (struct process_stratum_target): Remove the target ops.
4251 (class process_target): Add the target ops.
4252 * target.cc (process_target::prepare_to_access_memory): Define.
4253 (process_target::done_accessing_memory): Define.
4254 (prepare_to_access_memory): Update.
4255 (done_accessing_memory): Update.
4256
4257 Update the derived classes and callers below.
4258
4259 * linux-low.cc (linux_target_ops): Update.
4260 (linux_prepare_to_access_memory): Turn into ...
4261 (linux_process_target::prepare_to_access_memory): ... this.
4262 (linux_done_accessing_memory): Turn into ...
4263 (linux_process_target::done_accessing_memory): ... this.
4264 * linux-low.h (class linux_process_target): Update.
4265 * lynx-low.cc (lynx_target_ops): Update.
4266 * nto-low.cc (nto_target_ops): Update.
4267 * win32-low.cc (win32_target_ops): Update.
4268
4269 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4270
4271 Turn process_stratum_target's fetch_registers and store_registers
4272 ops into methods of process_target.
4273
4274 * target.h (struct process_stratum_target): Remove the target ops.
4275 (class process_target): Add the target ops.
4276 (fetch_inferior_registers): Update the macro.
4277 (store_inferior_registers): Update the macro.
4278
4279 Update the derived classes and callers below.
4280
4281 * linux-low.cc (linux_target_ops): Update.
4282 (linux_fetch_registers): Turn into ...
4283 (linux_process_target::fetch_registers): ... this.
4284 (linux_store_registers): Turn into ...
4285 (linux_process_target::store_registers): ... this.
4286 * linux-low.h (class linux_process_target): Update.
4287 * lynx-low.cc (lynx_target_ops): Update.
4288 (lynx_fetch_registers): Turn into ...
4289 (lynx_process_target::fetch_registers): ... this.
4290 (lynx_store_registers): Turn into ...
4291 (lynx_process_target::store_registers): ... this.
4292 * lynx-low.h (class lynx_process_target): Update.
4293 * nto-low.cc (nto_target_ops): Update.
4294 (nto_fetch_registers): Turn into ...
4295 (nto_process_target::fetch_registers): ... this.
4296 (nto_store_registers): Turn into ...
4297 (nto_process_target::store_registers): ... this.
4298 * nto-low.h (class nto_process_target): Update.
4299 * win32-low.cc (win32_target_ops): Update.
4300 (win32_fetch_inferior_registers): Turn into ...
4301 (win32_process_target::fetch_registers): ... this.
4302 (win32_store_inferior_registers): Turn into ...
4303 (win32_process_target::store_registers): ... this.
4304 * win32-low.h (class win32_process_target): Update.
4305
4306 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4307
4308 Turn process_stratum_target's wait op into a method of
4309 process_target.
4310
4311 * target.h (struct process_stratum_target): Remove the target op.
4312 (class process_target): Add the target op.
4313
4314 Update the derived classes and callers below.
4315
4316 * target.cc (target_wait): Update.
4317 * linux-low.cc (linux_target_ops): Update.
4318 (linux_wait): Turn into ...
4319 (linux_process_target::wait): ... this.
4320 * linux-low.h (class linux_process_target): Update.
4321 * lynx-low.cc (lynx_target_ops): Update.
4322 (lynx_wait): Turn into ...
4323 (lynx_process_target::wait): ... this.
4324 * lynx-low.h (class lynx_process_target): Update.
4325 * nto-low.cc (nto_target_ops): Update.
4326 (nto_wait): Turn into ...
4327 (nto_process_target::wait): ... this.
4328 * nto-low.h (class nto_process_target): Update.
4329 * win32-low.cc (win32_target_ops): Update.
4330 (win32_wait): Turn into ...
4331 (win32_process_target::wait): ... this.
4332 (do_initial_child_stuff): Update.
4333 * win32-low.h (class win32_process_target): Update.
4334
4335 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4336
4337 Turn process_stratum_target's resume op into a method of
4338 process_target.
4339
4340 * target.h (struct process_stratum_target): Remove the target op.
4341 (class process_target): Add the target op.
4342
4343 Update the derived classes and callers below.
4344
4345 * server.cc (resume): Update.
4346 * target.cc (target_stop_and_wait): Update.
4347 (target_continue_no_signal): Update.
4348 (target_continue): Update.
4349 * linux-low.cc (linux_target_ops): Update.
4350 (linux_resume): Turn into ...
4351 (linux_process_target::resume): ... this.
4352 * linux-low.h (class linux_process_target): Update.
4353 * lynx-low.cc (lynx_target_ops): Update.
4354 (lynx_resume): Turn into ...
4355 (lynx_process_target::resume): ... this.
4356 * lynx-low.h (class lynx_process_target): Update.
4357 * nto-low.cc (nto_target_ops): Update.
4358 (nto_resume): Turn into ...
4359 (nto_process_target::resume): ... this.
4360 * nto-low.h (class nto_process_target): Update.
4361 * win32-low.cc (win32_target_ops): Update.
4362 (win32_resume): Turn into ...
4363 (win32_process_target::resume): ... this.
4364 (win32_process_target::detach): Update.
4365 (do_initial_child_stuff): Update.
4366 * win32-low.h (class win32_process_target): Update.
4367
4368 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4369
4370 Turn process_stratum_target's thread_alive op into a method of
4371 process_target.
4372
4373 * target.h (struct process_stratum_target): Remove the target op.
4374 (class process_target): Add the target op.
4375 (mythread_alive): Update the macro.
4376
4377 Update the derived classes and callers below.
4378
4379 * linux-low.cc (linux_target_ops): Update.
4380 (linux_thread_alive): Turn into ...
4381 (linux_process_target::thread_alive): ... this.
4382 (wait_for_sigstop): Update.
4383 * linux-low.h (class linux_process_target): Update.
4384 * lynx-low.cc (lynx_target_ops): Update.
4385 (lynx_thread_alive): Turn into ...
4386 (lynx_process_target::thread_alive): ... this.
4387 * lynx-low.h (class lynx_process_target): Update.
4388 * nto-low.cc (nto_target_ops): Update.
4389 (nto_thread_alive): Turn into ...
4390 (nto_process_target::thread_alive): ... this.
4391 * nto-low.h (class nto_process_target): Update.
4392 * win32-low.cc (win32_target_ops): Update.
4393 (win32_thread_alive): Turn into ...
4394 (win32_process_target::thread_alive): ... this.
4395 * win32-low.h (class win32_process_target): Update.
4396
4397 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4398
4399 Turn process_stratum_target's join op into a method of
4400 process_target.
4401
4402 * target.h (struct process_stratum_target): Remove the target op.
4403 (class process_target): Add the target op.
4404 (join_inferior): Update the macro.
4405
4406 Update the derived classes and callers below.
4407
4408 * linux-low.cc (linux_target_ops): Update.
4409 (linux_join): Turn into ...
4410 (linux_process_target::join): ... this.
4411 * linux-low.h (class linux_process_target): Update.
4412 * lynx-low.cc (lynx_target_ops): Update.
4413 (lynx_join): Turn into ...
4414 (lynx_process_target::join): ... this.
4415 * lynx-low.h (class lynx_process_target): Update.
4416 * nto-low.cc (nto_target_ops): Update.
4417 (nto_process_target::join): Define.
4418 * nto-low.h (class nto_process_target): Update.
4419 * win32-low.cc (win32_target_ops): Update.
4420 (win32_join): Turn into ...
4421 (win32_process_target::join): ... this.
4422 * win32-low.h (class win32_process_target): Update.
4423
4424 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4425
4426 Turn process_stratum_target's mourn op into a method of
4427 process_target.
4428
4429 * target.h (struct process_stratum_target): Remove the target op.
4430 (class process_target): Add the target op.
4431
4432 Update the derived classes and callers below.
4433
4434 * target.cc (target_mourn_inferior): Update.
4435 * linux-low.cc (linux_target_ops): Update.
4436 (linux_mourn): Turn into ...
4437 (linux_process_target::mourn): ... this.
4438 (handle_extended_wait): Update.
4439 (linux_process_target::kill): Update.
4440 (linux_process_target::detach): Update.
4441 * linux-low.h (class linux_process_target): Update.
4442 * lynx-low.cc (lynx_target_ops): Update.
4443 (lynx_mourn): Turn into ...
4444 (lynx_process_target::mourn): ... this.
4445 * lynx-low.h (class lynx_process_target): Update.
4446 * nto-low.cc (nto_target_ops): Update.
4447 (nto_mourn): Turn into ...
4448 (nto_process_target::mourn): ... this.
4449 * nto-low.h (class nto_process_target): Update.
4450 * win32-low.cc (win32_target_ops): Update.
4451 (win32_mourn): Turn into ...
4452 (win32_process_target::mourn): ... this.
4453 * win32-low.h (class win32_process_target): Update.
4454
4455 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4456
4457 Turn process_stratum_target's detach op into a method of
4458 process_target.
4459
4460 * target.h (struct process_stratum_target): Remove the target op.
4461 (class process_target): Add the target op.
4462 (detach_inferior): Update the macro.
4463
4464 Update the derived classes and callers below.
4465
4466 * linux-low.cc (linux_target_ops): Update.
4467 (linux_detach): Turn into ...
4468 (linux_process_target::detach): ... this.
4469 * linux-low.h (class linux_process_target): Update.
4470 * lynx-low.cc (lynx_target_ops): Update.
4471 (lynx_detach): Turn into ...
4472 (lynx_process_target::detach): ... this.
4473 * lynx-low.h (class lynx_process_target): Update.
4474 * nto-low.cc (nto_target_ops): Update.
4475 (nto_detach): Turn into ...
4476 (nto_process_target::detach): ... this.
4477 * nto-low.h (class nto_process_target): Update.
4478 * win32-low.cc (win32_target_ops): Update.
4479 (win32_detach): Turn into ...
4480 (win32_process_target::detach): ... this.
4481 * win32-low.h (class win32_process_target): Update.
4482
4483 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4484
4485 Turn process_stratum_target's kill op into a method of
4486 process_target.
4487
4488 * target.h (struct process_stratum_target): Remove the target op.
4489 (class process_target): Add the target op.
4490
4491 Update the derived classes and callers below.
4492
4493 * target.cc (kill_inferior): Update.
4494 * linux-low.cc (linux_target_ops): Update.
4495 (linux_kill): Turn into ...
4496 (linux_process_target::kill): ... this.
4497 * linux-low.h (class linux_process_target): Update.
4498 * lynx-low.cc (lynx_target_ops): Update.
4499 (lynx_kill): Turn into ...
4500 (lynx_process_target::kill): ... this.
4501 * lynx-low.h (class lynx_process_target): Update.
4502 * nto-low.cc (nto_target_ops): Update.
4503 (nto_kill): Turn into ...
4504 (nto_process_target::kill): ... this.
4505 * nto-low.h (class nto_process_target): Update.
4506 * win32-low.cc (win32_target_ops): Update.
4507 (win32_kill): Turn into ...
4508 (win32_process_target::kill): ... this.
4509 * win32-low.h (class win32_process_target): Update.
4510
4511 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4512
4513 Turn process_stratum_target's attach op into a method of
4514 process_target.
4515
4516 * target.h (struct process_stratum_target): Remove the target op.
4517 (class process_target): Add the target op.
4518 (myattach): Update the macro.
4519
4520 Update the derived classes and callers below.
4521
4522 * linux-low.cc (linux_target_ops): Update.
4523 (linux_attach): Turn into ...
4524 (linux_process_target::attach): ... this.
4525 * linux-low.h (class linux_process_target): Update.
4526 * lynx-low.cc (lynx_target_ops): Update.
4527 (lynx_attach): Turn into ...
4528 (lynx_process_target::attach): ... this.
4529 * lynx-low.h (class lynx_process_target): Update.
4530 * nto-low.cc (nto_target_ops): Update.
4531 (nto_attach): Turn into ...
4532 (nto_process_target::attach): ... this.
4533 * nto-low.h (class nto_process_target): Update.
4534 * win32-low.cc (win32_target_ops): Update.
4535 (win32_attach): Turn into ...
4536 (win32_process_target::attach): ... this.
4537 * win32-low.h (class win32_process_target): Update.
4538
4539 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4540
4541 Turn process_stratum_target's post_create_inferior op into a method
4542 of process_target.
4543
4544 * target.h (struct process_stratum_target): Remove the target op.
4545 (class process_target): Add the target op.
4546 (target_post_create_inferior): Update the macro.
4547 * target.cc (process_target::post_create_inferior): Define.
4548
4549 Update the derived classes and callers below.
4550
4551 * linux-low.cc (linux_target_ops): Update.
4552 (linux_post_create_inferior): Turn into ...
4553 (linux_process_target::post_create_inferior): ... this.
4554 * linux-low.h (class linux_process_target): Update.
4555 * lynx-low.cc (lynx_target_ops): Update.
4556 * nto-low.cc (nto_target_ops): Update.
4557 * win32-low.cc (win32_target_ops): Update.
4558
4559 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4560
4561 Turn process_stratum_target's create_inferior op into a method of
4562 process_target.
4563
4564 * target.h (struct process_stratum_target): Remove the target op.
4565 (class process_target): Add the target op.
4566 (create_inferior): Rename the macro to ...
4567 (target_create_inferior): ... this.
4568
4569 Update the derived classes and callers below.
4570
4571 * server.cc (handle_v_run): Update.
4572 (captured_main): Update.
4573 (process_serial_event): Update.
4574 * linux-low.cc (linux_target_ops): Update.
4575 (linux_create_inferior): Turn into ...
4576 (linux_process_target::create_inferior): ... this.
4577 * linux-low.h (class linux_process_target): Update.
4578 * lynx-low.cc (lynx_target_ops): Update.
4579 (lynx_create_inferior): Turn into ...
4580 (lynx_process_target::create_inferior): ... this.
4581 * lynx-low.h (class lynx_process_target): Update.
4582 * nto-low.cc (nto_target_ops): Update.
4583 (nto_create_inferior): Turn into ...
4584 (nto_process_target::create_inferior): ... this.
4585 * nto-low.h (class nto_process_target): Update.
4586 * win32-low.cc (win32_target_ops): Update.
4587 (win32_create_inferior): Turn into ...
4588 (win32_process_target::create_inferior): ... this.
4589 * win32-low.h (class win32_process_target): Update.
4590
4591 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4592
4593 * target.h (class process_target): New class definition.
4594 (struct process_stratum_target) <pt>: New field with type
4595 'process_target*'.
4596 * linux-low.h (class linux_process_target): Define as a derived
4597 class of 'process_target'.
4598 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4599 as the 'pt' field.
4600 * lynx-low.h (class lynx_process_target): Define as a derived
4601 class of 'process_target'.
4602 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4603 as the 'pt' field.
4604 * nto-low.h (class nto_process_target): Define as a derived
4605 class of 'process_target'.
4606 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4607 as the 'pt' field.
4608 * win32-low.h (class win32_process_target): Define as a derived
4609 class of 'process_target'.
4610 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4611 as the 'pt' field.
4612
4613 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4614
4615 * configure: Regenerate.
4616
4617 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4618 Andrew Burgess <andrew.burgess@embecosm.com>
4619
4620 * linux-riscv-low.cc: New file.
4621 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4622 and nat/riscv-linux-tdesc.c.
4623 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4624 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4625 Define.
4626
4627 2020-02-14 Tom Tromey <tom@tromey.com>
4628
4629 * acinclude.m4: Don't include acx_configure_dir.m4.
4630 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4631 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4632 (all, install-only, uninstall, clean-info, clean)
4633 (maintainer-clean): Don't recurse.
4634 (subdir_do, all-lib): Remove.
4635 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4636 (GNULIB_H): Remove.
4637 (generated_files): Update.
4638 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4639 * configure: Rebuild.
4640 * configure.ac: Don't configure gnulib or libiberty.
4641 (GNULIB): Update.
4642
4643 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4644
4645 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4646 preparing the command line for CreateProcess.
4647 (win32_create_inferior): Reflect the program name in debugging
4648 output that shows the process and its command line.
4649
4650 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4651
4652 * Makefile.in: Rename source files from .c to .cc.
4653 * %.c: Rename to %.cc.
4654 * configure.ac: Rename server.c to server.cc.
4655 * configure: Re-generate.
4656
4657 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4658
4659 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4660
4661 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4662
4663 * win32-low.c (win32_create_inferior): Set signal_pid.
4664
4665 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4666 Pedro Alves <palves@redhat.com>
4667
4668 Skip building gdbserver in a cross-configuration.
4669 * configure.srv: Set $gdbserver_host depending on whether $target
4670 is $host. Use $gdbserver_host instead of $host.
4671
4672 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4673
4674 * configure: Re-generate.
4675
4676 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4677
4678 * configure: Re-generate.
4679
4680 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4681
4682 * acinclude.m4: Update warning.m4 path.
4683
4684 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4685
4686 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4687 (handle_exception): Set siginfo_er.
4688 (win32_xfer_siginfo): New function.
4689
4690 2020-02-07 Tom Tromey <tom@tromey.com>
4691 Pedro Alves <palves@redhat.com>
4692
4693 * README: Update build documentation.
4694 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4695 host, not target.
4696 * configure.ac: Update paths.
4697 * configure: Rebuild.
4698 * acinclude.m4: Update paths.
4699 * Makefile.in: Update include paths.
4700 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4701 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4702 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4703 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4704 (%-generated.c): Update paths.
4705 * Move entire directory from ../gdb/gdbserver.
4706
4707 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4708
4709 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4710
4711 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4712
4713 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4714 assignment instead of srv_linux_obj.
4715
4716 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4717
4718 * server.c (handle_qxfer_libraries): Write segment-address with
4719 paddress.
4720
4721 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4722
4723 * Makefile.in (install-strip): New target.
4724 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4725 * aclocal.m4: Regenerate.
4726 * configure: Regenerate.
4727 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4728
4729 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4730
4731 * Makefile.in (SFILES): Adjust paths to point to real files.
4732 (OBS): Move waitstatus.o to target/waitstatus.o.
4733 (TAGS): Transform paths appropriately.
4734 (%.o): Rename to...
4735 (nat/%.o): ... this pattern rule.
4736 (%.o): Rename to...
4737 (target/%.o): ... this pattern rule.
4738 * configure.srv: Adjust paths throughout to include nat/ prefix
4739 with the revant files.
4740 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4741 * configure: Regenerate.
4742
4743 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4744
4745 * Makefile.in (TAGS): Remove config files from the recipe.
4746
4747 2020-01-14 Tom Tromey <tom@tromey.com>
4748
4749 * configure: Rebuild.
4750 * configure.ac: Remove any checks that were added to common.m4.
4751 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4752 lib-link.m4.
4753
4754 2020-01-14 Tom Tromey <tom@tromey.com>
4755
4756 * server.h: Include config.h.
4757 * gdbreplay.c: Include config.h.
4758 * configure: Rebuild.
4759 * configure.ac: Don't source common.host.
4760 * acinclude.m4: Update path.
4761 * Makefile.in (INCSUPPORT): New variable.
4762 (INCLUDE_CFLAGS): Add INCSUPPORT.
4763 (SFILES): Update paths.
4764 (version-generated.c): Update path to create-version.sh.
4765 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4766
4767 2020-01-14 Tom Tromey <tom@tromey.com>
4768
4769 * configure.ac (LIBS): Use WIN32APILIBS.
4770 (USE_WIN32API): Don't define.
4771 * configure: Rebuild.
4772
4773 2020-01-14 Tom Tromey <tom@tromey.com>
4774
4775 * configure: Rebuild.
4776
4777 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4778
4779 * Makefile.in (%-generated.c): Remove rule for files from
4780 regformats/i386.
4781
4782 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4783
4784 * configure: Re-generate.
4785
4786 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4787
4788 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4789 Define to static.
4790 * tracepoint.c (stop_tracing, flush_trace_buffer,
4791 about_to_request_buffer_space, get_trace_state_variable_value,
4792 set_trace_state_variable_value, gdb_collect): Add declaration.
4793
4794 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4795
4796 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4797 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4798 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4799 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4800 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4801 static.
4802
4803 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4804
4805 * inferiors.c: Include gdbsupport/common-inferior.h.
4806
4807 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4808
4809 * hostio-errno.c: Include hostio.h.
4810
4811 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4812
4813 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4814 prerequisite.
4815
4816 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4817
4818 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4819 * linux-arm-tdesc.h: Include arch/arm.h.
4820
4821 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4822
4823 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4824
4825 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4826
4827 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4828 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4829
4830 2020-01-10 Pedro Alves <palves@redhat.com>
4831
4832 * fork-child.c (post_fork_inferior): Pass target down to
4833 startup_inferior.
4834 * inferiors.c (switch_to_thread): Add process_stratum_target
4835 parameter.
4836 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4837 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4838 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4839 * remote-utils.c (prepare_resume_reply): Pass the target to
4840 switch_to_thread.
4841 * target.c (the_target): Now a process_stratum_target.
4842 (done_accessing_memory): Pass the target to switch_to_thread.
4843 (set_target_ops): Ajust to use process_stratum_target.
4844 * target.h (struct target_ops): Rename to ...
4845 (struct process_stratum_target): ... this.
4846 (the_target, set_target_ops): Adjust.
4847 (prepare_to_access_memory): Adjust comment.
4848 * win32-low.c (child_xfer_memory): Adjust to use
4849 process_stratum_target.
4850 (win32_target_ops): Now a process_stratum_target.
4851
4852 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4853 Pedro Alves <palves@redhat.com>
4854
4855 * win32-low.c (get_child_debug_event): Extract the fatal exception
4856 from the exit status and convert to the equivalent Posix signal
4857 number.
4858 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4859 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4860
4861 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4862
4863 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4864
4865 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4866
4867 * server.c (gdbserver_version): Change copyright year to 2020.
4868 * gdbreplay.c (gdbreplay_version): Likewise.
4869
4870 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4871
4872 * configure: Regenerate.
4873 * configure.ac: Quote variable arguments of test.
4874
4875 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4876
4877 * Makefile.in: Fix build with GNU Make 3.81
4878
4879 2019-12-16 Tom Tromey <tromey@adacore.com>
4880
4881 * server.c (get_exec_file): Constify result.
4882
4883 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4884
4885 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4886 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4887 * config.in: Regenerate.
4888 * configure: Regenerate.
4889 * configure.ac: Don't check for strerror.
4890 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4891 Call safe_strerror instead of strerror.
4892 * server.h (strerror): Remove this now-unnecessary declaration.
4893 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4894 strerror.
4895 (gdb_agent_helper_thread): Likewise.
4896 * utils.c (perror_with_name): Likewise.
4897
4898 2019-11-26 Tom Tromey <tom@tromey.com>
4899
4900 * configure, config.in: Rebuild.
4901
4902 2019-11-26 Tom Tromey <tom@tromey.com>
4903
4904 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4905 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4906 gdb_sigmask.
4907 * configure, config.in: Rebuild.
4908
4909 2019-11-26 Tom Tromey <tom@tromey.com>
4910
4911 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4912 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4913 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4914 * acinclude.m4: Include ax_pthread.m4.
4915 * config.in, configure: Rebuild.
4916
4917 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4918
4919 * debug.c (debug_set_output): Call safe_strerror instead of
4920 strerror.
4921 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4922 (linux_kill_one_lwp): Likewise.
4923 (linux_detach_one_lwp): Likewise.
4924 (linux_wait_for_event_filtered): Likewise.
4925 (store_register): Likewise.
4926 * lynx-low.c (lynx_attach): Likewise.
4927 * mem-break.c (insert_memory_breakpoint): Likewise.
4928 (remove_memory_breakpoint): Likewise.
4929 (delete_fast_tracepoint_jump): Likewise.
4930 (set_fast_tracepoint_jump): Likewise.
4931 (uninsert_fast_tracepoint_jumps_at): Likewise.
4932 (reinsert_fast_tracepoint_jumps_at): Likewise.
4933 * nto-low.c (nto_xfer_memory): Likewise.
4934 (nto_resume): Likewise.
4935
4936 2019-11-20 Luis Machado <luis.machado@linaro.org>
4937
4938 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4939 instead of register count.
4940 * tdesc.c (tdesc_contains_feature): New function.
4941 * tdesc.h (tdesc_contains_feature): New prototype.
4942
4943 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4944
4945 * Makefile.in: Add safe-strerror.c.
4946 * configure: Regenerate.
4947 * configure.ac: Don't source common.host.
4948
4949 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4950
4951 * config.in: Regenerate.
4952 * configure: Regenerate.
4953
4954 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4955
4956 * ax.c (ax_printf): Handle size_t_arg.
4957
4958 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4959
4960 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4961 * mi/mi-main.c (output_cores): Likewise.
4962 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4963 (linux_xfer_osdata_modules): Likewise.
4964 * remote.c (register_remote_support_xml): Likewise.
4965 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4966 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4967
4968 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4969
4970 * configure: Regenerate.
4971 * configure.ac: Remove check for strerror_r.
4972
4973 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4974
4975 * config.in: Regenerate.
4976 * configure: Regenerate.
4977 * configure.ac: Also check for strerror_r.
4978
4979 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4980
4981 * ax.h (debug_agent): Remove duplicate declaration.
4982
4983 2019-10-26 Tom de Vries <tdevries@suse.de>
4984
4985 * linux-aarch64-low.c: Fix typos in comments.
4986 * linux-arm-low.c: Same.
4987 * linux-low.c: Same.
4988 * linux-ppc-low.c: Same.
4989 * proc-service.c: Same.
4990 * regcache.h: Same.
4991 * server.c: Same.
4992 * tracepoint.c: Same.
4993 * win32-low.c: Same.
4994
4995 2019-10-25 Tom Tromey <tromey@adacore.com>
4996
4997 * utils.c (xstrdup): Remove.
4998
4999 2019-10-23 Tom Tromey <tom@tromey.com>
5000
5001 * configure, config.in: Rebuild.
5002
5003 2019-10-23 Tom Tromey <tom@tromey.com>
5004
5005 * configure: Rebuild.
5006 * acinclude.m4: Use m4_include, not sinclude.
5007
5008 2019-10-17 Tom Tromey <tromey@adacore.com>
5009
5010 * configure: Rebuild.
5011 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
5012 in AC_CONFIG_FILES invocation.
5013 * Makefile.in (stamp-h, Makefile): Use new-style config.status
5014 invocation.
5015
5016 2019-10-16 Christian Biesinger <cbiesinger@google.com>
5017
5018 * server.c: Include xml-builtin.h.
5019 (get_xml_features): Don't declare xml_builtins here.
5020
5021 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
5022
5023 * Makefile.in: Remove references to vec-ipa.o.
5024
5025 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
5026
5027 * Makefile.in: Remove references to vec.c.
5028
5029 2019-10-02 Christian Biesinger <cbiesinger@google.com>
5030
5031 * server.c (server_waiting): Change to bool.
5032 (extended_protocol): Likewise.
5033 (response_needed): Likewise.
5034 (exit_requested): Likewise.
5035 (run_once): Likewise.
5036 (report_no_resumed): Likewise.
5037 (non_stop): Likewise.
5038 (disable_packet_vCont): Likewise.
5039 (disable_packet_Tthread): Likewise.
5040 (disable_packet_qC): Likewise.
5041 (disable_packet_qfThreadInfo): Likewise.
5042 (handle_general_set): Update.
5043 (handle_detach): Update.
5044 (handle_monitor_command): Update.
5045 (handle_query): Update.
5046 (captured_main): Update.
5047 (process_serial_event): Update.
5048 * server.h (server_waiting): Change to bool.
5049 (disable_packet_vCont): Likewise.
5050 (disable_packet_Tthread): Likewise.
5051 (disable_packet_qC): Likewise.
5052 (disable_packet_qfThreadInfo): Likewise.
5053 (run_once): Likewise.
5054 (non_stop): Likewise.
5055 * target.c (target_stop_and_wait): Update.
5056
5057 2019-10-02 Tom Tromey <tromey@adacore.com>
5058
5059 * Makefile.in (SFILES): Add common-inferior.c.
5060 (OBS): Add common-inferior.o.
5061 * server.c (startup_with_shell): Don't define.
5062
5063 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
5064
5065 * linux-low.c (linux_low_read_btrace): Update for change to
5066 std::vector.
5067
5068 2019-09-20 Christian Biesinger <cbiesinger@google.com>
5069
5070 * debug.c (debug_threads): Remove comment in favor of the header.
5071 * debug.h (using_threads): Add declaration.
5072 (debug_threads): Add comment.
5073 * linux-aarch64-low.c: Include debug.h and remove declaration of
5074 debug_threads.
5075 * nto-low.c: Likewise.
5076 * remote-utils.c: Likewise.
5077 * thread-db.c: Likewise.
5078
5079 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
5080
5081 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
5082 and powerpc-cell64l-ipa.o.
5083 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
5084 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
5085 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
5086 (spu*-*-*): Remove.
5087
5088 * spu-low.c: Remove file.
5089
5090 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
5091 (parse_spufs_run): Remove.
5092 (ppc_get_pc): Remove Cell/B.E. support.
5093 (ppc_set_pc): Likewise.
5094 (ppc_breakpoint_at): Likewise.
5095 (ppc_arch_setup): Likewise.
5096 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
5097 tdesc_powerpc_cell32l.
5098 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
5099 or init_registers_powerpc_cell32l.
5100 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
5101 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
5102 or init_registers_powerpc_cell32l.
5103 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
5104 (init_registers_powerpc_cell32l): Remove prototype.
5105 (init_registers_powerpc_cell64l): Likewise.
5106
5107 * target.h (struct target_ops): Remove qxfer_spu member.
5108 * server.c (handle_qxfer_spu): Remove.
5109 (qxfer_packets): Remove entry for "spu".
5110 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
5111 * linux-low.c (SPUFS_MAGIC): Remove.
5112 (spu_enumerate_spu_ids): Remove.
5113 (linux_qxfer_spu): Remove.
5114 (linux_target_ops): Remove qxfer_spu member.
5115 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
5116 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
5117 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
5118
5119 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
5120
5121 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
5122 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
5123 * config.in: Regenerate.
5124 * configure: Regenerate.
5125
5126 2019-08-15 Tom Tromey <tromey@adacore.com>
5127
5128 * target.c (target_write_memory): Use gdb::byte_vector.
5129
5130 2019-08-15 Tom Tromey <tromey@adacore.com>
5131
5132 * tracepoint.c (write_inferior_data_pointer)
5133 (write_inferior_integer, write_inferior_int8)
5134 (write_inferior_uinteger, m_tracepoint_action_download)
5135 (r_tracepoint_action_download, x_tracepoint_action_download)
5136 (l_tracepoint_action_download, clear_inferior_trace_buffer)
5137 (download_agent_expr, download_tracepoint_1)
5138 (download_trace_state_variables, upload_fast_traceframes): Update.
5139 * server.c (gdb_write_memory): Update.
5140 * remote-utils.c (relocate_instruction): Update.
5141 * proc-service.c (ps_pdwrite): Update.
5142 * mem-break.c (remove_memory_breakpoint)
5143 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
5144 (uninsert_fast_tracepoint_jumps_at)
5145 (reinsert_fast_tracepoint_jumps_at): Update.
5146 * linux-x86-low.c (append_insns)
5147 (i386_install_fast_tracepoint_jump_pad)
5148 (amd64_write_goto_address, i386_write_goto_address): Update.
5149 * linux-s390-low.c (append_insns, s390_write_goto_address):
5150 Update.
5151 * linux-ppc-low.c (ppc_relocate_instruction)
5152 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
5153 (ppc_write_goto_address): Update.
5154 * linux-aarch64-low.c (append_insns): Update.
5155 * target.h (struct target_ops): Update.
5156 (write_inferior_memory): Don't declare.
5157 * target.c (target_write_memory): Rename from
5158 write_inferior_memory. Remove old target_write_memory.
5159
5160 2019-08-15 Tom Tromey <tromey@adacore.com>
5161
5162 * target.c (write_inferior_memory): Use std::vector.
5163
5164 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
5165
5166 PR build/24886
5167 * configure.ac: Drop enable-libmcheck support.
5168 * configure, config.in: Rebuild.
5169 * acinclude.m4: Don't include it.
5170
5171 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5172
5173 * configure.srv: Remove Arm xml files.
5174
5175 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5176
5177 * configure.srv: Add new files. Remove xml generated files.
5178 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
5179 registers.
5180 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
5181 * linux-aarch32-tdesc.c: New file.
5182 * linux-aarch32-tdesc.h: New file.
5183 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
5184 * linux-arm-low.c (init_registers_arm, tdesc_arm)
5185 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
5186 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
5187 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
5188 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5189 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
5190 (arm_read_description): Call arm_linux_read_description.
5191 (initialize_low_arch): Don't init registers.
5192 * linux-arm-tdesc.c: New file.
5193 * linux-arm-tdesc.h: New file.
5194
5195 2019-07-10 Alan Hayward <alan.hayward@arm.com>
5196
5197 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
5198 Move counter inside for.
5199 (arm_read_description): Check ptrace earlier.
5200 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
5201
5202 2019-07-09 Tom Tromey <tom@tromey.com>
5203
5204 * configure: Rebuild.
5205 * configure.ac: Change common to gdbsupport.
5206 * acinclude.m4: Change common to gdbsupport.
5207 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
5208 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
5209 common to gdbsupport.
5210 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
5211 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
5212 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
5213 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
5214 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
5215 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
5216 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
5217 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
5218 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
5219 common to gdbsupport.
5220
5221 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5222
5223 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
5224 defines.
5225 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
5226
5227 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5228
5229 * configure.srv: Remove legacy xml.
5230 * linux-aarch64-low.c (initialize_low_arch): Remove
5231 initialize_low_tdesc call.
5232 * linux-aarch64-tdesc-selftest.c: Remove file.
5233 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
5234 * linux-x86-low.c (initialize_low_arch): Remove
5235 initialize_low_tdesc call.
5236 * linux-x86-tdesc-selftest.c: Remove file.
5237 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
5238
5239 2019-06-20 Tom de Vries <tdevries@suse.de>
5240
5241 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
5242 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
5243
5244 2019-06-19 Tom de Vries <tdevries@suse.de>
5245
5246 * debug.h (debug_write): Change return type to ssize_t.
5247 * debug.c (debug_write): Same.
5248
5249 2019-06-14 Tom Tromey <tom@tromey.com>
5250
5251 * configure.ac: Use new path to gnulib.
5252 * configure: Rebuild.
5253 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
5254 to gnulib.
5255
5256 2019-06-11 Tom Tromey <tom@tromey.com>
5257
5258 * Makefile.in (SFILES): Add alloc.c.
5259 (OBS): Add alloc.o.
5260 (IPA_OBJS): Add alloc-ipa.o.
5261 (alloc-ipa.o): New target.
5262 (%.o: ../%.c): New pattern rule.
5263
5264 2019-06-10 Tom Tromey <tromey@adacore.com>
5265
5266 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
5267 end warning with a newline.
5268 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
5269 newline.
5270 * thread-db.c (attach_thread): Don't end warning with a newline.
5271 (thread_db_notice_clone): Likewise.
5272 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
5273 newline.
5274 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
5275 end warning with a newline.
5276
5277 2019-06-04 Pedro Alves <palves@redhat.com>
5278
5279 * server.c (captured_main): Use make_unique_xstrdup.
5280
5281 2019-06-02 Tom Tromey <tom@tromey.com>
5282
5283 * gdbreplay.c (fromhex): Remove.
5284 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5285
5286 2019-05-29 Tom Tromey <tromey@adacore.com>
5287
5288 * configure: Rebuild.
5289
5290 2019-05-06 Kevin Buettner <kevinb@redhat.com>
5291
5292 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
5293 sign extension code on 32-bit builds.
5294
5295 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5296
5297 * remote-utils.c:
5298 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5299
5300 2019-04-19 Tom Tromey <tom@tromey.com>
5301
5302 * server.c (struct vstop_notif): Derive from notif_event.
5303 <base>: Remove.
5304 (queue_stop_reply): Update.
5305 (remove_all_on_match_ptid): Change type. Rewrite.
5306 (discard_queued_stop_replies): Rewrite.
5307 (in_queued_stop_replies_ptid): Change type.
5308 (in_queued_stop_replies): Rewrite.
5309 (notif_stop): Update.
5310 (queue_stop_reply_callback): Update.
5311 (captured_main): Don't call initialize_notif.
5312 (push_stop_notification): Update.
5313 * notif.c (notif_write_event, handle_notif_ack)
5314 (notif_event_enque, notif_push): Update.
5315 (notif_event_xfree, initialize_notif): Remove.
5316 * notif.h (struct notif_event): Include <list>, not
5317 "common/queue.h".
5318 (struct notif_server) <queue>: Now a std::list.
5319 (notif_event_p): Remove typedef.
5320 (initialize_notif): Don't declare.
5321 (struct notif_event): Add virtual destructor.
5322
5323 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5324
5325 * ax.c (ax_vdebug): Call debug_printf.
5326 * debug.c (debug_write): New function.
5327 * debug.h (debug_write): New declaration.
5328 * linux-low.c (sigchld_handler): Call debug_write.
5329
5330 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5331
5332 * debug.c (debug_set_output): New function.
5333 (debug_vprintf): Send output to debug_file.
5334 (debug_flush): Likewise.
5335 * debug.h (debug_set_output): New declaration.
5336 * server.c (handle_monitor_command): Add debug-file option.
5337 (captured_main): Likewise.
5338
5339 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5340
5341 * debug.c (remote_debug): Add definition.
5342 * debug.h (remote_debug): Add declaration.
5343 * hostio.c (remote_debug): Remove declaration.
5344 * remote-utils.c (struct ui_file): Likewise.
5345 (remote_debug): Likewise.
5346 * remote-utils.h (remote_debug): Likewise,
5347 * server.c (remote_debug): Remove definition.
5348
5349 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5350
5351 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5352 when using a 64-bit gdbserver.
5353
5354 2019-04-09 Tom Tromey <tromey@adacore.com>
5355
5356 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5357
5358 2019-04-08 Tom Tromey <tom@tromey.com>
5359
5360 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5361 throw.
5362 (linux_resume_one_lwp): Likewise.
5363
5364 2019-04-08 Tom Tromey <tom@tromey.com>
5365
5366 * gdbreplay.c: Update.
5367 * linux-low.c: Update.
5368 * server.c: Update.
5369
5370 2019-04-08 Tom Tromey <tom@tromey.com>
5371
5372 * server.c: Use C++ exception handling.
5373 * linux-low.c: Use C++ exception handling.
5374 * gdbreplay.c: Use C++ exception handling.
5375
5376 2019-04-08 Tom Tromey <tom@tromey.com>
5377
5378 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5379 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5380 (captured_main, main): Update.
5381 * gdbreplay.c (main): Update.
5382
5383 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5384
5385 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5386 value in argument pointer, return 1 if the entry is found and 0
5387 otherwise. Move comment.
5388 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5389 * linux-low.h (linux_get_auxv): Declare.
5390 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5391
5392 2019-04-05 Tom Tromey <tromey@adacore.com>
5393
5394 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5395 variables.
5396
5397 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5398
5399 * linux-low.c (AT_HWCAP2): Add define if not already included.
5400
5401 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5402
5403 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5404 (aarch64_arch_setup): Call linux_get_hwcap.
5405 * linux-arm-low.c (arm_get_hwcap): Remove function.
5406 (arm_read_description): Call linux_get_hwcap.
5407 * linux-low.c (linux_get_auxv): New function.
5408 (linux_get_hwcap): Likewise.
5409 (linux_get_hwcap2): Likewise.
5410 * linux-low.h (linux_get_hwcap): New declaration.
5411 (linux_get_hwcap2): Likewise.
5412 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5413 (ppc_arch_setup): Call linux_get_hwcap.
5414 * linux-s390-low.c (s390_get_hwcap): Remove function.
5415 (s390_arch_setup): Call linux_get_hwcap.
5416
5417 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5418 Jiong Wang <jiong.wang@arm.com>
5419
5420 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5421 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5422 to fail.
5423 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5424
5425 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5426 Jiong Wang <jiong.wang@arm.com>
5427
5428 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5429 (aarch64_get_hwcap): New function.
5430 (aarch64_arch_setup): Read APIA hwcap.
5431
5432 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5433 Jiong Wang <jiong.wang@arm.com>
5434
5435 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5436 (initialize_low_tracepoint): Likewise.
5437 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5438 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5439 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5440 (aarch64_linux_read_description): Likewise.
5441 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5442
5443 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5444
5445 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5446 i386_create_target_description for 'segments' parameter.
5447 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5448 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5449 * win32-i386-low.c (i386_arch_setup): Likewise.
5450
5451 2019-03-12 Tom Tromey <tromey@adacore.com>
5452
5453 * linux-low.c (iterate_over_lwps): Update.
5454
5455 2019-03-06 Tom Tromey <tom@tromey.com>
5456
5457 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5458 (captured_main): Use SCOPE_EXIT.
5459
5460 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5461
5462 * configure.srv: Use '$enable_unittest' instead of '$development'
5463 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5464 case.
5465
5466 2019-02-27 Tom Tromey <tromey@adacore.com>
5467
5468 * gdbreplay.c (logchar): Handle \r\n.
5469
5470 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5471
5472 * linux-low.c (linux_attach): Add process before lwp.
5473 * server.c (attach_inferior): Check if already attached.
5474
5475 2019-02-07 Tom Tromey <tom@tromey.com>
5476
5477 * x86-tdesc.h: Rename include guard.
5478 * x86-low.h: Add include guard.
5479 * wincecompat.h: Rename include guard.
5480 * win32-low.h: Add include guard.
5481 * utils.h: Rename include guard.
5482 * tracepoint.h: Rename include guard.
5483 * tdesc.h: Rename include guard.
5484 * target.h: Rename include guard.
5485 * server.h: Rename include guard.
5486 * remote-utils.h: Rename include guard.
5487 * regcache.h: Rename include guard.
5488 * nto-low.h: Rename include guard.
5489 * notif.h: Add include guard.
5490 * mem-break.h: Rename include guard.
5491 * lynx-low.h: Add include guard.
5492 * linux-x86-tdesc.h: Add include guard.
5493 * linux-s390-tdesc.h: Add include guard.
5494 * linux-ppc-tdesc-init.h: Add include guard.
5495 * linux-low.h: Add include guard.
5496 * linux-aarch64-tdesc.h: Add include guard.
5497 * linux-aarch32-low.h: Add include guard.
5498 * inferiors.h: Rename include guard.
5499 * i387-fp.h: Rename include guard.
5500 * hostio.h: Rename include guard.
5501 * gdbthread.h: Rename include guard.
5502 * gdb_proc_service.h: Rename include guard.
5503 * event-loop.h: Rename include guard.
5504 * dll.h: Rename include guard.
5505 * debug.h: Rename include guard.
5506 * ax.h: Rename include guard.
5507
5508 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5509
5510 PR gdb/23985
5511 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5512 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5513
5514 2019-01-25 Tom Tromey <tom@tromey.com>
5515
5516 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5517
5518 2019-01-25 Tom Tromey <tom@tromey.com>
5519
5520 * win32-low.c: Fix common/ includes.
5521 * win32-i386-low.c: Fix common/ includes.
5522 * tracepoint.c: Fix common/ includes.
5523 * thread-db.c: Fix common/ includes.
5524 * target.h: Fix common/ includes.
5525 * symbol.c: Fix common/ includes.
5526 * spu-low.c: Fix common/ includes.
5527 * server.h: Fix common/ includes.
5528 * server.c: Fix common/ includes.
5529 * remote-utils.c: Fix common/ includes.
5530 * regcache.h: Fix common/ includes.
5531 * regcache.c: Fix common/ includes.
5532 * nto-x86-low.c: Fix common/ includes.
5533 * notif.h: Fix common/ includes.
5534 * mem-break.h: Fix common/ includes.
5535 * lynx-low.c: Fix common/ includes.
5536 * lynx-i386-low.c: Fix common/ includes.
5537 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5538 * linux-x86-low.c: Fix common/ includes.
5539 * linux-low.c: Fix common/ includes.
5540 * inferiors.h: Fix common/ includes.
5541 * i387-fp.c: Fix common/ includes.
5542 * hostio.c: Fix common/ includes.
5543 * hostio-errno.c: Fix common/ includes.
5544 * gdbthread.h: Fix common/ includes.
5545 * gdbreplay.c: Fix common/ includes.
5546 * fork-child.c: Fix common/ includes.
5547 * event-loop.c: Fix common/ includes.
5548 * ax.c:
5549 (enum gdb_agent_op): Fix common/ includes.
5550
5551 2019-01-21 Tom Tromey <tom@tromey.com>
5552
5553 * tracepoint.c: Fix includes.
5554 * remote-utils.c: Fix includes.
5555 * linux-x86-low.c: Fix includes.
5556
5557 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5558
5559 * gdbreplay.c (gdbreplay_version): Update copyright year in
5560 version message.
5561 * server.c (gdbserver_version): Likewise.
5562
5563 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5564
5565 * linux-low.c (add_lwp): Switch ordering.
5566
5567 2018-11-29 Tom Tromey <tom@tromey.com>
5568
5569 * win32-low.c (win32_join): Take pid, not process.
5570 * target.h (struct target_ops) <join>: Change argument type.
5571 (join_inferior): Change argument name.
5572 * spu-low.c (spu_join): Take pid, not process.
5573 * server.c (handle_detach): Preserve pid before destroying
5574 process.
5575 * lynx-low.c (lynx_join): Take pid, not process.
5576 * linux-low.c (linux_join): Take pid, not process.
5577
5578 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5579
5580 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5581 (aarch64_cannot_fetch_register): Likewise.
5582 (struct linux_target_ops): Update references.
5583
5584 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5585
5586 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5587
5588 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5589
5590 * configure.srv (ipa_ppc_linux_regobj): Add
5591 powerpc-isa207-htm-vsx32l-ipa.o and
5592 powerpc-isa207-htm-vsx64l-ipa.o.
5593 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5594 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5595 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5596 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5597 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5598 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5599 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5600 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5601 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5602 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5603 (init_registers_powerpc_isa207_htm_vsx32l)
5604 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5605 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5606 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5607 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5608 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5609 (ppc_store_tm_ctarregset): New functions.
5610 (ppc_regsets): Add entries for HTM regsets.
5611 (ppc_arch_setup): Set htm in features struct when needed. Set
5612 sizes for the HTM regsets.
5613 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5614 (initialize_low_arch): Call
5615 init_registers_powerpc_isa207_htm_vsx32l and
5616 init_registers_powerpc_isa207_htm_vsx64l.
5617 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5618 PPC_TDESC_ISA207_HTM_VSX.
5619 (initialize_low_tracepoint): Call
5620 init_registers_powerpc_isa207_htm_vsx32l and
5621 init_registers_powerpc_isa207_htm_vsx64l.
5622
5623 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5624
5625 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5626 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5627 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5628 (ppc_store_pmuregset): New functions.
5629 (ppc_regsets): Add entries for ebb and pmu regsets.
5630 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5631 pmu regsets are available. Set sizes for these regsets.
5632
5633 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5634
5635 * configure.srv (ipa_ppc_linux_regobj): Add
5636 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5637 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5638 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5639 rs6000/powerpc-isa207-vsx32l.xml, and
5640 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5641 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5642 <PPC_TDESC_ISA207_VSX>: New enum value.
5643 (init_registers_powerpc_isa207_vsx32l): Declare.
5644 (init_registers_powerpc_isa207_vsx64l): Declare.
5645 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5646 (ppc_store_tarregset): New function.
5647 (ppc_regsets): Add entry for the TAR regset.
5648 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5649 size for the TAR regsets.
5650 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5651 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5652 and init_registers_powerpc_isa207_vsx64l.
5653 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5654 (initialize_low_tracepoint): Call
5655 init_registers_powerpc_isa207_vsx32l and
5656 init_registers_powerpc_isa207_vsx64l.
5657
5658 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5659 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5660
5661 * configure.srv (ipa_ppc_linux_regobj): Add
5662 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5663 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5664 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5665 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5666 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5667 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5668 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5669 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5670 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5671 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5672 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5673 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5674 (ppc_hwcap): Add comment.
5675 (ppc_hwcap2): New global.
5676 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5677 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5678 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5679 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5680 when needed. Set sizes for the the DSCR and PPR regsets.
5681 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5682 (initialize_low_arch): Call
5683 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5684 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5685 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5686 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5687 (initialize_low_tracepoint): Call
5688 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5689 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5690
5691 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5692
5693 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5694
5695 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5696 Simon Marchi <simark@simark.ca>
5697
5698 * acinclude.m4: Include "../selftest.m4".
5699 * configure: Regenerate.
5700 * configure.ac: Use "GDB_AC_SELFTEST".
5701 * configure.srv: Use "$enable_unittests" instead of
5702 "$development" when checking whether unit tests have been
5703 enabled.
5704 * server.c (captured_main): Update message informing that
5705 selftests have been disabled.
5706
5707 2018-10-04 Tom Tromey <tom@tromey.com>
5708
5709 * configure: Rebuild.
5710
5711 2018-10-04 Tom Tromey <tom@tromey.com>
5712
5713 * server.c (handle_status): Rename inner "thread".
5714 (process_serial_event): Declare "res" in 'm' case.
5715 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5716 (iterate_over_lwps): Rename inner "thread".
5717 (linux_qxfer_libraries_svr4): Rename inner "len".
5718 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5719
5720 2018-10-01 Gary Benson <gbenson@redhat.com>
5721
5722 * gdb_proc_service.h: Moved common code to
5723 common/gdb_proc_service.h.
5724
5725 2018-10-01 Gary Benson <gbenson@redhat.com>
5726
5727 * gdb_proc_service.h: Synchronize comments and whitespace with
5728 GDB's version of this file.
5729
5730 2018-09-25 Tom Tromey <tom@tromey.com>
5731
5732 * configure: Rebuild.
5733 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5734
5735 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5736
5737 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5738 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5739 ($(IPA_LIB)): Sort IPA_OBJS.
5740
5741 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5742
5743 * Makefile.in: Remove references to $(ADD_DEPS).
5744
5745 2018-09-16 Tom Tromey <tom@tromey.com>
5746
5747 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5748 variables.
5749 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5750 variables.
5751
5752 2018-09-05 Tom Tromey <tom@tromey.com>
5753
5754 * configure: Rebuild.
5755
5756 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5757
5758 PR build/23399
5759 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5760
5761 2018-08-27 Tom Tromey <tom@tromey.com>
5762
5763 PR build/23087:
5764 * configure: Rebuild.
5765
5766 2018-08-27 Tom Tromey <tom@tromey.com>
5767
5768 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5769 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5770 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5771 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5772 (s390x_emit_stack_adjust): Add casts to unsigned char.
5773
5774 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5775
5776 PR gdb/23374
5777 PR gdb/23375
5778 * server.h (struct client_state) <disable_randomization>:
5779 Initialize to 1.
5780
5781 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5782
5783 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5784 variable.
5785 (mips_supply_ptrace_register): Likewise.
5786
5787 2018-07-22 Tom Tromey <tom@tromey.com>
5788
5789 * configure: Rebuild.
5790
5791 2018-07-22 Tom Tromey <tom@tromey.com>
5792
5793 * win32-low.c (win32_create_inferior): Remove unused variables.
5794 * gdbreplay.c (remote_open): Remove unused variable.
5795 * remote-utils.c (remote_prepare): Remove unused variable.
5796 * x86-tdesc.h (X86_TDESC_H): Define.
5797 (amd64_expedite_regs): Define conditionally.
5798 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5799 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5800 * remote-utils.c (readchar): Remove unused variable.
5801
5802 2018-07-13 Pedro Alves <palves@redhat.com>
5803
5804 * linux-low.c (linux_kill): Change parameter to process_info
5805 pointer instead of pid. Adjust.
5806 * lynx-low.c (lynx_kill): Likewise.
5807 * nto-low.c (nto_kill): Likewise.
5808 * spu-low.c (spu_kill): Likewise.
5809 * win32-low.c (win32_kill): Likewise.
5810 * server.c (handle_v_kill, kill_inferior_callback)
5811 (detach_or_kill_for_exit): Adjust.
5812 * target.c (kill_inferior): Change parameter to process_info
5813 pointer instead of pid. Adjust.
5814 * target.h (struct target_ops) <kill>: Change parameter to
5815 process_info pointer instead of pid. Adjust all implementations
5816 and callers.
5817 (kill_inferior): Likewise.
5818
5819 2018-07-13 Pedro Alves <palves@redhat.com>
5820
5821 * linux-low.c (linux_detach, linux_join): Change parameter to
5822 process_info pointer instead of pid. Adjust.
5823 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5824 * nto-low.c (nto_detach): Likewise.
5825 * spu-low.c (spu_detach, spu_join): Likewise.
5826 * win32-low.c (win32_detach, win32_join): Likewise.
5827 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5828 * target.h (struct target_ops) <detach, join>: Change parameter to
5829 process_info pointer instead of pid. Adjust all implementations
5830 and callers.
5831 (detach_inferior, join_inferior): Rename 'pid' parameter to
5832 'proc'.
5833
5834 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5835 Jan Kratochvil <jan.kratochvil@redhat.com>
5836 Paul Fertser <fercerpav@gmail.com>
5837 Tsutomu Seki <sekiriki@gmail.com>
5838
5839 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5840 (OBS): Add 'common/netstuff.o'.
5841 (GDBREPLAY_OBS): Likewise.
5842 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5843 (remote_open): Implement support for IPv6
5844 connections.
5845 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5846 and 'wspiapi.h'.
5847 (handle_accept_event): Accept connections from IPv6 sources.
5848 (remote_prepare): Handle IPv6-style hostnames; implement
5849 support for IPv6 connections.
5850 (remote_open): Implement support for printing connections from
5851 IPv6 sources.
5852
5853 2018-07-11 Pedro Alves <palves@redhat.com>
5854
5855 PR gdb/23377
5856 * mem-break.c (any_persistent_commands): Add process_info
5857 parameter and use it instead of relying on the current process.
5858 Change return type to bool.
5859 * mem-break.h (any_persistent_commands): Add process_info
5860 parameter and change return type to bool.
5861 * server.c (handle_detach): Remove require_running_or_return call.
5862 Look up the process_info for the process we're about to detach.
5863 If not found, return back error to GDB. Adjust
5864 any_persistent_commands call to pass down a process pointer.
5865
5866 2018-07-11 Pedro Alves <palves@redhat.com>
5867
5868 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5869 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5870 instead of collect_register_by_name.
5871 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5872 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5873
5874 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5875 Pedro Alves <palves@redhat.com>
5876
5877 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5878
5879 2018-07-03 Tom Tromey <tom@tromey.com>
5880
5881 * linux-low.c: Update.
5882 * lynx-low.c: Update.
5883 * mem-break.c: Update.
5884 * nto-low.c: Update.
5885 * remote-utils.c: Update.
5886 * server.c: Update.
5887 * spu-low.c: Update.
5888 * target.c: Update.
5889 * win32-low.c: Update.
5890
5891 2018-07-03 Tom Tromey <tom@tromey.com>
5892
5893 * server.c: Update.
5894
5895 2018-07-03 Tom Tromey <tom@tromey.com>
5896
5897 * linux-low.c: Update.
5898
5899 2018-07-03 Tom Tromey <tom@tromey.com>
5900
5901 * target.c: Update.
5902
5903 2018-07-03 Tom Tromey <tom@tromey.com>
5904
5905 * linux-low.c: Update.
5906 * linux-mips-low.c: Update.
5907 * lynx-low.c: Update.
5908 * nto-low.c: Update.
5909 * remote-utils.c: Update.
5910 * server.c: Update.
5911 * spu-low.c: Update.
5912 * target.c: Update.
5913 * thread-db.c: Update.
5914
5915 2018-07-03 Tom Tromey <tom@tromey.com>
5916
5917 * linux-low.c: Update.
5918 * linux-mips-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 * tracepoint.c: Update.
5927
5928 2018-07-03 Tom Tromey <tom@tromey.com>
5929
5930 * linux-low.c: Update.
5931 * linux-ppc-low.c: Update.
5932 * linux-x86-low.c: Update.
5933 * proc-service.c: Update.
5934 * server.c: Update.
5935 * spu-low.c: Update.
5936 * thread-db.c: Update.
5937 * win32-low.c: Update.
5938
5939 2018-07-03 Tom Tromey <tom@tromey.com>
5940
5941 * linux-low.c: Update.
5942 * lynx-low.c: Update.
5943 * nto-low.c: Update.
5944 * remote-utils.c: Update.
5945 * spu-low.c: Update.
5946 * thread-db.c: Update.
5947 * win32-low.c: Update.
5948
5949 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5950
5951 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5952 parameter in call to 'amd64_create_target_description'.
5953
5954 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5955
5956 * x86-tdesc.h: Remove executable permission flag.
5957
5958 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5959
5960 * configure.ac: Remove AC_PREREQ, add missing quoting.
5961 * configure: Re-generate.
5962 * config.in: Re-generate.
5963 * aclocal.m4: Re-generate.
5964
5965 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5966
5967 * tracepoint.h (current_traceframe): Remove declaration.
5968
5969 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5970
5971 * linux-aarch64-low.c (is_sve_tdesc): New function.
5972 (aarch64_sve_regs_copy_to_regcache): Likewise.
5973 (aarch64_sve_regs_copy_from_regcache): Likewise.
5974 (aarch64_regs_info): Add SVE checks.
5975 (initialize_low_arch): Initialize SVE.
5976
5977 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5978
5979 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5980
5981 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5982
5983 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5984 (initialize_low_tracepoint): Likewise
5985 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5986 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5987 param.
5988 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5989 checks.
5990 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5991
5992 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5993
5994 * server.h (PBUFSIZ): Increase size
5995
5996 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5997
5998 * regcache.c (regcache::raw_compare): New function.
5999 * regcache.h (regcache::raw_compare): New declaration.
6000
6001 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6002
6003 * regcache.c (new_register_cache): Use new.
6004 (free_register_cache): Use delete.
6005 (register_data): Use const.
6006 (supply_register): Move body inside regcache.
6007 (regcache::raw_supply): New override function.
6008 (collect_register): Move body inside regcache.
6009 (regcache::raw_collect): New override function.
6010 (regcache::get_register_status): New override function.
6011 * regcache.h (struct regcache): Inherit from reg_buffer_common.
6012
6013 2018-06-09 Tom Tromey <tom@tromey.com>
6014
6015 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
6016 declare queue.
6017 (event_queue): Use std::queue.
6018 (gdb_event_xfree): Remove.
6019 (initialize_event_loop, process_event, wait_for_event): Update.
6020
6021 2018-06-08 Stan Cox <scox@redhat.com>
6022
6023 * win32-low.c (win32_create_inferior): last_ptid and last_status
6024 moved to client_state.
6025
6026 2018-06-08 Pedro Alves <palves@redhat.com>
6027
6028 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
6029 common/common-exceptions.o, common/common-utils.o,
6030 common/errors.o, common/print-utils.o and utils.o.
6031 * gdbreplay.c: Include "common-defs.h" instead of the two
6032 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
6033 string.h or alloca.h.
6034 (perror_with_name): Delete.
6035 (remote_open): Use xstrdup instead of strdup.
6036 (main): Rename to ...
6037 (captured_main): ... this.
6038 (main): New.
6039
6040 2018-06-08 Tom Tromey <tom@tromey.com>
6041
6042 * linux-low.c (linux_low_read_btrace): Update.
6043
6044 2018-06-04 Stan Cox <scox@redhat.com>
6045
6046 * server.h (struct client_state): New.
6047 * server.c (cont_thread, general_thread, multi_process)
6048 (report_fork_events, report_vfork_events, report_exec_events)
6049 (report_thread_events, swbreak_feature, hwbreak_feature)
6050 (vCont_supported, disable_randomization, pass_signals)
6051 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
6052 Moved to client_state.
6053 * remote-utils.c (remote_debug, noack_mode)
6054 (transport_is_reliable): Moved to client_state.
6055 * tracepoint.c (current_traceframe): Moved to client_state.
6056
6057 Update all callers.
6058 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
6059 linux-low.c, remote-utils.h, target.c: Use client_state.
6060
6061 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6062
6063 * configure.srv: Add new c/h file.
6064
6065 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6066
6067 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
6068 null VQ.
6069
6070 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6071
6072 * gdb.arch/mips-fpregset-core.exp: New test.
6073 * gdb.arch/mips-fpregset-core.c: New test source.
6074
6075 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
6076
6077 PR server/23198
6078 * hostio.c (require_int): Do not report overflow for integers
6079 between 0xfffffff and 0x7fffffff.
6080
6081 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6082
6083 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
6084 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
6085 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
6086 functions.
6087 (the_low_target): Wire them.
6088
6089 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6090
6091 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
6092 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
6093 mode. Call collect_register_by_name with vscr using
6094 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
6095 (ppc_store_vrregset): Add and set vscr_offset variable as in
6096 ppc_fill_vrregset. Call supply_register_by_name with vscr using
6097 vscr_offset.
6098
6099 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6100
6101 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6102 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
6103 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
6104
6105 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6106
6107 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
6108 (ppc_store_vsxregset): Likewise.
6109 (ppc_fill_vrregset): Likewise.
6110 (ppc_store_vrregset): Likewise.
6111 (ppc_fill_evrregset): Likewise.
6112 (ppc_store_evrregset): Likewise.
6113 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
6114 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
6115 needed.
6116
6117 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6118
6119 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
6120 wordsize of the inferior. Call ppc_linux_target_wordsize.
6121
6122 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6123
6124 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
6125 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
6126 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
6127 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6128 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6129 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6130 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6131 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6132 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6133 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6134 (tdesc_powerpc_e500l): Remove.
6135 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
6136 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
6137 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
6138 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
6139 linux-ppc-tdesc.h.
6140 (ppc_arch_setup): Remove target description matching code. Fill a
6141 ppc_linux_features struct and call ppc_linux_match_description
6142 with it.
6143
6144 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6145
6146 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
6147 width of the requested register exceeds the width of the
6148 `ptrace' data type.
6149 (mips_cannot_store_register): Likewise.
6150
6151 2018-05-21 Maciej W. Rozycki <macro@mips.com>
6152
6153 * linux-mips-low.c (mips_fetch_register): New function. Update
6154 preceding comment.
6155 (mips_store_gregset): Supply 0 rather than $restart for $zero.
6156 (the_low_target): Wire `mips_fetch_register'.
6157
6158 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6159
6160 * lynx-i386-low.c (LYNXOS_178): New macro.
6161 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
6162 the layout on LynxOS-178.
6163 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
6164 handle floating point registers that are not supported by
6165 LynxOS-178.
6166
6167 2018-05-10 Tom Tromey <tom@tromey.com>
6168
6169 * configure: Rebuild.
6170
6171 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6172
6173 PR server/23158:
6174 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
6175 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
6176 Use it to set the expedite_regs field in the given tdesc.
6177 * x86-tdesc.h: New file.
6178 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
6179 Adjust following the addition of the new expedite_regs parameter
6180 to init_target_desc.
6181 * linux-tic6x-low.c (tic6x_read_description): Likewise.
6182 * linux-x86-tdesc.c: #include "x86-tdesc.h".
6183 (i386_linux_read_description, amd64_linux_read_description):
6184 Adjust following the addition of the new expedite_regs parameter
6185 to init_target_desc.
6186 * lynx-i386-low.c: #include "x86-tdesc.h".
6187 (lynx_i386_arch_setup): Adjust following the addition of the new
6188 expedite_regs parameter to init_target_desc.
6189 * nto-x86-low.c: #include "x86-tdesc.h".
6190 (nto_x86_arch_setup): Adjust following the addition of the new
6191 expedite_regs parameter to init_target_desc.
6192 * win32-i386-low.c: #include "x86-tdesc.h".
6193 (i386_arch_setup): Adjust following the addition of the new
6194 expedite_regs parameter to init_target_desc.
6195
6196 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6197
6198 PR server/23158:
6199 * win32-low.c (win32_create_inferior): Add call to my_wait
6200 setting last_status global.
6201
6202 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6203
6204 PR server/23158:
6205 * win32-low.c (create_process): Only call gdb_tilde_expand if
6206 inferior_cwd is not NULL.
6207
6208 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6209
6210 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
6211 registers to the cache if their values have changed.
6212 (i387_xsave_to_cache): Provide default values for x87 control
6213 registers when these features are available, but disabled.
6214 * regcache.c (supply_register_by_name_zeroed): New function.
6215 * regcache.h (supply_register_by_name_zeroed): Declare new
6216 function.
6217
6218 2018-05-07 Tom Tromey <tom@tromey.com>
6219
6220 * configure: Rebuild.
6221
6222 2018-05-04 Tom Tromey <tom@tromey.com>
6223
6224 * configure: Rebuild.
6225
6226 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6227 Pedro Alves <palves@redhat.com>
6228
6229 * linux-aarch64-low.c (aarch64_stopped_data_address):
6230 Likewise.
6231
6232 2018-04-27 Tom Tromey <tom@tromey.com>
6233
6234 * configure: Rebuild.
6235
6236 2018-04-23 Tom Tromey <tom@tromey.com>
6237
6238 * configure: Rebuild.
6239
6240 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
6241
6242 * Makefile.in (depcomp): Add "..".
6243 (all_deps_files): New and use it.
6244
6245 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6246
6247 * configure.srv (aarch64*-*-linux*): Don't include xml.
6248 (i[34567]86-*-cygwin*): Likewise.
6249 (i[34567]86-*-linux*): Likewise.
6250 (i[34567]86-*-lynxos*): Likewise.
6251 (i[34567]86-*-mingw32ce*): Likewise.
6252 (i[34567]86-*-mingw*): Likewise.
6253 (i[34567]86-*-nto*): Likewise.
6254 (tic6x-*-uclinux): Likewise.
6255 (x86_64-*-linux*): Likewise.
6256 (x86_64-*-mingw*): Likewise.
6257 (x86_64-*-cygwin*): Likewise.
6258
6259 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6260
6261 * tdesc.c: Remove xml parameter.
6262
6263 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6264
6265 * server.c (get_features_xml): Remove cast.
6266 * tdesc.c (void target_desc::accept): Fill in function.
6267 (tdesc_get_features_xml): Remove old xml creation.
6268 (print_xml_feature::visit_pre): Add xml vistor.
6269 * tdesc.h (struct target_desc): Make xmltarget mutable.
6270 (tdesc_get_features_xml): Remove declaration.
6271
6272 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6273
6274 * tdesc.c (tdesc_architecture_name): Add new function.
6275 (tdesc_osabi_name): Likewise.
6276 (tdesc_get_features_xml): Use new functions.
6277
6278 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6279
6280 * tdesc.c (tdesc_create_flags): Remove.
6281 (tdesc_add_flag): Likewise.
6282 (tdesc_named_type): Likewise.
6283 (tdesc_create_union): Likewise.
6284 (tdesc_create_struct): Likewise.
6285 (tdesc_create_vector): Likewise.
6286 (tdesc_add_bitfield): Likewise.
6287 (tdesc_add_field): Likewise.
6288 (tdesc_set_struct_size): Likewise.
6289
6290 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6291
6292 * tdesc.c (~target_desc): Remove implictly deleted items.
6293 (init_target_desc): Iterate all features.
6294 (tdesc_get_features_xml): Use vector.
6295 (tdesc_create_feature): Create feature.
6296 * tdesc.h (tdesc_feature) Remove
6297 (target_desc): Add features.
6298
6299 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6300
6301 * Makefile.in: Add common/tdesc.c
6302 * tdesc.c (init_target_desc): init all reg_defs from register
6303 vector.
6304 (tdesc_create_reg): Create tdesc_reg.
6305 * tdesc.h (tdesc_feature): Add register vector.
6306
6307 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6308
6309 * tdesc.h (struct target_desc) <features>: Change type to
6310 std::vector<std::string>.
6311 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6312 changes.
6313 (tdesc_get_features_xml): Likewise.
6314 (tdesc_create_feature): Likewise.
6315
6316 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6317
6318 * regcache.c (find_register_by_number): Return a ref.
6319 (find_regno): Use references.
6320 (register_size): Likewise.
6321 (register_data): Likewise.
6322 * tdesc.c (target_desc::~target_desc): Remove free calls.
6323 (target_desc::operator==): Use std::vector compare.
6324 (init_target_desc): Use reference.
6325 (tdesc_create_reg): Use reg constructors.
6326 * tdesc.h (struct target_desc): Replace pointer with object.
6327
6328 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6329
6330 * regcache.c (find_register_by_number): Make static.
6331 (find_regno): Use find_register_by_number
6332 * regcache.h (struct reg): Remove declaration.
6333
6334 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6335
6336 * tdesc.c (target_desc::~target_desc): Move to here.
6337 (target_desc::operator==): Likewise.
6338 * tdesc.h (target_desc::~target_desc): Move from here.
6339 (target_desc::operator==): Likewise.
6340
6341 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6342
6343 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6344
6345 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6346
6347 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6348 S390_TDESC_GS.
6349 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6350 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6351 and init_registers_s390_gs_linux64.
6352
6353 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6354
6355 * linux-s390-low.c (s390_fill_gs): Remove function.
6356 (s390_fill_gsbc): Remove function.
6357 (s390_regsets): Set fill functions for the guarded storage regsets
6358 to NULL.
6359
6360 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6361
6362 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6363 the word size. Add comment.
6364 (s390_get_wordsize): New function.
6365 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6366 pswm with it. Instead, use s390_get_wordsize to determine the
6367 word size first and derive the correct tdesc from that directly.
6368
6369 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6370
6371 * Makefile.in: Include silent-rules.mk.
6372 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6373 (COMPILE): Add ECHO_CXX.
6374 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6375 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6376 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6377 (version-generated.c): Add ECHO_GEN.
6378 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6379 (IPAGENT_COMPILE): Add ECHO_CXX.
6380 (%-generated.c): Add ECHO_REGDAT.
6381
6382 2018-03-14 Tom Tromey <tom@tromey.com>
6383
6384 PR cli/14977:
6385 * ax.c (ax_printf): Special case for NULL.
6386
6387 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6388
6389 * linux-low.c (linux_qxfer_libraries_svr4): Use
6390 xml_escape_text_append.
6391
6392 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6393
6394 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6395
6396 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6397
6398 * server.c (handle_general_set): Remove unnecessary xstrdup.
6399
6400 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6401
6402 * server.c (parse_debug_format_options): Adjust to
6403 delim_string_to_char_ptr_vec changes.
6404 * thread-db.c (thread_db_load_search): Adjust to
6405 dirnames_to_char_ptr_vec changes.
6406
6407 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6408
6409 * target.h (target_enable_btrace, target_disable_btrace)
6410 (target_read_btrace, target_read_btrace_conf): Turn macro into
6411 inline function. Throw error if target method is not defined.
6412 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6413 check for btrace target method. Be prepared to handle exceptions
6414 from btrace target methods.
6415
6416 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6417
6418 * server.c (captured_main): Change order of error message printed
6419 when the current working directory cannot be found.
6420
6421 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6422
6423 * server.c: Include "filenames.h" and "pathstuff.h".
6424 (program_name): Delete variable.
6425 (program_path): New anonymous class.
6426 (get_exec_wrapper): Use "program_path" instead of
6427 "program_name".
6428 (handle_v_run): Likewise.
6429 (captured_main): Likewise.
6430 (process_serial_event): Likewise.
6431
6432 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6433
6434 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6435 (OBJS): Add "pathstuff.o".
6436 * server.c (current_directory): New global variable.
6437 (captured_main): Initialize "current_directory".
6438
6439 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6440
6441 * tdesc.c: Use common/tdesc.h.
6442 * tdesc.h: Likewise.
6443
6444 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6445 Simon Marchi <simon.marchi@ericsson.com>
6446
6447 * Makefile.in: Switch order of make rules.
6448
6449 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6450
6451 * Makefile.in: Add common directory in build.
6452 * configure.ac: Add common reference.
6453 * configure: Regenerate.
6454
6455 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6456
6457 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6458 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6459 * spu-low.c (spu_target_ops): Likewise.
6460 * win32-low.c (win32_target_ops): Likewise.
6461 * server.c (supported_btrace_packets): Report packets unconditionally.
6462 * target.h (target_ops) <supports_btrace>: Remove.
6463 (target_supports_btrace): Remove.
6464
6465 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6466
6467 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6468 (handle_btrace_disable): Change return type to void. Use exceptions
6469 to report errors.
6470 (handle_btrace_general_set): Catch exception and copy message to
6471 return message.
6472
6473 2018-02-08 Tom Tromey <tom@tromey.com>
6474
6475 * linux-low.c (install_software_single_step_breakpoints): Use
6476 make_scoped_restore.
6477 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6478 (do_restore_current_thread_cleanup): Remove.
6479 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6480 declare.
6481
6482 2018-02-08 Tom Tromey <tom@tromey.com>
6483
6484 * mem-break.c (set_raw_breakpoint_at): Use
6485 gdb::unique_xmalloc_ptr.
6486
6487 2018-01-30 Pedro Alves <palves@redhat.com>
6488
6489 PR gdb/13211
6490 * target.c (target_terminal::terminal_state): Rename to ...
6491 (target_terminal::m_terminal_state): ... this.
6492
6493 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6494
6495 * linux-low.c (handle_extended_wait): Surround call to
6496 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6497
6498 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6499
6500 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6501 linux_ptrace_attach_fail_reason_string now returning an
6502 std::string.
6503 (linux_attach): Likewise.
6504 * thread-db.c (attach_thread): Likewise.
6505
6506 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6507
6508 PR gdb/21559
6509 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6510 checking for fs_base/gs_base fields in struct user_regs_struct.
6511 * configure: Regenerate.
6512
6513 2018-01-16 Yao Qi <yao.qi@linaro.org>
6514
6515 PR gdb/18749
6516 * linux-low.c (fetch_register): Call supply_register instead of
6517 error.
6518
6519 2018-01-08 Yao Qi <yao.qi@linaro.org>
6520 Simon Marchi <simon.marchi@ericsson.com>
6521
6522 * Makefile.in (OBS): Remove selftest.o.
6523 * configure.ac: Set srv_selftest_objs if $development is true.
6524 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6525 * configure: Re-generated.
6526 * server.c (captured_main): Wrap variable selftest_filter with
6527 GDB_SELF_TEST.
6528
6529 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6530
6531 * server.c (parse_debug_format_options): Return std::string.
6532 (handle_monitor_command, captured_main): Adjust.
6533
6534 2018-01-05 Pedro Alves <palves@redhat.com>
6535
6536 PR gdb/18653
6537 * server.c (captured_main): Pass quiet=false to
6538 save_original_signals_state.
6539
6540 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6541
6542 * gdbreplay.c (gdbreplay_version): Update copyright year in
6543 version message.
6544 * server.c (gdbserver_version): Likewise.
6545
6546 2017-12-08 Tom Tromey <tom@tromey.com>
6547
6548 * ax.c (ax_printf): Update.
6549
6550 2017-12-07 Yao Qi <yao.qi@linaro.org>
6551
6552 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6553 aarch64_linux_read_description.
6554 * linux-amd64-ipa.c (idx2mask): New array.
6555 (get_ipa_tdesc): Move idx2mask out.
6556 (initialize_low_tracepoint): Initialize target descriptions.
6557 * linux-i386-ipa.c (idx2mask): New array.
6558 (get_ipa_tdesc): Move idx2mask out.
6559 (initialize_low_tracepoint): Initialize target descriptions.
6560
6561 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6562
6563 * tdesc.c (struct tdesc_type): Change return type.
6564 (tdesc_add_flag): Change parameter type.
6565 (tdesc_add_bitfield): Likewise.
6566 (tdesc_add_field): Likewise.
6567 (tdesc_set_struct_size): Likewise.
6568
6569 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6570
6571 * regcache.c (registers_to_string): Remove unused variable.
6572
6573 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6574
6575 * inferiors.c (for_each_inferior_with_data): Remove.
6576 * inferiors.h (for_each_inferior_with_data): Remove.
6577 * server.c (handle_qxfer_threads_worker): Change parameter type.
6578 (handle_qxfer_threads_proper): Use for_each_thread.
6579
6580 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6581
6582 * inferiors.c (for_each_inferior): Remove.
6583 (clear_inferiors): Use for_each_thread.
6584 * inferiors.h (for_each_inferior): Remove.
6585 * linux-low.c (linux_wait_for_event_filtered): Use
6586 for_each_thread.
6587 (linux_stabilize_threads): Likewise.
6588 * regcache.c (regcache_release): Likewise.
6589 * server.c (gdb_wants_all_threads_stopped): Likewise.
6590 (clear_pending_status_callback): Remove.
6591 (handle_status): Use for_each_thread.
6592 (captured_main): Likewise.
6593 * win32-low.c (child_init_thread_list): Likewise.
6594 (win32_clear_inferiors): Likewise.
6595 (fake_breakpoint_event): Likewise.
6596
6597 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6598
6599 * inferiors.h (find_inferior): Remove.
6600 * inferiors.c (find_inferior): Remove.
6601
6602 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6603
6604 * linux-low.c (resume_status_pending_p): Update comment.
6605 (need_step_over_p): Update comment.
6606
6607 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6608
6609 * linux-low.c (proceed_one_lwp): Return void, change parameter
6610 type.
6611 (unsuspend_and_proceed_one_lwp): Likewise.
6612 (proceed_all_lwps): Use for_each_thread.
6613 (unstop_all_lwps): Likewise.
6614
6615 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6616
6617 * linux-low.c (linux_resume_one_thread): Return void, take
6618 parameter directly.
6619 (linux_resume): Use for_each_thread.
6620
6621 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6622
6623 * linux-low.c (send_sigstop_callback): Return void, change
6624 parameter type. Rename to...
6625 (send_sigstop): ... this.
6626 (suspend_and_send_sigstop_callback): Return void, change parameter
6627 type. Rename to...
6628 (suspend_and_send_sigstop): ... this.
6629 (stop_all_lwps): Use for_each_thread.
6630
6631 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6632
6633 * linux-low.c (lwp_running): Return bool, remove unused
6634 argument.
6635 (linux_stabilize_threads): Use find_thread.
6636
6637 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6638
6639 * linux-low.c (select_singlestep_lwp_callback): Remove.
6640 (count_events_callback): Remove.
6641 (select_event_lwp_callback): Remove.
6642 (select_event_lwp): Use find_thread/for_each_thread.
6643
6644 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6645
6646 * linux-low.c (not_stopped_callback): Return bool, take filter
6647 argument directly.
6648 (linux_wait_for_event_filtered): Use find_thread.
6649 (linux_wait_1): Likewise.
6650
6651 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6652
6653 * linux-low.c (same_lwp): Remove.
6654 (find_lwp_pid): Use find_thread.
6655
6656 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6657
6658 * linux-low.c (delete_lwp_callback): Remove.
6659 (linux_mourn): Use for_each_thread.
6660
6661 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6662
6663 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6664 args parameter, don't check for pid.
6665 (linux_detach): Use for_each_thread.
6666
6667 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6668
6669 * linux-low.c (struct counter): Remove.
6670 (second_thread_of_pid_p): Remove.
6671 (last_thread_of_process_p): Use find_thread.
6672
6673 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6674
6675 * inferiors.c (find_inferior_in_random): Remove.
6676 * inferiors.h (find_inferior_in_random): Remove.
6677 * linux-low.c (status_pending_p_callback): Return bool, accept
6678 parameter ptid directly.
6679 (linux_wait_for_event_filtered): Use find_thread_in_random.
6680 (linux_wait_1): Likewise.
6681
6682 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6683
6684 * inferiors.c (find_inferior_id): Remove.
6685 (find_thread_ptid): Move implemention from find_inferior_id to
6686 here.
6687 * inferiors.h (find_inferior_id): Remove.
6688 * server.c (handle_status): Use find_thread_ptid.
6689 (process_serial_event): Likewise.
6690 * thread-db.c (find_one_thread): Likewise.
6691 (thread_db_thread_handle): Likewise.
6692 * win32-low.c (thread_rec): Likewise.
6693 (child_delete_thread): Likewise.
6694 (win32_thread_alive): Likewise.
6695 (get_child_debug_event): Likewise.
6696
6697 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6698
6699 * linux-mips-low.c (update_watch_registers_callback): Return
6700 void, remove pid_p parameter, don't check for pid.
6701 (mips_insert_point, mips_remove_point): Use for_each_thread.
6702
6703 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6704
6705 * lynx.low (lynx_delete_thread_callback): Remove.
6706 (lynx_mourn): Use for_each_thread.
6707
6708 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6709
6710 * regcache.c (regcache_invalidate_one): Remove.
6711 (regcache_invalidate_pid): use for_each_thread.
6712
6713 2017-11-26 Tom Tromey <tom@tromey.com>
6714
6715 * linux-low.c (linux_create_inferior): Update.
6716
6717 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6718
6719 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6720
6721 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6722
6723 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6724 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6725 * linux-aarch64-tdesc-selftest.c: New file.
6726 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6727
6728 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6729
6730 * configure.srv: Add new file.
6731 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6732 * linux-aarch64-tdesc-selftest.c: New file.
6733 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6734
6735 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6736
6737 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6738 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6739 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6740
6741 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6742
6743 * configure.srv: Add new files.
6744 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6745 aarch64_linux_read_description.
6746 * linux-aarch64-low.c (aarch64_linux_read_description):
6747 Merge with aarch64_arch_setup.
6748 (aarch64_arch_setup): Call aarch64_linux_read_description.
6749 * linux-aarch64-tdesc.c: New file.
6750 * linux-aarch64-tdesc.h: New file.
6751
6752 2017-11-24 Yao Qi <yao.qi@linaro.org>
6753
6754 * configure.srv: Set $srv_regobj for tic6x-linux.
6755 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6756 (tic6x_read_description): Move some code to tic6x_arch_setup.
6757 (tic6x_tdesc_test): New function.
6758 (initialize_low_arch): Call selftests::register_test.
6759
6760 2017-11-22 Yao Qi <yao.qi@linaro.org>
6761
6762 * remote-utils.c (prepare_resume_reply): Use memcpy.
6763
6764 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6765
6766 * linux-low.c (kill_one_lwp_callback): Return void, take
6767 argument directly, don't filter on pid.
6768 (linux_kill): Use for_each_thread.
6769
6770 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6771
6772 * linux-low.c (need_step_over_p): Return bool, remove dummy
6773 argument.
6774 (linux_resume, proceed_all_lwps): Use find_thread.
6775
6776 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6777
6778 * linux-low.c (resume_status_pending_p): Return bool, remove
6779 flag_p argument.
6780 (linux_resume): Use find_thread.
6781
6782 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6783
6784 * linux-low.c (struct thread_resume_array): Remove.
6785 (linux_set_resume_request): Return void, take arguments
6786 directly.
6787 (linux_resume): Use for_each_thread.
6788
6789 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6790
6791 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6792 return bool, remove data argument.
6793 (linux_stabilize_threads): Use find_thread.
6794
6795 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6796
6797 * linux-low.c (unsuspend_one_lwp): Remove.
6798 (unsuspend_all_lwps): Use for_each_thread, inline code from
6799 unsuspend_one_lwp.
6800
6801 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6802
6803 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6804 * linux-low.c (struct iterate_over_lwps_args): Remove.
6805 (iterate_over_lwps_filter): Remove.
6806 (iterate_over_lwps): Use find_thread.
6807
6808 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6809
6810 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6811 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6812 code from reset_lwp_ptrace_options_callback.
6813
6814 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6815
6816 * linux-arm-low.c (struct update_registers_data): Remove.
6817 (update_registers_callback): Return void, take arguments
6818 directly, don't check thread's pid.
6819 (arm_insert_point, arm_remove_point): Use for_each_thread.
6820
6821 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6822
6823 * win32-low.c (continue_one_thread): Return void, take argument
6824 directly.
6825 (child_continue): Use for_each_thread.
6826
6827 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6828
6829 * win32-i386-low.c (update_debug_registers_callback): Rename
6830 to ...
6831 (update_debug_registers): ... this, return void, remove pid_p arg.
6832 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6833
6834 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6835
6836 * inferiors.h (struct process_info): Add constructor, initialize
6837 fields..
6838 <syscalls_to_catch>: Change type to std::vector<int>.
6839 * inferiors.c (add_process): Allocate process_info with new.
6840 (remove_process): Free process_info with delete.
6841 * linux-low.c (handle_extended_wait): Adjust.
6842 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6843 * server.c (handle_general_set): Adjust.
6844
6845 2017-11-16 Pedro Alves <palves@redhat.com>
6846
6847 * remote-utils.c (remote_close): Block SIGIO signals instead of
6848 uninstalling the SIGIO handler.
6849
6850 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6851
6852 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6853
6854 2017-11-16 Yao Qi <yao.qi@linaro.org>
6855
6856 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6857 (tic6x_store_gregset): Likewise.
6858 (tic6x_usrregs_info): Move it up.
6859
6860 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6861
6862 * Makefile.in: Update arch rules.
6863 * configure.srv: Explicitly mark arch/ files.
6864
6865 2017-11-13 Andreas Schwab <schwab@suse.de>
6866
6867 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6868 function.
6869 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6870
6871 2017-11-06 Pedro Alves <palves@redhat.com>
6872
6873 * config.in, configure: Regenerate.
6874
6875 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6876
6877 * target.c (struct thread_search): Remove.
6878 (thread_search_callback): Remove.
6879 (prepare_to_access_memory): Use for_each_thread instead of
6880 find_inferior. Inline code from thread_search_callback.
6881
6882 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6883
6884 * server.c (struct visit_actioned_threads_data): Remove.
6885 (visit_actioned_threads): Change prototype to take arguments
6886 directly.
6887 (resume): Use find_thread instead of find_inferior.
6888
6889 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6890
6891 * server.c (queue_stop_reply_callback): Change prototype, return
6892 void.
6893 (find_status_pending_thread_callback): Remove.
6894 (handle_status): Replace find_inferior with find_thread and
6895 for_each_thread.
6896
6897 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6898
6899 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6900 with REGNO.
6901 (aarch64_store_gregset): Likewise.
6902 (aarch64_fill_fpregset): Likewise.
6903 (aarch64_store_fpregset): Likewise.
6904
6905 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6906
6907 * gdbthread.h (find_thread, for_each_thread): New functions.
6908 * inferiors.c (thread_of_pid): Remove.
6909 (find_any_thread_of_pid): Use find_thread.
6910 * linux-low.c (num_lwps): Use for_each_thread.
6911
6912 2017-10-17 Yao Qi <yao.qi@linaro.org>
6913
6914 * Makefile.in: Remove one rule.
6915 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6916
6917 2017-10-17 Yao Qi <yao.qi@linaro.org>
6918
6919 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6920 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6921
6922 2017-10-17 Yao Qi <yao.qi@linaro.org>
6923
6924 * configure.srv: Rename arm.o with arch/arm.o.
6925
6926 2017-10-17 Yao Qi <yao.qi@linaro.org>
6927
6928 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6929 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6930 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6931 (arch-i386.o, arch-amd64.o): Remove rules.
6932 (arch/%.o): New rule.
6933 Update POSTCOMPILE and COMPILE.pre.
6934 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6935 * configure: Re-generated.
6936 * configure.srv: Replace arch-i386.o with arch/i386.o.
6937 Replace arch-amd64.o with arch/amd64.o.
6938
6939 2017-10-16 Yao Qi <yao.qi@linaro.org>
6940
6941 * configure: Regenerated.
6942
6943 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6944
6945 * inferiors.h: (struct inferior_list): Remove.
6946 (struct inferior_list_entry); Remove.
6947 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6948 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6949 get_first_inferior): Remove.
6950 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6951 find_inferior_id, find_inferior_in_random): Change signature.
6952 * inferiors.c (all_threads): Change type to
6953 std::list<thread_info *>.
6954 (get_thread): Remove macro.
6955 (find_inferior, find_inferior_id): Change signature, implement
6956 using find_thread.
6957 (find_inferior_in_random): Change signature, implement using
6958 find_thread_in_random.
6959 (for_each_inferior, for_each_inferior_with_data): Change
6960 signature, implement using for_each_thread.
6961 (add_inferior_to_list, remove_inferior): Remove.
6962 (add_thread, get_first_thread, thread_of_pid,
6963 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6964 (get_first_inferior, one_inferior_p, clear_inferior_list):
6965 Remove.
6966 (clear_inferiors, get_thread_process): Update.
6967 * gdbthread.h: Include <list>.
6968 (struct thread_info) <entry>: Remove field.
6969 <id>: New field.
6970 (all_threads): Change type to std::list<thread_info *>.
6971 (get_first_inferior): Add doc.
6972 (find_thread, for_each_thread, find_thread_in_random): New
6973 functions.
6974 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6975 * linux-arm-low.c (update_registers_callback): Update.
6976 * linux-low.c (second_thread_of_pid_p): Update.
6977 (kill_one_lwp_callback, linux_detach_lwp_callback,
6978 delete_lwp_callback, status_pending_p_callback, same_lwp,
6979 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6980 iterate_over_lwps, not_stopped_callback,
6981 resume_stopped_resumed_lwps, count_events_callback,
6982 select_singlestep_lwp_callback, select_event_lwp_callback,
6983 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6984 suspend_and_send_sigstop_callback, wait_for_sigstop,
6985 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6986 lwp_running, linux_set_resume_request, resume_status_pending_p,
6987 need_step_over_p, start_step_over, linux_resume_one_thread,
6988 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6989 reset_lwp_ptrace_options_callback): Update.
6990 * linux-mips-low.c (update_watch_registers_callback): Update.
6991 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6992 Update.
6993 (free_register_cache_thread_one): Remove.
6994 (regcache_release): Update.
6995 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6996 handle_qxfer_threads_worker): Update.
6997 (handle_query): Update, use list iterator.
6998 (visit_actioned_threads, handle_pending_status,
6999 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
7000 clear_pending_status_callback, set_pending_status_callback,
7001 find_status_pending_thread_callback, handle_status,
7002 process_serial_event): Update.
7003 * target.c (thread_search_callback): Update.
7004 * thread-db.c (thread_db_get_tls_address): Update.
7005 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
7006 Update.
7007 * win32-i386-low.c (update_debug_registers_callback): Update.
7008 * win32-low.c (delete_thread_info, child_delete_thread,
7009 continue_one_thread, suspend_one_thread,
7010 get_child_debug_event): Adjust.
7011
7012 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
7013
7014 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
7015 * inferiors.h: Include <list>.
7016 (struct process_info) <entry>: Remove field.
7017 <pid>: New field.
7018 (pid_of): Change macro to function.
7019 (ptid_of, lwpid_of): Remove macro.
7020 (all_processes): Change type to std::list<process_info *>.
7021 (ALL_PROCESSES): Remove macro.
7022 (for_each_process, find_process): New function.
7023 * inferiors.c (all_processes): Change type to
7024 std::list<process_info *>.
7025 (find_thread_process): Adjust.
7026 (add_process): Likewise.
7027 (remove_process): Likewise.
7028 (find_process_pid): Likewise.
7029 (get_first_process): Likewise.
7030 (started_inferior_callback): Remove.
7031 (have_started_inferiors_p): Adjust.
7032 (attached_inferior_callback): Remove.
7033 (have_attached_inferiors_p): Adjust.
7034 * linux-low.c (check_zombie_leaders): Likewise.
7035 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
7036 (x86_linux_update_xmltarget): Adjust.
7037 * server.c (handle_query): Likewise.
7038 (gdb_reattached_process): Remove.
7039 (handle_status): Adjust.
7040 (kill_inferior_callback): Likewise.
7041 (detach_or_kill_inferior): Remove.
7042 (print_started_pid): Likewise.
7043 (print_attached_pid): Likewise.
7044 (detach_or_kill_for_exit): Update.
7045 (process_serial_event): Likewise.
7046 * linux-arm-low.c (arm_new_fork): Likewise.
7047
7048 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
7049
7050 * dll.h: Include <list>.
7051 (struct dll_info): Add constructor.
7052 <entry>: Remove field.
7053 (all_dlls): Change type to std::list<dll_info>.
7054 * dll.c: Include <algorithm>.
7055 (get_dll): Remove macro.
7056 (all_dlls): Change type to std::list<dll_info *>.
7057 (free_one_dll): Remove.
7058 (match_dll): Likewise.
7059 (loaded_dll): Adjust.
7060 (unloaded_dll): Adjust to all_dlls type change, use
7061 std::find_if. Inline code from match_dll.
7062 (clear_dlls): Adjust to all_dlls type change.
7063 * server.c (emit_dll_description): Remove.
7064 (handle_qxfer_libraries): Adjust to all_dlls type change,
7065 integrate emit_dll_description's functionality.
7066
7067 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
7068
7069 * linux-low.h (struct linux_target_ops) <delete_process>: New
7070 field.
7071 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
7072 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
7073 (struct linux_target_ops): Add delete_process callback.
7074 * linux-arm-low.c (arm_delete_process): New.
7075 (struct linux_target_ops): Add delete_process callback.
7076 * linux-bfin-low.c (struct linux_target_ops): Likewise.
7077 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
7078 * linux-m32r-low.c (struct linux_target_ops): Likewise.
7079 * linux-mips-low.c (mips_linux_delete_process): New.
7080 (struct linux_target_ops): Add delete_process callback.
7081 * linux-ppc-low.c (struct linux_target_ops): Likewise.
7082 * linux-s390-low.c (struct linux_target_ops): Likewise.
7083 * linux-sh-low.c (struct linux_target_ops): Likewise.
7084 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
7085 * linux-tile-low.c (struct linux_target_ops): Likewise.
7086 * linux-x86-low.c (x86_linux_delete_process): New.
7087 (struct linux_target_ops): Add delete_process callback.
7088 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
7089
7090 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
7091
7092 * linux-aarch64-low.c (the_low_target): Add thread delete
7093 callback.
7094 * linux-arm-low.c (arm_delete_thread): New function.
7095 (the_low_target): Add thread delete callback.
7096 * linux-bfin-low.c (the_low_target): Likewise.
7097 * linux-crisv32-low.c (the_low_target): Likewise.
7098 * linux-low.c (delete_lwp): Invoke delete_thread callback if
7099 set.
7100 * linux-low.h (struct linux_target_ops) <delete_thread>: New
7101 field.
7102 * linux-m32r-low.c (the_low_target): Add thread delete callback.
7103 * linux-mips-low.c (mips_linux_delete_thread): New function.
7104 (the_low_target): Add thread delete callback.
7105 * linux-ppc-low.c (the_low_target): Likewise.
7106 * linux-s390-low.c (the_low_target): Likewise.
7107 * linux-sh-low.c (the_low_target): Likewise.
7108 * linux-tic6x-low.c (the_low_target): Likewise.
7109 * linux-tile-low.c (the_low_target): Likewise.
7110 * linux-x86-low.c (the_low_target): Likewise.
7111 * linux-xtensa-low.c (the_low_target): Likewise.
7112
7113 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
7114
7115 * win32-low.c: Include "common-inferior.h".
7116
7117 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7118
7119 * inferiors.c (set_inferior_cwd): New function.
7120 * server.c (handle_general_set): Handle QSetWorkingDir packet.
7121 (handle_query): Inform that QSetWorkingDir is supported.
7122 * win32-low.c (create_process): Pass the inferior's cwd to
7123 CreateProcess.
7124
7125 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7126
7127 * inferiors.c (current_inferior_cwd): New global variable.
7128 (get_inferior_cwd): New function.
7129 * inferiors.h (struct process_info) <cwd>: New field.
7130
7131 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7132
7133 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
7134 (OBS): Add gdb_tilde_expand.o.
7135
7136 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
7137
7138 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
7139 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
7140
7141 2017-09-29 Pedro Alves <palves@redhat.com>
7142
7143 * ax.c (gdb_parse_agent_expr): Constify.
7144 * ax.h (gdb_parse_agent_expr): Constify.
7145 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7146 Constify.
7147 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
7148 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
7149 * remote-utils.h (read_ptid): Constify.
7150 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
7151 (process_point_options, process_serial_event): Constify.
7152 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
7153 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
7154 (cmd_qtbuffer): Constify.
7155
7156 2017-09-29 Pedro Alves <palves@redhat.com>
7157
7158 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
7159 fails.
7160
7161 2017-09-29 Pedro Alves <palves@redhat.com>
7162
7163 * linux-low.c (handle_extended_wait): Pass parent thread instead
7164 of process to thread_db_notice_clone.
7165 * linux-low.h (thread_db_notice_clone): Replace parent process
7166 parameter with parent thread parameter.
7167 * thread-db.c (find_one_thread): Add comment.
7168 (thread_db_notice_clone): Replace parent process parameter with
7169 parent thread parameter. Temporarily switch to the parent thread.
7170
7171 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
7172
7173 * gdbthread.h: Include "common-gdbthread.h".
7174 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
7175 "if" when validating the ptid.
7176 * remote-utils.c: Include "gdbthread.h".
7177 (prepare_resume_reply): Use "switch_to_thread".
7178 * target.c (done_accessing_memory): Likewise.
7179
7180 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7181
7182 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
7183 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
7184 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
7185 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
7186 s390x-gs-linux64-ipa.o to ipa_obj.
7187 * linux-s390-low.c (HWCAP_S390_GS): New define.
7188 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
7189 New functions.
7190 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
7191 (s390_arch_setup): Check for guarded-storage support and choose
7192 appropriate tdesc.
7193 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
7194 init_registers_s390x_gs_linux64.
7195 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
7196 enum value.
7197 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
7198 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
7199
7200 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
7201
7202 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
7203
7204 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7205
7206 * linux-low.h (struct lwp_info): Add new field, thread_handle.
7207 (thread_db_thread_handle): Declare.
7208 * linux-low.c (linux_target_ops): Initialize thread_handle.
7209 * server.c (handle_qxfer_threads_worker): Add support for
7210 "handle" attribute.
7211 * target.h (struct target_ops): Add new function pointer,
7212 thread_handle.
7213 (target_thread_handle): Define.
7214 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
7215 field in lwp.
7216 (thread_db_thread_handle): New function.
7217
7218 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7219
7220 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
7221 * linux-low.h (thread_db_notice_clone): Declare.
7222 * thread-db.c (thread_db_notice_clone): New function.
7223
7224 2017-09-21 Pedro Alves <palves@redhat.com>
7225
7226 * server.c (gdb_read_memory, handle_status, process_serial_event)
7227 (handle_serial_event, handle_target_event): Adjust to
7228 set_desired_thread prototype change.
7229 * target.c (set_desired_thread): Remove 'use_general' parameter
7230 and adjust.
7231 * target.h (set_desired_thread): Remove 'use_general' parameter.
7232
7233 2017-09-20 Tom Tromey <tom@tromey.com>
7234
7235 * target.c (target_terminal::terminal_state): Define.
7236 (target_terminal::init): Rename from target_terminal_init.
7237 (target_terminal::inferior): Rename from
7238 target_terminal_inferior.
7239 (target_terminal::ours): Rename from target_terminal_ours.
7240 (target_terminal::ours_for_output, target_terminal::info): New.
7241
7242 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7243
7244 * server.c (accumulate_file_name_length): Remove.
7245 (emit_dll_description): Adjust to std::string change.
7246 (handle_qxfer_libraries): Use std::string to hold document.
7247
7248 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7249
7250 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
7251 return type of xml_escape_text.
7252 * server.c (emit_dll_description): Likewise.
7253
7254 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7255
7256 * server.c (captured_main): Accept argument for --selftest.
7257 Update run_tests call.
7258 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
7259 when registering selftests.
7260
7261 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
7262
7263 * regcache.c (get_thread_regcache): Update code to use "std::vector"
7264 instead of "VEC" for "target_desc.reg_defs".
7265 (regcache_cpy): Likewise.
7266 (registers_to_string): Likewise.
7267 (registers_from_string): Likewise.
7268 (find_regno): Likewise.
7269 (supply_regblock): Likewise.
7270 (regcache_raw_read_unsigned): Likewise.
7271 * tdesc.c (init_target_desc): Likewise.
7272 (tdesc_create_reg): Likewise.
7273 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
7274 (struct target_desc) <reg_defs>: Convert to "std::vector".
7275 (target_desc): Do not initialize "reg_defs".
7276 (~target_desc): Update code to use "std::vector" instead of "VEC"
7277 for "target_desc.reg_defs".
7278 (operator==): Likewise.
7279
7280 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7281
7282 * inferiors.h (thread_to_gdb_id): Remove.
7283 * inferiors.c (thread_to_gdb_id): Remove.
7284 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
7285 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7286 lynx_store_registers, lynx_read_memory, lynx_write_memory):
7287 Likewise.
7288 * nto-low.c (nto_fetch_registers, nto_store_registers,
7289 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
7290
7291 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7292
7293 * inferiors.h (gdb_id_to_thread_id): Remove.
7294 * inferiors.c (gdb_id_to_thread_id): Remove.
7295 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7296 removal. Move pid declaration closer to where it's used.
7297
7298 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7299
7300 * server.c (handle_detach): New function.
7301 (process_serial_event): Move code out, call handle_detach.
7302
7303 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7304
7305 * server.c (require_running): Rename to ...
7306 (require_running_or_return): ... this ...
7307 (require_running_or_break): ... and this.
7308 (handle_query, process_serial_event): Adjust.
7309
7310 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7311
7312 * linux-low.c (linux_set_resume_request): Remove unused
7313 variables.
7314
7315 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7316
7317 * server.c (first_thread_of): Remove.
7318 (process_serial_event): Replace usage of first_thread_of with
7319 find_any_thread_of_pid.
7320 * tracepoint.c (same_process_p): Remove.
7321 (gdb_agent_about_to_close): Replace usage of same_process_p with
7322 find_any_thread_of_pid.
7323 * linux-x86-low.c (same_process_callback): Remove.
7324 (x86_arch_setup_process_callback): Replace usage of
7325 same_process_callback with find_any_thread_of_pid.
7326 * thread-db.c (any_thread_of): Remove.
7327 (switch_to_process): Replace usage of any_thread_of with
7328 find_any_thread_of_pid.
7329 * inferiors.c (thread_pid_matches_callback): Remove.
7330 (find_thread_process): Adjust to use find_any_thread_of_pid.
7331
7332 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7333
7334 * regcache.c (get_thread_regcache): Guard calls to "memset"
7335 with "!VEC_empty".
7336
7337 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7338
7339 * linux-low.c (handle_extended_wait): Use
7340 "allocate_target_description" instead of "XNEW".
7341 * linux-x86-low.c (initialize_low_arch): Likewise.
7342
7343 2017-09-05 Yao Qi <yao.qi@linaro.org>
7344
7345 * configure.srv (srv_i386_regobj): Remove.
7346 (srv_amd64_regobj): Remove.
7347 (srv_regobj): Set it to "" for x86 non-linux targets.
7348 * linux-x86-tdesc.c (i386_linux_read_description):
7349 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7350 (init_registers_i386): Remove the declaration.
7351 (tdesc_i386): Remove the declaration.
7352 (lynx_i386_arch_setup): Call i386_create_target_description.
7353 * nto-x86-low.c: Likewise.
7354 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7355 [!__x86_64__]: include arch/i386.h.
7356 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7357
7358 2017-09-05 Yao Qi <yao.qi@linaro.org>
7359
7360 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7361 i386/amd64-XXX-linux from it.
7362
7363 2017-09-05 Yao Qi <yao.qi@linaro.org>
7364
7365 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7366 false.
7367 (ipa_amd64_linux_regobj): Remove.
7368 (ipa_x32_linux_regobj): Remove.
7369
7370 2017-09-05 Yao Qi <yao.qi@linaro.org>
7371
7372 * Makefile.in (arch-amd64.o): New rule.
7373 * configure.srv: Append arch-amd64.o.
7374 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7375 (get_ipa_tdesc): Call amd64_linux_read_description.
7376 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7377 and init_registers_amd64_XXX.
7378 * linux-x86-low.c (x86_linux_read_description): Call
7379 amd64_linux_read_description.
7380 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7381 (initialize_low_arch): Don't call init_registers_x32_XXX and
7382 init_registers_amd64_XXX.
7383 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7384 and tdesc_amd64_XXX.
7385 [__x86_64__] (amd64_tdesc_test): New function.
7386 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7387 and init_registers_amd64_XXX.
7388 * linux-x86-tdesc.c: Include arch/amd64.h.
7389 (xcr0_to_tdesc_idx): New function.
7390 (i386_linux_read_description): New function.
7391 (amd64_get_ipa_tdesc_idx): New function.
7392 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7393 (amd64_get_ipa_tdesc): Declare.
7394
7395 2017-09-05 Yao Qi <yao.qi@linaro.org>
7396
7397 * configure.srv (srv_i386_linux_xmlfiles): Remove
7398 i386/i386-XXX-linux.xml from it.
7399
7400 2017-09-05 Yao Qi <yao.qi@linaro.org>
7401
7402 * configure.srv: Set srv_i386_linux_regobj empty if $development
7403 is false.
7404 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7405 initialize_low_tdesc.
7406 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7407 with #if initialize_low_tdesc.
7408 * linux-x86-tdesc-selftest.c: New file.
7409 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7410
7411 2017-09-05 Yao Qi <yao.qi@linaro.org>
7412
7413 * Makefile.in (arch-i386.o): New rule.
7414 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7415 (x86_64-*-linux*): Likewise.
7416 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7417 include arch/i386.h.
7418 (i386_linux_read_description): Remove code and call
7419 i386_create_target_description.
7420 * tdesc.c (allocate_target_description): New function.
7421 * tdesc.h (set_tdesc_architecture): Remove declaration.
7422 (set_tdesc_osabi): Likewise.
7423
7424 2017-09-05 Yao Qi <yao.qi@linaro.org>
7425
7426 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7427 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7428 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7429 .xmltarget.
7430 * server.c (get_features_xml): Call tdesc_get_features_xml.
7431 * tdesc.c (set_tdesc_architecture): New function.
7432 (set_tdesc_osabi): New function.
7433 (tdesc_get_features_xml): New function.
7434 (tdesc_create_feature): Add an argument.
7435 * tdesc.h (struct target_desc) <features>: New field.
7436 <arch, osabi>: New field.
7437 (~target_desc): xfree features, arch, and osabi.
7438 (target_desc::oerator==): Don't compare .xmltarget.
7439 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7440 (set_tdesc_osabi): Likewise.
7441 (tdesc_get_features_xml): Likewise.
7442
7443 2017-09-05 Yao Qi <yao.qi@linaro.org>
7444
7445 * linux-x86-tdesc.c: Include selftest.h.
7446 (i386_tdesc_test): New function.
7447 (initialize_low_tdesc): Call selftests::register_test.
7448 * tdesc.h: Include regdef.h.
7449 (target_desc): Override operator == and !=.
7450
7451 2017-09-05 Yao Qi <yao.qi@linaro.org>
7452
7453 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7454 (ipa_obj): Likewise.
7455 * linux-i386-ipa.c: Include common/x86-xstate.h
7456 (get_ipa_tdesc): Call i386_linux_read_description.
7457 (initialize_low_tracepoint): Don't call init_registers_XXX
7458 functions, call initialize_low_tdesc instead.
7459 * linux-x86-low.c (x86_linux_read_description): Call
7460 i386_linux_read_description.
7461 (initialize_low_arch): Don't call init_registers_i386_XXX
7462 functions, call initialize_low_tdesc.
7463 * linux-x86-tdesc.c: New file.
7464 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7465 (i386_get_ipa_tdesc_idx): Declare.
7466 (i386_get_ipa_tdesc): Declare.
7467 (initialize_low_tdesc): Declare.
7468
7469 2017-09-05 Yao Qi <yao.qi@linaro.org>
7470
7471 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7472 instead of 0.
7473
7474 2017-09-05 Yao Qi <yao.qi@linaro.org>
7475
7476 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7477 * regcache.c (get_thread_regcache): Use VEC_length.
7478 (init_register_cache): Likewise.
7479 (regcache_cpy): Likewise.
7480 (registers_to_string): Iterate reg_defs via VEC_iterate.
7481 (find_regno): Likewise.
7482 (find_register_by_number): Use VEC_index.
7483 (register_size): Call find_register_by_number.
7484 (register_data): Call find_register_by_number.
7485 (supply_regblock): Use VEC_length.
7486 (regcache_raw_read_unsigned): Likewise.
7487 * tdesc.c (init_target_desc): Iterate reg_defs via
7488 VEC_iterate.
7489 (default_description): Update initializer.
7490 (copy_target_description): Don't update field num_registers.
7491 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7492 <num_registers>: Remove.
7493
7494 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7495
7496 * Makefile.in (.SECONDARY): Define target.
7497
7498 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7499
7500 * linux-low.c (linux_wait_1): Adjust.
7501 * server.c (queue_stop_reply_callback): Adjust.
7502
7503 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7504
7505 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7506 QEnvironmentUnset and QEnvironmentReset packets.
7507 (handle_query): Inform remote that QEnvironmentHexEncoded,
7508 QEnvironmentUnset and QEnvironmentReset are supported.
7509
7510 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7511
7512 * inferiors.h (inferior_target_data): Rename to ...
7513 (thread_target_data): ... this.
7514 (inferior_regcache_data): Rename to ...
7515 (thread_regcache_data): ... this.
7516 (set_inferior_regcache_data): Rename to ...
7517 (set_thread_regcache_data): ... this.
7518 * inferiors.c (inferior_target_data): Rename to ...
7519 (thread_target_data): ... this.
7520 (inferior_regcache_data): Rename to ...
7521 (thread_regcache_data): ... this.
7522 (set_inferior_regcache_data): Rename to ...
7523 (set_thread_regcache_data): ... this.
7524 (free_one_thread): Update.
7525 * linux-low.h (get_thread_lwp): Update.
7526 * regcache.c (get_thread_regcache): Update.
7527 (regcache_invalidate_thread): Update.
7528 (free_register_cache_thread): Update.
7529 * win32-i386-low.c (update_debug_registers_callback): Update.
7530 (win32_get_current_dr): Update.
7531 * win32-low.c (thread_rec): Update.
7532 (delete_thread_info): Update.
7533 (continue_one_thread): Update.
7534 (suspend_one_thread): Update.
7535
7536 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7537
7538 * inferiors.c (set_inferior_target_data): Remove.
7539 * inferiors.h (set_inferior_target_data): Remove.
7540
7541 2017-08-18 Yao Qi <yao.qi@linaro.org>
7542
7543 * Makefile.in (OBS): Add selftest.o.
7544 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7545 * configure, config.in: Re-generated.
7546 * server.c: Include common/sefltest.h.
7547 (captured_main): Handle option --selftest.
7548
7549 2017-08-09 Yao Qi <yao.qi@linaro.org>
7550
7551 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7552 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7553 i386-avx-mpx.o and i386-mmx.o.
7554 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7555 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7556 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7557 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7558 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7559 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7560 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7561 i386/amd64-avx-mpx.xml.
7562
7563 2017-08-09 Yao Qi <yao.qi@linaro.org>
7564
7565 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7566 and x32-avx-avx512.o.
7567 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7568 i386/x32-avx-avx512.xml.
7569
7570 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7571
7572 * tracepoint.h (enum class fast_tpoint_collect_result): New
7573 enumeration.
7574 (fast_tracepoint_collecting): Change return type to
7575 fast_tpoint_collect_result.
7576 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7577 * linux-low.h: Include tracepoint.h.
7578 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7579 fast_tpoint_collect_result.
7580 * linux-low.c (handle_tracepoints): Adjust.
7581 (linux_fast_tracepoint_collecting): Change return type to
7582 fast_tpoint_collect_result.
7583 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7584 linux_wait_1, stuck_in_jump_pad_callback,
7585 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7586 proceed_one_lwp): Adjust to type change.
7587
7588 2017-07-10 Yao Qi <yao.qi@linaro.org>
7589
7590 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7591
7592 2017-06-29 Yao Qi <yao.qi@linaro.org>
7593
7594 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7595 Remove.
7596 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7597
7598 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7599
7600 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7601
7602 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7603
7604 * linux-low.c (linux_create_inferior): Adjust code to access the
7605 environment information via 'gdb_environ' class.
7606 * lynx-low.c (lynx_create_inferior): Likewise.
7607 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7608 (get_environ): Return a pointer to 'our_environ'.
7609 (captured_main): Initialize 'our_environ'.
7610 * server.h (get_environ): Adjust prototype.
7611 * spu-low.c (spu_create_inferior): Adjust code to access the
7612 environment information via 'gdb_environ' class.
7613
7614 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7615
7616 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7617 usage of "register" keyword.
7618
7619 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7620
7621 * configure: Re-generate.
7622
7623 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7624
7625 * configure: Re-generate.
7626
7627 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7628
7629 * Makefile.in (COMPILE.pre): Add "-x c++".
7630
7631 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7632
7633 * fork-child.c: Conditionally include <signal.h>.
7634
7635 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7636
7637 * server.c (handle_general_set): Handle new packet
7638 "QStartupWithShell".
7639 (handle_query): Add "QStartupWithShell" to the list of supported
7640 packets.
7641 (gdbserver_usage): Add help text explaining the
7642 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7643 options.
7644 (captured_main): Recognize and act upon the presence of the new
7645 CLI options.
7646
7647 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7648 Pedro Alves <palves@redhat.com>
7649
7650 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7651 * configure: Regenerate.
7652 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7653 "fork-inferior.o".
7654 (i[34567]86-*-lynxos*): Likewise.
7655 (spu*-*-*): Likewise.
7656 * fork-child.c: New file.
7657 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7658 and "environ.h".
7659 (linux_ptrace_fun): New function.
7660 (linux_create_inferior): Adjust function prototype to reflect
7661 change on "target.h". Adjust function code to use
7662 "fork_inferior".
7663 (linux_request_interrupt): Delete "signal_pid".
7664 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7665 (lynx_ptrace_fun): New function.
7666 (lynx_create_inferior): Adjust function prototype to reflect
7667 change on "target.h". Adjust function code to use
7668 "fork_inferior".
7669 * nto-low.c (nto_create_inferior): Adjust function prototype and
7670 code to reflect change on "target.h". Update comments.
7671 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7672 "common-terminal.h" and "environ.h".
7673 (terminal_fd): Moved to fork-child.c.
7674 (old_foreground_pgrp): Likewise.
7675 (restore_old_foreground_pgrp): Likewise.
7676 (last_status): Make it global.
7677 (last_ptid): Likewise.
7678 (our_environ): New variable.
7679 (startup_with_shell): Likewise.
7680 (program_name): Likewise.
7681 (program_argv): Rename to...
7682 (program_args): ...this.
7683 (wrapper_argv): New variable.
7684 (start_inferior): Delete function.
7685 (get_exec_wrapper): New function.
7686 (get_exec_file): Likewise.
7687 (get_environ): Likewise.
7688 (prefork_hook): Likewise.
7689 (post_fork_inferior): Likewise.
7690 (postfork_hook): Likewise.
7691 (postfork_child_hook): Likewise.
7692 (handle_v_run): Update code to deal with arguments coming from the
7693 remote host. Update calls from "start_inferior" to
7694 "create_inferior".
7695 (captured_main): Likewise. Initialize environment variable. Call
7696 "have_job_control".
7697 * server.h (post_fork_inferior): New prototype.
7698 (get_environ): Likewise.
7699 (last_status): Declare.
7700 (last_ptid): Likewise.
7701 (signal_pid): Likewise.
7702 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7703 (spu_ptrace_fun): New function.
7704 (spu_create_inferior): Adjust function prototype to reflect change
7705 on "target.h". Adjust function code to use "fork_inferior".
7706 * target.c (target_terminal_init): New function.
7707 (target_terminal_inferior): Likewise.
7708 (target_terminal_ours): Likewise.
7709 * target.h: Include <vector>.
7710 (struct target_ops) <create_inferior>: Update prototype.
7711 (create_inferior): Update macro.
7712 * utils.c (gdb_flush_out_err): New function.
7713 * win32-low.c (win32_create_inferior): Adjust function prototype
7714 and code to reflect change on "target.h".
7715
7716 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7717
7718 * inferiors.c (switch_to_thread): New function.
7719
7720 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7721
7722 * Makefile.in (SFILE): Add "common/job-control.c".
7723 (OBS): Add "job-control.o".
7724
7725 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7726
7727 * Makefile: Remove "@host_makefile_frag@".
7728
7729 2017-05-05 Pedro Alves <palves@redhat.com>
7730
7731 * configure: Regenerate.
7732
7733 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7734
7735 * configure: Regenerate.
7736
7737 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7738
7739 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7740 software_single_step change of return type to
7741 std::vector<CORE_ADDR>.
7742 * linux-low.c (install_software_single_step_breakpoints):
7743 Likewise.
7744 * linux-low.h (install_software_single_step_breakpoints):
7745 Likewise.
7746
7747 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7748
7749 * remote-utils.c: Include "gdb_termios.h" instead of
7750 "terminal.h".
7751 * terminal.h: Delete file.
7752
7753 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7754
7755 * server.c: Include <vector>.
7756 <program_argv, wrapper_argv>: Convert to std::vector.
7757 (start_inferior): Rewrite function to use C++.
7758 (handle_v_run): Likewise. Update code that calculates the argv
7759 based on the vRun packet; use C++.
7760 (captured_main): Likewise.
7761
7762 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7763
7764 * server.c (handle_v_cont): Initialize thread_resume::thread
7765 with null_ptid.
7766
7767 2017-04-05 Pedro Alves <palves@redhat.com>
7768
7769 * configure: Regenerate.
7770
7771 2017-04-05 Pedro Alves <palves@redhat.com>
7772
7773 * gdbreplay.c (sync_error): Constify.
7774 * linux-x86-low.c (push_opcode): Constify.
7775
7776 2017-04-05 Pedro Alves <palves@redhat.com>
7777
7778 * win32-low.c (get_child_debug_event)
7779 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7780 Report TARGET_WAITKIND_SPURIOUS instead.
7781
7782 2017-04-05 Pedro Alves <palves@redhat.com>
7783
7784 * remote-utils.c (remote_prepare, remote_open): Constify.
7785 * remote-utils.h (remote_prepare, remote_open): Constify.
7786 * server.c (captured_main): Constify 'port' handling.
7787
7788 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7789
7790 * Makefile.in (clean): Clear .deps.
7791
7792 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7793
7794 * .gitignore: Remove generated files, replace with wildcard.
7795 * (clean): Replace removal of generated files with wildcard.
7796 (version.c): Replace with...
7797 (version-generated.c): ...this.
7798 (xml-builtin.c): Replace with...
7799 (xml-builtin-generated.c): ...this.
7800 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7801 (%.c: *regformats*): Replace with...
7802 (%-generated.c: *regformats*): ...this.
7803
7804 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7805
7806 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7807 (xtensa_fill_gregset): Call collect_register_by_name for
7808 threadptr register.
7809 (xtensa_store_gregset): Call supply_register_by_name for
7810 threadptr register.
7811
7812 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7813
7814 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7815 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7816 (xtensa_store_gregset): Call supply_register for all registers in
7817 a0_regnum..a0_regnum + C0_NREGS range.
7818
7819 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7820
7821 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7822 (ax-ipa.o: ax.c): Remove.
7823 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7824 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7825 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7826 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7827 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7828
7829 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7830
7831 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7832 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7833 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7834 (errors-ipa.o: ../common/errors.c): Remove.
7835 (format-ipa.o: ../common/format.c): Remove.
7836 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7837
7838 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7839
7840 * Makefile.in (%-ipa.o: %.c): New rule.
7841 (tracepoint-ipa.o: tracepoint.c): Remove.
7842 (utils-ipa.o: utils.c): Remove.
7843 (remote-utils-ipa.o: remote-utils.c): Remove.
7844 (regcache-ipa.o: regcache.c): Remove.
7845 (i386-linux-ipa.o: i386-linux.c): Remove.
7846 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7847 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7848 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7849 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7850 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7851 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7852 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7853 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7854 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7855 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7856 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7857 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7858 (aarch64-ipa.o: aarch64.c): Remove.
7859 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7860 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7861 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7862 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7863 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7864 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7865 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7866 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7867 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7868 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7869 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7870 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7871 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7872 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7873 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7874 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7875 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7876 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7877 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7878 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7879 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7880 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7881 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7882 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7883 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7884 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7885 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7886 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7887 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7888 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7889 (tdesc-ipa.o: tdesc.c): Remove.
7890 (x32-linux-ipa.o: x32-linux.c): Remove.
7891 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7892 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7893
7894 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7895
7896 * Makefile.in (%.o: ../arch/%.c): New rule.
7897 (arm.o: ../arch/arm.c): Remove.
7898 (arm-linux.o: ../arch/arm-linux.c): Remove.
7899 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7900 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7901
7902 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7903
7904 * Makefile.in (%.o: ../nat/%.c): New rule.
7905 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7906 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7907 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7908 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7909 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7910 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7911 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7912 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7913 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7914 (linux-personality.o: ../nat/linux-personality.c): Remove.
7915 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7916 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7917 (x86-linux.o: ../nat/x86-linux.c): Remove.
7918 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7919 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7920
7921 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7922
7923 * Makefile.in (%.o: ../common/%.c): New rule.
7924 (signals.o: ../common/signals.c): Remove.
7925 (print-utils.o: ../common/print-utils.c): Remove.
7926 (rsp-low.o: ../common/rsp-low.c): Remove.
7927 (common-utils.o: ../common/common-utils.c): Remove.
7928 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7929 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7930 (vec.o: ../common/vec.c): Remove.
7931 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7932 (xml-utils.o: ../common/xml-utils.c): Remove.
7933 (ptid.o: ../common/ptid.c): Remove.
7934 (buffer.o: ../common/buffer.c): Remove.
7935 (format.o: ../common/format.c): Remove.
7936 (filestuff.o: ../common/filestuff.c): Remove.
7937 (agent.o: ../common/agent.c): Remove.
7938 (errors.o: ../common/errors.c): Remove.
7939 (environ.o: ../common/environ.c): Remove.
7940 (common-debug.o: ../common/common-debug.c): Remove.
7941 (cleanups.o: ../common/cleanups.c): Remove.
7942 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7943 (fileio.o: ../common/fileio.c): Remove.
7944 (common-regcache.o: ../common/common-regcache.c): Remove.
7945 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7946 (new-op.o: ../common/new-op.c): Remove.
7947 (btrace-common.o: ../common/btrace-common.c): Remove.
7948
7949 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7950
7951 * Makefile.in (%.o: ../target/%.c): New rule.
7952 (waitstatus.o: ../target/waitstatus.c): Remove.
7953
7954 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7955
7956 * Makefile.in
7957 (%.c: ../regformats/%.dat,
7958 (%.c: ../regformats/arm/%.dat,
7959 (%.c: ../regformats/i386/%.dat,
7960 (%.c: ../regformats/rs6000/%.dat): New rules.
7961 (aarch64.c): Remove.
7962 (reg-arm.c): Remove.
7963 (arm-with-iwmmxt.c): Remove.
7964 (arm-with-vfpv2.c): Remove.
7965 (arm-with-vfpv3.c): Remove.
7966 (arm-with-neon.c): Remove.
7967 (reg-bfin.c): Remove.
7968 (reg-cris.c): Remove.
7969 (reg-crisv32.c): Remove.
7970 (i386.c): Remove.
7971 (i386-linux.c): Remove.
7972 (i386-avx.c): Remove.
7973 (i386-avx-linux.c): Remove.
7974 (i386-avx-avx512.c): Remove.
7975 (i386-avx-avx512-linux.c): Remove.
7976 (i386-mpx.c): Remove.
7977 (i386-mpx-linux.c): Remove.
7978 (i386-avx-mpx-avx512-pku.c): Remove.
7979 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7980 (i386-avx-mpx.c): Remove.
7981 (i386-avx-mpx-linux.c): Remove.
7982 (i386-mmx.c): Remove.
7983 (i386-mmx-linux.c): Remove.
7984 (reg-ia64.c): Remove.
7985 (reg-m32r.c): Remove.
7986 (reg-m68k.c): Remove.
7987 (reg-cf.c): Remove.
7988 (mips-linux.c): Remove.
7989 (mips-dsp-linux.c): Remove.
7990 (mips64-linux.c): Remove.
7991 (mips64-dsp-linux.c): Remove.
7992 (nios2-linux.c): Remove.
7993 (powerpc-32.c): Remove.
7994 (powerpc-32l.c): Remove.
7995 (powerpc-altivec32l.c): Remove.
7996 (powerpc-cell32l.c): Remove.
7997 (powerpc-vsx32l.c): Remove.
7998 (powerpc-isa205-32l.c): Remove.
7999 (powerpc-isa205-altivec32l.c): Remove.
8000 (powerpc-isa205-vsx32l.c): Remove.
8001 (powerpc-e500l.c): Remove.
8002 (powerpc-64l.c): Remove.
8003 (powerpc-altivec64l.c): Remove.
8004 (powerpc-cell64l.c): Remove.
8005 (powerpc-vsx64l.c): Remove.
8006 (powerpc-isa205-64l.c): Remove.
8007 (powerpc-isa205-altivec64l.c): Remove.
8008 (powerpc-isa205-vsx64l.c): Remove.
8009 (s390-linux32.c): Remove.
8010 (s390-linux32v1.c): Remove.
8011 (s390-linux32v2.c): Remove.
8012 (s390-linux64.c): Remove.
8013 (s390-linux64v1.c): Remove.
8014 (s390-linux64v2.c): Remove.
8015 (s390-te-linux64.c): Remove.
8016 (s390-vx-linux64.c): Remove.
8017 (s390-tevx-linux64.c): Remove.
8018 (s390x-linux64.c): Remove.
8019 (s390x-linux64v1.c): Remove.
8020 (s390x-linux64v2.c): Remove.
8021 (s390x-te-linux64.c): Remove.
8022 (s390x-vx-linux64.c): Remove.
8023 (s390x-tevx-linux64.c): Remove.
8024 (tic6x-c64xp-linux.c): Remove.
8025 (tic6x-c64x-linux.c): Remove.
8026 (tic6x-c62x-linux.c): Remove.
8027 (reg-sh.c): Remove.
8028 (reg-sparc64.c): Remove.
8029 (reg-spu.c): Remove.
8030 (amd64.c): Remove.
8031 (amd64-linux.c): Remove.
8032 (amd64-avx.c): Remove.
8033 (amd64-avx-linux.c): Remove.
8034 (amd64-avx-avx512.c): Remove.
8035 (amd64-avx-avx512-linux.c): Remove.
8036 (amd64-mpx.c): Remove.
8037 (amd64-mpx-linux.c): Remove.
8038 (amd64-avx-mpx-avx512-pku.c): Remove.
8039 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
8040 (amd64-avx-mpx.c): Remove.
8041 (amd64-avx-mpx-linux.c): Remove.
8042 (x32.c): Remove.
8043 (x32-linux.c): Remove.
8044 (x32-avx.c): Remove.
8045 (x32-avx-linux.c): Remove.
8046 (x32-avx-avx512.c): Remove.
8047 (x32-avx-avx512-linux.c): Remove.
8048 (reg-xtensa.c): Remove.
8049 (reg-tilegx.c): Remove.
8050 (reg-tilegx32.c): Remove.
8051
8052 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
8053
8054 * Makefile.in (SFILES): Add "common/environ.c".
8055 (OBJS): Add "common/environ.h".
8056
8057 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8058
8059 * configure.ac: Check if the fs_base and gs_base members of
8060 `struct user_regs_struct' exist.
8061 * config.in: Regenerated.
8062 * configure: Likewise.
8063
8064 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
8065
8066 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
8067 target_read_memory.
8068 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
8069 (get_next_pcs_syscall_next_pc): Likewise.
8070
8071 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
8072
8073 * win32-i386-low.c: Fix incorrect reference to a couple source files.
8074 * nto-x86-low.c: Likewise.
8075
8076 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
8077
8078 * Makefile.in: Include disable-implicit-rules.mk.
8079
8080 2016-11-23 Pedro Alves <palves@redhat.com>
8081
8082 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
8083 (debug_vprintf): Use std::chrono::steady_clock instead of
8084 gettimeofday. Use '.' instead of ':'.
8085 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
8086 (get_timestamp): Use std::chrono::steady_clock instead of
8087 gettimeofday.
8088
8089 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
8090
8091 * Makefile.in: Fix whitespace formatting.
8092
8093 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
8094
8095 * Makefile.in (SFILES, OBS): Flatten list and order
8096 alphabetically.
8097
8098 2016-11-23 Pedro Alves <palves@redhat.com>
8099
8100 * event-loop.c (handle_file_event): Use warning.
8101 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
8102 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8103 Use warning.
8104
8105 2016-11-23 Pedro Alves <palves@redhat.com>
8106
8107 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
8108 output.
8109 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
8110 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
8111 debug_printf and debug_flush for debug output.
8112 * server.c (handle_general_set): Likewise.
8113 * thread-db.c (try_thread_db_load): Use debug_printf for debug
8114 output.
8115
8116 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
8117
8118 * Makefile.in (.c.o): Replace rule with ...
8119 (%.o: %.c): ... this one.
8120
8121 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
8122
8123 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
8124 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
8125 make.
8126 * configure.ac: Remove checks for the make program.
8127 * configure: Re-generate.
8128
8129 2016-10-28 Pedro Alves <palves@redhat.com>
8130
8131 * Makefile.in (CXX_DIALECT): Get from configure.
8132 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
8133 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
8134 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
8135 * config.in: Regenerate.
8136 * configure: Regenerate.
8137
8138 2016-10-27 Yao Qi <yao.qi@linaro.org>
8139
8140 * linux-low.c (linux_supports_range_stepping): Return true if
8141 can_software_single_step return true.
8142
8143 2016-10-27 Yao Qi <yao.qi@linaro.org>
8144
8145 * inferiors.c (find_inferior_in_random): New function.
8146 * inferiors.h (find_inferior_in_random): Declare.
8147 * linux-low.c (linux_wait_for_event_filtered): Call
8148 find_inferior_in_random instead of find_inferior.
8149
8150 2016-10-27 Yao Qi <yao.qi@linaro.org>
8151
8152 * linux-low.c (linux_wait_1): If single-step breakpoints are
8153 inserted, remove them.
8154
8155 2016-10-26 Pedro Alves <palves@redhat.com>
8156
8157 * linux-low.c (handle_extended_wait): Link parent/child fork
8158 threads.
8159 (linux_wait_1): Unlink them.
8160 (linux_set_resume_request): Ignore resume requests for
8161 already-resumed and unhandled fork child threads.
8162 * linux-low.h (struct lwp_info) <fork_relative>: New field.
8163 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
8164 New functions.
8165 (handle_v_requests) <vCont>: Don't call require_running.
8166 * server.h (in_queued_stop_replies): New declaration.
8167
8168 2016-10-24 Yao Qi <yao.qi@linaro.org>
8169
8170 PR server/20733
8171 * linux-aarch64-low.c (append_insns): Cast the return value to
8172 'uint32_t *'.
8173
8174 2016-10-10 Yao Qi <yao.qi@linaro.org>
8175
8176 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
8177
8178 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
8179
8180 * target.c (target_supports_multi_process): New function, moved
8181 from...
8182 * target.h (target_supports_multi_process): ... here. Remove
8183 macro.
8184
8185 2016-10-05 Tom Tromey <tom@tromey.com>
8186
8187 PR remote/20655:
8188 * tracepoint.c (handle_tracepoint_bkpts): Check
8189 ipa_error_tracepoint, not ipa_stopping_tracepoint.
8190
8191 2016-10-05 Yao Qi <yao.qi@linaro.org>
8192
8193 * configure.srv: Update the path of arm-*.xml files.
8194
8195 2016-10-05 Terry Guo <terry.guo@arm.com>
8196 Yao Qi <yao.qi@linaro.org>
8197
8198 * Makefile.in: Adjust the path of rules.
8199 * configure.srv: Update the path of xml files.
8200 * regformats/arm-with-iwmmxt.dat: Regenerated.
8201 * regformats/arm-with-neon.dat: Likewise.
8202 * regformats/arm-with-vfpv2.dat: Likewise.
8203 * regformats/arm-with-vfpv3.dat Likewise.
8204
8205 2016-09-30 Yao Qi <yao.qi@linaro.org>
8206
8207 PR gdbserver/20627
8208 * target.c (target_stop_and_wait): Don't call
8209 target_continue_no_signal, use resume_stop instead.
8210
8211 2016-09-26 Yao Qi <yao.qi@linaro.org>
8212
8213 * linux-low.c (linux_wait_1): Call debug_exit.
8214
8215 2016-09-23 Pedro Alves <palves@redhat.com>
8216
8217 * Makefile.in (SFILES): Add common/new-op.c.
8218 (OBS): Add common/new-op.o.
8219 (new-op.o): New rule.
8220
8221 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
8222
8223 * .gitinore: Ignore more files.
8224
8225 2016-09-21 Yao Qi <yao.qi@linaro.org>
8226
8227 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
8228 23.
8229
8230 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
8231
8232 * server.c (start_inferior): Call target_mourn_inferior instead of
8233 mourn_inferior; pass ptid_t argument to it.
8234 (resume): Likewise.
8235 (handle_target_event): Likewise.
8236 * target.c (target_mourn_inferior): New function.
8237 * target.h (mourn_inferior): Delete macro.
8238
8239 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8240
8241 * linux-low.c (lwp_is_stepping): New function.
8242
8243 2016-09-06 Carl Love <cel@us.ibm.com>
8244
8245 * server.c (start_inferior): Fixed comment, requested comment change
8246 didn't get updated correctly. Removed reference to ptrace () call as
8247 it is only true on Linux systems.
8248
8249 2016-09-06 Carl Love <cel@us.ibm.com>
8250
8251 * server.c (start_inferior): Do not call
8252 function target_post_create_inferior () if the
8253 inferior process has already exited.
8254
8255 2016-09-05 Pedro Alves <palves@redhat.com>
8256
8257 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
8258 (COMPILE.pre, CC_LD): Use CXX directly.
8259 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
8260 * acinclude.m4: Don't include build-with-cxx.m4.
8261 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
8262 * configure: Regenerate.
8263
8264 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
8265
8266 PR gdb/19495
8267 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
8268 call writing data to own_buf.
8269
8270 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8271
8272 * target.c (mywait): Call target_wait instead of
8273 the_target->wait.
8274 (target_wait): New function.
8275
8276 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8277
8278 * server.c (start_inferior): New variable 'ptid'. Replace calls
8279 to the_target->resume by target_continue{,_no_signal}, depending
8280 on the case.
8281 * target.c (target_stop_and_wait): Call target_continue_no_signal
8282 instead of the_target->resume.
8283 (target_continue): New function.
8284
8285 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
8286
8287 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
8288
8289 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
8290
8291 PR server/20491
8292 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
8293 ps_prochandle.
8294 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8295 * linux-arm-low.c (ps_get_thread_area): Likewise.
8296 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8297 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8298 * linux-mips-low.c (ps_get_thread_area): Likewise.
8299 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8300 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8301 * linux-x86-low.c (ps_get_thread_area): Likewise.
8302 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8303
8304 2016-08-19 Pedro Alves <palves@redhat.com>
8305
8306 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8307
8308 2016-08-19 Pedro Alves <palves@redhat.com>
8309
8310 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8311 comment. Use memcpy instead of casting through unsigned long.
8312
8313 2016-08-19 Pedro Alves <palves@redhat.com>
8314
8315 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8316 allocating around 0x80000000.
8317
8318 2016-08-19 Pedro Alves <palves@redhat.com>
8319
8320 PR gdb/20415
8321 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8322 (x32-avx512-linux-ipa.o): New rules.
8323 * configure.ac (x86_64-*-linux*): New x32 check.
8324 * configure.srv (ipa_x32_linux_regobj): New.
8325 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8326 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8327 descriptions.
8328 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8329 descriptions.
8330 * configure: Regenerate.
8331
8332 2016-08-09 Pedro Alves <palves@redhat.com>
8333
8334 PR gdb/18653
8335 * Makefile.in (OBS): Add signals-state-save-restore.o.
8336 (signals-state-save-restore.o): New rule.
8337 * config.in: Regenerate.
8338 * configure: Regenerate.
8339 * linux-low.c: Include "signals-state-save-restore.h".
8340 (linux_create_inferior): Call
8341 restore_original_signals_state.
8342 * server.c: Include "dispositions-save-restore.h".
8343 (captured_main): Call save_original_signals_state.
8344
8345 2016-08-05 Pedro Alves <palves@redhat.com>
8346
8347 * configure: Regenerate.
8348
8349 2016-08-04 Yao Qi <yao.qi@linaro.org>
8350
8351 * linux-low.c (regsets_fetch_inferior_registers): Check
8352 errno is ESRCH or not.
8353
8354 2016-08-02 Yao Qi <yao.qi@linaro.org>
8355
8356 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8357 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8358 (thread_db_load_search): Update.
8359 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8360 td_ta_set_event and td_ta_event_getmsg.
8361
8362 2016-07-26 Pedro Alves <palves@redhat.com>
8363
8364 PR server/20414
8365 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8366 of unsigned long for 64-bit registers and use uint32_t instead of
8367 unsigned int for 32-bit registers.
8368
8369 2016-07-26 Pedro Alves <palves@redhat.com>
8370
8371 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8372 to 'ptrace'.
8373
8374 2016-07-21 Tom Tromey <tom@tromey.com>
8375
8376 * configure: Rebuild.
8377
8378 2016-07-21 Yao Qi <yao.qi@linaro.org>
8379
8380 * mem-break.c (find_gdb_breakpoint): Cast bp to
8381 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8382
8383 2016-07-21 Yao Qi <yao.qi@linaro.org>
8384
8385 * server.c (handle_v_requests): Support s and S actions
8386 if target_supports_software_single_step return true.
8387
8388 2016-07-21 Yao Qi <yao.qi@linaro.org>
8389
8390 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8391 is resume_step, call maybe_hw_step.
8392 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8393 and unstop them.
8394 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8395 breakpoints or not.
8396 (proceed_one_lwp): If resume request is resume_step, install
8397 reinsert breakpoints and call maybe_hw_step.
8398
8399 2016-07-21 Yao Qi <yao.qi@linaro.org>
8400
8401 * linux-low.c (proceed_one_lwp): Declare.
8402 (linux_resume_one_thread): Remove local variable 'step'.
8403 Lift code enqueue signal. Call proceed_one_lwp instead of
8404 linux_resume_one_lwp.
8405
8406 2016-07-21 Yao Qi <yao.qi@linaro.org>
8407
8408 * linux-low.c (linux_resume_one_thread): Call
8409 enqueue_pending_signal.
8410
8411 2016-07-21 Yao Qi <yao.qi@linaro.org>
8412
8413 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8414 * inferiors.c (do_restore_current_thread_cleanup): New function.
8415 (make_cleanup_restore_current_thread): Likewise.
8416 * linux-low.c (install_software_single_step_breakpoints): Call
8417 make_cleanup_restore_current_thread. Switch current_thread to
8418 thread.
8419
8420 2016-07-21 Yao Qi <yao.qi@linaro.org>
8421
8422 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8423 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8424 (clone_one_breakpoint): Likewise.
8425 (delete_reinsert_breakpoints): Change parameter to thread.
8426 Callers updated.
8427 (has_reinsert_breakpoints): Likewise.
8428 (uninsert_reinsert_breakpoints): Likewise.
8429 (reinsert_reinsert_breakpoints): Likewise.
8430 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8431 (delete_reinsert_breakpoints): Likewise.
8432 (reinsert_reinsert_breakpoints): Likewise.
8433 (uninsert_reinsert_breakpoints): Likewise.
8434 (has_reinsert_breakpoints): Likewise.
8435
8436 2016-07-21 Yao Qi <yao.qi@linaro.org>
8437
8438 * inferiors.c (get_thread_process): Make parameter const.
8439 * inferiors.h (get_thread_process): Update declaration.
8440 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8441 Add new parameters child_thread and parent_thread. Callers
8442 updated.
8443 * mem-break.h (clone_all_breakpoints): Update declaration.
8444
8445 2016-07-21 Yao Qi <yao.qi@linaro.org>
8446
8447 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8448 <command_list, handler>: Remove.
8449 (struct gdb_breakpoint): New.
8450 (struct other_breakpoint): New.
8451 (struct reinsert_breakpoint): New.
8452 (is_gdb_breakpoint): New function.
8453 (any_persistent_commands): Update command_list if
8454 is_gdb_breakpoint returns true.
8455 (set_breakpoint): Create breakpoints according to their types.
8456 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8457 (set_gdb_breakpoint_1): Likewise.
8458 (set_gdb_breakpoint): Likewise.
8459 (clear_breakpoint_conditions): Change parameter type to
8460 'struct gdb_breakpoint *'.
8461 (clear_breakpoint_commands): Likewise.
8462 (clear_breakpoint_conditions_and_commands): Likewise.
8463 (add_condition_to_breakpoint): Likewise.
8464 (add_breakpoint_condition): Likewise.
8465 (add_commands_to_breakpoint): Likewise.
8466 (check_breakpoints): Check other_breakpoint.
8467 (clone_one_breakpoint): Clone breakpopint according to its type.
8468 * mem-break.h (struct gdb_breakpoint): Declare.
8469 (set_gdb_breakpoint): Update declaration.
8470 (clear_breakpoint_conditions_and_commands): Likewise.
8471 (add_breakpoint_condition): Likewise.
8472 (add_breakpoint_commands): Likewise.
8473 * server.c (process_point_options): Change parameter type to
8474 'struct gdb_breakpoint *'.
8475
8476 2016-07-21 Yao Qi <yao.qi@linaro.org>
8477
8478 * mem-break.c (set_breakpoint_at): Rename it to ...
8479 (set_breakpoint_type_at): ... it.
8480 (set_breakpoint_at): Call set_breakpoint_type_at.
8481 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8482 * mem-break.h (set_breakpoint_at): Update comments.
8483
8484 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8485
8486 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8487 to buf parameter.
8488 (nios2_store_gregset): Likewise.
8489
8490 2016-07-01 Pedro Alves <palves@redhat.com>
8491 Antoine Tremblay <antoine.tremblay@ericsson.com>
8492
8493 * linux-low.c: Change interface to take the target lwp_info
8494 pointer directly and return void. Handle detaching from a zombie
8495 thread.
8496 (linux_detach_lwp_callback): New function.
8497 (linux_detach): Detach from the leader thread after detaching from
8498 the clone threads.
8499
8500 2016-06-28 Yao Qi <yao.qi@linaro.org>
8501
8502 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8503 for variable new_offset.
8504 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8505 (aarch64_ftrace_insn_reloc_cb): Likewise.
8506 (aarch64_ftrace_insn_reloc_tb): Likewise.
8507 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8508 PRIx64 instead of PRIx32.
8509
8510 2016-06-28 Yao Qi <yao.qi@linaro.org>
8511
8512 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8513 (the_low_target): Install arm_get_syscall_trapinfo.
8514
8515 2016-06-28 Yao Qi <yao.qi@linaro.org>
8516
8517 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8518 function.
8519 (the_low_target): Install aarch64_get_syscall_trapinfo.
8520
8521 2016-06-28 Yao Qi <yao.qi@linaro.org>
8522
8523 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8524 Callers updated.
8525 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8526 Remove parameter sysno.
8527 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8528 sysret.
8529
8530 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8531
8532 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8533 (s390_emit_ne_goto): Likewise.
8534 (s390_emit_lt_goto): Likewise.
8535 (s390_emit_le_goto): Likewise.
8536 (s390_emit_gt_goto): Likewise.
8537 (s390_emit_ge_goto): Likewise.
8538 (s390x_emit_eq_goto): Likewise.
8539 (s390x_emit_ne_goto): Likewise.
8540 (s390x_emit_lt_goto): Likewise.
8541 (s390x_emit_le_goto): Likewise.
8542 (s390x_emit_gt_goto): Likewise.
8543 (s390x_emit_ge_goto): Likewise.
8544 (s390_emit_ops_impl): Mark variable static.
8545 (s390x_emit_ops): Likewise.
8546
8547 2016-06-17 Yao Qi <yao.qi@linaro.org>
8548
8549 * linux-low.c (handle_extended_wait): Call
8550 uninsert_reinsert_breakpoints for the parent process. Remove
8551 reinsert breakpoints from the child process. Reinsert them to
8552 the parent process when vfork is done.
8553 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8554 (reinsert_reinsert_breakpoints): New function.
8555 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8556 (reinsert_reinsert_breakpoints): Declare.
8557
8558 2016-06-17 Yao Qi <yao.qi@linaro.org>
8559
8560 * linux-low.c (handle_extended_wait): If the parent is doing
8561 step-over, remove the reinsert breakpoints from the forked child.
8562
8563 2016-06-17 Yao Qi <yao.qi@linaro.org>
8564
8565 * linux-low.c (unsuspend_all_lwps): Declare.
8566 (linux_low_filter_event): If thread exited, call finish_step_over.
8567 If step-over is finished, unsuspend other threads.
8568
8569 2016-06-17 Yao Qi <yao.qi@linaro.org>
8570
8571 * linux-low.c (linux_resume_one_lwp_throw): Assert
8572 has_reinsert_breakpoints returns false.
8573 * mem-break.c (delete_disabled_breakpoints): Assert
8574 bp type isn't reinsert_breakpoint.
8575
8576 2016-06-17 Yao Qi <yao.qi@linaro.org>
8577
8578 * linux-low.c (maybe_hw_step): New function.
8579 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8580 (finish_step_over): Switch current_thread to lwp temporarily,
8581 and assert has_reinsert_breakpoints returns true.
8582 (proceed_one_lwp): Call maybe_hw_step.
8583 * mem-break.c (has_reinsert_breakpoints): New function.
8584 * mem-break.h (has_reinsert_breakpoints): Declare.
8585
8586 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8587
8588 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8589
8590 2016-05-17 Yao Qi <yao.qi@linaro.org>
8591
8592 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8593 instead of find_inferior.
8594
8595 2016-05-05 Yao Qi <yao.qi@linaro.org>
8596
8597 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8598 Initialize res to zero.
8599
8600 2016-05-05 Yao Qi <yao.qi@linaro.org>
8601
8602 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8603 to uint32_t.
8604
8605 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8606
8607 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8608 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8609 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8610
8611 2016-04-28 Par Olsson <par.olsson@windriver.com>
8612 Simon Marchi <simon.marchi@ericsson.com>
8613
8614 * tracepoint.c (write_inferior_int8): New function.
8615 (cmd_qtenable_disable): Write enable flag using
8616 write_inferior_int8.
8617
8618 2016-04-25 Yao Qi <yao.qi@linaro.org>
8619
8620 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8621 (need_step_over_p): Return zero if the LWP has pending signals
8622 can be delivered on software single step target.
8623
8624 2016-04-25 Yao Qi <yao.qi@linaro.org>
8625
8626 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8627 return instead of error.
8628
8629 2016-04-22 Yao Qi <yao.qi@linaro.org>
8630
8631 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8632 to 23.
8633
8634 2016-04-22 Yao Qi <yao.qi@linaro.org>
8635
8636 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8637 signal when stepping over breakpoint with software single
8638 step.
8639
8640 2016-04-21 Pedro Alves <palves@redhat.com>
8641
8642 * linux-s390-low.c (s390_collect_ptrace_register)
8643 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8644 add casts.
8645 (s390_check_regset): Use void * instead of gdb_byte *.
8646
8647 2016-04-20 Pedro Alves <palves@redhat.com>
8648
8649 * configure: Renegerate.
8650
8651 2016-04-20 Yao Qi <yao.qi@linaro.org>
8652
8653 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8654 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8655 number 16.
8656 (arm_store_gregset): Likewise.
8657
8658 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8659
8660 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8661 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8662 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8663 (amd64-avx-mpx-linux.c): New rules.
8664 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8665 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8666 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8667 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8668 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8669 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8670 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8671 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8672 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8673 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8674 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8675 * linux-x86-low.c (x86_linux_read_description): Add case for
8676 X86_XSTATE_AVX_MPX_MASK.
8677 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8678 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8679 init_registers_i386_avx_mpx_linux.
8680 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8681 (initialize_low_tracepoint): Call
8682 init_registers_i386_avx_mpx_linux.
8683 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8684 (initialize_low_tracepoint): Call
8685 init_registers_amd64_avx_mpx_linux.
8686 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8687 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8688 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8689 declarations.
8690
8691 2016-04-18 Pedro Alves <palves@redhat.com>
8692
8693 * configure: Regenerate.
8694
8695 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8696
8697 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8698 (aarch64_emit_sub): Likewise.
8699
8700 2016-04-12 Pedro Alves <palves@redhat.com>
8701
8702 * utils.c (prepare_to_throw_exception): Delete.
8703
8704 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8705
8706 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8707
8708 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8709
8710 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8711
8712 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8713
8714 * linux-aarch64-ipa.c: Add <elf.h> include.
8715 * linux-ppc-ipa.c: Add <elf.h> include.
8716 * linux-s390-ipa.c: Add <elf.h> include.
8717
8718 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8719
8720 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8721 (get_raw_reg_ptr): Likewise.
8722 (get_trace_state_variable_value_ptr): Likewise.
8723 (set_trace_state_variable_value_ptr): Likewise.
8724 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8725 char *.
8726
8727 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8728 Marcin Kościelnicki <koriakin@0x04.net>
8729
8730 PR/17221
8731 * linux-ppc-low.c (emit_insns): New function.
8732 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8733 (ppc_emit_prologue): New function.
8734 (ppc_emit_epilogue): New function.
8735 (ppc_emit_add): New function.
8736 (ppc_emit_sub): New function.
8737 (ppc_emit_mul): New function.
8738 (ppc_emit_lsh): New function.
8739 (ppc_emit_rsh_signed): New function.
8740 (ppc_emit_rsh_unsigned): New function.
8741 (ppc_emit_ext): New function.
8742 (ppc_emit_zero_ext): New function.
8743 (ppc_emit_log_not): New function.
8744 (ppc_emit_bit_and): New function.
8745 (ppc_emit_bit_or): New function.
8746 (ppc_emit_bit_xor): New function.
8747 (ppc_emit_bit_not): New function.
8748 (ppc_emit_equal): New function.
8749 (ppc_emit_less_signed): New function.
8750 (ppc_emit_less_unsigned): New function.
8751 (ppc_emit_ref): New function.
8752 (ppc_emit_const): New function.
8753 (ppc_emit_reg): New function.
8754 (ppc_emit_pop): New function.
8755 (ppc_emit_stack_flush): New function.
8756 (ppc_emit_swap): New function.
8757 (ppc_emit_stack_adjust): New function.
8758 (ppc_emit_call): New function.
8759 (ppc_emit_int_call_1): New function.
8760 (ppc_emit_void_call_2): New function.
8761 (ppc_emit_if_goto): New function.
8762 (ppc_emit_goto): New function.
8763 (ppc_emit_eq_goto): New function.
8764 (ppc_emit_ne_goto): New function.
8765 (ppc_emit_lt_goto): New function.
8766 (ppc_emit_le_goto): New function.
8767 (ppc_emit_gt_goto): New function.
8768 (ppc_emit_ge_goto): New function.
8769 (ppc_write_goto_address): New function.
8770 (ppc_emit_ops_impl): New static variable.
8771 (ppc64v1_emit_prologue): New function.
8772 (ppc64v2_emit_prologue): New function.
8773 (ppc64_emit_epilogue): New function.
8774 (ppc64_emit_add): New function.
8775 (ppc64_emit_sub): New function.
8776 (ppc64_emit_mul): New function.
8777 (ppc64_emit_lsh): New function.
8778 (ppc64_emit_rsh_signed): New function.
8779 (ppc64_emit_rsh_unsigned): New function.
8780 (ppc64_emit_ext): New function.
8781 (ppc64_emit_zero_ext): New function.
8782 (ppc64_emit_log_not): New function.
8783 (ppc64_emit_bit_and): New function.
8784 (ppc64_emit_bit_or): New function.
8785 (ppc64_emit_bit_xor): New function.
8786 (ppc64_emit_bit_not): New function.
8787 (ppc64_emit_equal): New function.
8788 (ppc64_emit_less_signed): New function.
8789 (ppc64_emit_less_unsigned): New function.
8790 (ppc64_emit_ref): New function.
8791 (ppc64_emit_const): New function.
8792 (ppc64v1_emit_reg): New function.
8793 (ppc64v2_emit_reg): New function.
8794 (ppc64_emit_pop): New function.
8795 (ppc64_emit_stack_flush): New function.
8796 (ppc64_emit_swap): New function.
8797 (ppc64v1_emit_call): New function.
8798 (ppc64v2_emit_call): New function.
8799 (ppc64v1_emit_int_call_1): New function.
8800 (ppc64v2_emit_int_call_1): New function.
8801 (ppc64v1_emit_void_call_2): New function.
8802 (ppc64v2_emit_void_call_2): New function.
8803 (ppc64_emit_if_goto): New function.
8804 (ppc64_emit_eq_goto): New function.
8805 (ppc64_emit_ne_goto): New function.
8806 (ppc64_emit_lt_goto): New function.
8807 (ppc64_emit_le_goto): New function.
8808 (ppc64_emit_gt_goto): New function.
8809 (ppc64_emit_ge_goto): New function.
8810 (ppc64v1_emit_ops_impl): New static variable.
8811 (ppc64v2_emit_ops_impl): New static variable.
8812 (ppc_emit_ops): New function.
8813 (linux_low_target): Wire in ppc_emit_ops.
8814
8815 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8816 Marcin Kościelnicki <koriakin@0x04.net>
8817
8818 PR/17221
8819 * Makefile.in: Add powerpc-*-ipa.o
8820 * configure.srv: Add ipa_obj for powerpc*-linux.
8821 * linux-ppc-ipa.c: New file.
8822 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8823 includes.
8824 (PPC_FIELD): New macro.
8825 (PPC_SEXT): New macro.
8826 (PPC_OP6): New macro.
8827 (PPC_BO): New macro.
8828 (PPC_LI): New macro.
8829 (PPC_BD): New macro.
8830 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8831 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8832 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8833 (ppc_get_thread_area): New function.
8834 (is_elfv2_inferior): New function.
8835 (gen_ds_form): New function.
8836 (GEN_STD): New macro.
8837 (GEN_STDU): New macro.
8838 (GEN_LD): New macro.
8839 (GEN_LDU): New macro.
8840 (gen_d_form): New function.
8841 (GEN_ADDI): New macro.
8842 (GEN_ADDIS): New macro.
8843 (GEN_LI): New macro.
8844 (GEN_LIS): New macro.
8845 (GEN_ORI): New macro.
8846 (GEN_ORIS): New macro.
8847 (GEN_LWZ): New macro.
8848 (GEN_STW): New macro.
8849 (GEN_STWU): New macro.
8850 (gen_xfx_form): New function.
8851 (GEN_MFSPR): New macro.
8852 (GEN_MTSPR): New macro.
8853 (GEN_MFCR): New macro.
8854 (GEN_MTCR): New macro.
8855 (GEN_SYNC): New macro.
8856 (GEN_LWSYNC): New macro.
8857 (gen_x_form): New function.
8858 (GEN_OR): New macro.
8859 (GEN_MR): New macro.
8860 (GEN_LWARX): New macro.
8861 (GEN_STWCX): New macro.
8862 (GEN_CMPW): New macro.
8863 (gen_md_form): New function.
8864 (GEN_RLDICL): New macro.
8865 (GEN_RLDICR): New macro.
8866 (gen_i_form): New function.
8867 (GEN_B): New macro.
8868 (GEN_BL): New macro.
8869 (gen_b_form): New function.
8870 (GEN_BNE): New macro.
8871 (GEN_LOAD): New macro.
8872 (GEN_STORE): New macro.
8873 (gen_limm): New function.
8874 (gen_atomic_xchg): New function.
8875 (gen_call): New function.
8876 (ppc_relocate_instruction): New function.
8877 (ppc_install_fast_tracepoint_jump_pad): New function.
8878 (ppc_get_min_fast_tracepoint_insn_len): New function.
8879 (ppc_get_ipa_tdesc_idx): New function.
8880 (the_low_target): Wire in the new functions.
8881 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8882 tdescs.
8883 * linux-ppc-tdesc.h: New file.
8884
8885 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8886
8887 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8888 (alloc_jump_pad_buffer): New function.
8889 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8890 (alloc_jump_pad_buffer): New function.
8891 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8892 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8893 (alloc_jump_pad_buffer): New function.
8894 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8895 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8896 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8897 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8898
8899 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8900
8901 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8902 * linux-amd64-ipa.c: Likewise.
8903 * linux-i386-ipa.c: Likewise.
8904 * linux-s390-ipa.c: Likewise.
8905 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8906 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8907 set_trace_state_variable_value_ptr.
8908 (struct ipa_sym_addresses): Likewise.
8909 (symbol_list): Likewise.
8910 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8911 accessing gdb_collect directly.
8912 (gdb_collect_ptr_type): New typedef.
8913 (get_raw_reg_ptr_type): New typedef.
8914 (get_trace_state_variable_value_ptr_type): New typedef.
8915 (set_trace_state_variable_value_ptr_type): New typedef.
8916 (gdb_collect_ptr): New global.
8917 (get_raw_reg_ptr): New global.
8918 (get_trace_state_variable_value_ptr): New global.
8919 (set_trace_state_variable_value_ptr): New global.
8920 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8921 accessing get_raw_reg directly.
8922 (get_get_tsv_func_addr): Likewise for
8923 get_trace_state_variable_value_ptr.
8924 (get_set_tsv_func_addr): Likewise for
8925 set_trace_state_variable_value_ptr.
8926 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8927
8928 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8929
8930 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8931
8932 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8933
8934 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8935 packets.
8936 (relocate_instruction): Remove own_buf.
8937 * server.c (own_buf): Make global.
8938 (handle_v_requests): Make global.
8939 * server.h (own_buf): New declaration.
8940 (handle_v_requests): New prototype.
8941
8942 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8943
8944 PR 18377
8945 * linux-s390-low.c (add_insns): New function.
8946 (s390_emit_prologue): New function.
8947 (s390_emit_epilogue): New function.
8948 (s390_emit_add): New function.
8949 (s390_emit_sub): New function.
8950 (s390_emit_mul): New function.
8951 (s390_emit_lsh): New function.
8952 (s390_emit_rsh_signed): New function.
8953 (s390_emit_rsh_unsigned): New function.
8954 (s390_emit_ext): New function.
8955 (s390_emit_log_not): New function.
8956 (s390_emit_bit_and): New function.
8957 (s390_emit_bit_or): New function.
8958 (s390_emit_bit_xor): New function.
8959 (s390_emit_bit_not): New function.
8960 (s390_emit_equal): New function.
8961 (s390_emit_less_signed): New function.
8962 (s390_emit_less_unsigned): New function.
8963 (s390_emit_ref): New function.
8964 (s390_emit_if_goto): New function.
8965 (s390_emit_goto): New function.
8966 (s390_write_goto_address): New function.
8967 (s390_emit_litpool): New function.
8968 (s390_emit_const): New function.
8969 (s390_emit_call): New function.
8970 (s390_emit_reg): New function.
8971 (s390_emit_pop): New function.
8972 (s390_emit_stack_flush): New function.
8973 (s390_emit_zero_ext): New function.
8974 (s390_emit_swap): New function.
8975 (s390_emit_stack_adjust): New function.
8976 (s390_emit_set_r2): New function.
8977 (s390_emit_int_call_1): New function.
8978 (s390_emit_void_call_2): New function.
8979 (s390_emit_eq_goto): New function.
8980 (s390_emit_ne_goto): New function.
8981 (s390_emit_lt_goto): New function.
8982 (s390_emit_le_goto): New function.
8983 (s390_emit_gt_goto): New function.
8984 (s390_emit_ge_goto): New function.
8985 (s390x_emit_prologue): New function.
8986 (s390x_emit_epilogue): New function.
8987 (s390x_emit_add): New function.
8988 (s390x_emit_sub): New function.
8989 (s390x_emit_mul): New function.
8990 (s390x_emit_lsh): New function.
8991 (s390x_emit_rsh_signed): New function.
8992 (s390x_emit_rsh_unsigned): New function.
8993 (s390x_emit_ext): New function.
8994 (s390x_emit_log_not): New function.
8995 (s390x_emit_bit_and): New function.
8996 (s390x_emit_bit_or): New function.
8997 (s390x_emit_bit_xor): New function.
8998 (s390x_emit_bit_not): New function.
8999 (s390x_emit_equal): New function.
9000 (s390x_emit_less_signed): New function.
9001 (s390x_emit_less_unsigned): New function.
9002 (s390x_emit_ref): New function.
9003 (s390x_emit_if_goto): New function.
9004 (s390x_emit_const): New function.
9005 (s390x_emit_call): New function.
9006 (s390x_emit_reg): New function.
9007 (s390x_emit_pop): New function.
9008 (s390x_emit_stack_flush): New function.
9009 (s390x_emit_zero_ext): New function.
9010 (s390x_emit_swap): New function.
9011 (s390x_emit_stack_adjust): New function.
9012 (s390x_emit_int_call_1): New function.
9013 (s390x_emit_void_call_2): New function.
9014 (s390x_emit_eq_goto): New function.
9015 (s390x_emit_ne_goto): New function.
9016 (s390x_emit_lt_goto): New function.
9017 (s390x_emit_le_goto): New function.
9018 (s390x_emit_gt_goto): New function.
9019 (s390x_emit_ge_goto): New function.
9020 (s390_emit_ops): New function.
9021 (struct linux_target_ops): Fill in emit_ops hook.
9022
9023 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
9024
9025 PR 18377
9026 * Makefile.in: Add s390 IPA files.
9027 * configure.srv: Build IPA for s390.
9028 * linux-s390-ipa.c: New file.
9029 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
9030 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
9031 (tdesc_s390_linux32): Likewise.
9032 (init_registers_s390_linux32v1): Likewise.
9033 (tdesc_s390_linux32v1): Likewise.
9034 (init_registers_s390_linux32v2): Likewise.
9035 (tdesc_s390_linux32v2): Likewise.
9036 (init_registers_s390_linux64): Likewise.
9037 (tdesc_s390_linux64): Likewise.
9038 (init_registers_s390_linux64v1): Likewise.
9039 (tdesc_s390_linux64v1): Likewise.
9040 (init_registers_s390_linux64v2): Likewise.
9041 (tdesc_s390_linux64v2): Likewise.
9042 (init_registers_s390_te_linux64): Likewise.
9043 (tdesc_s390_te_linux64): Likewise.
9044 (init_registers_s390_vx_linux64): Likewise.
9045 (tdesc_s390_vx_linux64): Likewise.
9046 (init_registers_s390_tevx_linux64): Likewise.
9047 (tdesc_s390_tevx_linux64): Likewise.
9048 (init_registers_s390x_linux64): Likewise.
9049 (tdesc_s390x_linux64): Likewise.
9050 (init_registers_s390x_linux64v1): Likewise.
9051 (tdesc_s390x_linux64v1): Likewise.
9052 (init_registers_s390x_linux64v2): Likewise.
9053 (tdesc_s390x_linux64v2): Likewise.
9054 (init_registers_s390x_te_linux64): Likewise.
9055 (tdesc_s390x_te_linux64): Likewise.
9056 (init_registers_s390x_vx_linux64): Likewise.
9057 (tdesc_s390x_vx_linux64): Likewise.
9058 (init_registers_s390x_tevx_linux64): Likewise.
9059 (tdesc_s390x_tevx_linux64): Likewise.
9060 (have_hwcap_s390_vx): New static variable.
9061 (s390_arch_setup): Fill have_hwcap_s390_vx.
9062 (s390_get_thread_area): New function.
9063 (s390_ft_entry_gpr_esa): New const.
9064 (s390_ft_entry_gpr_zarch): New const.
9065 (s390_ft_entry_misc): New const.
9066 (s390_ft_entry_fr): New const.
9067 (s390_ft_entry_vr): New const.
9068 (s390_ft_main_31): New const.
9069 (s390_ft_main_64): New const.
9070 (s390_ft_exit_fr): New const.
9071 (s390_ft_exit_vr): New const.
9072 (s390_ft_exit_misc): New const.
9073 (s390_ft_exit_gpr_esa): New const.
9074 (s390_ft_exit_gpr_zarch): New const.
9075 (append_insns): New function.
9076 (s390_relocate_instruction): New function.
9077 (s390_install_fast_tracepoint_jump_pad): New function.
9078 (s390_get_min_fast_tracepoint_insn_len): New function.
9079 (s390_get_ipa_tdesc_idx): New function.
9080 (struct linux_target_ops): Wire in the above functions.
9081 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
9082 * linux-s390-tdesc.h: New file.
9083
9084 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
9085
9086 * linux-s390-low.c (s390_supports_tracepoints): New function.
9087 (struct linux_target_ops): Fill supports_tracepoints hook.
9088
9089 2016-03-18 Yao Qi <yao.qi@linaro.org>
9090
9091 * linux-low.c (lwp_signal_can_be_delivered): New function.
9092 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
9093
9094 2016-03-18 Yao Qi <yao.qi@linaro.org>
9095
9096 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
9097 0 if signal is enqueued. Remove 'signal' from one debugging
9098 message. Move one debugging message to some lines below.
9099 Remove code setting 'signal' to 0.
9100
9101 2016-03-18 Yao Qi <yao.qi@linaro.org>
9102
9103 * linux-low.c (linux_low_filter_event): Remove redundant
9104 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
9105
9106 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
9107
9108 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
9109 (struct linux_target_ops): Wire in the above.
9110
9111 2016-03-03 Yao Qi <yao.qi@linaro.org>
9112
9113 * linux-low.c: Update comments to start_step_over.
9114
9115 2016-03-03 Yao Qi <yao.qi@linaro.org>
9116
9117 PR server/19736
9118 * linux-low.c (handle_extended_wait): Set child suspended
9119 if event_lwp->bp_reinsert isn't zero.
9120
9121 2016-03-02 Yao Qi <yao.qi@linaro.org>
9122
9123 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
9124 enqueue_pending_signal.
9125
9126 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
9127
9128 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
9129 is actually loaded.
9130
9131 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9132
9133 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
9134 (s390_regmap_3264) [!__s390x__]: New global.
9135 (s390_collect_ptrace_register): Skip map entries containing -1.
9136 (s390_supply_ptrace_register): Ditto.
9137 (s390_fill_gprs_high): New function.
9138 (s390_store_gprs_high): New function.
9139 (s390_regsets): Add NT_S390_HIGH_GPRS.
9140 (s390_get_hwcap): Enable on 31-bit.
9141 (have_hwcap_s390_high_gprs): Enable on 31-bit.
9142 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
9143 Detect NT_S390_HIGH_GPRS.
9144 (s390_usrregs_info_3264): Enable on 31-bit.
9145 (s390_regs_info): Enable regs_info_3264 on 31-bit.
9146 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
9147
9148 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9149
9150 PR gdb/13808
9151 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
9152 * configure.srv: Ditto.
9153 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
9154 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
9155 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
9156 (init_registers_amd64_linux): Remove prototype.
9157 (tdesc_amd64_linux): Remove declaration.
9158 (get_ipa_tdesc): New function.
9159 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9160 initialize remaining tdescs.
9161 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
9162 (init_registers_i386_linux): Remove prototype.
9163 (tdesc_i386_linux): Remove declaration.
9164 (get_ipa_tdesc): New function.
9165 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9166 initialize remaining tdescs.
9167 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
9168 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
9169 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
9170 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
9171 (x86_get_ipa_tdesc_idx): New function.
9172 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
9173 * linux-x86-tdesc.h: New file.
9174 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
9175 (target_get_ipa_tdesc_idx): New macro.
9176 * tracepoint.c (ipa_tdesc_idx): New macro.
9177 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
9178 (symbol_list): Add ipa_tdesc_idx.
9179 (cmd_qtstart): Write ipa_tdesc_idx in the target.
9180 (ipa_tdesc): Remove.
9181 (ipa_tdesc_idx): New variable.
9182 (get_context_regcache): Use get_ipa_tdesc.
9183 (gdb_collect): Ditto.
9184 (gdb_probe): Ditto.
9185 * tracepoint.h (get_ipa_tdesc): New prototype.
9186 (ipa_tdesc): Remove.
9187
9188 2016-02-24 Pedro Alves <palves@redhat.com>
9189
9190 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
9191 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
9192 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
9193 Factor out common code between the USE_SIGTRAP_SIGINFO and
9194 !USE_SIGTRAP_SIGINFO blocks.
9195 (linux_low_filter_event): Call save_stop_reason instead of
9196 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
9197 Update comments.
9198 (linux_wait_1): Update comments.
9199
9200 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
9201
9202 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
9203 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
9204 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
9205 ppc_insert_point, ppc_remove_point.
9206
9207 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
9208
9209 * linux-s390-low.c (s390_supports_z_point_type): New function.
9210 (struct linux_target_ops): Wire s390_supports_z_point_type in.
9211
9212 2016-02-16 Yao Qi <yao.qi@linaro.org>
9213
9214 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9215 PC. Get pc from regcache_read_pc.
9216
9217 2016-02-12 Yao Qi <yao.qi@linaro.org>
9218
9219 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
9220 or linux_get_pc_32bit.
9221 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
9222
9223 2016-02-12 Yao Qi <yao.qi@linaro.org>
9224
9225 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
9226 arm_linux_get_next_pcs_fixup.
9227
9228 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
9229
9230 * tracepoint.c (x_tracepoint_action_download): Change
9231 write_inferior_data_ptr to write_inferior_data_pointer.
9232 (cmd_qtstart): Likewise.
9233 (write_inferior_data_ptr): Remove.
9234 (download_agent_expr): Change write_inferior_data_ptr to
9235 write_inferior_data_pointer.
9236 (download_tracepoint_1): Likewise.
9237 (download_tracepoint): Likewise.
9238 (download_trace_state_variables): Likewise.
9239
9240 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
9241 Marcin Kościelnicki <koriakin@0x04.net>
9242
9243 * tracepoint.c (struct tracepoint_action_ops): Remove.
9244 (struct tracepoint_action): Remove ops.
9245 (m_tracepoint_action_download, r_tracepoint_action_download)
9246 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
9247 size and offset accordingly.
9248 (m_tracepoint_action_ops, r_tracepoint_action_ops)
9249 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
9250 (tracepoint_action_send, tracepoint_action_download): New functions.
9251 Helpers for trace action handlers.
9252 (add_tracepoint_action): Remove setup actions ops.
9253 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
9254
9255 2016-02-10 Yao Qi <yao.qi@linaro.org>
9256
9257 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
9258
9259 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9260
9261 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
9262 to AC_OUTPUT.
9263 * configure: Regenerate.
9264
9265 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9266
9267 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
9268 void * to gdb_byte *.
9269 * linux-low.c (siginfo_fixup): Likewise.
9270 (linux_xfer_siginfo): Likewise.
9271 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
9272 Likewise.
9273 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9274
9275 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
9276
9277 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9278 to srv_tgtobj.
9279 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
9280 to srv_tgtobj.
9281 * linux-x86-low.c [__x86_64__]: Include
9282 "nat/amd64-linux-siginfo.h".
9283 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
9284 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
9285 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
9286 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
9287 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
9288 (cpt_si_fd, si_timerid, si_overrun): Move from
9289 nat/amd64-linux-siginfo.c.
9290 * Makefile.in (amd64-linux-siginfo.o:): New rule.
9291
9292 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
9293
9294 * server.c (skip_to_semicolon): Remove.
9295 (process_point_options): Use strchrnul instead of
9296 skip_to_semicolon.
9297
9298 2016-01-26 Yao Qi <yao.qi@linaro.org>
9299
9300 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9301 * linux-low.c (install_software_single_step_breakpoints): Don't
9302 call regcache_read_pc.
9303 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9304 argument pc.
9305
9306 2016-01-26 Yao Qi <yao.qi@linaro.org>
9307
9308 * linux-low.c (install_software_single_step_breakpoints): Call
9309 regcache_read_pc instead of get_pc.
9310
9311 2016-01-26 Yao Qi <yao.qi@linaro.org>
9312
9313 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9314 (unblock_async_io): Rename to ...
9315 (block_unblock_async_io): ... it. New function.
9316 (enable_async_io): Don't install SIGIO handler. Unblock it
9317 instead.
9318 (disable_async_io): Don't ignore SIGIO. Block it instead.
9319 (initialize_async_io): Install SIGIO handler. Don't call
9320 unblock_async_io.
9321
9322 2016-01-26 Yao Qi <yao.qi@linaro.org>
9323
9324 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9325 first character is '\003', call *the_target->request_interrupt.
9326
9327 2016-01-25 Yao Qi <yao.qi@linaro.org>
9328
9329 * remote-utils.c (new_thread_notify): Remove.
9330 (dead_thread_notify): Likewise.
9331 * remote-utils.h (new_thread_notify): Remove declaration.
9332 (dead_thread_notify): Likewise.
9333
9334 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9335
9336 * gdb.trace/pending.exp: Fix expected message on continue.
9337
9338 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9339
9340 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9341 it works properly on big-endian machines where sizeof (CORE_ADDR)
9342 != sizeof (void *).
9343
9344 2016-01-21 Pedro Alves <palves@redhat.com>
9345
9346 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9347 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9348 * configure: Regenerate.
9349
9350 2016-01-21 Yao Qi <yao.qi@linaro.org>
9351
9352 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9353 is_thumb and set it according to CPSR saved on the stack.
9354 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9355 arm_sigreturn_next_pc.
9356
9357 2016-01-18 Yao Qi <yao.qi@linaro.org>
9358
9359 * linux-low.c (linux_set_pc_64bit): New function.
9360 (linux_get_pc_64bit): New function.
9361 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9362 Declare.
9363 * linux-sparc-low.c (debug_threads): Remove declaration.
9364 (sparc_get_pc): Remove.
9365 (the_low_target): Use linux_get_pc_64bit instead of
9366 sparc_get_pc.
9367 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9368 (the_low_target): Use linux_get_pc_64bit and
9369 linux_set_pc_64bit.
9370
9371 2016-01-18 Yao Qi <yao.qi@linaro.org>
9372
9373 * linux-arm-low.c (debug_threads): Remove declaration.
9374 (arm_get_pc, arm_set_pc): Remove.
9375 (the_low_target): Use linux_get_pc_32bit and
9376 linux_set_pc_32bit.
9377 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9378 (the_low_target): Use linux_get_pc_32bit and
9379 linux_set_pc_32bit.
9380 * linux-cris-low.c (debug_threads): Remove declaration.
9381 (cris_get_pc, cris_set_pc,): Remove.
9382 (the_low_target): Use linux_get_pc_32bit and
9383 linux_set_pc_32bit.
9384 * linux-crisv32-low.c (debug_threads): Remove declaration.
9385 (cris_get_pc, cris_set_pc): Remove.
9386 (the_low_target): Use linux_get_pc_32bit and
9387 linux_set_pc_32bit.
9388 * linux-low.c: Include inttypes.h.
9389 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9390 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9391 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9392 (the_low_target): Use linux_get_pc_32bit and
9393 linux_set_pc_32bit.
9394 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9395 (the_low_target): Use linux_get_pc_32bit and
9396 linux_set_pc_32bit.
9397 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9398 (the_low_target): Use linux_get_pc_32bit and
9399 linux_set_pc_32bit.
9400 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9401 (the_low_target): Use linux_get_pc_32bit and
9402 linux_set_pc_32bit.
9403 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9404 (the_low_target): Use linux_get_pc_32bit and
9405 linux_set_pc_32bit.
9406
9407 2016-01-18 Gary Benson <gbenson@redhat.com>
9408
9409 * configure.ac (AC_FUNC_FORK): New check.
9410 * config.in: Regenerate.
9411 * configure: Likewise.
9412
9413 2016-01-14 Yao Qi <yao.qi@linaro.org>
9414
9415 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9416 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9417 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9418 arm_get_next_pcs_ctor.
9419
9420 2016-01-12 Josh Stone <jistone@redhat.com>
9421 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9422
9423 * inferiors.h: Include "gdb_vecs.h".
9424 (struct process_info): Add syscalls_to_catch.
9425 * inferiors.c (remove_process): Free syscalls_to_catch.
9426 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9427 syscall_return stops.
9428 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9429 * server.c (handle_general_set): Handle QCatchSyscalls.
9430 (handle_query): Report support for QCatchSyscalls.
9431 * target.h (struct target_ops): Add supports_catch_syscall.
9432 (target_supports_catch_syscall): New macro.
9433 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9434 (struct lwp_info): Add syscall_state.
9435 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9436 Maintain syscall_state and syscalls_to_catch across exec.
9437 (get_syscall_trapinfo): New function, proxy to the_low_target.
9438 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9439 (linux_low_filter_event): Toggle syscall_state entry/return for
9440 syscall traps, and set it ignored for all others.
9441 (gdb_catching_syscalls_p): New function.
9442 (gdb_catch_this_syscall_p): New function.
9443 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9444 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9445 (linux_supports_catch_syscall): New function.
9446 (linux_target_ops): Install it.
9447 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9448 (the_low_target): Install it.
9449
9450 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9451
9452 * acinclude.m4: Include new ../warning.m4 file.
9453 * configure: Regenerated.
9454 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9455
9456 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9457
9458 * ax.c (is_goto_target): Mark static.
9459 * linux-low.c (register_addr): Likewise.
9460 (linux_fetch_registers, linux_store_registers): Likewise.
9461 * mem-break.c (any_persistent_commands): Fix old prototype.
9462 (add_commands_to_breakpoint): Mark static.
9463 * regcache.c (find_register_by_name): Delete unused func.
9464 * remote-utils.c (hex_or_minus_one): Mark static.
9465 * server.c (monitor_show_help): Mark static.
9466 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9467 handle_v_requests): Likewise.
9468
9469 2016-01-12 Pedro Alves <palves@redhat.com>
9470
9471 Remove use of the registered trademark symbol throughout.
9472
9473 2016-01-08 Yao Qi <yao.qi@linaro.org>
9474
9475 * remote-utils.c (getpkt): If c is '\003', call target hook
9476 request_interrupt.
9477
9478 2016-01-06 Yao Qi <yao.qi@linaro.org>
9479
9480 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9481 linux-aarch32-low.c.
9482 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9483 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9484 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9485 (thumb2_breakpoint): Declare.
9486 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9487 linux-aarch32-low.h.
9488 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9489 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9490 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9491
9492 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9493
9494 * gdbreplay.c (gdbreplay_version): Change copyright year in
9495 version message.
9496 * server.c (gdbserver_version): Likewise.
9497
9498 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9499
9500 * server.c (crc32_table): Delete.
9501 (crc32): Use libiberty's xcrc32 function.
9502
9503 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9504
9505 * lynx-low.c (lynx_delete_thread_callback): New function.
9506 (lynx_mourn): Properly delete our process and all of its
9507 threads. Remove call to clear_inferiors.
9508
9509 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9510
9511 * target.c (thread_search_callback): Add check that
9512 the thread_stopped target callback is not NULL before
9513 calling it.
9514
9515 2015-12-21 Yao Qi <yao.qi@linaro.org>
9516
9517 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9518 arm breakpoint.
9519
9520 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9521
9522 * server.c (handle_query): Call target_supports_software_single_step.
9523
9524 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9525
9526 * linux-low.c (single_step): New function.
9527 (linux_resume_one_lwp_throw): Call single_step.
9528 (start_step_over): Likewise.
9529
9530 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9531
9532 * Makefile.in (SFILES): Append arch/arm-linux.c,
9533 arch/arm-get-next-pcs.c.
9534 (arm-linux.o): New rule.
9535 (arm-get-next-pcs.o): New rule.
9536 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9537 arm-linux.o.
9538 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9539 to linux-aarch32-low.c.
9540 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9541 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9542 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9543 (thumb2_breakpoint_len): Likewise.
9544 (arm_is_thumb_mode): Make non-static.
9545 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9546 from linux-aarch32-low.c.
9547 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9548 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9549 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9550 (thumb2_breakpoint_len): Likewise.
9551 (arm_is_thumb_mode): New declaration.
9552 * linux-arm-low.c: Include arch/arm-linux.h
9553 aarch/arm-get-next-pcs.h, sys/syscall.h.
9554 (get_next_pcs_ops): New struct.
9555 (get_next_pcs_addr_bits_remove): New function.
9556 (get_next_pcs_is_thumb): New function.
9557 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9558 (arm_sigreturn_next_pc): Likewise.
9559 (get_next_pcs_syscall_next_pc): Likewise.
9560 (arm_gdbserver_get_next_pcs): Likewise.
9561 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9562 Initialize.
9563 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9564 * server.h: Include gdb_vecs.h.
9565
9566 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9567
9568 * Makefile.in (SFILES): Append common/common-regcache.c.
9569 (OBS): Append common-regcache.o.
9570 (common-regcache.o): New rule.
9571 * regcache.c (init_register_cache): Initialize cache to
9572 REG_UNAVAILABLE.
9573 (regcache_raw_read_unsigned): New function.
9574 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9575 register_status enum.
9576
9577 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9578
9579 * linux-aarch64-low.c (the_low_targets): Rename
9580 breakpoint_reinsert_addr to get_next_pcs.
9581 * linux-arm-low.c (the_low_targets): Likewise.
9582 * linux-bfin-low.c (the_low_targets): Likewise.
9583 * linux-cris-low.c (the_low_targets): Likewise.
9584 * linux-crisv32-low.c (the_low_targets): Likewise.
9585 * linux-low.c (can_software_single_step): Likewise.
9586 (install_software_single_step_breakpoints): New function.
9587 (start_step_over): Use install_software_single_step_breakpoints.
9588 * linux-low.h: New CORE_ADDR vector.
9589 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9590 get_next_pcs.
9591 * linux-mips-low.c (the_low_targets): Likewise.
9592 * linux-nios2-low.c (the_low_targets): Likewise.
9593 * linux-sparc-low.c (the_low_targets): Likewise.
9594
9595 2015-12-17 Pedro Alves <palves@redhat.com>
9596
9597 * linux-low.c (linux_kill_one_lwp): Remove references to
9598 LinuxThreads.
9599 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9600 to 'kill'.
9601 (linux_init_signals): Delete.
9602 (initialize_low): Adjust.
9603 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9604
9605 2015-12-16 Pedro Alves <palves@redhat.com>
9606
9607 * configure.ac (compiler warning flags): When testing a
9608 -Wno-foo option, check whether -Wfoo works instead.
9609 * configure: Regenerate.
9610
9611 2015-12-11 Don Breazeal <donb@codesourcery.com>
9612
9613 * server.c (process_serial_event): Don't exit from gdbserver
9614 in remote mode if there are still active inferiors.
9615
9616 2015-12-11 Yao Qi <yao.qi@linaro.org>
9617
9618 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9619 arm_breakpoint_at if the process is 32-bit.
9620
9621 2015-12-11 Yao Qi <yao.qi@linaro.org>
9622
9623 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9624 arm breakpoint.
9625
9626 2015-12-07 Yao Qi <yao.qi@linaro.org>
9627
9628 * configure.srv: Append arm.o to srv_tgtobj for
9629 aarch64*-*-linux* target.
9630 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9631 from linux-arm-low.c.
9632 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9633 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9634 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9635 (thumb2_breakpoint_len): Likewise.
9636 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9637 (arm_breakpoint_kinds): Likewise.
9638 (arm_breakpoint_kind_from_pc): Likewise.
9639 (arm_sw_breakpoint_from_kind): Likewise.
9640 (arm_breakpoint_kind_from_current_state): Likewise.
9641 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9642 (arm_sw_breakpoint_from_kind): Declare.
9643 (arm_breakpoint_kind_from_current_state): Declare.
9644 (arm_breakpoint_at): Declare.
9645 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9646 arm_sw_breakpoint_from_kind if process is 32-bit.
9647 (aarch64_breakpoint_kind_from_pc): New function.
9648 (aarch64_breakpoint_kind_from_current_state): New function.
9649 (the_low_target): Initialize fields breakpoint_kind_from_pc
9650 and breakpoint_kind_from_current_state.
9651 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9652 linux-aarch32-low.c.
9653 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9654 (arm_breakpoint, arm_breakpoint_len): Likewise.
9655 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9656 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9657 (arm_is_thumb_mode): Likewise.
9658 (arm_breakpoint_at): Likewise.
9659 (arm_breakpoint_kind_from_pc): Likewise.
9660 (arm_sw_breakpoint_from_kind): Likewise.
9661 (arm_breakpoint_kind_from_current_state): Likewise.
9662
9663 Revert:
9664 2015-08-04 Yao Qi <yao.qi@linaro.org>
9665
9666 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9667 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9668 * server.c (extended_protocol): Remove "static".
9669 * server.h (extended_protocol): Declare it.
9670
9671 2015-12-04 Josh Stone <jistone@redhat.com>
9672
9673 * target.h (struct target_ops) <arch_setup>: Rename to ...
9674 (struct target_ops) <post_create_inferior>: ... this.
9675 (target_arch_setup): Rename to ...
9676 (target_post_create_inferior): ... this, calling post_create_inferior.
9677 * server.c (start_inferior): Update target_arch_setup calls to
9678 target_post_create_inferior.
9679 * linux-low.c (linux_low_ptrace_options): Forward declare.
9680 (linux_arch_setup): Update its comment for general use.
9681 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9682 (struct linux_target_ops): Use linux_post_create_inferior.
9683 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9684 to post_create_inferior.
9685 * nto-low.c (struct nto_target_ops): Likewise.
9686 * spu-low.c (struct spu_target_ops): Likewise.
9687 * win32-low.c (struct win32_target_ops): Likewise.
9688
9689 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9690
9691 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9692
9693 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9694
9695 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9696 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9697 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9698 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9699 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9700 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9701 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9702 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9703 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9704 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9705 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9706 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9707
9708 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9709
9710 * linux-low.c (linux_look_up_symbols): Don't call
9711 linux_supports_traceclone.
9712 * linux-low.h (thread_db_init): Remove use_events argument.
9713 * thread-db.c (thread_db_use_event): Remove global variable.
9714 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9715 (struct thread_db) <td_create_bp>: Remove field.
9716 (thread_db_create_event): Remove function.
9717 (thread_db_enable_reporting): Likewise.
9718 (find_one_thread): Don't check for thread_db_use_events.
9719 (attach_thread): Likewise.
9720 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9721 (try_thread_db_load_1): Don't check for thread_db_use_events.
9722 (thread_db_init): Remove use_events argument and thread events
9723 handling.
9724 (remove_thread_event_breakpoints): Remove function.
9725 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9726
9727 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9728
9729 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9730 New function.
9731 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9732 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9733 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9734 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9735 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9736 Initialize.
9737 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9738 New function.
9739 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9740 * linux-low.c (can_hardware_single_step): Use
9741 supports_hardware_single_step.
9742 (can_software_single_step): New function.
9743 (start_step_over): Call can_software_single_step.
9744 (linux_supports_hardware_single_step): New function.
9745 (struct target_ops) <supports_software_single_step>: Initialize.
9746 * linux-low.h (struct linux_target_ops)
9747 <supports_hardware_single_step>: Initialize.
9748 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9749 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9750 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9751 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9752 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9753 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9754 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9755 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9756 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9757 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9758 Initialize.
9759 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9760 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9761 Initialize.
9762 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9763 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9764 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9765 New function.
9766 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9767 * target.h (struct target_ops): <supports_software_single_step>:
9768 New field.
9769 (target_supports_software_single_step): New macro.
9770
9771 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9772
9773 * linux-low.c (linux_wait_1): Fix pc advance condition.
9774 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9775 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9776
9777 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9778
9779 * linux-arm-low.c (arm_is_thumb_mode): New function.
9780 (arm_breakpoint_at): Use arm_is_thumb_mode.
9781 (arm_breakpoint_kind_from_current_state): New function.
9782 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9783 Initialize.
9784 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9785 (linux_breakpoint_kind_from_current_state): New function.
9786 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9787 * linux-low.h (struct linux_target_ops)
9788 <breakpoint_kind_from_current_state>: New field.
9789 * target.h (struct target_ops): Likewise.
9790 (target_breakpoint_kind_from_current_state): New macro.
9791
9792 2015-11-30 Pedro Alves <palves@redhat.com>
9793
9794 * linux-low.c (linux_resume): Wake up the event loop before
9795 returning.
9796
9797 2015-11-30 Pedro Alves <palves@redhat.com>
9798
9799 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9800 check.
9801 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9802 to -1.
9803 * target.c (struct thread_search): New structure.
9804 (thread_search_callback): New function.
9805 (prev_general_thread): New global.
9806 (prepare_to_access_memory, done_accessing_memory): New functions.
9807 * target.h (prepare_to_access_memory, done_accessing_memory):
9808 Replace macros with function declarations.
9809
9810 2015-11-30 Pedro Alves <palves@redhat.com>
9811
9812 PR 14618
9813 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9814 report TARGET_WAITKIND_NO_RESUMED.
9815 * remote-utils.c (prepare_resume_reply): Handle
9816 TARGET_WAITKIND_NO_RESUMED.
9817 * server.c (report_no_resumed): New global.
9818 (handle_query) <qSupported>: Handle "no-resumed+". Report
9819 "no-resumed+" support.
9820 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9821 return error if the client doesn't support no-resumed events.
9822 (push_stop_notification): New function.
9823 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9824 events if the client supports them.
9825
9826 2015-11-30 Pedro Alves <palves@redhat.com>
9827
9828 * linux-low.c (thread_still_has_status_pending_p): Don't check
9829 vCont;t here.
9830 (lwp_resumed): New function.
9831 (status_pending_p_callback): Return early if the LWP is not
9832 supposed to be resumed.
9833
9834 2015-11-30 Pedro Alves <palves@redhat.com>
9835
9836 * linux-low.c (handle_extended_wait): Assert that the LWP's
9837 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9838 thread create events, leave the new child's status pending.
9839 (linux_low_filter_event): If GDB wants to hear about thread exit
9840 events, leave the LWP marked dead and don't delete it.
9841 (linux_wait_for_event_filtered): Don't check for thread exit.
9842 (filter_exit_event): New function.
9843 (linux_wait_1): Use it, when returning an exit event.
9844 (linux_resume_one_lwp_throw): Assert that the LWP's
9845 waitstatus is TARGET_WAITKIND_IGNORE.
9846 * remote-utils.c (prepare_resume_reply): Handle
9847 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9848 * server.c (report_thread_events): New global.
9849 (handle_general_set): Handle QThreadEvents.
9850 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9851 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9852 TARGET_WAITKIND_THREAD_EXITED.
9853 * server.h (report_thread_events): Declare.
9854
9855 2015-11-30 Pedro Alves <palves@redhat.com>
9856
9857 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9858 the thread's last_resume_kind was resume_stop.
9859
9860 2015-11-30 Pedro Alves <palves@redhat.com>
9861
9862 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9863 before returning.
9864
9865 2015-11-30 Pedro Alves <palves@redhat.com>
9866
9867 * server.c (handle_v_requests): Handle vCtrlC.
9868
9869 2015-11-30 Pedro Alves <palves@redhat.com>
9870
9871 * gdbthread.h (find_any_thread_of_pid): Declare.
9872 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9873 functions.
9874 * server.c (handle_query): If current_thread is NULL, look for
9875 another thread of the selected process.
9876
9877 2015-11-26 Daniel Colascione <dancol@dancol.org>
9878 Simon Marchi <simon.marchi@ericsson.com>
9879
9880 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9881 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9882 name in reply.
9883 * target.h (struct target_ops) <thread_name>: New field.
9884 (target_thread_name): New macro.
9885
9886 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9887
9888 * regcache.h (regcache_invalidate_pid): Add declaration.
9889 * regcache.c (regcache_invalidate_pid): New function, extracted
9890 from regcache_invalidate.
9891 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9892 Add trivial documentation comment.
9893 * lynx-low.c: Use regcache_invalidate_pid instead of
9894 regcache_invalidate.
9895
9896 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9897
9898 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9899 and Elf64_auxv_t if the target is Android.
9900
9901 2015-11-22 Doug Evans <xdje42@gmail.com>
9902
9903 * target.h: #include <sys/types.h>.
9904
9905 2015-11-19 Pedro Alves <palves@redhat.com>
9906
9907 * linux-low.c (linux_process_qsupported): Change prototype.
9908 Adjust.
9909 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9910 Change prototype.
9911 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9912 and adjust to loop over all features.
9913 * server.c (handle_query) <qSupported>: Adjust to call
9914 target_process_qsupported once, passing it a vector of unprocessed
9915 features.
9916 * target.h (struct target_ops) <process_qsupported>: Change
9917 prototype.
9918 (target_process_qsupported): Adjust.
9919
9920 2015-11-19 Pedro Alves <palves@redhat.com>
9921
9922 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9923 mode.
9924 * configure: Regenerate.
9925
9926 2015-11-19 Pedro Alves <palves@redhat.com>
9927
9928 * configure: Regenerate.
9929
9930 2015-11-19 Yao Qi <yao.qi@linaro.org>
9931
9932 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9933 type to uint32_t.
9934
9935 2015-11-19 Yao Qi <yao.qi@linaro.org>
9936
9937 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9938 (struct aarch64_operand): Move enum out.
9939
9940 2015-11-19 Yao Qi <yao.qi@linaro.org>
9941
9942 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9943 struct user_fpsimd_state *.
9944 (aarch64_store_fpregset): Likewise.
9945
9946 2015-11-19 Yao Qi <yao.qi@linaro.org>
9947
9948 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9949 struct user_pt_regs *.
9950 (aarch64_store_gregset): Likewise.
9951
9952 2015-11-18 Pedro Alves <palves@redhat.com>
9953
9954 * Makefile.in (all_object_files): Add $IPA_OBJS.
9955
9956 2015-11-17 Pedro Alves <palves@redhat.com>
9957
9958 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9959 GDB_SIGNAL_0 and gdb_signal_to_string.
9960
9961 2015-11-17 Pedro Alves <palves@redhat.com>
9962
9963 * win32-low.c (handle_output_debug_string): Remove parameter.
9964 (win32_kill): Remove our_status local and adjust call to
9965 handle_output_debug_string.
9966 (get_child_debug_event): Adjust call to
9967 handle_output_debug_string.
9968
9969 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9970
9971 * linux-mips-low.c (mips_fill_gregset): Add cast.
9972 (mips_store_gregset): Likewise.
9973 (mips_fill_fpregset): Likewise.
9974 (mips_store_fpregset): Likewise.
9975
9976 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9977
9978 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9979 priv.
9980
9981 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9982
9983 * linux-mips-low.c (mips_linux_new_thread): Change type of
9984 watch_type to enum target_hw_bp_type.
9985
9986 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9987
9988 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9989 Change return type to arm_hwbp_type.
9990
9991 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9992
9993 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9994 (arm_store_gregset): Likewise.
9995 * linux-arm-low.c (arm_get_hwcap): Likewise.
9996 (arm_read_description): Likewise.
9997
9998 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9999
10000 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
10001
10002 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10003
10004 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
10005 (ppc_fill_vsxregset): Likewise.
10006 (ppc_store_vsxregset): Likewise.
10007 (ppc_fill_vrregset): Likewise.
10008 (ppc_store_vrregset): Likewise.
10009 (ppc_fill_evrregset): Likewise.
10010 (ppc_store_evrregset): Likewise.
10011
10012 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10013
10014 * linux-ppc-low.c (ppc_usrregs_info): Remove
10015 forward-declaration.
10016 (ppc_arch_setup): Move lower in file.
10017
10018 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
10019
10020 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
10021 (ps_pdwrite): Likewise.
10022
10023 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
10024
10025 * linux-arm-low.c (arm_new_thread): Move pointer dereference
10026 to after assert checks.
10027
10028 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
10029
10030 * proc-service.c (ps_pdread): Add/adjust casts.
10031 (ps_pdwrite): Add/adjust casts.
10032
10033 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
10034
10035 * server.c (handle_search_memory_1): Cast return value of
10036 memmem.
10037
10038 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
10039
10040 * server.c (write_qxfer_response): Change type of data to
10041 gdb_byte *.
10042
10043 2015-10-29 Pedro Alves <palves@redhat.com>
10044
10045 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
10046
10047 2015-10-29 Pedro Alves <palves@redhat.com>
10048
10049 * tracepoint.c (clear_installed_tracepoints): Add casts.
10050
10051 2015-10-29 Pedro Alves <palves@redhat.com>
10052
10053 * server.c (handle_v_cont, process_serial_event): Add enum
10054 gdb_signal casts to signal parsing code.
10055
10056 2015-10-29 Pedro Alves <palves@redhat.com>
10057
10058 * linux-low.h (NULL_REGSET): Define.
10059 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
10060 * linux-arm-low.c (arm_regsets): Likewise.
10061 * linux-crisv32-low.c (cris_regsets): Likewise.
10062 * linux-m68k-low.c (m68k_regsets): Likewise.
10063 * linux-mips-low.c (mips_regsets): Likewise.
10064 * linux-nios2-low.c (nios2_regsets): Likewise.
10065 * linux-ppc-low.c (ppc_regsets): Likewise.
10066 * linux-s390-low.c (s390_regsets): Likewise.
10067 * linux-sh-low.c (sh_regsets): Likewise.
10068 * linux-sparc-low.c (sparc_regsets): Likewise.
10069 * linux-tic6x-low.c (tic6x_regsets): Likewise.
10070 * linux-tile-low.c (tile_regsets): Likewise.
10071 * linux-x86-low.c (x86_regsets): Likewise.
10072 * linux-xtensa-low.c (xtensa_regsets): Likewise.
10073
10074 2015-10-29 Pedro Alves <palves@redhat.com>
10075
10076 * linux-low.h (NULL_REGSET): Define.
10077 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
10078 * linux-arm-low.c (arm_regsets): Likewise.
10079 * linux-crisv32-low.c (cris_regsets): Likewise.
10080 * linux-m68k-low.c (m68k_regsets): Likewise.
10081 * linux-mips-low.c (mips_regsets): Likewise.
10082 * linux-nios2-low.c (nios2_regsets): Likewise.
10083 * linux-ppc-low.c (ppc_regsets): Likewise.
10084 * linux-s390-low.c (s390_regsets): Likewise.
10085 * linux-sh-low.c (sh_regsets): Likewise.
10086 * linux-sparc-low.c (sparc_regsets): Likewise.
10087 * linux-tic6x-low.c (tic6x_regsets): Likewise.
10088 * linux-tile-low.c (tile_regsets): Likewise.
10089 * linux-x86-low.c (x86_regsets): Likewise.
10090 * linux-xtensa-low.c (xtensa_regsets): Likewise.
10091
10092 2015-10-26 Doug Evans <dje@google.com>
10093
10094 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
10095
10096 2015-10-26 Doug Evans <dje@google.com>
10097
10098 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
10099
10100 2015-10-26 Doug Evans <dje@google.com>
10101
10102 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
10103 for debug_printf.
10104 (attach_thread, find_new_threads_callback): Ditto.
10105
10106 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10107
10108 * mem-break.h (set_breakpoint_data): Remove.
10109
10110 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10111
10112 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
10113 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
10114 (initialize_low): Remove set_breakpoint_data call.
10115 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
10116 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
10117 (initialize_low): Remove set_breakpoint_data call.
10118 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
10119 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
10120 (initialize_low): Remove set_breakpoint_data call.
10121
10122 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10123
10124 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
10125 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
10126 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
10127 * target.h (target_breakpoint_kind_from_pc): New macro.
10128
10129 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
10130
10131 * linux-low.c (default_breakpoint_kind_from_pc): New function.
10132 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
10133 the default breakpoint kind.
10134
10135 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10136
10137 * linux-arm-low.c (arm_supports_z_point_type): Add software
10138 breakpoint support.
10139
10140 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10141
10142 * linux-arm-low.c: Refactor breakpoint definitions.
10143 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
10144 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
10145
10146 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10147
10148 * Makefile.in: Add arm.c/o.
10149 * configure.srv: Likewise.
10150 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
10151 (arm_breakpoint_kind_from_pc): New function.
10152 (arm_sw_breakpoint_from_kind): Return proper kind.
10153 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
10154
10155 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10156
10157 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
10158 removal.
10159 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
10160 (struct raw_breakpoint) <size>: Remove.
10161 (struct raw_breakpoint) <kind>: Add.
10162 (bp_size): New function.
10163 (bp_opcode): Likewise.
10164 (find_raw_breakpoint_at): Adjust for kind.
10165 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
10166 (remove_memory_breakpoint): Adjust for kind call bp_size.
10167 (set_raw_breakpoint_at): Adjust for kind.
10168 (set_breakpoint): Likewise.
10169 (set_breakpoint_at): Call breakpoint_kind_from_pc.
10170 (delete_raw_breakpoint): Adjust for kind.
10171 (delete_breakpoint): Likewise.
10172 (find_gdb_breakpoint): Likewise.
10173 (set_gdb_breakpoint_1): Likewise.
10174 (set_gdb_breakpoint): Likewise.
10175 (delete_gdb_breakpoint_1): Likewise.
10176 (delete_gdb_breakpoint): Likewise.
10177 (uninsert_raw_breakpoint): Likewise.
10178 (reinsert_raw_breakpoint): Likewise.
10179 (set_breakpoint_data): Remove.
10180 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
10181 (check_mem_read): Adjust for kind call bp_size.
10182 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
10183 (clone_one_breakpoint): Adjust for kind.
10184 * mem-break.h (set_gdb_breakpoint): Likewise.
10185 (delete_gdb_breakpoint): Likewise.
10186 * server.c (process_serial_event): Likewise.
10187
10188 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10189
10190 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
10191 (struct linux_target_ops) <breakpoint>: Remove.
10192 (struct linux_target_ops) <breakpoint_len>: Remove.
10193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10195 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
10196 (arm_sw_breakpoint_from_kind): New function.
10197 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
10198 (struct linux_target_ops) <breakpoint>: Remove.
10199 (struct linux_target_ops) <breakpoint_len>: Remove.
10200 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10201 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10202 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
10203 (struct linux_target_ops) <breakpoint>: Remove.
10204 (struct linux_target_ops) <breakpoint_len>: Remove.
10205 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10206 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10207 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
10208 (struct linux_target_ops) <breakpoint>: Remove.
10209 (struct linux_target_ops) <breakpoint_len>: Remove.
10210 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10211 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10212 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
10213 and sw_breakpoint_from_kind to increment the pc.
10214 (linux_breakpoint_kind_from_pc): New function.
10215 (linux_sw_breakpoint_from_kind): New function.
10216 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
10217 (initialize_low): Call breakpoint_kind_from_pc and
10218 sw_breakpoint_from_kind to replace breakpoint_data/len.
10219 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
10220 New field.
10221 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
10222 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
10223 (struct linux_target_ops) <breakpoint>: Remove.
10224 (struct linux_target_ops) <breakpoint_len>: Remove.
10225 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10226 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10227 * linux-m68k-low.c (m68k_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-mips-low.c (mips_sw_breakpoint_from_kind): New function.
10233 (struct linux_target_ops) <breakpoint>: Remove.
10234 (struct linux_target_ops) <breakpoint_len>: Remove.
10235 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10236 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10237 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
10238 (struct linux_target_ops) <breakpoint>: Remove.
10239 (struct linux_target_ops) <breakpoint_len>: Remove.
10240 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10241 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10242 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
10243 (struct linux_target_ops) <breakpoint>: Remove.
10244 (struct linux_target_ops) <breakpoint_len>: Remove.
10245 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10246 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10247 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
10248 (struct linux_target_ops) <breakpoint>: Remove.
10249 (struct linux_target_ops) <breakpoint_len>: Remove.
10250 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10251 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10252 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
10253 (struct linux_target_ops) <breakpoint>: Remove.
10254 (struct linux_target_ops) <breakpoint_len>: Remove.
10255 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10256 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10257 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
10258 (struct linux_target_ops) <breakpoint>: Remove.
10259 (struct linux_target_ops) <breakpoint_len>: Remove.
10260 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10261 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10262 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
10263 (struct linux_target_ops) <breakpoint>: Remove.
10264 (struct linux_target_ops) <breakpoint_len>: Remove.
10265 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10266 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10267 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
10268 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
10269 (struct linux_target_ops) <breakpoint>: Remove.
10270 (struct linux_target_ops) <breakpoint_len>: Remove.
10271 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10272 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10273 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
10274 (struct linux_target_ops) <breakpoint>: Remove.
10275 (struct linux_target_ops) <breakpoint_len>: Remove.
10276 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10277 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10278
10279 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10280
10281 * linux-cris-low.c (cris_get_pc): Remove void arg.
10282
10283 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10284
10285 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
10286 variable name.
10287
10288 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10289
10290 * inferiors.c (thread_pid_matches_callback): New function.
10291 (find_thread_process): New function.
10292 (remove_thread): Reset current_thread.
10293 (remove_process): Assert threads have been removed first.
10294
10295 2015-10-15 Yao Qi <yao.qi@linaro.org>
10296
10297 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10298 if it is 3.
10299 (aarch64_remove_point): Likewise.
10300 * regcache.c (regcache_register_size): New function.
10301
10302 2015-10-12 Yao Qi <yao.qi@linaro.org>
10303
10304 * linux-aarch64-low.c: Update all callers as emit_load_store
10305 is renamed to aarch64_emit_load_store.
10306
10307 2015-10-12 Yao Qi <yao.qi@linaro.org>
10308
10309 * linux-aarch64-low.c: Update all callers of function renaming
10310 from emit_insn to aarch64_emit_insn.
10311
10312 2015-10-12 Yao Qi <yao.qi@linaro.org>
10313
10314 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10315 arch/aarch64-insn.h.
10316 (struct aarch64_memory_operand): Likewise.
10317 (ENCODE): Likewise.
10318 (emit_insn): Move to arch/aarch64-insn.c.
10319 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10320 (emit_load_store): Move to arch/aarch64-insn.c.
10321 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10322 (can_encode_int32): Remove.
10323
10324 2015-10-12 Yao Qi <yao.qi@linaro.org>
10325
10326 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10327 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10328 (aarch64_relocate_instruction): Likewise.
10329 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10330 (struct aarch64_insn_visitor): Likewise.
10331
10332 2015-10-12 Yao Qi <yao.qi@linaro.org>
10333
10334 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10335 (struct aarch64_insn_visitor): New.
10336 (struct aarch64_insn_relocation_data): New.
10337 (aarch64_ftrace_insn_reloc_b): New function.
10338 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10339 (aarch64_ftrace_insn_reloc_cb): Likewise.
10340 (aarch64_ftrace_insn_reloc_tb): Likewise.
10341 (aarch64_ftrace_insn_reloc_adr): Likewise.
10342 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10343 (aarch64_ftrace_insn_reloc_others): Likewise.
10344 (visitor): New.
10345 (aarch64_relocate_instruction): Use visitor.
10346
10347 2015-10-12 Yao Qi <yao.qi@linaro.org>
10348
10349 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10350 int. Add argument buf.
10351 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10352 aarch64_relocate_instruction.
10353
10354 2015-10-12 Yao Qi <yao.qi@linaro.org>
10355
10356 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10357 argument insn. Remove local variable insn. Don't call
10358 target_read_uint32.
10359 (aarch64_install_fast_tracepoint_jump_pad): Call
10360 target_read_uint32.
10361
10362 2015-09-30 Yao Qi <yao.qi@linaro.org>
10363
10364 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10365 (emit_load_store_pair): Likewise.
10366
10367 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10368
10369 * dll.c (match_dll): Add cast(s).
10370 (unloaded_dll): Likewise.
10371 * linux-low.c (second_thread_of_pid_p): Likewise.
10372 (delete_lwp_callback): Likewise.
10373 (count_events_callback): Likewise.
10374 (select_event_lwp_callback): Likewise.
10375 (linux_set_resume_request): Likewise.
10376 * server.c (accumulate_file_name_length): Likewise.
10377 (emit_dll_description): Likewise.
10378 (handle_qxfer_threads_worker): Likewise.
10379 (visit_actioned_threads): Likewise.
10380 * thread-db.c (any_thread_of): Likewise.
10381 * tracepoint.c (same_process_p): Likewise.
10382 (match_blocktype): Likewise.
10383 (build_traceframe_info_xml): Likewise.
10384
10385 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10386
10387 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10388 assignment.
10389 (gdb_unparse_agent_expr): Likewise.
10390 * hostio.c (require_data): Likewise.
10391 (handle_pread): Likewise.
10392 * linux-low.c (disable_regset): Likewise.
10393 (fetch_register): Likewise.
10394 (store_register): Likewise.
10395 (get_dynamic): Likewise.
10396 (linux_qxfer_libraries_svr4): Likewise.
10397 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10398 (set_fast_tracepoint_jump): Likewise.
10399 (uninsert_fast_tracepoint_jumps_at): Likewise.
10400 (reinsert_fast_tracepoint_jumps_at): Likewise.
10401 (validate_inserted_breakpoint): Likewise.
10402 (clone_agent_expr): Likewise.
10403 * regcache.c (init_register_cache): Likewise.
10404 * remote-utils.c (putpkt_binary_1): Likewise.
10405 (decode_M_packet): Likewise.
10406 (decode_X_packet): Likewise.
10407 (look_up_one_symbol): Likewise.
10408 (relocate_instruction): Likewise.
10409 (monitor_output): Likewise.
10410 * server.c (handle_search_memory): Likewise.
10411 (handle_qxfer_exec_file): Likewise.
10412 (handle_qxfer_libraries): Likewise.
10413 (handle_qxfer): Likewise.
10414 (handle_query): Likewise.
10415 (handle_v_cont): Likewise.
10416 (handle_v_run): Likewise.
10417 (captured_main): Likewise.
10418 * target.c (write_inferior_memory): Likewise.
10419 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10420 * tracepoint.c (init_trace_buffer): Likewise.
10421 (add_tracepoint_action): Likewise.
10422 (add_traceframe): Likewise.
10423 (add_traceframe_block): Likewise.
10424 (cmd_qtdpsrc): Likewise.
10425 (cmd_qtdv): Likewise.
10426 (cmd_qtstatus): Likewise.
10427 (response_source): Likewise.
10428 (response_tsv): Likewise.
10429 (cmd_qtnotes): Likewise.
10430 (gdb_collect): Likewise.
10431 (initialize_tracepoint): Likewise.
10432
10433 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10434
10435 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10436 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10437 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10438 <NOP>: New.
10439 (enum aarch64_condition_codes): New enum.
10440 (w0): New static global.
10441 (fp): Likewise.
10442 (lr): Likewise.
10443 (struct aarch64_memory_operand) <type>: New
10444 MEMORY_OPERAND_POSTINDEX type.
10445 (postindex_memory_operand): New helper function.
10446 (emit_ret): New function.
10447 (emit_load_store_pair): New function, factored out of emit_stp
10448 with support for MEMORY_OPERAND_POSTINDEX.
10449 (emit_stp): Rewrite using emit_load_store_pair.
10450 (emit_ldp): New function.
10451 (emit_load_store): Likewise.
10452 (emit_ldr): Mention post-index instruction in comment.
10453 (emit_ldrh): New function.
10454 (emit_ldrb): New function.
10455 (emit_ldrsw): Mention post-index instruction in comment.
10456 (emit_str): Likewise.
10457 (emit_subs): New function.
10458 (emit_cmp): Likewise.
10459 (emit_and): Likewise.
10460 (emit_orr): Likewise.
10461 (emit_orn): Likewise.
10462 (emit_eor): Likewise.
10463 (emit_mvn): Likewise.
10464 (emit_lslv): Likewise.
10465 (emit_lsrv): Likewise.
10466 (emit_asrv): Likewise.
10467 (emit_mul): Likewise.
10468 (emit_sbfm): Likewise.
10469 (emit_sbfx): Likewise.
10470 (emit_ubfm): Likewise.
10471 (emit_ubfx): Likewise.
10472 (emit_csinc): Likewise.
10473 (emit_cset): Likewise.
10474 (emit_nop): Likewise.
10475 (emit_ops_insns): New helper function.
10476 (emit_pop): Likewise.
10477 (emit_push): Likewise.
10478 (aarch64_emit_prologue): New function.
10479 (aarch64_emit_epilogue): Likewise.
10480 (aarch64_emit_add): Likewise.
10481 (aarch64_emit_sub): Likewise.
10482 (aarch64_emit_mul): Likewise.
10483 (aarch64_emit_lsh): Likewise.
10484 (aarch64_emit_rsh_signed): Likewise.
10485 (aarch64_emit_rsh_unsigned): Likewise.
10486 (aarch64_emit_ext): Likewise.
10487 (aarch64_emit_log_not): Likewise.
10488 (aarch64_emit_bit_and): Likewise.
10489 (aarch64_emit_bit_or): Likewise.
10490 (aarch64_emit_bit_xor): Likewise.
10491 (aarch64_emit_bit_not): Likewise.
10492 (aarch64_emit_equal): Likewise.
10493 (aarch64_emit_less_signed): Likewise.
10494 (aarch64_emit_less_unsigned): Likewise.
10495 (aarch64_emit_ref): Likewise.
10496 (aarch64_emit_if_goto): Likewise.
10497 (aarch64_emit_goto): Likewise.
10498 (aarch64_write_goto_address): Likewise.
10499 (aarch64_emit_const): Likewise.
10500 (aarch64_emit_call): Likewise.
10501 (aarch64_emit_reg): Likewise.
10502 (aarch64_emit_pop): Likewise.
10503 (aarch64_emit_stack_flush): Likewise.
10504 (aarch64_emit_zero_ext): Likewise.
10505 (aarch64_emit_swap): Likewise.
10506 (aarch64_emit_stack_adjust): Likewise.
10507 (aarch64_emit_int_call_1): Likewise.
10508 (aarch64_emit_void_call_2): Likewise.
10509 (aarch64_emit_eq_goto): Likewise.
10510 (aarch64_emit_ne_goto): Likewise.
10511 (aarch64_emit_lt_goto): Likewise.
10512 (aarch64_emit_le_goto): Likewise.
10513 (aarch64_emit_gt_goto): Likewise.
10514 (aarch64_emit_ge_got): Likewise.
10515 (aarch64_emit_ops_impl): New static global variable.
10516 (aarch64_emit_ops): New target function, return
10517 &aarch64_emit_ops_impl.
10518 (struct linux_target_ops): Install it.
10519
10520 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10521
10522 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10523 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10524 aarch64-ipa.o.
10525 * linux-aarch64-ipa.c: New file.
10526 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10527 and endian.h.
10528 (aarch64_get_thread_area): New target method.
10529 (extract_signed_bitfield): New helper function.
10530 (aarch64_decode_ldr_literal): New function.
10531 (enum aarch64_opcodes): New enum.
10532 (struct aarch64_register): New struct.
10533 (struct aarch64_operand): New struct.
10534 (x0): New static global.
10535 (x1): Likewise.
10536 (x2): Likewise.
10537 (x3): Likewise.
10538 (x4): Likewise.
10539 (w2): Likewise.
10540 (ip0): Likewise.
10541 (sp): Likewise.
10542 (xzr): Likewise.
10543 (aarch64_register): New helper function.
10544 (register_operand): Likewise.
10545 (immediate_operand): Likewise.
10546 (struct aarch64_memory_operand): New struct.
10547 (offset_memory_operand): New helper function.
10548 (preindex_memory_operand): Likewise.
10549 (enum aarch64_system_control_registers): New enum.
10550 (ENCODE): New macro.
10551 (emit_insn): New helper function.
10552 (emit_b): New function.
10553 (emit_bcond): Likewise.
10554 (emit_cb): Likewise.
10555 (emit_tb): Likewise.
10556 (emit_blr): Likewise.
10557 (emit_stp): Likewise.
10558 (emit_ldp_q_offset): Likewise.
10559 (emit_stp_q_offset): Likewise.
10560 (emit_load_store): Likewise.
10561 (emit_ldr): Likewise.
10562 (emit_ldrsw): Likewise.
10563 (emit_str): Likewise.
10564 (emit_ldaxr): Likewise.
10565 (emit_stxr): Likewise.
10566 (emit_stlr): Likewise.
10567 (emit_data_processing_reg): Likewise.
10568 (emit_data_processing): Likewise.
10569 (emit_add): Likewise.
10570 (emit_sub): Likewise.
10571 (emit_mov): Likewise.
10572 (emit_movk): Likewise.
10573 (emit_mov_addr): Likewise.
10574 (emit_mrs): Likewise.
10575 (emit_msr): Likewise.
10576 (emit_sevl): Likewise.
10577 (emit_wfe): Likewise.
10578 (append_insns): Likewise.
10579 (can_encode_int32_in): New helper function.
10580 (aarch64_relocate_instruction): New function.
10581 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10582 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10583 (struct linux_target_ops): Install aarch64_get_thread_area,
10584 aarch64_install_fast_tracepoint_jump_pad and
10585 aarch64_get_min_fast_tracepoint_insn_len.
10586
10587 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10588
10589 * Makefile.in (aarch64-insn.o): New rule.
10590 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10591
10592 2015-09-21 Yao Qi <yao.qi@linaro.org>
10593
10594 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10595
10596 2015-09-21 Yao Qi <yao.qi@linaro.org>
10597
10598 * tracepoint.c (max_jump_pad_size): Remove.
10599
10600 2015-09-18 Yao Qi <yao.qi@linaro.org>
10601
10602 * linux-aarch64-low.c: Don't include sys/uio.h.
10603 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10604
10605 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10606
10607 * tracepoint.c (eval_result_type): Change prototype.
10608 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10609
10610 2015-09-15 Pedro Alves <palves@redhat.com>
10611
10612 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10613 Check whether to report exec events instead of checking whether
10614 multiprocess is enabled.
10615
10616 2015-09-15 Pedro Alves <palves@redhat.com>
10617
10618 PR remote/18965
10619 * remote-utils.c (prepare_resume_reply): Merge
10620 TARGET_WAITKIND_VFORK_DONE switch case with the
10621 TARGET_WAITKIND_FORKED case.
10622
10623 2015-09-15 Yao Qi <yao.qi@linaro.org>
10624
10625 * server.c (handle_query): Check string comparison using
10626 "else if" instead of "if".
10627
10628 2015-09-15 Yao Qi <yao.qi@linaro.org>
10629
10630 * server.c (vCont_supported): New global variable.
10631 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10632 matches. Append ";vContSupported+" to own_buf.
10633 (handle_v_requests): Append ";s;S" to own_buf if target supports
10634 hardware single step or vCont_supported is false.
10635 (capture_main): Set vCont_supported to zero.
10636
10637 2015-09-15 Yao Qi <yao.qi@linaro.org>
10638
10639 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10640 it to ...
10641 (linux_supports_hardware_single_step): ... New function.
10642 (linux_target_ops): Update.
10643 * lynx-low.c (lynx_target_ops): Set field
10644 supports_hardware_single_step to target_can_do_hardware_single_step.
10645 * nto-low.c (nto_target_ops): Likewise.
10646 * spu-low.c (spu_target_ops): Likewise.
10647 * win32-low.c (win32_target_ops): Likewise.
10648 * target.c (target_can_do_hardware_single_step): New function.
10649 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10650 Remove. <supports_hardware_single_step>: New field.
10651 (target_supports_conditional_breakpoints): Remove.
10652 (target_supports_hardware_single_step): New macro.
10653 (target_can_do_hardware_single_step): Declare.
10654 * server.c (handle_query): Use target_supports_hardware_single_step
10655 instead of target_supports_conditional_breakpoints.
10656
10657 2015-09-15 Yao Qi <yao.qi@linaro.org>
10658
10659 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10660 function.
10661 (struct linux_target_ops the_low_target): Install
10662 aarch64_linux_siginfo_fixup.
10663
10664 2015-09-11 Don Breazeal <donb@codesourcery.com>
10665 Luis Machado <lgustavo@codesourcery.com>
10666
10667 * linux-low.c (linux_mourn): Static declaration.
10668 (linux_arch_setup): Move in front of
10669 handle_extended_wait.
10670 (linux_arch_setup_thread): New function.
10671 (handle_extended_wait): Handle exec events. Call
10672 linux_arch_setup_thread. Make event_lwp argument a
10673 pointer-to-a-pointer.
10674 (check_zombie_leaders): Do not check stopped threads.
10675 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10676 (linux_low_filter_event): Add lwp and thread for exec'ing
10677 non-leader thread if leader thread has been deleted.
10678 Refactor code into linux_arch_setup_thread and call it.
10679 Pass child lwp pointer by reference to handle_extended_wait.
10680 (linux_wait_for_event_filtered): Update comment.
10681 (linux_wait_1): Prevent clobbering exec event status.
10682 (linux_supports_exec_events): New function.
10683 (linux_target_ops) <supports_exec_events>: Initialize new member.
10684 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10685 new member.
10686 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10687 * server.c (report_exec_events): New global variable.
10688 (handle_query): Handle qSupported query for exec-events feature.
10689 (captured_main): Initialize report_exec_events.
10690 * server.h (report_exec_events): Declare new global variable.
10691 * target.h (struct target_ops) <supports_exec_events>: New
10692 member.
10693 (target_supports_exec_events): New macro.
10694 * win32-low.c (win32_target_ops) <supports_exec_events>:
10695 Initialize new member.
10696
10697 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10698
10699 * linux-low.c (linux_low_enable_btrace): Remove.
10700 (linux_target_ops): Replace linux_low_enable_btrace with
10701 linux_enable_btrace.
10702
10703 2015-09-03 Yao Qi <yao.qi@linaro.org>
10704
10705 * linux-aarch64-low.c (aarch64_insert_point): Call
10706 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10707 returns true.
10708
10709 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10710
10711 * linux-low.c (check_stopped_by_breakpoint): Use
10712 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10713
10714 2015-08-27 Pedro Alves <palves@redhat.com>
10715
10716 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10717
10718 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10719
10720 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10721 the XNEW-family equivalent.
10722 (compile_bytecodes): Likewise.
10723 * dll.c (loaded_dll): Likewise.
10724 * event-loop.c (append_callback_event): Likewise.
10725 (create_file_handler): Likewise.
10726 (create_file_event): Likewise.
10727 * hostio.c (handle_open): Likewise.
10728 * inferiors.c (add_thread): Likewise.
10729 (add_process): Likewise.
10730 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10731 * linux-arm-low.c (arm_new_process): Likewise.
10732 (arm_new_thread): Likewise.
10733 * linux-low.c (add_to_pid_list): Likewise.
10734 (linux_add_process): Likewise.
10735 (handle_extended_wait): Likewise.
10736 (add_lwp): Likewise.
10737 (enqueue_one_deferred_signal): Likewise.
10738 (enqueue_pending_signal): Likewise.
10739 (linux_resume_one_lwp_throw): Likewise.
10740 (linux_resume_one_thread): Likewise.
10741 (linux_read_memory): Likewise.
10742 (linux_write_memory): Likewise.
10743 * linux-mips-low.c (mips_linux_new_process): Likewise.
10744 (mips_linux_new_thread): Likewise.
10745 (mips_add_watchpoint): Likewise.
10746 * linux-x86-low.c (initialize_low_arch): Likewise.
10747 * lynx-low.c (lynx_add_process): Likewise.
10748 * mem-break.c (set_raw_breakpoint_at): Likewise.
10749 (set_breakpoint): Likewise.
10750 (add_condition_to_breakpoint): Likewise.
10751 (add_commands_to_breakpoint): Likewise.
10752 (clone_agent_expr): Likewise.
10753 (clone_one_breakpoint): Likewise.
10754 * regcache.c (new_register_cache): Likewise.
10755 * remote-utils.c (look_up_one_symbol): Likewise.
10756 * server.c (queue_stop_reply): Likewise.
10757 (start_inferior): Likewise.
10758 (queue_stop_reply_callback): Likewise.
10759 (handle_target_event): Likewise.
10760 * spu-low.c (fetch_ppc_memory): Likewise.
10761 (store_ppc_memory): Likewise.
10762 * target.c (set_target_ops): Likewise.
10763 * thread-db.c (thread_db_load_search): Likewise.
10764 (try_thread_db_load_1): Likewise.
10765 * tracepoint.c (add_tracepoint): Likewise.
10766 (add_tracepoint_action): Likewise.
10767 (create_trace_state_variable): Likewise.
10768 (cmd_qtdpsrc): Likewise.
10769 (cmd_qtro): Likewise.
10770 (add_while_stepping_state): Likewise.
10771 * win32-low.c (child_add_thread): Likewise.
10772 (get_image_name): Likewise.
10773
10774 2015-08-25 Yao Qi <yao.qi@linaro.org>
10775
10776 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10777
10778 2015-08-25 Yao Qi <yao.qi@linaro.org>
10779
10780 * Makefile.in (aarch64-linux.o): New rule.
10781 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10782 srv_tgtobj.
10783 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10784 (aarch64_init_debug_reg_state): Make it extern.
10785 (aarch64_linux_prepare_to_resume): Remove.
10786
10787 2015-08-25 Yao Qi <yao.qi@linaro.org>
10788
10789 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10790 lwp_arch_private_info and ptid_of_lwp.
10791
10792 2015-08-25 Yao Qi <yao.qi@linaro.org>
10793
10794 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10795 Find proc_info by find_process_pid. All callers updated.
10796
10797 2015-08-25 Yao Qi <yao.qi@linaro.org>
10798
10799 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10800 Remove.
10801 (debug_reg_change_callback): Remove.
10802 (aarch64_notify_debug_reg_change): Remove.
10803
10804 2015-08-25 Yao Qi <yao.qi@linaro.org>
10805
10806 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10807 Call current_lwp_ptid.
10808
10809 2015-08-25 Yao Qi <yao.qi@linaro.org>
10810
10811 * linux-aarch64-low.c (debug_reg_change_callback): Use
10812 debug_printf.
10813
10814 2015-08-25 Yao Qi <yao.qi@linaro.org>
10815
10816 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10817
10818 2015-08-25 Yao Qi <yao.qi@linaro.org>
10819
10820 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10821
10822 2015-08-25 Yao Qi <yao.qi@linaro.org>
10823
10824 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10825 the code.
10826
10827 2015-08-25 Yao Qi <yao.qi@linaro.org>
10828
10829 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10830 Remove.
10831 (debug_reg_change_callback): Remove argument entry and add argument
10832 lwp. Remove local variable thread. Don't print thread id in the
10833 debugging output. Don't check whether pid of thread equals to pid.
10834 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10835 iterate_over_lwps instead find_inferior.
10836
10837 2015-08-24 Pedro Alves <palves@redhat.com>
10838
10839 * inferiors.c (get_first_process): New function.
10840 * inferiors.h (get_first_process): New declaration.
10841 * remote-utils.c (read_ptid): Default to the first process in the
10842 list, instead of to the current thread's process.
10843
10844 2015-08-24 Pedro Alves <palves@redhat.com>
10845
10846 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10847 * event-loop.c: Likewise.
10848 * remote-utils.c: Likewise.
10849 * tracepoint.c: Likewise.
10850
10851 2015-08-24 Pedro Alves <palves@redhat.com>
10852
10853 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10854 ptid_get_lwp.
10855
10856 2015-08-21 Pedro Alves <palves@redhat.com>
10857
10858 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10859 instead of literal 1.
10860
10861 2015-08-21 Pedro Alves <palves@redhat.com>
10862
10863 * tdesc.c (default_description): Explicitly zero-initialize.
10864
10865 2015-08-21 Pedro Alves <palves@redhat.com>
10866
10867 PR gdb/18749
10868 * inferiors.c (remove_thread): Discard any pending stop reply for
10869 this thread.
10870 * server.c (remove_all_on_match_pid): Rename to ...
10871 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10872 instead of a pid.
10873 (discard_queued_stop_replies): Change parameter to a ptid. Now
10874 extern.
10875 (handle_v_kill, kill_inferior_callback, captured_main)
10876 (process_serial_event): Adjust.
10877 * server.h (discard_queued_stop_replies): Declare.
10878
10879 2015-08-21 Pedro Alves <palves@redhat.com>
10880
10881 * linux-low.c (wait_for_sigstop): Always switch to no thread
10882 selected if the previously current thread dies.
10883 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10884 process instead of the current thread's.
10885 * remote-utils.c (input_interrupt): Don't check if there's no
10886 current thread.
10887 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10888 current thread to the general thread fails, error out.
10889 (handle_qxfer_auxv, handle_qxfer_libraries)
10890 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10891 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10892 (handle_query): Check if there's a thread selected instead of
10893 checking whether there's any thread in the thread list.
10894 (handle_qxfer_threads, handle_qxfer_btrace)
10895 (handle_qxfer_btrace_conf): Don't error out early if there's no
10896 thread in the thread list.
10897 (handle_v_cont, myresume): Don't set the current thread to the
10898 continue thread.
10899 (process_serial_event) <Hg handling>: Also set thread_id if the
10900 previous general thread is still alive.
10901 (process_serial_event) <g/G handling>: If setting the current
10902 thread to the general thread fails, error out.
10903 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10904 thread's lwp instead of the current thread's.
10905 * target.c (set_desired_thread): If the desired thread was not
10906 found, leave the current thread pointing to NULL. Return an int
10907 (boolean) indicating success.
10908 * target.h (set_desired_thread): Change return type to int.
10909
10910 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10911
10912 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10913 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10914 #includes.
10915 (ps_get_thread_area): New function.
10916
10917 2015-08-19 Gary Benson <gbenson@redhat.com>
10918
10919 * hostio.c (handle_pread): Do not attempt to read more data
10920 than hostio_reply_with_data can fit in a packet.
10921
10922 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10923
10924 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10925
10926 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10927
10928 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10929
10930 2015-08-06 Pedro Alves <palves@redhat.com>
10931
10932 * tracepoint.c (expr_eval_result): Now an int.
10933
10934 2015-08-06 Pedro Alves <palves@redhat.com>
10935
10936 * gdbthread.h (struct regcache): Forward declare.
10937 (struct thread_info) <regcache_data>: Now a struct regcache
10938 pointer.
10939 * inferiors.c (inferior_regcache_data)
10940 (set_inferior_regcache_data): Now work with struct regcache
10941 pointers.
10942 * inferiors.h (struct regcache): Forward declare.
10943 (inferior_regcache_data, set_inferior_regcache_data): Now work
10944 with struct regcache pointers.
10945 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10946 (free_register_cache_thread): Remove struct regcache pointer
10947 casts.
10948
10949 2015-08-06 Pedro Alves <palves@redhat.com>
10950
10951 * server.c (captured_main): On error, print the exception message
10952 to stderr, and if run_once is set, throw a quit.
10953
10954 2015-08-06 Pedro Alves <palves@redhat.com>
10955
10956 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10957 the current thread.
10958
10959 2015-08-06 Pedro Alves <palves@redhat.com>
10960
10961 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10962 reading beyond the passed in buffer length.
10963
10964 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10965
10966 * tracepoint.c (symbol_list) <required>: Remove.
10967
10968 2015-08-06 Pedro Alves <palves@redhat.com>
10969
10970 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10971 count if stopping and suspending threads.
10972 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10973 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10974 (linux_detach): Complete an ongoing step-over.
10975 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10976 throughout.
10977 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10978 (linux_wait_1): If passing a signal to the inferior after
10979 finishing a step-over, unsuspend and re-resume all lwps. If we
10980 see a single-step event but the thread should be continuing, don't
10981 pass the trap to gdb.
10982 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10983 internal_error instead of gdb_assert.
10984 (enqueue_pending_signal): New function.
10985 (check_ptrace_stopped_lwp_gone): Add debug output.
10986 (start_step_over): Use internal_error instead of gdb_assert.
10987 (complete_ongoing_step_over): New function.
10988 (linux_resume_one_thread): Don't resume a suspended thread.
10989 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10990 it stepping.
10991
10992 2015-08-06 Pedro Alves <palves@redhat.com>
10993
10994 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10995 (linux_thread_alive): Use lwp_is_marked_dead.
10996 (extended_event_reported): Delete.
10997 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10998 instead of extended_event_reported.
10999 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
11000 as well.
11001 (lwp_is_marked_dead): New function.
11002 (lwp_running): Use lwp_is_marked_dead.
11003 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
11004 comment.
11005
11006 2015-08-06 Pedro Alves <palves@redhat.com>
11007
11008 * linux-low.c (linux_wait_1): Move fork event output out of the
11009 !report_to_gdb check. Pass event_child->waitstatus to
11010 target_waitstatus_to_string instead of ourstatus.
11011
11012 2015-08-04 Yao Qi <yao.qi@linaro.org>
11013
11014 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
11015 if current_thread is 32 bit.
11016
11017 2015-08-04 Yao Qi <yao.qi@linaro.org>
11018
11019 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
11020 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
11021 * server.c (extended_protocol): Remove "static".
11022 * server.h (extended_protocol): Declare it.
11023
11024 2015-08-04 Yao Qi <yao.qi@linaro.org>
11025
11026 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
11027 both aarch64 and aarch32.
11028 (aarch64_set_pc): Likewise.
11029
11030 2015-08-04 Yao Qi <yao.qi@linaro.org>
11031
11032 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
11033 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
11034 arm-with-neon.xml to srv_xmlfiles.
11035 * linux-aarch64-low.c: Include linux-aarch32-low.h.
11036 (is_64bit_tdesc): New function.
11037 (aarch64_linux_read_description): New function.
11038 (aarch64_arch_setup): Call aarch64_linux_read_description.
11039 (regs_info): Rename to regs_info_aarch64.
11040 (aarch64_regs_info): Return right regs_info.
11041 (initialize_low_arch): Call initialize_low_arch_aarch32.
11042
11043 2015-08-04 Yao Qi <yao.qi@linaro.org>
11044
11045 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
11046 * linux-aarch32-low.c: New file.
11047 * linux-aarch32-low.h: New file.
11048 * linux-arm-low.c (arm_fill_gregset): Move it to
11049 linux-aarch32-low.c.
11050 (arm_store_gregset): Likewise.
11051 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
11052 (arm_store_vfpregset): Call arm_store_vfpregset_num.
11053 (arm_arch_setup): Check if PTRACE_GETREGSET works.
11054 (regs_info): Rename to regs_info_arm.
11055 (arm_regs_info): Return regs_info_aarch32 if
11056 have_ptrace_getregset is 1 and target description is
11057 arm_with_neon or arm_with_vfpv3.
11058 (initialize_low_arch): Don't call init_registers_arm_with_neon.
11059 Call initialize_low_arch_aarch32 instead.
11060
11061 2015-08-04 Yao Qi <yao.qi@linaro.org>
11062
11063 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
11064 * linux-low.c: ... here.
11065 * linux-low.h (have_ptrace_getregset): Declare it.
11066
11067 2015-08-04 Pedro Alves <palves@redhat.com>
11068
11069 * thread-db.c (struct thread_db): Use new typedefs.
11070 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
11071 CHK calls.
11072 (disable_thread_event_reporting): Cast result of dlsym to
11073 destination function pointer type.
11074 (thread_db_mourn): Use td_ta_delete_ftype.
11075
11076 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
11077
11078 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
11079 arch variant.
11080 (CDX_BREAKPOINT): Define for R2.
11081 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
11082 (the_low_target): Add comments.
11083
11084 2015-07-30 Yao Qi <yao.qi@linaro.org>
11085
11086 * linux-arm-low.c (arm_hwcap): Remove it.
11087 (arm_read_description): New local variable arm_hwcap. Don't
11088 set arm_hwcap to zero.
11089
11090 2015-07-30 Yao Qi <yao.qi@linaro.org>
11091
11092 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
11093 Use regcache->tdesc instead.
11094 (arm_store_wmmxregset): Likewise.
11095 (arm_fill_vfpregset): Likewise.
11096 (arm_store_vfpregset): Likewise.
11097
11098 2015-07-30 Yao Qi <yao.qi@linaro.org>
11099
11100 * linux-arm-low.c: Include arch/arm.h.
11101 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
11102 (arm_store_gregset): Likewise.
11103
11104 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
11105
11106 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
11107 ptrace's 4th parameter.
11108
11109 2015-07-27 Yao Qi <yao.qi@linaro.org>
11110
11111 * configure.srv (case aarch64*-*-linux*): Don't set
11112 srv_linux_usrregs.
11113
11114 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
11115
11116 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
11117 sys/ptrace.h.
11118 * linux-arm-low.c: Likewise.
11119 * linux-cris-low.c: Likewise.
11120 * linux-crisv32-low.c: Likewise.
11121 * linux-low.c: Likewise.
11122 * linux-m68k-low.c: Likewise.
11123 * linux-mips-low.c: Likewise.
11124 * linux-nios2-low.c: Likewise.
11125 * linux-s390-low.c: Likewise.
11126 * linux-sparc-low.c: Likewise.
11127 * linux-tic6x-low.c: Likewise.
11128 * linux-tile-low.c: Likewise.
11129 * linux-x86-low.c: Likewise.
11130
11131 2015-07-24 Pedro Alves <palves@redhat.com>
11132
11133 * config.in: Regenerate.
11134 * configure: Regenerate.
11135
11136 2015-07-24 Pedro Alves <palves@redhat.com>
11137
11138 * acinclude.m4: Include ../ptrace.m4.
11139 * configure.ac: Call GDB_AC_PTRACE.
11140 * config.in, configure: Regenerate.
11141
11142 2015-07-24 Yao Qi <yao.qi@linaro.org>
11143
11144 * linux-low.c (linux_create_inferior): Remove setting to
11145 proc->priv->new_inferior.
11146 (linux_attach): Likewise.
11147 (linux_low_filter_event): Likewise.
11148 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
11149
11150 2015-07-24 Yao Qi <yao.qi@linaro.org>
11151
11152 * linux-low.c (linux_arch_setup): New function.
11153 (linux_low_filter_event): If proc->tdesc is NULL and
11154 proc->attached is true, call the_low_target.arch_setup.
11155 Otherwise, keep status pending, and return.
11156 (linux_resume_one_lwp_throw): Don't call get_pc if
11157 thread->while_stepping isn't NULL. Don't call
11158 get_thread_regcache if proc->tdesc is NULL.
11159 (need_step_over_p): Return 0 if proc->tdesc is NULL.
11160 (linux_target_ops): Install arch_setup.
11161 * server.c (start_inferior): Call the_target->arch_setup.
11162 * target.h (struct target_ops) <arch_setup>: New field.
11163 (target_arch_setup): New marco.
11164 * lynx-low.c (lynx_target_ops): Update.
11165 * nto-low.c (nto_target_ops): Update.
11166 * spu-low.c (spu_target_ops): Update.
11167 * win32-low.c (win32_target_ops): Update.
11168
11169 2015-07-24 Yao Qi <yao.qi@linaro.org>
11170
11171 * linux-low.c (linux_add_process): Don't set
11172 proc->priv->new_inferior.
11173 (linux_create_inferior): Set proc->priv->new_inferior to 1.
11174 (linux_attach): Likewise.
11175
11176 2015-07-24 Yao Qi <yao.qi@linaro.org>
11177
11178 * server.c (start_inferior): Code refactor.
11179
11180 2015-07-24 Yao Qi <yao.qi@linaro.org>
11181
11182 * server.c (process_serial_event): Set general_thread.
11183
11184 2015-07-21 Yao Qi <yao.qi@linaro.org>
11185
11186 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
11187 aarch64_linux_get_debug_reg_capacity.
11188
11189 2015-07-17 Yao Qi <yao.qi@linaro.org>
11190
11191 * Makefile.in (aarch64-linux-hw-point.o): New rule.
11192 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
11193 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
11194 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
11195 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
11196 (AARCH64_HWP_ALIGNMENT): Likewise.
11197 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
11198 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
11199 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
11200 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
11201 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
11202 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
11203 (struct aarch64_debug_reg_state): Likewise.
11204 (struct arch_lwp_info): Likewise.
11205 (aarch64_align_watchpoint): Likewise.
11206 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
11207 (aarch64_watchpoint_length): Likewise.
11208 (aarch64_point_encode_ctrl_reg): Likewise
11209 (aarch64_point_is_aligned): Likewise.
11210 (aarch64_align_watchpoint): Likewise.
11211 (aarch64_linux_set_debug_regs):
11212 (aarch64_dr_state_insert_one_point): Likewise.
11213 (aarch64_dr_state_remove_one_point): Likewise.
11214 (aarch64_handle_breakpoint): Likewise.
11215 (aarch64_handle_aligned_watchpoint): Likewise.
11216 (aarch64_handle_unaligned_watchpoint): Likewise.
11217 (aarch64_handle_watchpoint): Likewise.
11218
11219 2015-07-17 Yao Qi <yao.qi@linaro.org>
11220
11221 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
11222 and don't aarch64_get_debug_reg_state. All callers update.
11223 (aarch64_handle_aligned_watchpoint): Likewise.
11224 (aarch64_handle_unaligned_watchpoint): Likewise.
11225 (aarch64_handle_watchpoint): Likewise.
11226 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
11227 (aarch64_remove_point): Likewise.
11228
11229 2015-07-17 Yao Qi <yao.qi@linaro.org>
11230
11231 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
11232 debug_printf.
11233 (aarch64_handle_unaligned_watchpoint): Likewise.
11234
11235 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11236
11237 Revert the previous 3 commits:
11238 Move gdb_regex* to common/
11239 Move linux_find_memory_regions_full & co.
11240 gdbserver build-id attribute generator
11241
11242 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11243 Jan Kratochvil <jan.kratochvil@redhat.com>
11244
11245 gdbserver build-id attribute generator.
11246 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
11247 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
11248 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
11249 (find_phdr): New.
11250 (get_dynamic): Use find_pdhr to traverse program headers.
11251 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
11252 (compare_mapping_entry_range, struct find_memory_region_callback_data)
11253 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
11254 (get_hex_build_id): New.
11255 (linux_qxfer_libraries_svr4): Add optional build-id attribute
11256 to reply XML document.
11257
11258 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11259 Jan Kratochvil <jan.kratochvil@redhat.com>
11260
11261 * target.c: Include target/target-utils.h and fcntl.h.
11262 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
11263 (target_fileio_read_stralloc): New functions.
11264
11265 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11266
11267 * Makefile.in (OBS): Add gdb_regex.o.
11268 (gdb_regex.o): New.
11269 * config.in: Rebuilt.
11270 * configure: Rebuilt.
11271
11272 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11273 Jan Kratochvil <jan.kratochvil@redhat.com>
11274
11275 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
11276 * Makefile.in (OBS): Add target-utils.o.
11277 (linux-maps.o, target-utils.o): New.
11278 * configure.srv (srv_linux_obj): Add linux-maps.o.
11279
11280 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
11281
11282 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
11283 function, return 1.
11284 (the_low_target): Install it.
11285
11286 2015-07-14 Pedro Alves <palves@redhat.com>
11287
11288 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
11289 Instead, ignore ECHILD, and throw an error for other errnos.
11290
11291 2015-07-10 Pedro Alves <palves@redhat.com>
11292
11293 * event-loop.c (struct callback_event) <data>: Change type to
11294 gdb_client_data instance instead of gdb_client_data pointer.
11295 (append_callback_event): Adjust.
11296
11297 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11298
11299 * linux-aarch64-low.c: Add comments for each linux_target_ops
11300 method. Remove comments already covered in target_ops and
11301 linux_target_ops definitions.
11302 (the_low_target): Add comments for each unimplemented method.
11303
11304 2015-07-09 Yao Qi <yao.qi@linaro.org>
11305
11306 * linux-aarch64-low.c (aarch64_regmap): Remove.
11307 (aarch64_usrregs_info): Remove.
11308 (regs_info): Set field usrregs to NULL.
11309
11310 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11311
11312 * linux-low.c: Include "rsp-low.h"
11313 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11314 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11315 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11316 (handle_btrace_enable_pt): New.
11317 (handle_btrace_general_set): Support "pt".
11318 (handle_btrace_conf_general_set): Support "pt:size".
11319
11320 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11321
11322 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11323 Z_PACKET_SW_BP.
11324
11325 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11326
11327 * linux-aarch64-low.c: Remove comment about endianness.
11328 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11329 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11330 memcmp.
11331
11332 2015-06-24 Gary Benson <gbenson@redhat.com>
11333
11334 * linux-i386-ipa.c (stdint.h): Do not include.
11335 * lynx-i386-low.c (stdint.h): Likewise.
11336 * lynx-ppc-low.c (stdint.h): Likewise.
11337 * mem-break.c (stdint.h): Likewise.
11338 * thread-db.c (stdint.h): Likewise.
11339 * tracepoint.c (stdint.h): Likewise.
11340 * win32-low.c (stdint.h): Likewise.
11341
11342 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11343
11344 * server.c (write_qxfer_response): Update call to
11345 remote_escape_output.
11346
11347 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11348 Jan Kratochvil <jan.kratochvil@redhat.com>
11349
11350 Merge multiple hex conversions.
11351 * gdbreplay.c (tohex): Rename to 'fromhex'.
11352 (logchar): Use fromhex.
11353
11354 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11355
11356 * server.c (handle_qxfer_libraries): Set `version' attribute for
11357 <library-list>.
11358
11359 2015-06-10 Gary Benson <gbenson@redhat.com>
11360
11361 * target.h (struct target_ops) <multifs_open>: New field.
11362 <multifs_unlink>: Likewise.
11363 <multifs_readlink>: Likewise.
11364 * linux-low.c (nat/linux-namespaces.h): New include.
11365 (linux_target_ops): Initialize the_target->multifs_open,
11366 the_target->multifs_unlink and the_target->multifs_readlink.
11367 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11368 * hostio.c (hostio_fs_pid): New static variable.
11369 (hostio_handle_new_gdb_connection): New function.
11370 (handle_setfs): Likewise.
11371 (handle_open): Use the_target->multifs_open as appropriate.
11372 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11373 (handle_readlink): Use the_target->multifs_readlink as
11374 appropriate.
11375 (handle_vFile): Handle vFile:setfs packets.
11376 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11377 after target_handle_new_gdb_connection.
11378
11379 2015-06-10 Gary Benson <gbenson@redhat.com>
11380
11381 * configure.ac (AC_CHECK_FUNCS): Add setns.
11382 * config.in: Regenerate.
11383 * configure: Likewise.
11384 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11385 (linux-namespaces.o): New rule.
11386 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11387
11388 2015-06-09 Gary Benson <gbenson@redhat.com>
11389
11390 * hostio.c (handle_open): Process mode argument with
11391 fileio_to_host_mode.
11392
11393 2015-06-01 Yao Qi <yao.qi@linaro.org>
11394
11395 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11396 * linux-x86-low.c: Likewise.
11397
11398 2015-05-28 Don Breazeal <donb@codesourcery.com>
11399
11400 * linux-low.c (handle_extended_wait): Initialize
11401 thread_info.last_resume_kind for new fork children.
11402
11403 2015-05-15 Pedro Alves <palves@redhat.com>
11404
11405 * target.h (target_handle_new_gdb_connection): Rewrite using if
11406 wrapped in do/while.
11407
11408 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11409
11410 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11411 * configure, config.in: Regenerate.
11412 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11413 Declare typedef.
11414
11415 2015-05-12 Don Breazeal <donb@codesourcery.com>
11416
11417 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11418 PTRACE_EVENT_VFORK_DONE.
11419 (linux_low_ptrace_options, extended_event_reported): Add vfork
11420 events.
11421 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11422 and "vforkdone" for RSP 'T' Stop Reply Packet.
11423 * server.h (report_vfork_events): Declare
11424 global variable.
11425
11426 2015-05-12 Don Breazeal <donb@codesourcery.com>
11427
11428 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11429 (the_low_target) <new_fork>: Initialize new member.
11430 * linux-arm-low.c (arm_new_fork): New function.
11431 (the_low_target) <new_fork>: Initialize new member.
11432 * linux-low.c (handle_extended_wait): Call new target function
11433 new_fork.
11434 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11435 * linux-mips-low.c (mips_add_watchpoint): New function
11436 extracted from mips_insert_point.
11437 (the_low_target) <new_fork>: Initialize new member.
11438 (mips_linux_new_fork): New function.
11439 (mips_insert_point): Call mips_add_watchpoint.
11440 * linux-x86-low.c (x86_linux_new_fork): New function.
11441 (the_low_target) <new_fork>: Initialize new member.
11442
11443 2015-05-12 Don Breazeal <donb@codesourcery.com>
11444
11445 * linux-low.c (handle_extended_wait): Implement return value,
11446 rename argument 'event_child' to 'event_lwp', handle
11447 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11448 (linux_low_ptrace_options): New function.
11449 (linux_low_filter_event): Call linux_low_ptrace_options,
11450 use different argument fo linux_enable_event_reporting,
11451 use return value from handle_extended_wait.
11452 (extended_event_reported): New function.
11453 (linux_wait_1): Call extended_event_reported and set
11454 status to report fork events.
11455 (linux_write_memory): Add pid to debug message.
11456 (reset_lwp_ptrace_options_callback): New function.
11457 (linux_handle_new_gdb_connection): New function.
11458 (linux_target_ops): Initialize new structure member.
11459 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11460 * lynx-low.c: Initialize new structure member.
11461 * remote-utils.c (prepare_resume_reply): Implement stop reason
11462 "fork" for "T" stop message.
11463 * server.c (handle_query): Call handle_new_gdb_connection.
11464 * server.h (report_fork_events): Declare global flag.
11465 * target.h (struct target_ops) <handle_new_gdb_connection>:
11466 New member.
11467 (target_handle_new_gdb_connection): New macro.
11468 * win32-low.c: Initialize new structure member.
11469
11470 2015-05-12 Don Breazeal <donb@codesourcery.com>
11471
11472 * mem-break.c (APPEND_TO_LIST): Define macro.
11473 (clone_agent_expr): New function.
11474 (clone_one_breakpoint): New function.
11475 (clone_all_breakpoints): New function.
11476 * mem-break.h: Declare new functions.
11477
11478 2015-05-12 Don Breazeal <donb@codesourcery.com>
11479
11480 * linux-low.c (linux_supports_fork_events): New function.
11481 (linux_supports_vfork_events): New function.
11482 (linux_target_ops): Initialize new structure members.
11483 (initialize_low): Call linux_check_ptrace_features.
11484 * lynx-low.c (lynx_target_ops): Initialize new structure
11485 members.
11486 * server.c (report_fork_events, report_vfork_events):
11487 New global flags.
11488 (handle_query): Add new features to qSupported packet and
11489 response.
11490 (captured_main): Initialize new global variables.
11491 * target.h (struct target_ops) <supports_fork_events>:
11492 New member.
11493 <supports_vfork_events>: New member.
11494 (target_supports_fork_events): New macro.
11495 (target_supports_vfork_events): New macro.
11496 * win32-low.c (win32_target_ops): Initialize new structure
11497 members.
11498
11499 2015-05-12 Gary Benson <gbenson@redhat.com>
11500
11501 * server.c (handle_qxfer_exec_file): Use current process
11502 if annex is empty.
11503
11504 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11505
11506 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11507 Remove HAVE_PTRACE_GETREGS conditionals.
11508 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11509 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11510
11511 2015-05-08 Yao Qi <yao.qi@linaro.org>
11512
11513 * linux-low.c (linux_supports_conditional_breakpoints): New
11514 function.
11515 (linux_target_ops): Install new target method.
11516 * lynx-low.c (lynx_target_ops): Install NULL hook for
11517 supports_conditional_breakpoints.
11518 * nto-low.c (nto_target_ops): Likewise.
11519 * spu-low.c (spu_target_ops): Likewise.
11520 * win32-low.c (win32_target_ops): Likewise.
11521 * server.c (handle_query): Check
11522 target_supports_conditional_breakpoints.
11523 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11524 New field.
11525 (target_supports_conditional_breakpoints): New macro.
11526
11527 2015-05-06 Pedro Alves <palves@redhat.com>
11528
11529 PR server/18081
11530 * server.c (start_inferior): If the process exits, mourn it.
11531
11532 2015-04-21 Gary Benson <gbenson@redhat.com>
11533
11534 * hostio.c (fileio_open_flags_to_host): Factored out to
11535 fileio_to_host_openflags in common/fileio.c. Single use
11536 updated.
11537
11538 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11539
11540 * linux-xtensa-low.c (xtensa_fill_gregset)
11541 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11542 XCHAL_HAVE_LOOP.
11543
11544 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11545
11546 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11547 (regs_info): Replace usrregs pointer with NULL.
11548
11549 2015-04-17 Gary Benson <gbenson@redhat.com>
11550
11551 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11552 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11553 * server.c (handle_qxfer_exec_file): New function.
11554 (qxfer_packets): Add exec-file entry.
11555 (handle_query): Report qXfer:exec-file:read as supported packet.
11556
11557 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11558
11559 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11560
11561 2015-04-09 Gary Benson <gbenson@redhat.com>
11562
11563 * hostio-errno.c (errno_to_fileio_error): Remove function.
11564 Update caller to use remote_fileio_to_fio_error.
11565
11566 2015-04-09 Yao Qi <yao.qi@linaro.org>
11567
11568 * linux-low.c (linux_insert_point): Call
11569 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11570 (linux_remove_point): Call remove_memory_breakpoint if type is
11571 raw_bkpt_type_sw.
11572 * linux-x86-low.c (x86_insert_point): Don't call
11573 insert_memory_breakpoint.
11574 (x86_remove_point): Don't call remove_memory_breakpoint.
11575
11576 2015-04-01 Pedro Alves <palves@redhat.com>
11577 Cleber Rosa <crosa@redhat.com>
11578
11579 * server.c (gdbserver_usage): Reorganize and extend the usage
11580 message.
11581
11582 2015-03-24 Pedro Alves <palves@redhat.com>
11583
11584 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11585 output. Also dump TRAP_TRACE.
11586 (linux_low_filter_event): In debug output, distinguish a
11587 resume_stop SIGSTOP from a delayed SIGSTOP.
11588
11589 2015-03-24 Gary Benson <gbenson@redhat.com>
11590
11591 * linux-x86-low.c (x86_linux_new_thread): Moved to
11592 nat/x86-linux.c.
11593 (x86_linux_prepare_to_resume): Likewise.
11594
11595 2015-03-24 Gary Benson <gbenson@redhat.com>
11596
11597 * Makefile.in (x86-linux-dregs.o): New rule.
11598 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11599 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11600 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11601 (x86_linux_dr_get): Likewise.
11602 (x86_linux_dr_set): Likewise.
11603 (update_debug_registers_callback): Likewise.
11604 (x86_linux_dr_set_addr): Likewise.
11605 (x86_linux_dr_get_addr): Likewise.
11606 (x86_linux_dr_set_control): Likewise.
11607 (x86_linux_dr_get_control): Likewise.
11608 (x86_linux_dr_get_status): Likewise.
11609 (x86_linux_update_debug_registers): Likewise.
11610
11611 2015-03-24 Gary Benson <gbenson@redhat.com>
11612
11613 * linux-x86-low.c (x86_linux_update_debug_registers):
11614 New function, factored out from...
11615 (x86_linux_prepare_to_resume): ...this.
11616
11617 2015-03-24 Gary Benson <gbenson@redhat.com>
11618
11619 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11620 (x86_linux_dr_set): Likewise.
11621 (update_debug_registers_callback): Likewise.
11622 (x86_linux_dr_set_addr): Likewise.
11623 (x86_linux_dr_get_addr): Likewise.
11624 (x86_linux_dr_set_control): Likewise.
11625 (x86_linux_dr_get_control): Likewise.
11626 (x86_linux_dr_get_status): Likewise.
11627 (x86_linux_prepare_to_resume): Likewise.
11628
11629 2015-03-24 Gary Benson <gbenson@redhat.com>
11630
11631 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11632 Use perror_with_name. Pass string through gettext.
11633 (x86_linux_dr_set): Likewise.
11634
11635 2015-03-24 Gary Benson <gbenson@redhat.com>
11636
11637 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11638 (x86_linux_dr_set_addr): ...this.
11639 (x86_dr_low_get_addr): Rename to...
11640 (x86_linux_dr_get_addr): ...this.
11641 (x86_dr_low_set_control): Rename to...
11642 (x86_linux_dr_set_control): ...this.
11643 (x86_dr_low_get_control): Rename to...
11644 (x86_linux_dr_get_control): ...this.
11645 (x86_dr_low_get_status): Rename to...
11646 (x86_linux_dr_get_status): ...this.
11647 (x86_dr_low): Update with new function names.
11648
11649 2015-03-24 Gary Benson <gbenson@redhat.com>
11650
11651 * Makefile.in (x86-linux.o): New rule.
11652 * configure.srv: Add x86-linux.o to relevant targets.
11653 * linux-low.c (lwp_set_arch_private_info): New function.
11654 (lwp_arch_private_info): Likewise.
11655 * linux-x86-low.c: Include nat/x86-linux.h.
11656 (arch_lwp_info): Removed structure.
11657 (update_debug_registers_callback):
11658 Use lwp_set_debug_registers_changed.
11659 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11660 and lwp_set_debug_registers_changed.
11661 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11662
11663 2015-03-24 Gary Benson <gbenson@redhat.com>
11664
11665 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11666 * linux-arm-low.c (arm_new_thread): Likewise.
11667 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11668 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11669 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11670 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11671
11672 2015-03-24 Gary Benson <gbenson@redhat.com>
11673
11674 * linux-low.c (ptid_of_lwp): New function.
11675 (lwp_is_stopped): Likewise.
11676 (lwp_stop_reason): Likewise.
11677 * linux-x86-low.c (update_debug_registers_callback):
11678 Use lwp_is_stopped.
11679 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11680 lwp_stop_reason.
11681
11682 2015-03-24 Gary Benson <gbenson@redhat.com>
11683
11684 * linux-low.h (linux_stop_lwp): Remove declaration.
11685
11686 2015-03-24 Gary Benson <gbenson@redhat.com>
11687
11688 * linux-low.h: Include nat/linux-nat.h.
11689 * linux-low.c (iterate_over_lwps_args): New structure.
11690 (iterate_over_lwps_filter): New function.
11691 (iterate_over_lwps): Likewise.
11692 * linux-x86-low.c (update_debug_registers_callback):
11693 Update signature to what iterate_over_lwps expects.
11694 Remove PID check that iterate_over_lwps now performs.
11695 (x86_dr_low_set_addr): Use iterate_over_lwps.
11696 (x86_dr_low_set_control): Likewise.
11697
11698 2015-03-24 Gary Benson <gbenson@redhat.com>
11699
11700 * linux-x86-low.c (x86_debug_reg_state): New function.
11701 (x86_linux_prepare_to_resume): Use the above.
11702
11703 2015-03-24 Gary Benson <gbenson@redhat.com>
11704
11705 * linux-low.c (current_lwp_ptid): New function.
11706 * linux-x86-low.c: Include nat/linux-nat.h.
11707 (x86_dr_low_get_addr): Use current_lwp_ptid.
11708 (x86_dr_low_get_control): Likewise.
11709 (x86_dr_low_get_status): Likewise.
11710
11711 2015-03-20 Pedro Alves <palves@redhat.com>
11712
11713 * tracepoint.c (cmd_qtstatus): Make "str" const.
11714
11715 2015-03-20 Pedro Alves <palves@redhat.com>
11716
11717 * server.c (handle_general_set): Make "req_str" const.
11718
11719 2015-03-19 Pedro Alves <palves@redhat.com>
11720
11721 * linux-low.c (linux_resume_one_lwp): Rename to ...
11722 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11723 instead call perror_with_name.
11724 (check_ptrace_stopped_lwp_gone): New function.
11725 (linux_resume_one_lwp): Reimplement as wrapper around
11726 linux_resume_one_lwp_throw that swallows errors if the LWP is
11727 gone.
11728
11729 2015-03-19 Pedro Alves <palves@redhat.com>
11730
11731 * linux-low.c (count_events_callback, select_event_lwp_callback):
11732 No longer check whether the thread has resume_stop as last resume
11733 kind.
11734
11735 2015-03-19 Pedro Alves <palves@redhat.com>
11736
11737 * linux-low.c (count_events_callback, select_event_lwp_callback):
11738 Use the lwp's status_pending_p field, not the thread's.
11739
11740 2015-03-19 Pedro Alves <palves@redhat.com>
11741
11742 * linux-low.c (select_event_lwp_callback): Update comments to
11743 no longer mention SIGTRAP.
11744
11745 2015-03-18 Gary Benson <gbenson@redhat.com>
11746
11747 * server.c (handle_query): Do not report vFile:fstat as supported.
11748
11749 2015-03-11 Gary Benson <gbenson@redhat.com>
11750
11751 * hostio.c (sys/types.h): New include.
11752 (sys/stat.h): Likewise.
11753 (common-remote-fileio.h): Likewise.
11754 (handle_fstat): New function.
11755 (handle_vFile): Handle vFile:fstat packets.
11756
11757 2015-03-11 Gary Benson <gbenson@redhat.com>
11758
11759 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11760 struct stat.st_blocks and struct stat.st_blksize.
11761 * configure: Regenerate.
11762 * config.in: Likewise.
11763 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11764 (OBS): Add common-remote-fileio.o.
11765 (common-remote-fileio.o): New rule.
11766
11767 2015-03-09 Pedro Alves <palves@redhat.com>
11768
11769 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11770 'struct sockaddr' pointer in 'accept' call.
11771
11772 2015-03-09 Pedro Alves <palves@redhat.com>
11773
11774 Revert:
11775 2015-03-07 Pedro Alves <palves@redhat.com>
11776 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11777 or <winsock2.h> here. Instead include "gdb_socket.h".
11778 (remote_open): Use union gdb_sockaddr_u.
11779 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11780 or <winsock2.h> here. Instead include "gdb_socket.h".
11781 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11782 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11783 or <sys/un.h>.
11784 (init_named_socket, gdb_agent_helper_thread): Use union
11785 gdb_sockaddr_u.
11786
11787 2015-03-07 Pedro Alves <palves@redhat.com>
11788
11789 * configure.ac (build_warnings): Move
11790 -Wdeclaration-after-statement to the C-specific set.
11791 * configure: Regenerate.
11792
11793 2015-03-07 Pedro Alves <palves@redhat.com>
11794
11795 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11796 or <winsock2.h> here. Instead include "gdb_socket.h".
11797 (remote_open): Use union gdb_sockaddr_u.
11798 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11799 or <winsock2.h> here. Instead include "gdb_socket.h".
11800 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11801 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11802 or <sys/un.h>.
11803 (init_named_socket, gdb_agent_helper_thread): Use union
11804 gdb_sockaddr_u.
11805
11806 2015-03-07 Pedro Alves <palves@redhat.com>
11807
11808 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11809 instead.
11810
11811 2015-03-06 Yao Qi <yao.qi@linaro.org>
11812
11813 * linux-aarch64-low.c (aarch64_insert_point): Use
11814 show_debug_regs as a boolean.
11815 (aarch64_remove_point): Likewise.
11816
11817 2015-03-05 Pedro Alves <palves@redhat.com>
11818
11819 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11820 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11821 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11822 * nto-low.c (nto_target_ops): Likewise.
11823 * spu-low.c (spu_target_ops): Likewise.
11824 * win32-low.c (win32_target_ops): Likewise.
11825
11826 2015-03-04 Pedro Alves <palves@redhat.com>
11827
11828 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11829 Decide whether a breakpoint triggered based on the SIGTRAP's
11830 siginfo.si_code.
11831 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11832 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11833 (linux_low_filter_event): Check for breakpoints before checking
11834 watchpoints.
11835 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11836 siginfo.si_code.
11837 (linux_stopped_by_sw_breakpoint)
11838 (linux_supports_stopped_by_sw_breakpoint)
11839 (linux_stopped_by_hw_breakpoint)
11840 (linux_supports_stopped_by_hw_breakpoint): New functions.
11841 (linux_target_ops): Install new target methods.
11842
11843 2015-03-04 Pedro Alves <palves@redhat.com>
11844
11845 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11846 * server.c (swbreak_feature, hwbreak_feature): New globals.
11847 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11848 (captured_main): Clear swbreak_feature and hwbreak_feature.
11849 * server.h (swbreak_feature, hwbreak_feature): Declare.
11850 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11851 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11852 supports_stopped_by_hw_breakpoint>: New fields.
11853 (target_supports_stopped_by_sw_breakpoint)
11854 (target_stopped_by_sw_breakpoint)
11855 (target_supports_stopped_by_hw_breakpoint)
11856 (target_stopped_by_hw_breakpoint): Declare.
11857
11858 2015-03-04 Pedro Alves <palves@redhat.com>
11859
11860 enum lwp_stop_reason -> enum target_stop_reason
11861 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11862 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11863 (linux_wait_1, stuck_in_jump_pad_callback)
11864 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11865 (linux_stopped_by_watchpoint):
11866 * linux-low.h (enum lwp_stop_reason): Delete.
11867 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11868 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11869
11870 2015-03-04 Yao Qi <yao.qi@linaro.org>
11871
11872 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11873
11874 2015-03-03 Gary Benson <gbenson@redhat.com>
11875
11876 * hostio.c (handle_vFile): Fix prefix lengths.
11877
11878 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11879
11880 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11881 ptr_bits.
11882
11883 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11884
11885 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11886 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11887 (clean): Add "rm -f" for above C files.
11888 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11889 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11890 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11891 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11892 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11893 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11894 (init_registers_s390x_vx_linux64)
11895 (init_registers_s390x_tevx_linux64)
11896 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11897 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11898 declarations.
11899 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11900 (s390_store_vxrs_high): New functions.
11901 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11902 NT_S390_VXRS_HIGH.
11903 (s390_arch_setup): Add logic for selecting one of the new target
11904 descriptions. Activate the new vector regsets if applicable.
11905 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11906 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11907 and init_registers_s390x_tevx_linux64.
11908
11909 2015-03-01 Pedro Alves <palves@redhat.com>
11910
11911 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11912 parameter.
11913
11914 2015-02-27 Pedro Alves <palves@redhat.com>
11915
11916 * linux-x86-low.c (u_debugreg_offset): New function.
11917 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11918
11919 2015-02-27 Pedro Alves <palves@redhat.com>
11920
11921 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11922 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11923 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11924 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11925 (ps_lsetfpregs, ps_getpid)
11926 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11927 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11928 (ps_lsetxregs, ps_plog): Declare.
11929
11930 2015-02-27 Pedro Alves <palves@redhat.com>
11931
11932 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11933 IP_AGENT_EXPORT_FUNC.
11934 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11935 IP_AGENT_EXPORT_FUNC.
11936 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11937 (IP_AGENT_EXPORT): Delete.
11938 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11939 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11940 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11941 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11942 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11943 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11944 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11945 (traceframe_read_count, traceframe_write_count)
11946 (traceframes_created, trace_state_variables, get_raw_reg)
11947 (get_trace_state_variable_value, set_trace_state_variable_value)
11948 (ust_loaded, helper_thread_id, cmd_buf): Use
11949 IPA_SYM_EXPORTED_NAME.
11950 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11951 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11952 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11953 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11954 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11955 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11956 EXTERN_C_PUSH/EXTERN_C_POP.
11957 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11958 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11959 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11960 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11961 (traceframe_write_count, traceframe_read_count)
11962 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11963 (about_to_request_buffer_space, get_trace_state_variable_value)
11964 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11965 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11966 EXTERN_C_PUSH/EXTERN_C_POP.
11967 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11968 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11969 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11970 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11971 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11972 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11973 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11974 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11975 Define.
11976 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11977 (IP_AGENT_EXPORT_VAR_DECL): Define.
11978 (tracing): Declare.
11979 (gdb_agent_get_raw_reg): Declare.
11980
11981 2015-02-27 Tom Tromey <tromey@redhat.com>
11982 Pedro Alves <palves@redhat.com>
11983
11984 Rename symbols whose names are reserved C++ keywords throughout.
11985
11986 2015-02-27 Pedro Alves <palves@redhat.com>
11987
11988 * Makefile.in (COMPILER): New, get it from autoconf.
11989 (CXX): Get from autoconf instead.
11990 (COMPILE.pre): Use COMPILER.
11991 (CC-LD): Rename to ...
11992 (CC_LD): ... this. Use COMPILER.
11993 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11994 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11995 * acinclude.m4: Include build-with-cxx.m4.
11996 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11997 Disable -Werror by default if building in C++ mode.
11998 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11999 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
12000 the C++ compiler. Save/restore CXXFLAGS too.
12001 * configure: Regenerate.
12002
12003 2015-02-27 Pedro Alves <palves@redhat.com>
12004
12005 * acinclude.m4: Include libiberty.m4.
12006 * configure.ac: Call libiberty_INIT.
12007 * config.in, configure: Regenerate.
12008
12009 2015-02-26 Pedro Alves <palves@redhat.com>
12010
12011 * linux-low.c (linux_wait_1): When incrementing the PC past a
12012 program breakpoint always use the_low_target.breakpoint_len as
12013 increment, rather than the maximum between that and
12014 the_low_target.decr_pc_after_break.
12015
12016 2015-02-23 Pedro Alves <palves@redhat.com>
12017
12018 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
12019 thread was doing a step-over; always adjust the PC if
12020 we stepped over a permanent breakpoint.
12021 (linux_wait_1): If we stepped over breakpoint that was on top of a
12022 permanent breakpoint, manually advance the PC past it.
12023
12024 2015-02-23 Pedro Alves <palves@redhat.com>
12025
12026 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
12027 modes.
12028 (x86_fill_gregset, x86_store_gregset): Use it when handling
12029 $orig_eax.
12030
12031 2015-02-20 Pedro Alves <palves@redhat.com>
12032
12033 * thread-db.c: Include "nat/linux-procfs.h".
12034 (thread_db_init): Skip listing new threads if the kernel supports
12035 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
12036
12037 2015-02-20 Pedro Alves <palves@redhat.com>
12038
12039 * linux-low.c (status_pending_p_callback): Use ptid_match.
12040
12041 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
12042
12043 PR breakpoints/16812
12044 * linux-low.c (wstatus_maybe_breakpoint): Remove.
12045 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
12046 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
12047
12048 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
12049
12050 PR breakpoints/15956
12051 * tracepoint.c (cmd_qtinit): Add check for current_thread.
12052
12053 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12054
12055 * linux-low.c (linux_low_btrace_conf): Print size.
12056 * server.c (handle_btrace_conf_general_set): New.
12057 (hanle_general_set): Call handle_btrace_conf_general_set.
12058 (handle_query): Report Qbtrace-conf:bts:size as supported.
12059
12060 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12061
12062 * linux-low.c (linux_low_enable_btrace): Update parameters.
12063 (linux_low_btrace_conf): New.
12064 (linux_target_ops)<to_btrace_conf>: Initialize.
12065 * server.c (current_btrace_conf): New.
12066 (handle_btrace_enable): Rename to ...
12067 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
12068 to target_enable_btrace. Update comment. Update users.
12069 (handle_qxfer_btrace_conf): New.
12070 (qxfer_packets): Add btrace-conf entry.
12071 (handle_query): Report qXfer:btrace-conf:read as supported packet.
12072 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
12073 (target_ops)<read_btrace_conf>: New.
12074 (target_enable_btrace): Update parameters.
12075 (target_read_btrace_conf): New.
12076
12077 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12078
12079 * server.c (handle_btrace_general_set): Remove call to
12080 target_supports_btrace.
12081 (supported_btrace_packets): New.
12082 (handle_query): Call supported_btrace_packets.
12083 * target.h: include btrace-common.h.
12084 (btrace_target_info): Removed.
12085 (supports_btrace, target_supports_btrace): Update parameters.
12086
12087 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12088
12089 * Makefile.in (SFILES): Add common/btrace-common.c.
12090 (OBS): Add common/btrace-common.o.
12091 (btrace-common.o): Add build rules.
12092 * linux-low: Include btrace-common.h.
12093 (linux_low_read_btrace): Use struct btrace_data. Call
12094 btrace_data_init and btrace_data_fini.
12095
12096 2015-02-06 Pedro Alves <palves@redhat.com>
12097
12098 * thread-db.c (find_new_threads_callback): Add debug output.
12099
12100 2015-02-04 Pedro Alves <palves@redhat.com>
12101
12102 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
12103 (resume_stopped_resumed_lwps): New function.
12104 (linux_wait_for_event_filtered): Use it.
12105
12106 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
12107
12108 * Makefile.in (SFILES): Add linux-personality.c.
12109 (linux-personality.o): New rule.
12110 * configure.srv (srv_linux_obj): Add linux-personality.o to the
12111 list of objects to be built.
12112 * linux-low.c: Include nat/linux-personality.h.
12113 (linux_create_inferior): Remove code to disable address space
12114 randomization (moved to ../nat/linux-personality.c). Create
12115 cleanup to disable address space randomization.
12116
12117 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
12118
12119 * Makefile.in (posix-strerror.o): New rule.
12120 (mingw-strerror.o): Likewise.
12121 * configure: Regenerated.
12122 * configure.ac: Source file ../common/common.host. Initialize new
12123 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
12124
12125 2015-01-14 Yao Qi <yao@codesourcery.com>
12126
12127 * Makefile.in (SFILES): Add nat/ppc-linux.c.
12128 (ppc-linux.o): New rule.
12129 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
12130 * configure.ac: AC_CHECK_FUNCS(getauxval).
12131 * config.in: Re-generated.
12132 * configure: Re-generated.
12133 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
12134 ppc64_64bit_inferior_p
12135
12136 2015-01-14 Yao Qi <yao@codesourcery.com>
12137
12138 * linux-ppc-low.c: Include "nat/ppc-linux.h".
12139 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
12140 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
12141 (PT_ORIG_R3, PT_TRAP): Likewise.
12142 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
12143 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
12144 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
12145
12146 2015-01-10 Joel Brobecker <brobecker@adacore.com>
12147
12148 * i387-fp.c (i387_cache_to_xsave): In look over
12149 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
12150 zmmh_low_space field by use of zmmh_high_space.
12151
12152 2015-01-09 Pedro Alves <palves@redhat.com>
12153
12154 * linux-low.c (step_over_bkpt): Move higher up in the file.
12155 (handle_extended_wait): Don't store the stop_pc here.
12156 (get_stop_pc): Adjust comments and rename to ...
12157 (check_stopped_by_breakpoint): ... this. Record whether the LWP
12158 stopped for a software breakpoint or hardware breakpoint.
12159 (thread_still_has_status_pending_p): New function.
12160 (status_pending_p_callback): Use
12161 thread_still_has_status_pending_p. If the event is no longer
12162 interesting, resume the LWP.
12163 (handle_tracepoints): Add assert.
12164 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
12165 (wstatus_maybe_breakpoint): New function.
12166 (cancel_breakpoint): Delete function.
12167 (check_stopped_by_watchpoint): New function, factored out from
12168 linux_low_filter_event.
12169 (lp_status_maybe_breakpoint): Delete function.
12170 (linux_low_filter_event): Remove filter_ptid argument.
12171 Leave thread group exits pending here. Store the LWP's stop PC.
12172 Always leave events pending.
12173 (linux_wait_for_event_filtered): Pull all events out of the
12174 kernel, and leave them all pending.
12175 (count_events_callback, select_event_lwp_callback): Consider all
12176 events.
12177 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
12178 (select_event_lwp): Only give preference to the stepping LWP in
12179 all-stop mode. Adjust comments.
12180 (ignore_event): New function.
12181 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
12182 references to cancel_breakpoints. Adjust to renames. Also give
12183 equal priority to all LWPs that have had events in non-stop mode.
12184 If reporting a software breakpoint event, unadjust the LWP's PC.
12185 (linux_wait): If linux_wait_1 returned an ignored event, retry.
12186 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
12187 Adjust.
12188 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
12189 (resume_status_pending_p): Use thread_still_has_status_pending_p.
12190 (linux_stopped_by_watchpoint): Adjust.
12191 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
12192 * linux-low.h (enum lwp_stop_reason): New.
12193 (struct lwp_info) <stop_pc>: Adjust comment.
12194 <stopped_by_watchpoint>: Delete field.
12195 <stop_reason>: New field.
12196 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
12197 * mem-break.c (software_breakpoint_inserted_here)
12198 (hardware_breakpoint_inserted_here): New function.
12199 * mem-break.h (software_breakpoint_inserted_here)
12200 (hardware_breakpoint_inserted_here): Declare.
12201 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
12202 (cancel_breakpoints): Delete.
12203 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
12204 (upload_fast_traceframes): Remove references to
12205 cancel_breakpoints.
12206
12207 2015-01-09 Pedro Alves <palves@redhat.com>
12208
12209 * thread-db.c (find_new_threads_callback): Ignore thread if the
12210 kernel thread ID is -1.
12211
12212 2015-01-09 Pedro Alves <palves@redhat.com>
12213
12214 * linux-low.c (linux_attach_fail_reason_string): Move to
12215 nat/linux-ptrace.c, and rename.
12216 (linux_attach_lwp): Update comment.
12217 (attach_proc_task_lwp_callback): New function.
12218 (linux_attach): Adjust to rename and use
12219 linux_proc_attach_tgid_threads.
12220 (linux_attach_fail_reason_string): Delete declaration.
12221
12222 2015-01-01 Joel Brobecker <brobecker@adacore.com>
12223
12224 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
12225 * server.c (gdbserver_version): Likewise.
12226
12227 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
12228
12229 * remote-utils.c: Include ctype.h.
12230 (input_interrupt): Explicitly handle the case when the char
12231 received is the NUL byte. Improve the printing of non-ASCII
12232 characters.
12233
12234 2014-12-16 Joel Brobecker <brobecker@adacore.com>
12235
12236 * linux-low.c (linux_low_filter_event): Update call to
12237 linux_enable_event_reporting following the addition of
12238 a new parameter to that function.
12239
12240 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
12241
12242 PR server/17457
12243 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
12244 (AARCH64_FPCR_REGNO): Likewise.
12245 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
12246 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
12247 (aarch64_store_fpregset): Likewise.
12248
12249 2014-12-15 Joel Brobecker <brobecker@adacore.com>
12250
12251 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
12252 Remove FIXME comment about assumption about N.
12253
12254 2014-12-13 Joel Brobecker <brobecker@adacore.com>
12255
12256 * configure.ac: If large-file support is disabled in GDBserver,
12257 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
12258 * configure: Regenerate.
12259
12260 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12261
12262 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
12263 warning upon ENODATA from ptrace.
12264 * linux-s390-low.c (s390_store_tdb): New.
12265 (s390_regsets): Add regset for NT_S390_TDB.
12266
12267 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12268
12269 * linux-low.c (regsets_store_inferior_registers): Skip regsets
12270 without a fill_function.
12271 * linux-s390-low.c (s390_fill_last_break): Remove.
12272 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
12273 (s390_arch_setup): Use regset's size instead of fill_function for
12274 loop end condition.
12275
12276 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12277
12278 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
12279 the regset's store function when ptrace returned an error.
12280 * regcache.c (get_thread_regcache): Invalidate register cache
12281 before fetching inferior's registers.
12282
12283 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12284
12285 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
12286 while-loop as for-loop.
12287 (regsets_store_inferior_registers): Likewise.
12288
12289 2014-11-28 Yao Qi <yao@codesourcery.com>
12290
12291 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
12292 * config.in, configure: Re-generate.
12293 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
12294 is defined.
12295
12296 2014-11-21 Yao Qi <yao@codesourcery.com>
12297
12298 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12299 (AC_CHECK_HEADERS): Remove malloc.h.
12300 * configure: Re-generated.
12301 * config.in: Re-generated.
12302 * server.h: Don't include alloca.h and malloc.h.
12303 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12304 Don't include malloc.h.
12305
12306 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12307
12308 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12309 corresponding ERRNO check in same block.
12310
12311 2014-11-12 Pedro Alves <palves@redhat.com>
12312
12313 * server.c (cont_thread): Update comment.
12314 (start_inferior, attach_inferior): No longer clear cont_thread.
12315 (handle_v_cont): No longer set cont_thread.
12316 (captured_main): Clear cont_thread each time a GDB connects.
12317
12318 2014-11-12 Pedro Alves <palves@redhat.com>
12319
12320 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12321 thread, and don't resume all threads if the Hc thread has exited.
12322
12323 2014-11-12 Pedro Alves <palves@redhat.com>
12324
12325 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12326 the process group instead of to a specific LWP.
12327
12328 2014-10-15 Pedro Alves <palves@redhat.com>
12329
12330 PR server/17487
12331 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12332 parameter.
12333 (arm_set_thread_context): Delete.
12334 (the_low_target): Adjust.
12335 * win32-i386-low.c (debug_registers_changed)
12336 (debug_registers_used): Delete.
12337 (update_debug_registers_callback): New function.
12338 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12339 needing to update their debug registers.
12340 (win32_get_current_dr): New function.
12341 (x86_dr_low_get_addr, x86_dr_low_get_control)
12342 (x86_dr_low_get_status): Fetch the debug register from the thread
12343 record's context.
12344 (i386_initial_stuff): Adjust.
12345 (i386_get_thread_context): Remove current_event parameter. Don't
12346 clear debug_registers_changed nor copy DR values to
12347 debug_reg_state.
12348 (i386_set_thread_context): Delete.
12349 (i386_prepare_to_resume): New function.
12350 (i386_thread_added): Mark the thread as needing to update irs
12351 debug registers.
12352 (the_low_target): Remove i386_set_thread_context and install
12353 i386_prepare_to_resume.
12354 * win32-low.c (win32_get_thread_context): Adjust.
12355 (win32_set_thread_context): Use SetThreadContext
12356 directly.
12357 (win32_prepare_to_resume): New function.
12358 (win32_require_context): New function, factored out from ...
12359 (thread_rec): ... this.
12360 (continue_one_thread): Call win32_prepare_to_resume on each thread
12361 we're about to continue.
12362 (win32_resume): Call win32_prepare_to_resume on the event thread.
12363 * win32-low.h (struct win32_thread_info)
12364 <debug_registers_changed>: New field.
12365 (struct win32_target_ops): Change prototype of set_thread_context,
12366 delete set_thread_context and add prepare_to_resume.
12367 (win32_require_context): New declaration.
12368
12369 2014-10-08 Gary Benson <gbenson@redhat.com>
12370
12371 * server.h: Do not include common-exceptions.h.
12372
12373 2014-10-08 Gary Benson <gbenson@redhat.com>
12374
12375 * server.h: Do not include cleanups.h.
12376
12377 2014-09-30 James Hogan <james.hogan@imgtec.com>
12378
12379 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12380 mips64-dsp-linux.c.
12381
12382 2014-09-23 Yao Qi <yao@codesourcery.com>
12383
12384 * linux-low.c (lp_status_maybe_breakpoint): New function.
12385 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12386 (count_events_callback): Likewise.
12387 (select_event_lwp_callback): Likewise.
12388 (cancel_breakpoints_callback): Likewise.
12389
12390 2014-09-19 Don Breazeal <donb@codesourcery.com>
12391
12392 * linux-low.c (handle_extended_wait): Call
12393 linux_ptrace_get_extended_event.
12394 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12395 linux_is_extended_waitstatus.
12396
12397 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12398
12399 * Makefile.in (CPPFLAGS): Define.
12400 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12401 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12402
12403 2014-09-16 Gary Benson <gbenson@redhat.com>
12404
12405 * inferiors.h (current_inferior): Renamed as...
12406 (current_thread): New variable. All uses updated.
12407 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12408 (maybe_move_out_of_jump_pad): Likewise.
12409 (cancel_breakpoint): Likewise.
12410 (linux_low_filter_event): Likewise.
12411 (wait_for_sigstop): Likewise.
12412 (linux_resume_one_lwp): Likewise.
12413 (need_step_over_p): Likewise.
12414 (start_step_over): Likewise.
12415 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12416 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12417 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12418 and save_inferior as saved_thread.
12419 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12420 saved_thread.
12421 (regcache_invalidate_thread): Likewise.
12422 * remote-utils.c (prepare_resume_reply): Likewise.
12423 * thread-db.c (thread_db_get_tls_address): Likewise.
12424 (disable_thread_event_reporting): Likewise.
12425 (remove_thread_event_breakpoints): Likewise.
12426 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12427 as saved_thread.
12428 * target.h (set_desired_inferior): Renamed as...
12429 (set_desired_thread): New declaration. All uses updated.
12430 * server.c (myresume): Updated comment to reference thread instead
12431 of inferior.
12432 (handle_serial_event): Likewise.
12433 (handle_target_event): Likewise.
12434
12435 2014-09-12 Tom Tromey <tromey@redhat.com>
12436 Gary Benson <gbenson@redhat.com>
12437
12438 * regcache.h: Include common-regcache.h.
12439 (regcache_read_pc): Don't declare.
12440 * regcache.c (get_thread_regcache_for_ptid): New function.
12441
12442 2014-09-11 Tom Tromey <tromey@redhat.com>
12443 Gary Benson <gbenson@redhat.com>
12444
12445 * symbol.c: New file.
12446 * Makefile.in (SFILES): Add symbol.c.
12447 (OBS): Add symbol.o.
12448
12449 2014-09-11 Gary Benson <gbenson@redhat.com>
12450
12451 * target.c (target_stop_ptid, target_continue_ptid): New
12452 functions.
12453
12454 2014-09-11 Tom Tromey <tromey@redhat.com>
12455 Gary Benson <gbenson@redhat.com>
12456
12457 * target.h: Include target/target.h.
12458 * target.c (target_read_memory, target_read_uint32)
12459 (target_write_memory): New functions.
12460
12461 2014-09-11 Gary Benson <gbenson@redhat.com>
12462
12463 * server.h (debug_hw_points): Don't declare.
12464 * server.c (debug_hw_points): Don't define. Replace all uses
12465 with show_debug_regs.
12466 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12467 all uses with show_debug_regs.
12468
12469 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12470
12471 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12472 endianness into account.
12473 (ppc_supply_ptrace_register): Likewise.
12474
12475 2014-09-03 James Hogan <james.hogan@imgtec.com>
12476
12477 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12478 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12479
12480 2014-09-03 Gary Benson <gbenson@redhat.com>
12481
12482 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12483 ALL_DEBUG_ADDRESS_REGISTERS.
12484
12485 2014-09-02 Gary Benson <gbenson@redhat.com>
12486
12487 * i386-low.h: Renamed as...
12488 * x86-low.h: New file. All type, function and variable name
12489 prefixes changed from "i386_" to "x86_". All references updated.
12490 * i386-low.c: Renamed as...
12491 * x86-low.c: New file. All type, function and variable name
12492 prefixes changed from "i386_" to "x86_". All references updated.
12493
12494 2014-09-02 Gary Benson <gbenson@redhat.com>
12495
12496 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12497 (x86_linux_new_thread): Likewise.
12498
12499 2014-08-29 Gary Benson <gbenson@redhat.com>
12500
12501 * server.h (setjmp.h): Do not include.
12502 (toplevel): Do not declare.
12503 (common-exceptions.h): Include.
12504 (cleanups.h): Likewise.
12505 * server.c (toplevel): Do not define.
12506 (exit_code): New static global.
12507 (detach_or_kill_for_exit_cleanup): New function.
12508 (main): New function. Original main renamed to...
12509 (captured_main): New function.
12510 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12511
12512 2014-08-29 Gary Benson <gbenson@redhat.com>
12513
12514 * Makefile.in (SFILES): Add common/common-exceptions.c.
12515 (OBS): Add common-exceptions.o.
12516 (common-exceptions.o): New rule.
12517 * utils.c (prepare_to_throw_exception): New function.
12518
12519 2014-08-29 Gary Benson <gbenson@redhat.com>
12520
12521 * config.in: Regenerate.
12522 * configure: Likewise.
12523
12524 2014-08-29 Gary Benson <gbenson@redhat.com>
12525
12526 * Makefile.in (SFILES): Add common/cleanups.c.
12527 (OBS): cleanups.o.
12528 (cleanups.o): New rule.
12529
12530 2014-08-29 Gary Benson <gbenson@redhat.com>
12531
12532 * utils.c (internal_vwarning): New function.
12533
12534 2014-08-28 Gary Benson <gbenson@redhat.com>
12535
12536 * utils.h (fatal): Remove declaration.
12537 * utils.c (fatal): Remove function.
12538
12539 2014-08-28 Gary Benson <gbenson@redhat.com>
12540
12541 * tracepoint.c (gdb_agent_init): Replace fatal with
12542 perror_with_name.
12543 (initialize_tracepoint): Likewise.
12544
12545 2014-08-28 Gary Benson <gbenson@redhat.com>
12546
12547 * remote-utils.c (remote_prepare): Replace fatal with error.
12548
12549 2014-08-28 Gary Benson <gbenson@redhat.com>
12550
12551 * linux-low.c (linux_async): Replace fatal with warning.
12552 Tidy up and return.
12553 (linux_start_non_stop): Return -1 if linux_async failed.
12554
12555 2014-08-28 Gary Benson <gbenson@redhat.com>
12556
12557 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12558 gdb_assert.
12559 (i386_dr_low_get_addr): Remove vague comment.
12560 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12561 gdb_assert.
12562
12563 2014-08-28 Gary Benson <gbenson@redhat.com>
12564
12565 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12566 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12567 internal_error.
12568 (linux_resume_one_lwp): Likewise.
12569 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12570 gdb_assert.
12571 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12572 with internal_error.
12573 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12574 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12575 (find_register_by_name): Replace fatal with internal_error.
12576 (find_regno): Likewise.
12577 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12578 * thread-db.c (thread_db_create_event): Likewise.
12579 (thread_db_load_search): Likewise.
12580 (try_thread_db_load_1): Likewise.
12581 * tracepoint.c (get_jump_space_head): Replace fatal with
12582 internal_error.
12583 (claim_trampoline_space): Likewise.
12584 (have_fast_tracepoint_trampoline_buffer): Likewise.
12585 (cmd_qtstart): Likewise.
12586 (stop_tracing): Likewise.
12587 (fast_tracepoint_collecting): Likewise.
12588 (target_malloc): Likewise.
12589 (download_tracepoint): Likewise.
12590 (download_trace_state_variables): Replace check with gdb_assert.
12591 (upload_fast_traceframes): Replace fatal with internal_error.
12592
12593 2014-08-19 Tom Tromey <tromey@redhat.com>
12594 Gary Benson <gbenson@redhat.com>
12595
12596 * Makefile.in (SFILES): Add common/common-debug.c.
12597 (OBS): Add common-debug.o.
12598 (common-debug.o): New rule.
12599 * debug.h (debug_printf): Don't declare.
12600 * debug.c (debug_printf): Renamed and rewritten as...
12601 (debug_vprintf): New function.
12602
12603 2014-08-19 Gary Benson <gbenson@redhat.com>
12604
12605 * utils.h: Do not include print-utils.h.
12606
12607 2014-08-19 Tom Tromey <tromey@redhat.com>
12608 Gary Benson <gbenson@redhat.com>
12609
12610 * server.h: Add static assertion.
12611 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12612
12613 2014-08-19 Tom Tromey <tromey@redhat.com>
12614 Gary Benson <gbenson@redhat.com>
12615
12616 * Makefile.in (SFILES): Add common/errors.c.
12617 (OBS): Add errors.o.
12618 (IPA_OBS): Add errors-ipa.o.
12619 (errors.o): New rule.
12620 (errors-ipa.o): Likewise.
12621 * utils.h (perror_with_name, error, warning): Don't declare.
12622 * utils.c (warning): Renamed and rewritten as...
12623 (vwarning): New function.
12624 (error): Renamed and rewritten as...
12625 (verror): New function.
12626 (internal_error): Renamed and rewritten as...
12627 (internal_verror): New function.
12628
12629 2014-08-07 Gary Benson <gbenson@redhat.com>
12630
12631 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12632 * configure: Regenerate.
12633 * config.in: Likewise.
12634 * server.h: Do not include errno.h.
12635 * event-loop.c: Likewise.
12636 * hostio-errno.c: Likewise.
12637 * linux-low.c: Likewise.
12638 * remote-utils.c: Likewise.
12639 * spu-low.c: Likewise.
12640 * utils.c: Likewise.
12641 * gdbreplay.c: Unconditionally include errno.h.
12642
12643 2014-08-07 Gary Benson <gbenson@redhat.com>
12644
12645 * server.h: Do not include string.h.
12646 * event-loop.c: Likewise.
12647 * linux-low.c: Likewise.
12648 * regcache.c: Likewise.
12649 * remote-utils.c: Likewise.
12650 * spu-low.c: Likewise.
12651 * utils.c: Likewise.
12652
12653 2014-08-07 Gary Benson <gbenson@redhat.com>
12654
12655 * server.h: Do not include gdb_assert.h.
12656
12657 2014-08-07 Gary Benson <gbenson@redhat.com>
12658
12659 * server.h: Do not include common-utils.h.
12660
12661 2014-08-07 Gary Benson <gbenson@redhat.com>
12662
12663 * server.h: Do not include ptid.h.
12664 * notif.h: Likewise.
12665
12666 2014-08-07 Gary Benson <gbenson@redhat.com>
12667
12668 * server.h: Do not include gdb_locale.h.
12669
12670 2014-08-07 Gary Benson <gbenson@redhat.com>
12671
12672 * server.h: Do not include gdb/signals.h.
12673 * win32-low.c: Likewise.
12674
12675 2014-08-07 Gary Benson <gbenson@redhat.com>
12676
12677 * server.h: Do not include pathmax.h.
12678
12679 2014-08-07 Gary Benson <gbenson@redhat.com>
12680
12681 * server.h: Do not include libiberty.h.
12682 * linux-bfin-low.c: Likewise.
12683
12684 2014-08-07 Gary Benson <gbenson@redhat.com>
12685
12686 * server.h: Do not include ansidecl.h.
12687
12688 2014-08-07 Gary Benson <gbenson@redhat.com>
12689
12690 * linux-x86-low.c: Do not include stddef.h.
12691 * lynx-ppc-low.c: Likewise.
12692 * tracepoint.c: Likewise.
12693
12694 2014-08-07 Gary Benson <gbenson@redhat.com>
12695
12696 * server.h: Do not include stdarg.h.
12697 * nto-low.c: Likewise.
12698
12699 2014-08-07 Gary Benson <gbenson@redhat.com>
12700
12701 * server.h: Do not include stdlib.h.
12702 * inferiors.c: Likewise.
12703 * linux-low.c: Likewise.
12704 * regcache.c: Likewise.
12705 * spu-low.c: Likewise.
12706 * tracepoint.c: Likewise.
12707 * utils.c: Likewise.
12708
12709 2014-08-07 Gary Benson <gbenson@redhat.com>
12710
12711 * server.h: Do not include stdio.h.
12712 * linux-low.c: Likewise.
12713 * remote-utils.c: Likewise.
12714 * spu-low.c: Likewise.
12715 * utils.c: Likewise.
12716 * wincecompat.c: Likewise.
12717
12718 2014-08-06 Gary Benson <gbenson@redhat.com>
12719
12720 * regcache.c (init_register_cache): Move conditionals inside if.
12721
12722 2014-08-06 Gary Benson <gbenson@redhat.com>
12723
12724 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12725
12726 2014-07-31 Gary Benson <gbenson@redhat.com>
12727
12728 * ax.h: Do not include server.h.
12729 * gdbthread.h: Likewise.
12730 * lynx-low.h: Likewise.
12731 * notif.h: Likewise.
12732
12733 2014-07-30 Gary Benson <gbenson@redhat.com>
12734
12735 * server.h: Include common-defs.h.
12736 Do not include config.h or build-gnulib-gdbserver/config.h.
12737
12738 2014-07-30 Gary Benson <gbenson@redhat.com>
12739
12740 * hostio-errno.c: Move server.h to top of includes list.
12741 * inferiors.c: Likewise.
12742 * linux-x86-low.c: Likewise.
12743 * notif.c: Include server.h.
12744
12745 2014-07-24 Tom Tromey <tromey@redhat.com>
12746 Gary Benson <gbenson@redhat.com>
12747
12748 * server.h (CORE_ADDR): Now unsigned.
12749
12750 2014-07-16 Pedro Alves <palves@redhat.com>
12751
12752 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12753
12754 2014-07-15 Pedro Alves <palves@redhat.com>
12755
12756 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12757 copy.
12758
12759 2014-07-11 Pedro Alves <palves@redhat.com>
12760
12761 * linux-low.c (kill_wait_lwp): New function, based on
12762 kill_one_lwp_callback, but use my_waitpid directly.
12763 (kill_one_lwp_callback, linux_kill): Use it.
12764
12765 2014-06-23 Pedro Alves <palves@redhat.com>
12766
12767 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12768 before setting DR0..DR3.
12769
12770 2014-06-20 Gary Benson <gbenson@redhat.com>
12771
12772 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12773 * configure: Regenerated.
12774 * config.in: Likewise.
12775
12776 2014-06-20 Gary Benson <gbenson@redhat.com>
12777
12778 * Makefile.in (SFILES): Update locations for files moved
12779 from common to nat.
12780 (object file files): Reordered.
12781
12782 2014-06-20 Gary Benson <gbenson@redhat.com>
12783
12784 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12785 (i386_dr_low_set_addr): Likewise.
12786 (i386_dr_low_get_addr): Likewise.
12787 (i386_dr_low_can_set_control): Likewise.
12788 (i386_dr_low_set_control): Likewise.
12789 (i386_dr_low_get_control): Likewise.
12790 (i386_dr_low_get_status): Likewise.
12791 (i386_get_debug_register_length): Likewise.
12792 * linux-x86-low.c (i386_dr_low_set_addr):
12793 Changed signature. Made static.
12794 (i386_dr_low_get_addr): Likewise.
12795 (i386_dr_low_set_control): Likewise.
12796 (i386_dr_low_get_control): Likewise.
12797 (i386_dr_low_get_status): Likewise.
12798 (i386_dr_low): New global variable.
12799 * win32-i386-low.c (i386_dr_low_set_addr):
12800 Changed signature. Made static.
12801 (i386_dr_low_get_addr): Likewise.
12802 (i386_dr_low_set_control): Likewise.
12803 (i386_dr_low_get_control): Likewise.
12804 (i386_dr_low_get_status): Likewise.
12805 (i386_dr_low): New global variable.
12806
12807 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12808
12809 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12810 * Makefile.in (AR, AR_FLAGS): Define.
12811 * configure: Regenerate.
12812
12813 2014-06-19 Gary Benson <gbenson@redhat.com>
12814
12815 * Makefile.in (i386-dregs.o): New rule.
12816 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12817 * i386-low.c (target.h): Remove include.
12818 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12819 (DR_CONTROL_SHIFT): Likewise.
12820 (DR_CONTROL_SIZE): Likewise.
12821 (DR_RW_EXECUTE): Likewise.
12822 (DR_RW_WRITE): Likewise.
12823 (DR_RW_READ): Likewise.
12824 (DR_RW_IORW): Likewise.
12825 (DR_LEN_1): Likewise.
12826 (DR_LEN_2): Likewise.
12827 (DR_LEN_4): Likewise.
12828 (DR_LEN_8): Likewise.
12829 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12830 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12831 (DR_ENABLE_SIZE): Likewise.
12832 (DR_LOCAL_SLOWDOWN): Likewise.
12833 (DR_GLOBAL_SLOWDOWN): Likewise.
12834 (DR_CONTROL_RESERVED): Likewise.
12835 (I386_DR_CONTROL_MASK): Likewise.
12836 (I386_DR_VACANT): Likewise.
12837 (I386_DR_LOCAL_ENABLE): Likewise.
12838 (I386_DR_GLOBAL_ENABLE): Likewise.
12839 (I386_DR_DISABLE): Likewise.
12840 (I386_DR_SET_RW_LEN): Likewise.
12841 (I386_DR_GET_RW_LEN): Likewise.
12842 (I386_DR_WATCH_HIT): Likewise.
12843 (i386_wp_op_t): Likewise.
12844 (i386_show_dr): Likewise.
12845 (i386_length_and_rw_bits): Likewise.
12846 (i386_insert_aligned_watchpoint): Likewise.
12847 (i386_remove_aligned_watchpoint): Likewise.
12848 (i386_handle_nonaligned_watchpoint): Likewise.
12849 i386_update_inferior_debug_regs(): Likewise.
12850 (i386_dr_insert_watchpoint): Likewise.
12851 (i386_dr_remove_watchpoint): Likewise.
12852 (i386_dr_region_ok_for_watchpoint): Likewise.
12853 (i386_dr_stopped_data_address): Likewise.
12854 (i386_dr_stopped_by_watchpoint): Likewise.
12855
12856 2014-06-19 Gary Benson <gbenson@redhat.com>
12857
12858 * i386-low.c (i386_dr_show): Renamed to
12859 i386_show_dr and made static. All uses updated.
12860 (i386_dr_length_and_rw_bits): Renamed to
12861 i386_length_and_rw_bits and made static.
12862 All uses updated.
12863 (i386_dr_insert_aligned_watchpoint): Renamed to
12864 i386_insert_aligned_watchpoint and made static.
12865 All uses updated.
12866 (i386_dr_remove_aligned_watchpoint): Renamed to
12867 i386_remove_aligned_watchpoint and made static.
12868 All uses updated.
12869 (i386_dr_update_inferior_debug_regs): Renamed to
12870 i386_update_inferior_debug_regs and made static.
12871 All uses updated.
12872
12873 2014-06-18 Gary Benson <gbenson@redhat.com>
12874
12875 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12876 (i386_dr_low_can_set_control): Likewise.
12877 (i386_get_debug_register_length): Likewise.
12878 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12879 (i386_dr_low_can_set_control): Likewise.
12880 (i386_get_debug_register_length): Likewise.
12881
12882 2014-06-17 Gary Benson <gbenson@redhat.com>
12883
12884 * i386-low.h (i386-dregs.h): New include.
12885 (DR_FIRSTADDR): Now in i386-dregs.h.
12886 (DR_LASTADDR): Likewise.
12887 (DR_NADDR): Likewise.
12888 (DR_STATUS): Likewise.
12889 (DR_CONTROL): Likewise.
12890 (i386_debug_reg_state): Likewise.
12891 (i386_dr_insert_watchpoint): Likewise.
12892 (i386_dr_remove_watchpoint): Likewise.
12893 (i386_dr_region_ok_for_watchpoint): Likewise.
12894 (i386_dr_stopped_data_address): Likewise.
12895 (i386_dr_stopped_by_watchpoint): Likewise.
12896 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12897
12898 2014-06-18 Gary Benson <gbenson@redhat.com>
12899
12900 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12901 i386_dr_insert_watchpoint.
12902 (i386_low_remove_watchpoint): Renamed to
12903 i386_dr_remove_watchpoint.
12904 (i386_low_region_ok_for_watchpoint): Renamed to
12905 i386_dr_region_ok_for_watchpoint.
12906 (i386_low_stopped_data_address): Renamed to
12907 i386_dr_stopped_data_address.
12908 (i386_low_stopped_by_watchpoint): Renamed to
12909 i386_dr_stopped_by_watchpoint.
12910 * i386-low.c (i386_show_dr): Renamed to
12911 i386_dr_show and made nonstatic. All uses updated.
12912 (i386_length_and_rw_bits): Renamed to
12913 i386_dr_length_and_rw_bits and made nonstatic.
12914 All uses updated.
12915 (i386_insert_aligned_watchpoint): Renamed to
12916 i386_dr_insert_aligned_watchpoint and made nonstatic.
12917 All uses updated.
12918 (i386_remove_aligned_watchpoint): Renamed to
12919 i386_dr_remove_aligned_watchpoint and made nonstatic.
12920 All uses updated.
12921 (i386_update_inferior_debug_regs): Renamed to
12922 i386_dr_update_inferior_debug_regs and made nonstatic.
12923 All uses updated.
12924 (i386_low_insert_watchpoint): Renamed to
12925 i386_dr_insert_watchpoint. All uses updated.
12926 (i386_low_remove_watchpoint): Renamed to
12927 i386_dr_remove_watchpoint. All uses updated.
12928 (i386_low_region_ok_for_watchpoint): Renamed to
12929 i386_dr_region_ok_for_watchpoint. All uses updated.
12930 (i386_low_stopped_data_address): Renamed to
12931 i386_dr_stopped_data_address. All uses updated.
12932 (i386_low_stopped_by_watchpoint): Renamed to
12933 i386_dr_stopped_by_watchpoint. All uses updated.
12934
12935 2014-06-18 Gary Benson <gbenson@redhat.com>
12936
12937 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12938 (i386_dr_low_can_set_control): Likewise.
12939 (i386_insert_aligned_watchpoint): New check.
12940
12941 2014-06-18 Gary Benson <gbenson@redhat.com>
12942
12943 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12944 Renamed to state.
12945
12946 2014-06-18 Gary Benson <gbenson@redhat.com>
12947
12948 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12949 instead of fatal and error.
12950 (i386_handle_nonaligned_watchpoint): Likewise.
12951
12952 2014-06-18 Gary Benson <gbenson@redhat.com>
12953
12954 * i386-low.c (i386_get_debug_register_length): New macro.
12955 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12956 (i386_show_dr): Use debug_printf instead of fprintf. Use
12957 phex to format values.
12958
12959 2014-06-18 Gary Benson <gbenson@redhat.com>
12960
12961 * i386-low.h: Comment changes.
12962 * i386-low.c: Likewise.
12963
12964 2014-06-18 Gary Benson <gbenson@redhat.com>
12965
12966 * i386-low.c: Whitespace changes.
12967
12968 2014-06-12 Tom Tromey <tromey@redhat.com>
12969
12970 * utils.c (freeargv): Remove.
12971
12972 2014-06-12 Tom Tromey <tromey@redhat.com>
12973
12974 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12975 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12976 (parse_debug_format_options): Likewise.
12977 (gdbserver_usage): Likewise.
12978 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12979 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12980 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12981 against libiberty.
12982 ($(LIBGNU)): Depend on libiberty.
12983 (all-lib): Recurse into all subdirs.
12984 (install-only): Invoke "install" target in subdirs.
12985 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12986 targets.
12987 * configure: Rebuild.
12988 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12989 for vasprintf, vsnprintf, or gettimeofday.
12990 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12991 srv_tgtobj.
12992
12993 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12994
12995 * development.sh: Delete.
12996 * Makefile.in (config.status): Adjust dependency on development.sh.
12997 * configure.ac: Adjust development.sh source call.
12998 * configure: Regenerate.
12999
13000 2014-06-02 Pedro Alves <palves@redhat.com>
13001
13002 * ax.c (gdb_free_agent_expr): New function.
13003 * ax.h (gdb_free_agent_expr): New declaration.
13004 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
13005 list.
13006 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
13007 static.
13008 (clear_breakpoint_conditions_and_commands): New function.
13009 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
13010 (clear_breakpoint_conditions_and_commands): New declaration.
13011
13012 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13013
13014 * linux-aarch64-low.c (asm/ptrace.h): Include.
13015
13016 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13017
13018 Fix TLS access for -static -pthread.
13019 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
13020 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
13021 (thread_db_load_search, try_thread_db_load_1): Initialize it.
13022
13023 2014-05-20 Pedro Alves <palves@redhat.com>
13024
13025 * linux-aarch64-low.c (aarch64_insert_point)
13026 (aarch64_remove_point): No longer check whether the type is
13027 supported here. Adjust to new interface.
13028 (the_low_target): Install aarch64_supports_z_point_type as
13029 supports_z_point_type method.
13030 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
13031 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
13032 instead of a Z packet char. Adjust.
13033 (arm_supports_z_point_type): New function.
13034 (arm_insert_point, arm_remove_point): Adjust to new interface.
13035 (the_low_target): Install arm_supports_z_point_type.
13036 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
13037 (cris_insert_point, cris_remove_point): Adjust to new interface.
13038 Don't check whether the type is supported here.
13039 (the_low_target): Install cris_supports_z_point_type.
13040 * linux-low.c (linux_supports_z_point_type): New function.
13041 (linux_insert_point, linux_remove_point): Adjust to new interface.
13042 * linux-low.h (struct linux_target_ops) <insert_point,
13043 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
13044 raw_breakpoint pointer parameter.
13045 <supports_z_point_type>: New method.
13046 * linux-mips-low.c (mips_supports_z_point_type): New function.
13047 (mips_insert_point, mips_remove_point): Adjust to new interface.
13048 Use mips_supports_z_point_type.
13049 (the_low_target): Install mips_supports_z_point_type.
13050 * linux-ppc-low.c (the_low_target): Install NULL as
13051 supports_z_point_type method.
13052 * linux-s390-low.c (the_low_target): Install NULL as
13053 supports_z_point_type method.
13054 * linux-sparc-low.c (the_low_target): Install NULL as
13055 supports_z_point_type method.
13056 * linux-x86-low.c (x86_supports_z_point_type): New function.
13057 (x86_insert_point): Adjust to new insert_point interface. Use
13058 insert_memory_breakpoint. Adjust to new
13059 i386_low_insert_watchpoint interface.
13060 (x86_remove_point): Adjust to remove_point interface. Use
13061 remove_memory_breakpoint. Adjust to new
13062 i386_low_remove_watchpoint interface.
13063 (the_low_target): Install x86_supports_z_point_type.
13064 * lynx-low.c (lynx_target_ops): Install NULL as
13065 supports_z_point_type callback.
13066 * nto-low.c (nto_supports_z_point_type): New.
13067 (nto_insert_point, nto_remove_point): Adjust to new interface.
13068 (nto_target_ops): Install nto_supports_z_point_type.
13069 * mem-break.c: Adjust intro comment.
13070 (struct raw_breakpoint) <raw_type, size>: New fields.
13071 <inserted>: Update comment.
13072 <shlib_disabled>: Delete field.
13073 (enum bkpt_type) <gdb_breakpoint>: Delete value.
13074 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
13075 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
13076 (raw_bkpt_type_to_target_hw_bp_type): New function.
13077 (find_enabled_raw_code_breakpoint_at): New function.
13078 (find_raw_breakpoint_at): New type and size parameters. Use them.
13079 (insert_memory_breakpoint): New function, based off
13080 set_raw_breakpoint_at.
13081 (remove_memory_breakpoint): New function.
13082 (set_raw_breakpoint_at): Reimplement.
13083 (set_breakpoint): New, based on set_breakpoint_at.
13084 (set_breakpoint_at): Reimplement.
13085 (delete_raw_breakpoint): Go through the_target->remove_point
13086 instead of assuming memory breakpoints.
13087 (find_gdb_breakpoint_at): Delete.
13088 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
13089 (find_gdb_breakpoint): New function.
13090 (set_gdb_breakpoint_at): Delete.
13091 (z_type_supported): New function.
13092 (set_gdb_breakpoint_1): New function, loosely based off
13093 set_gdb_breakpoint_at.
13094 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
13095 (delete_gdb_breakpoint_at): Delete.
13096 (delete_gdb_breakpoint_1): New function, loosely based off
13097 delete_gdb_breakpoint_at.
13098 (delete_gdb_breakpoint): New function.
13099 (clear_gdb_breakpoint_conditions): Rename to ...
13100 (clear_breakpoint_conditions): ... this. Don't handle a NULL
13101 breakpoint.
13102 (add_condition_to_breakpoint): Make static.
13103 (add_breakpoint_condition): Take a struct breakpoint pointer
13104 instead of an address. Adjust.
13105 (gdb_condition_true_at_breakpoint): Rename to ...
13106 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
13107 z_type parameter.
13108 (gdb_condition_true_at_breakpoint): Reimplement.
13109 (add_breakpoint_commands): Take a struct breakpoint pointer
13110 instead of an address. Adjust.
13111 (gdb_no_commands_at_breakpoint): Rename to ...
13112 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
13113 parameter. Return true if no breakpoint was found. Change debug
13114 output.
13115 (gdb_no_commands_at_breakpoint): Reimplement.
13116 (run_breakpoint_commands): Rename to ...
13117 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
13118 and change return type to boolean.
13119 (run_breakpoint_commands): New function.
13120 (gdb_breakpoint_here): Also check for Z1 breakpoints.
13121 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
13122 breakpoint. Go through the_target->remove_point instead of
13123 assuming memory breakpoint.
13124 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
13125 software and hardware breakpoints.
13126 (reinsert_raw_breakpoint): Go through the_target->insert_point
13127 instead of assuming memory breakpoint.
13128 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
13129 software and hardware breakpoints.
13130 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
13131 Check both software and hardware breakpoints.
13132 (validate_inserted_breakpoint): Assert the breakpoint is a
13133 software breakpoint. Set the inserted flag to -1 instead of
13134 setting shlib_disabled.
13135 (delete_disabled_breakpoints): Adjust.
13136 (validate_breakpoints): Only validate software breakpoints.
13137 Adjust to inserted flag change.
13138 (check_mem_read, check_mem_write): Skip breakpoint types other
13139 than software breakpoints. Adjust to inserted flag change.
13140 * mem-break.h (enum raw_bkpt_type): New enum.
13141 (raw_breakpoint, struct process_info): Forward declare.
13142 (Z_packet_to_target_hw_bp_type): Delete declaration.
13143 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
13144 (set_gdb_breakpoint, delete_gdb_breakpoint)
13145 (clear_breakpoint_conditions): New declarations.
13146 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
13147 (breakpoint_inserted_here): Update comment.
13148 (add_breakpoint_condition, add_breakpoint_commands): Replace
13149 address parameter with a breakpoint pointer parameter.
13150 (gdb_breakpoint_here): Update comment.
13151 (delete_gdb_breakpoint_at): Delete.
13152 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
13153 * server.c (process_point_options): Take a struct breakpoint
13154 pointer instead of an address. Adjust.
13155 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
13156 delete_gdb_breakpoint.
13157 * spu-low.c (spu_target_ops): Install NULL as
13158 supports_z_point_type method.
13159 * target.h: Include mem-break.h.
13160 (struct target_ops) <prepare_to_access_memory>: Update comment.
13161 <supports_z_point_type>: New field.
13162 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13163 instead of a char. Also take a raw breakpoint pointer.
13164 * win32-arm-low.c (the_low_target): Install NULL as
13165 supports_z_point_type.
13166 * win32-i386-low.c (i386_supports_z_point_type): New function.
13167 (i386_insert_point, i386_remove_point): Adjust to new interface.
13168 (the_low_target): Install i386_supports_z_point_type.
13169 * win32-low.c (win32_supports_z_point_type): New function.
13170 (win32_insert_point, win32_remove_point): Adjust to new interface.
13171 (win32_target_ops): Install win32_supports_z_point_type.
13172 * win32-low.h (struct win32_target_ops):
13173 <supports_z_point_type>: New method.
13174 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13175 instead of a char. Also take a raw breakpoint pointer.
13176
13177 2014-05-20 Pedro Alves <palves@redhat.com>
13178
13179 * mem-break.h: Include break-common.h.
13180 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13181 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
13182 (Z_packet_to_target_hw_bp_type): New declaration.
13183 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
13184 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
13185 (Z_PACKET_ACCESS_WP): Delete macros.
13186 (Z_packet_to_hw_type): Delete function.
13187 * i386-low.h: Don't include break-common.h here.
13188 (Z_packet_to_hw_type): Delete declaration.
13189 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
13190 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13191 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
13192 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13193 * linux-aarch64-low.c: Don't include break-common.h here.
13194 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13195 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
13196 (Z_packet_to_target_hw_bp_type): Delete function.
13197 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
13198 function.
13199 (mips_insert_point, mips_remove_point): Use
13200 Z_packet_to_target_hw_bp_type.
13201
13202 2014-05-20 Pedro Alves <palves@redhat.com>
13203
13204 * linux-aarch64-low.c: Include break-common.h.
13205 (enum target_point_type): Delete.
13206 (Z_packet_to_point_type): Rename to ...
13207 (Z_packet_to_target_hw_bp_type): ... this, and return a
13208 target_hw_bp_type instead.
13209 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
13210 instead of an enum target_point_type.
13211 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
13212 breakpoint type.
13213 (aarch64_dr_state_insert_one_point)
13214 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
13215 (aarch64_handle_aligned_watchpoint)
13216 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
13217 Take an enum target_hw_bp_type instead of an enum
13218 target_point_type.
13219 (aarch64_supports_z_point_type): New function.
13220 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
13221 use Z_packet_to_target_hw_bp_type.
13222
13223 2014-05-20 Joel Brobecker <brobecker@adacore.com>
13224
13225 * configure.ac: Only use -Werror by default when DEVELOPMENT
13226 is true.
13227 * configure: Regenerate.
13228
13229 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
13230
13231 Fix gdbserver qGetTLSAddr for x86_64 -m32.
13232 * linux-x86-low.c (X86_64_USER_REGS): New.
13233 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
13234
13235 2014-04-28 Yao Qi <yao@codesourcery.com>
13236
13237 * Makefile.in (i386-avx512.c): Fix the typo of generated file
13238 name.
13239
13240 2014-04-25 Pedro Alves <palves@redhat.com>
13241
13242 PR server/16255
13243 * linux-low.c (linux_attach_fail_reason_string): New function.
13244 (linux_attach_lwp): Delete.
13245 (linux_attach_lwp_1): Rename to ...
13246 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
13247 argument. Remove "initial" parameter. Return int instead of
13248 void. Don't error or warn here.
13249 (linux_attach): Adjust to call linux_attach_lwp. Call error on
13250 failure to attach to the tgid. Call warning when failing to
13251 attach to an lwp.
13252 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
13253 argument. Remove "initial" parameter. Return int instead of
13254 void. Don't error or warn here.
13255 (linux_attach_fail_reason_string): New declaration.
13256 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
13257 interface change. Use linux_attach_fail_reason_string.
13258
13259 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
13260 Walfred Tedeschi <walfred.tedeschi@intel.com>
13261
13262 * Makefile.in: Added rules to handle new files
13263 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
13264 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
13265 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
13266 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
13267 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
13268 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
13269 x32-avx512-linux.o.
13270 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
13271 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
13272 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
13273 i386/x32-avx512.xml.
13274 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
13275 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
13276 i386/x32-avx512-linux.xml.
13277 * i387-fp.c (num_avx512_k_registers): New constant for number
13278 of K registers.
13279 (num_avx512_zmmh_low_registers): New constant for number of
13280 lower ZMM registers (0-15).
13281 (num_avx512_zmmh_high_registers): New constant for number of
13282 higher ZMM registers (16-31).
13283 (num_avx512_ymmh_registers): New contant for number of higher
13284 YMM registers (ymm16-31 added by avx521 on x86_64).
13285 (num_avx512_xmm_registers): New constant for number of higher
13286 XMM registers (xmm16-31 added by AVX512 on x86_64).
13287 (struct i387_xsave): Add space for AVX512 registers.
13288 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
13289 Add code to handle AVX512 registers.
13290 (i387_xsave_to_cache): Add code to handle AVX512 registers.
13291 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
13292 prototypei from generated file.
13293 (tdesc_amd64_avx512_linux): Likewise.
13294 (init_registers_x32_avx512_linux): Likewise.
13295 (tdesc_x32_avx512_linux): Likewise.
13296 (init_registers_i386_avx512_linux): Likewise.
13297 (tdesc_i386_avx512_linux): Likewise.
13298 (x86_64_regmap): Add AVX512 registers.
13299 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13300 mask.
13301 (initialize_low_arch): Add code to initialize AVX512 registers.
13302
13303 2014-04-23 Pedro Alves <palves@redhat.com>
13304
13305 * mem-break.c (find_gdb_breakpoint_at): Make static.
13306 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13307
13308 2014-04-23 Pedro Alves <palves@redhat.com>
13309
13310 * i386-low.c: Don't include break-common.h here.
13311 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13312 prototype to take target_hw_bp_type as argument instead of a Z
13313 packet char.
13314 * i386-low.h: Include break-common.h here.
13315 (Z_packet_to_hw_type): Declare.
13316 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13317 prototypes.
13318 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13319 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13320 (x86_remove_point): Convert the packet number to a
13321 target_hw_bp_type before calling i386_low_remove_watchpoint.
13322 * win32-i386-low.c (i386_insert_point): Convert the packet number
13323 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13324 (i386_remove_point): Convert the packet number to a
13325 target_hw_bp_type before calling i386_low_remove_watchpoint.
13326
13327 2014-04-23 Pedro Alves <palves@redhat.com>
13328
13329 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13330
13331 2014-04-10 Pedro Alves <palves@redhat.com>
13332
13333 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13334 Check if the condition or command is NULL before checking if the
13335 breakpoint is known. On success, return true.
13336 * mem-break.h (add_breakpoint_condition): Document return.
13337 (add_breakpoint_commands): Add describing comment.
13338 * server.c (skip_to_semicolon): New function.
13339 (process_point_options): Use it.
13340
13341 2014-04-09 Pedro Alves <palves@redhat.com>
13342
13343 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13344 to lwpid_of.
13345
13346 2014-02-27 Pedro Alves <palves@redhat.com>
13347
13348 PR 12702
13349 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13350 macros.
13351 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13352 output.
13353 (last_thread_of_process_p): Take a PID argument instead of a
13354 thread pointer.
13355 (linux_wait_for_lwp): Delete.
13356 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13357 functions.
13358 (linux_low_filter_event): New function, party factored out from
13359 linux_wait_for_event.
13360 (linux_wait_for_event): Rename to ...
13361 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13362 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13363 sigsuspend. Check for zombie leaders.
13364 (linux_wait_for_event): Reimplement as wrapper around
13365 linux_wait_for_event_filtered.
13366 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13367 a normal or signal exit is seen, it's the whole process exiting.
13368 (wait_for_sigstop): No longer a for_each_inferior callback.
13369 Rewrite on top of linux_wait_for_event_filtered.
13370 (stop_all_lwps): Call wait_for_sigstop directly.
13371 * server.c (resume, handle_target_event): Handle
13372 TARGET_WAITKIND_NO_RESUMED.
13373
13374 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13375
13376 * win32-low.c (psapi_get_dll_name,
13377 * win32_CreateToolhelp32Snapshot): Delete.
13378 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13379 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13380 Delete.
13381 (handle_load_dll): Add function description.
13382 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13383
13384 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13385
13386 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13387 Add comment.
13388 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13389 base address when calling win32_add_one_solib.
13390 (handle_load_dll): Delete local variable load_addr.
13391 Remove 0x1000 offset applied to DLL base address when calling
13392 win32_add_one_solib.
13393 (handle_unload_dll): Add comment.
13394
13395 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13396
13397 * win32-low.c (win32_add_all_dlls): Renames
13398 win32_ensure_ntdll_loaded. Rewrite function documentation.
13399 Adjust implementation to always load all DLLs.
13400 Add 0x1000 offset to DLL base address when calling
13401 win32_add_one_solib.
13402 (child_initialization_done): New static global.
13403 (do_initial_child_stuff): Set child_initialization_done to
13404 zero during child initialization, and 1 after. Replace call
13405 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13406 Add comment.
13407 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13408 (handle_unload_dll): Add function documentation.
13409 (get_child_debug_event): Ignore load and unload DLL events
13410 during child initialization.
13411
13412 2014-02-20 Doug Evans <dje@google.com>
13413
13414 Remove global all_lwps.
13415 * inferiors.h (ptid_of): Move here from linux-low.h.
13416 (pid_of, lwpid_of): Ditto.
13417 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13418 parameter is a struct thread_info * now.
13419 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13420 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13421 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13422 directly.
13423 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13424 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13425 * linux-arm-low.c (update_registers_callback): Update, "entry"
13426 parameter is a struct thread_info * now.
13427 Fetch lwpid from current_inferior directly.
13428 (arm_insert_point): Pass &all_threads to find_inferior instead of
13429 &all_lwps.
13430 (arm_remove_point): Ditto.
13431 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13432 (arm_prepare_to_resume): Fetch pid from thread.
13433 (arm_read_description): Fetch lwpid from current_inferior directly.
13434 * linux-low.c (all_lwps): Delete.
13435 (delete_lwp): Delete call to remove_inferior.
13436 (handle_extended_wait): Fetch lwpid from thread.
13437 (add_lwp): Don't set lwp->entry.id. Remove call to
13438 add_inferior_to_list.
13439 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13440 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13441 (kill_one_lwp_callback): Ditto.
13442 (linux_kill): Don't dereference NULL pointer.
13443 Fetch ptid,lwpid from thread.
13444 (get_detach_signal): Fetch ptid from thread.
13445 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13446 Simplify call to regcache_invalidate_thread.
13447 (delete_lwp_callback): Update, "entry" parameter is a
13448 struct thread_info * now. Fetch pid from thread.
13449 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13450 (status_pending_p_callback): Update, "entry" parameter is a
13451 struct thread_info * now. Fetch ptid from thread.
13452 (find_lwp_pid): Update, "entry" parameter is a
13453 struct thread_info * now.
13454 (linux_wait_for_lwp): Fetch pid from thread.
13455 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13456 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13457 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13458 (dequeue_one_deferred_signal): Ditto.
13459 (cancel_breakpoint): Fetch ptid from current_inferior.
13460 (linux_wait_for_event): Pass &all_threads to find_inferior,
13461 not &all_lwps. Fetch ptid, lwpid from thread.
13462 (count_events_callback): Update, "entry" parameter is a
13463 struct thread_info * now.
13464 (select_singlestep_lwp_callback): Ditto.
13465 (select_event_lwp_callback): Ditto.
13466 (cancel_breakpoints_callback): Ditto.
13467 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13468 not &all_lwps.
13469 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13470 (unsuspend_one_lwp): Update, "entry" parameter is a
13471 struct thread_info * now.
13472 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13473 not &all_lwps.
13474 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13475 Fetch lwpid from thread, not lwp.
13476 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13477 Pass &all_threads to find_inferior, not &all_lwps.
13478 (send_sigstop): Fetch lwpid from thread, not lwp.
13479 (send_sigstop_callback): Update, "entry" parameter is a
13480 struct thread_info * now.
13481 (suspend_and_send_sigstop_callback): Ditto.
13482 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13483 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13484 struct thread_info * now.
13485 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13486 from thread, lwp.
13487 (lwp_running): Update, "entry" parameter is a
13488 struct thread_info * now.
13489 (stop_all_lwps): Fetch ptid from thread.
13490 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13491 (linux_resume_one_lwp): Fetch lwpid from thread.
13492 (linux_set_resume_request): Update, "entry" parameter is a
13493 struct thread_info * now. Fetch pid, lwpid from thread.
13494 (resume_status_pending_p): Update, "entry" parameter is a
13495 struct thread_info * now.
13496 (need_step_over_p): Ditto. Fetch lwpid from thread.
13497 (start_step_over): Fetch lwpid from thread.
13498 (linux_resume_one_thread): Update, "entry" parameter is a
13499 struct thread_info * now. Fetch lwpid from thread.
13500 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13501 (proceed_one_lwp): Update, "entry" parameter is a
13502 struct thread_info * now. Fetch lwpid from thread.
13503 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13504 struct thread_info * now.
13505 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13506 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13507 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13508 directly.
13509 (regsets_store_inferior_registers): Ditto.
13510 (fetch_register, store_register): Ditto.
13511 (linux_read_memory, linux_write_memory): Ditto.
13512 (linux_request_interrupt): Ditto.
13513 (linux_read_auxv): Ditto.
13514 (linux_xfer_siginfo): Ditto.
13515 (linux_qxfer_spu): Ditto.
13516 (linux_qxfer_libraries_svr4): Ditto.
13517 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13518 moved to inferiors.h.
13519 (get_lwp): Delete.
13520 (get_thread_lwp): Update.
13521 (struct lwp_info): Delete member "entry". Simplify comment for
13522 member "thread".
13523 (all_lwps): Delete.
13524 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13525 current_inferior directly.
13526 (update_watch_registers_callback): Update, "entry" parameter is a
13527 struct thread_info * now. Fetch pid from thread.
13528 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13529 (mips_insert_point): Fetch lwpid from current_inferior.
13530 Pass &all_threads to find_inferior, not &all_lwps.
13531 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13532 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13533 directly.
13534 (mips_stopped_data_address): Ditto.
13535 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13536 directly.
13537 * linux-tile-low.c (tile_arch_setup): Ditto.
13538 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13539 (update_debug_registers_callback): Update, "entry" parameter is a
13540 struct thread_info * now. Fetch pid from thread.
13541 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13542 Pass &all_threads to find_inferior, not &all_lwps.
13543 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13544 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13545 Pass &all_threads to find_inferior, not &all_lwps.
13546 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13547 (i386_dr_low_get_status): Ditto.
13548 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13549 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13550 (x86_linux_read_description): Ditto.
13551 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13552
13553 2014-02-20 Doug Evans <dje@google.com>
13554
13555 * inferiors.c (get_first_inferior): Fix buglet.
13556
13557 2014-02-19 Doug Evans <dje@google.com>
13558
13559 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13560 * inferiors.c (add_thread): Change result type to struct thread_info *.
13561 All callers updated.
13562 (add_lwp): Call add_thread here instead of in callers.
13563 All callers updated.
13564 * linux-low.h (get_lwp_thread): Rewrite.
13565 (struct lwp_info): New member "thread".
13566
13567 2014-02-19 Doug Evans <dje@google.com>
13568
13569 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13570 All callers updated.
13571
13572 2014-02-19 Doug Evans <dje@google.com>
13573
13574 * inferiors.c (add_thread): Fix whitespace.
13575
13576 2014-02-19 Doug Evans <dje@google.com>
13577
13578 * dll.c (clear_dlls): Replace accessing list implemention details
13579 with API function.
13580 * gdbthread.h (get_first_thread): Declare.
13581 * inferiors.c (for_each_inferior_with_data): New function.
13582 (get_first_thread): New function.
13583 (find_thread_ptid): Simplify.
13584 (get_first_inferior): New function.
13585 (clear_list): Delete.
13586 (one_inferior_p): New function.
13587 (clear_inferior_list): New function.
13588 (clear_inferiors): Update.
13589 * inferiors.h (for_each_inferior_with_data): Declare.
13590 (clear_inferior_list): Declare.
13591 (one_inferior_p): Declare.
13592 (get_first_inferior): Declare.
13593 * linux-low.c (linux_wait_for_event): Replace accessing list
13594 implemention details with API function.
13595 * server.c (target_running): Ditto.
13596 (accumulate_file_name_length): New function.
13597 (emit_dll_description): New function.
13598 (handle_qxfer_libraries): Replace accessing list implemention
13599 details with API function.
13600 (handle_qxfer_threads_worker): New function.
13601 (handle_qxfer_threads_proper): Replace accessing list implemention
13602 details with API function.
13603 (handle_query): Ditto.
13604 (visit_actioned_threads_callback_ftype): New typedef.
13605 (visit_actioned_threads_data): New struct.
13606 (visit_actioned_threads): Rewrite to be find_inferior callback.
13607 (resume): Call find_inferior.
13608 (handle_status): Replace accessing list implemention
13609 details with API function.
13610 (process_serial_event): Replace accessing list implemention details
13611 with API function.
13612 * target.c (set_desired_inferior): Replace accessing list implemention
13613 details with API function.
13614 * tracepoint.c (same_process_p): New function.
13615 (gdb_agent_about_to_close): Replace accessing list implemention
13616 details with API function.
13617 * win32-low.c (child_delete_thread): Replace accessing list
13618 implemention details with API function.
13619 (match_dll_by_basename): New function.
13620 (dll_is_loaded_by_basename): New function.
13621 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13622 details call to dll_is_loaded_by_basename.
13623
13624 2014-02-19 Doug Evans <dje@google.com>
13625
13626 * dll.h (struct dll_info): Add comment.
13627 * gdbthread.h (struct thread_info): Add comment.
13628 (current_ptid): Simplify.
13629 * inferiors.c (add_process): Update.
13630 (remove_process): Update.
13631 * inferiors.h (struct process_info): Rename member "head" to "entry".
13632 * linux-low.c (delete_lwp): Update.
13633 (add_lwp): Update.
13634 (last_thread_of_process_p): Update.
13635 (kill_one_lwp_callback, linux_kill): Update.
13636 (status_pending_p_callback): Update.
13637 (wait_for_sigstop): Update. Simplify read of ptid.
13638 (start_step_over): Update.
13639 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13640 (get_lwp_thread): Update.
13641 (struct lwp_info): Rename member "head" to "entry".
13642 * regcache.h (inferior_list_entry): Delete.
13643 * server.c (kill_inferior_callback): Update.
13644 (detach_or_kill_inferior_callback): Update.
13645 (print_started_pid): Update.
13646 (print_attached_pid): Update.
13647 (process_serial_event): Simplify read of ptid.
13648 * thread-db.c (thread_db_create_event): Update.
13649 (thread_db_get_tls_address): Update.
13650 * win32-low.c (current_inferior_ptid): Simplify.
13651
13652 2014-02-19 Tom Tromey <tromey@redhat.com>
13653
13654 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13655 argument.
13656 (target_supports_btrace): Update.
13657
13658 2014-02-14 Yao Qi <yao@codesourcery.com>
13659
13660 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13661 (rsp-low-ipa.o): New target.
13662
13663 2014-02-12 Tom Tromey <tromey@redhat.com>
13664
13665 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13666 convert_ascii_to_int.
13667 * regcache.c (registers_to_string): Likewise.
13668 * remote-utils.c (decode_M_packet): Likewise.
13669 * server.c (process_serial_event): Likewise.
13670
13671 2014-02-12 Tom Tromey <tromey@redhat.com>
13672
13673 * server.c (handle_query, handle_v_run): Use hex2bin, not
13674 unhexify.
13675 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13676
13677 2014-02-12 Tom Tromey <tromey@redhat.com>
13678
13679 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13680 convert_int_to_ascii.
13681 * regcache.c (registers_to_string, collect_register_as_string):
13682 Likewise.
13683 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13684 Likewise.
13685 * server.c (process_serial_event): Likewise.
13686 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13687 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13688
13689 2014-02-12 Tom Tromey <tromey@redhat.com>
13690
13691 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13692 bin2hex, not hexify.
13693 * tracepoint.c (cmd_qtstatus): Likewise.
13694
13695 2014-02-12 Tom Tromey <tromey@redhat.com>
13696
13697 * remote-utils.c (monitor_output): Pass explicit length to
13698 hexify.
13699
13700 2014-02-12 Tom Tromey <tromey@redhat.com>
13701
13702 * tracepoint.c: Include rsp-low.h.
13703 * server.c: Include rsp-low.h.
13704 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13705 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13706 declare.
13707 * remote-utils.c: Include rsp-low.h.
13708 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13709 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13710 (convert_int_to_ascii, convert_ascii_to_int): Move to
13711 common/rsp-low.c.
13712 * regcache.c: Include rsp-low.h.
13713 * ax.c: Include rsp-low.h.
13714 * Makefile.in (SFILES): Add common/rsp-low.c.
13715 (OBS): Add rsp-low.o.
13716 (rsp-low.o): New target.
13717
13718 2014-02-12 Tom Tromey <tromey@redhat.com>
13719
13720 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13721 Include print-utils.h.
13722 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13723 (plongest, thirty_two, phex_nz): Remove.
13724 * Makefile.in (SFILES): Add common/print-utils.c.
13725 (OBS): Add print-utils.o.
13726 (print-utils-ipa.o): New target.
13727 (print-utils.o): New target.
13728 (IPA_OBJS): Add print-utils-ipa.o.
13729
13730 2014-02-06 Tom Tromey <tromey@redhat.com>
13731
13732 * Makefile.in (SFILES): Fix indentation.
13733
13734 2014-02-05 Doug Evans <dje@google.com>
13735
13736 * linux-low.c (linux_wait_for_event): Improve comment.
13737 (linux_wait_1): Keep current_inferior in sync with event_child.
13738
13739 2014-01-22 Doug Evans <dje@google.com>
13740
13741 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13742
13743 2014-01-22 Doug Evans <dje@google.com>
13744
13745 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13746 * configure: Regenerate.
13747 * config.in: Regenerate.
13748 * Makefile.in (SFILES): Add debug.c.
13749 (OBS): Add debug.o.
13750 * debug.c: New file.
13751 * debug.h: New file.
13752 * linux-aarch64-low.c (*): Update all debugging printfs to use
13753 debug_printf instead of fprintf.
13754 * linux-arm-low.c (*): Ditto.
13755 * linux-cris-low.c (*): Ditto.
13756 * linux-crisv32-low.c (*): Ditto.
13757 * linux-m32r-low.c (*): Ditto.
13758 * linux-sparc-low.c (*): Ditto.
13759 * linux-x86.c (*): Ditto.
13760 * linux-low.c (*): Ditto.
13761 (linux_wait_1): Add calls to debug_enter, debug_exit.
13762 (linux_wait): Remove redundant debugging printf.
13763 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13764 (linux_resume, unstop_all_lwps): Ditto.
13765 * mem-break.c (*): Update all debugging printfs to use
13766 debug_printf instead of fprintf.
13767 * remote-utils.c (*): Ditto.
13768 * thread-db.c (*): Ditto.
13769 * server.c #include <ctype.h>, "gdb_vecs.h".
13770 (debug_threads): Moved to debug.c.
13771 (*): Update all debugging printfs to use debug_printf instead of
13772 fprintf.
13773 (start_inferior): Replace call to fflush with call to debug_flush.
13774 (monitor_show_help): Mention set debug-format.
13775 (parse_debug_format_options): New function.
13776 (handle_monitor_command): Handle "monitor set debug-format".
13777 (gdbserver_usage): Mention --debug-format.
13778 (main): Parse --debug-format.
13779 * server.h (debug_threads): Declaration moved to debug.h.
13780 #include "debug.h".
13781 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13782 trace_debug_1 that uses debug_printf.
13783 (tracepoint_look_up_symbols): Update all debugging printfs to use
13784 debug_printf instead of fprintf.
13785
13786 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13787
13788 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13789 sys/ptrace.h.
13790
13791 2014-01-17 Pedro Alves <palves@redhat.com>
13792
13793 PR build/16445
13794 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13795 defined after including gdb_proc_service.h.
13796
13797 2014-01-16 Doug Evans <dje@google.com>
13798
13799 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13800 (match_dll): Use it.
13801
13802 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13803
13804 * target.h (target_ops) <read_btrace>: Change parameters and
13805 return type to allow error reporting.
13806 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13807 trace reading errors on.
13808 * linux-low.c (linux_low_read_btrace): Pass trace reading
13809 errors on.
13810 (linux_low_disable_btrace): New.
13811
13812 2014-01-15 Doug Evans <dje@google.com>
13813
13814 * inferiors.c (thread_id_to_gdb_id): Delete.
13815 * inferiors.h (thread_id_to_gdb_id): Delete.
13816
13817 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13818
13819 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13820 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13821 versions.
13822
13823 2014-01-08 Pedro Alves <palves@redhat.com>
13824
13825 * server.c (handle_status): Don't discard previous queued stop
13826 replies or thread's pending status here.
13827 (main) <disconnection>: Do it here instead.
13828
13829 2014-01-08 Pedro Alves <palves@redhat.com>
13830
13831 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13832 * server.c (visit_actioned_threads, handle_pending_status): New
13833 function.
13834 (handle_v_cont): Factor out parts to ...
13835 (resume): ... this new function. If in all-stop, and a thread
13836 being resumed has a pending status, report it without actually
13837 resuming.
13838 (myresume): Adjust to use the new 'resume' function.
13839 (clear_pending_status_callback, set_pending_status_callback)
13840 (find_status_pending_thread_callback): New functions.
13841 (handle_status): Handle the case of multiple threads having
13842 interesting statuses to report. Report threads' real last signal
13843 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13844 with an interesting thread to report the status for, instead of
13845 always reporting the status of the first thread.
13846
13847 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13848
13849 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13850 * gdbreplay.c (gdbreplay_version): Likewise.
13851
13852 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13853
13854 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13855 iov.iov_len with the real length in use.
13856
13857 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13858
13859 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13860 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13861 for all targets that use win32-low.c.
13862 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13863 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13864
13865 2013-12-13 Pedro Alves <palves@redhat.com>
13866
13867 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13868 if equal to TARGET_WAITKIND_LOADED.
13869 * win32-low.c (cached_status): New static global.
13870 (win32_wait): Add declaration.
13871 (do_initial_child_stuff): Flush all initial pending debug events
13872 up to the initial breakpoint.
13873 (win32_wait): If CACHED_STATUS was set, return that instead
13874 of doing a real wait. Remove the code resuming the execution
13875 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13876 during the initial phase. Also remove the code changing
13877 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13878 TARGET_WAITKIND_STOPPED.
13879
13880 2013-12-11 Yao Qi <yao@codesourcery.com>
13881
13882 * notif.c (handle_notif_ack): Return 0 if no notification
13883 matches.
13884
13885 2013-11-20 Doug Evans <dje@google.com>
13886
13887 * linux-low.c (linux_set_resume_request): Fix comment.
13888
13889 2013-11-20 Doug Evans <dje@google.com>
13890
13891 * linux-low.c (resume_status_pending_p): Tweak comment.
13892
13893 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13894
13895 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13896 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13897 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13898 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13899 (srv_amd64_regobj): Add amd64-mpx.o.
13900 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13901 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13902 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13903 * i387-fp.c (num_pl_bnd_register) Added constant.
13904 (num_pl_bnd_cfg_registers) Added constant.
13905 (struct i387_xsave) Added reserved area and MPX fields.
13906 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13907 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13908 function.
13909 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13910 (init_registers_amd64_mpx_linux): Declare new function.
13911 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13912 (x86_64_regmap): Add MPX registers.
13913 (x86_linux_read_description): Add MPX case.
13914 (initialize_low_arch): Initialize MPX targets.
13915
13916 2013-11-18 Tom Tromey <tromey@redhat.com>
13917
13918 * configure: Rebuild.
13919 * configure.ac: Don't check for stdlib.h.
13920 * gdbreplay.c: Unconditionally include stdlib.h.
13921
13922 2013-11-18 Tom Tromey <tromey@redhat.com>
13923
13924 * config.in: Rebuild.
13925 * configure: Rebuild.
13926 * configure.ac: Don't use AC_HEADER_DIRENT.
13927
13928 2013-11-18 Tom Tromey <tromey@redhat.com>
13929
13930 * server.h: Don't check HAVE_STRING_H.
13931 * gdbreplay.c: Don't check HAVE_STRING_H.
13932 * configure: Rebuild.
13933
13934 2013-11-18 Tom Tromey <tromey@redhat.com>
13935
13936 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13937 LIBGNU.
13938
13939 2013-11-08 Tom Tromey <tromey@redhat.com>
13940
13941 * configure, config.in: Rebuild.
13942 * configure.ac: Remove unused configury.
13943
13944 2013-11-08 Tom Tromey <tromey@redhat.com>
13945
13946 * acinclude.m4: Include common.m4, codeset.m4.
13947 * configure, config.in: Rebuild.
13948 * configure.ac: Use GDB_AC_COMMON.
13949
13950 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13951
13952 * linux-s390-low.c (HWCAP_S390_TE): New define.
13953 (s390_arch_setup): Consider the TE field in the HWCAP for
13954 determining 'have_regset_tdb'.
13955
13956 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13957
13958 PR gdb/16014
13959 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13960 call to sizeof.
13961
13962 2013-10-02 Pedro Alves <palves@redhat.com>
13963
13964 * server.c (process_serial_event): Don't output "GDBserver
13965 exiting" if GDB is connected through stdio.
13966 * target.c (mywait): Likewise, be silent if GDB is connected
13967 through stdio.
13968
13969 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13970
13971 * lynx-low.c (lynx_add_threads_after_attach): New function.
13972 (lynx_attach): Remove call to add_thread. Add call to
13973 lynx_add_threads_after_attach instead.
13974
13975 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13976
13977 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13978 * config.in, configure: Regenerated.
13979
13980 2013-09-18 Yao Qi <yao@codesourcery.com>
13981
13982 PR server/15959
13983 * server.c (start_inferior): Clear 'resume_info'.
13984
13985 2013-09-16 Jiong Wang <jiwang@tilera.com>
13986
13987 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13988 for each register.
13989
13990 2013-09-16 Jiong Wang <jiwang@tilera.com>
13991
13992 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13993 linux-tile-low.o to srv_tgtobj.
13994
13995 2013-09-16 Will Newton <will.newton@linaro.org>
13996
13997 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13998 out regs.
13999
14000 2013-09-06 Pedro Alves <palves@redhat.com>
14001
14002 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
14003 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
14004 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
14005 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
14006 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
14007 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
14008
14009 2013-09-06 Pedro Alves <palves@redhat.com>
14010
14011 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
14012 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
14013
14014 2013-09-06 Pedro Alves <palves@redhat.com>
14015
14016 * linux-amd64-ipa.c: Include tracepoint.h.
14017 * linux-i386-ipa.c: Include tracepoint.h.
14018
14019 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
14020
14021 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
14022 (ps_get_thread_area): New function.
14023
14024 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
14025
14026 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
14027 (initialize_low_arch): Call init_registers_crisv32 rather than
14028 init_register_crisv32.
14029
14030 2013-09-05 Pedro Alves <palves@redhat.com>
14031
14032 * server.h (handle_vFile, hostio_last_error_from_errno): Move
14033 to ...
14034 * hostio.h: ... this new file.
14035 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
14036 win32-low.c: Include hostio.h.
14037
14038 2013-09-05 Pedro Alves <palves@redhat.com>
14039
14040 * server.h (gdb_client_data, handler_func, callback_handler_func)
14041 (delete_file_handler, add_file_handler, append_callback_event)
14042 (delete_callback_event, start_event_loop, initialize_event_loop):
14043 Move to event-loop.h and include it.
14044 * event-loop.h: New file.
14045
14046 2013-09-05 Pedro Alves <palves@redhat.com>
14047
14048 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
14049 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
14050 (loaded_dll, unloaded_dll): Move to ...
14051 * dll.h: ... this new file.
14052 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
14053
14054 2013-09-05 Pedro Alves <palves@redhat.com>
14055
14056 * server.h (current_process, get_thread_process, all_processes)
14057 (add_inferior_to_list, for_each_inferior, current_inferior)
14058 (remove_inferior, add_process, remove_process, find_process_pid)
14059 (have_started_inferiors_p, have_attached_inferiors_p)
14060 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
14061 (clear_inferiors, find_inferior, find_inferior_id)
14062 (inferior_target_data, set_inferior_target_data)
14063 (inferior_regcache_data, set_inferior_regcache_data): Move to
14064 inferiors.h, and include it.
14065 * inferiors.h: New file.
14066
14067 2013-09-05 Pedro Alves <palves@redhat.com>
14068
14069 * server.h (struct emit_ops, current_insn_ptr, emit_error):
14070 Move ...
14071 * ax.h: ... here.
14072
14073 2013-09-05 Pedro Alves <palves@redhat.com>
14074
14075 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
14076 tracepoint.h.
14077 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
14078 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
14079 (handle_tracepoint_general_set, handle_tracepoint_query)
14080 (tracepoint_finished_step, tracepoint_was_hit)
14081 (release_while_stepping_state_list, current_traceframe)
14082 (in_readonly_region, traceframe_read_mem)
14083 (fetch_traceframe_registers, traceframe_read_sdata)
14084 (traceframe_read_info, struct fast_tpoint_collect_status)
14085 (fast_tracepoint_collecting, force_unlock_trace_buffer)
14086 (handle_tracepoit_bkpts, initialize_low_tracepoint)
14087 (supply_fast_tracepoint_registers)
14088 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
14089 (ipa_tdesc, claim_trampoline_space)
14090 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
14091 (agent_mem_read, agent_get_trace_state_variable_value)
14092 (agent_set_trace_state_variable_value, agent_tsv_read)
14093 (agent_mem_read_string, get_raw_reg_func_addr)
14094 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
14095 * tracepoint.h: ... this new file.
14096
14097 2013-09-05 Pedro Alves <palves@redhat.com>
14098
14099 * server.h (perror_with_name, error, fatal, warning, paddress)
14100 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
14101 include it.
14102 * utils.h: New file.
14103
14104 2013-09-05 Pedro Alves <palves@redhat.com>
14105
14106 * server.h (remote_debug, noack_mode, transport_is_reliable)
14107 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
14108 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
14109 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
14110 (write_enn, initialize_async_io, enable_async_io)
14111 (disable_async_io, check_remote_input_interrupt_request)
14112 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
14113 (dead_thread_notify, prepare_resume_reply)
14114 (decode_address_to_semicolon, decode_address, decode_m_packet)
14115 (decode_M_packet, decode_X_packet, decode_xfer_write)
14116 (decode_search_memory_packet, unhexify, hexify)
14117 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
14118 (look_up_one_symbol, relocate_instruction)
14119 (monitor_output): Move to remote-utils.h, and include it.
14120 * remote-utils.h: New file.
14121
14122 2013-09-05 Pedro Alves <palves@redhat.com>
14123
14124 * server.h (_): Delete.
14125
14126 2013-09-02 Pedro Alves <palves@redhat.com>
14127
14128 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
14129 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
14130 allocated.
14131 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
14132
14133 2013-09-02 Pierre Muller <muller@sourceware.org>
14134
14135 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
14136 or WriteProcessMemory complete successfully and handle
14137 ERROR_PARTIAL_COPY error.
14138
14139 2013-09-02 Pedro Alves <palves@redhat.com>
14140
14141 * server.c (gdb_read_memory): Return -1 on traceframe memory read
14142 error instead of EIO.
14143
14144 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14145
14146 PR server/15604
14147 * linux-low.c: Include filestuff.h.
14148 (linux_create_inferior) <pid == 0>: Call close_most_fds.
14149 * lynx-low.c: Include filestuff.h.
14150 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
14151 * server.c: Include filestuff.h.
14152 (main): Call notice_open_fds.
14153 * spu-low.c: Include filestuff.h.
14154 (spu_create_inferior) <pid == 0>: Call close_most_fds.
14155
14156 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
14157
14158 * Makefile.in: Explain why ../target and ../nat are not
14159 listed as include file search paths.
14160 (linux-waitpid.o): New object file rule.
14161 * configure.srv (srv_native_linux_obj): New variable.
14162 Replace all occurrences of linux native object files with
14163 $srv_native_linux_obj.
14164 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
14165 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
14166 (linux_enable_event_reporting): Remove declaration.
14167 (my_waitpid): Moved to common/linux-waitpid.c.
14168 (linux_wait_for_event): Pass ptid when calling
14169 linux_enable_event_reporting.
14170 (linux_supports_tracefork_flag): Remove.
14171 (linux_enable_event_reporting): Likewise.
14172 (linux_tracefork_grandchild): Remove.
14173 (STACK_SIZE): Moved to common/linux-ptrace.c.
14174 (linux_tracefork_child): Remove.
14175 (linux_test_for_tracefork): Remove.
14176 (linux_look_up_symbols): Call linux_supports_traceclone.
14177 (initialize_low): Remove call to linux_test_for_tracefork.
14178 * linux-low.h (PTRACE_TYPE_ARG3): Move to
14179 common/linux-ptrace.h.
14180 (PTRACE_TYPE_ARG4): Likewise.
14181 Include linux-ptrace.h.
14182
14183 2013-08-21 Pedro Alves <palves@redhat.com>
14184
14185 * config.in: Renegerate.
14186
14187 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
14188
14189 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
14190 (SFILES): Remove $(srcdir)/common/target-common.c and
14191 add $(srcdir)/target/waitstatus.c.
14192 (OBS): Remove target-common.o and add waitstatus.o.
14193 (server_h): Remove $(srcdir)/../common/target-common.h and
14194 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
14195 and $(srcdir)/../target/waitstatus.h.
14196 (target-common.o): Remove.
14197 (waitstatus.o): New target object file.
14198 * target.h: Do not include target-common.h and
14199 include target/resume.h, target/wait.h and
14200 target/waitstatus.h.
14201
14202 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
14203
14204 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14205 to PTRACE_TYPE_ARG3.
14206 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14207 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
14208 PTRACE_TYPE_ARG4.
14209 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
14210 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
14211
14212 2013-07-27 Jie Zhang <jie@codesourcery.com>
14213 Daniel Jacobowitz <dan@codesourcery.com>
14214 Yao Qi <yao@codesourcery.com>
14215
14216 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
14217 (mips-linux-watch.o): New rule.
14218 (mips_linux_watch_h): New variable.
14219 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
14220 srv_tgtobj.
14221 * linux-mips-low.c: Include mips-linux-watch.h.
14222 (struct arch_process_info, struct arch_lwp_info): New.
14223 (update_watch_registers_callback): New function.
14224 (mips_linux_new_process, mips_linux_new_thread) New functions.
14225 (mips_linux_prepare_to_resume, mips_insert_point): New
14226 functions.
14227 (mips_remove_point, mips_stopped_by_watchpoint): New
14228 functions.
14229 (rsp_bp_type_to_target_hw_bp_type): New function.
14230 (mips_stopped_data_address): New function.
14231 (the_low_target): Add watchpoint support functions.
14232
14233 2013-07-27 Yao Qi <yao@codesourcery.com>
14234
14235 * i386-low.c: Include break-common.h.
14236 (enum target_hw_bp_type): Remove.
14237
14238 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
14239
14240 * Makefile.in (SFILES): /common/target-common.c.
14241 (OBS): Add target-common.o.
14242 (server_h): Add $(srcdir)/../common/target-common.h.
14243 (target-common.o): New target.
14244 * server.c (queue_stop_reply_callback): Free
14245 status string after use.
14246 * target.c (target_waitstatus_to_string): Remove.
14247 * target.h: Include target-common.h.
14248 (resume_kind): Likewise.
14249 (target_waitkind): Likewise.
14250 (target_waitstatus): Likewise.
14251 (TARGET_WNOHANG): Likewise.
14252
14253 2013-07-04 Yao Qi <yao@codesourcery.com>
14254
14255 * Makefile.in (host_alias): Use @host_noncanonical@.
14256 (target_alias): Use @target_noncanonical@.
14257 * configure.ac: Use ACX_NONCANONICAL_TARGET and
14258 ACX_NONCANONICAL_HOST.
14259 * configure: Regenerated.
14260
14261 Revert:
14262 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14263
14264 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14265 * configure: Rebuild.
14266 * Makefile.in (version_host, version_target): Get from configure.
14267 (version.c): Use $(version_host) and $(version_target).
14268
14269 2013-07-03 Pedro Alves <palves@redhat.com>
14270
14271 * Makefile.in (config.status): Depend on development.sh.
14272 * acinclude.m4: Include libmcheck.m4.
14273 * configure: Regenerate.
14274
14275 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14276
14277 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
14278 attribute inside the parentheses.
14279 (winapi_DebugSetProcessKillOnExit): Ditto.
14280 (winapi_DebugBreakProcess): Ditto.
14281 (winapi_GenerateConsoleCtrlEvent): Ditto.
14282
14283 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14284
14285 * notif.h (notif_event): Add a dummy member to avoid compiler
14286 errors.
14287
14288 2013-07-01 Pedro Alves <palves@redhat.com>
14289
14290 * hostio.c (HOSTIO_PATH_MAX): Define.
14291 (require_filename, handle_open, handle_unlink, handle_readlink):
14292 Use it.
14293
14294 2013-07-01 Pedro Alves <palves@redhat.com>
14295
14296 * server.h: Include "pathmax.h".
14297 * linux-low.c: Don't include sys/param.h.
14298 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14299 MAXPATHLEN.
14300 * win32-low.c: Don't include sys/param.h.
14301 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14302
14303 2013-07-01 Pedro Alves <palves@redhat.com>
14304
14305 * event-loop.c: Don't check HAVE_UNISTD_H before including
14306 <unistd.h>.
14307 * gdbreplay.c: Likewise.
14308 * remote-utils.c: Likewise.
14309 * server.c: Likewise.
14310 * configure.ac: Don't check for unistd.h.
14311 * configure: Regenerate.
14312
14313 2013-06-28 Tom Tromey <tromey@redhat.com>
14314
14315 * Makefile.in (version.c): Use version.in, not
14316 common/version.in.
14317
14318 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14319
14320 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14321 * configure: Rebuild.
14322 * Makefile.in (version_host, version_target): Get from configure.
14323 (version.c): Use $(version_host) and $(version_target).
14324
14325 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14326
14327 Fix trace-status to output user name without trailing colon.
14328 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14329
14330 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14331
14332 Fix trace-status to output proper start-time and stop-time.
14333 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14334 output start time and stop time in hex as gdb expects.
14335
14336 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14337
14338 * tracepoint.c (build_traceframe_info_xml): Output trace state
14339 variables present in the trace buffer.
14340
14341 2013-06-24 Tom Tromey <tromey@redhat.com>
14342
14343 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14344 create-version.sh.
14345 (version.o): Remove.
14346 * gdbreplay.c: Include version.h.
14347 (version, host_name): Don't declare.
14348 * server.h: Include version.h.
14349 (version, host_name): Don't declare.
14350
14351 2013-06-12 Pedro Alves <palves@redhat.com>
14352
14353 * linux-x86-low.c (linux_is_elf64): Delete global.
14354 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14355 with local linux_pid_exe_is_elf_64_file use.
14356
14357 2013-06-11 Pedro Alves <palves@redhat.com>
14358
14359 * linux-low.c (regset_disabled, disable_regset): New functions.
14360 (regsets_fetch_inferior_registers)
14361 (regsets_store_inferior_registers): Use them.
14362 (initialize_regsets_info); Don't allocate the disabled_regsets
14363 array here.
14364 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14365 comment.
14366
14367 2013-06-11 Pedro Alves <palves@redhat.com>
14368
14369 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14370 xmalloc.
14371
14372 2013-06-11 Pedro Alves <palves@redhat.com>
14373
14374 * linux-x86-low.c (initialize_low_arch): Call
14375 init_registers_x32_avx_linux.
14376
14377 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14378
14379 Fix compatibility with Android Bionic.
14380 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14381 it is not empty.
14382
14383 2013-06-07 Pedro Alves <palves@redhat.com>
14384
14385 PR server/14823
14386 * Makefile.in (OBS): Add tdesc.o.
14387 (IPA_OBJS): Add tdesc-ipa.o.
14388 (tdesc-ipa.o): New rule.
14389 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14390 interface.
14391 * linux-low.c (new_inferior): Delete.
14392 (disabled_regsets, num_regsets): Delete.
14393 (linux_add_process): Adjust to set the new per-process
14394 new_inferior flag.
14395 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14396 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14397 was a stop. When calling arch_setup, switch the current inferior
14398 to the thread that got an event.
14399 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14400 (regsets_fetch_inferior_registers)
14401 (regsets_store_inferior_registers): New regsets_info parameter.
14402 Adjust to use it.
14403 (linux_register_in_regsets): New regs_info parameter. Adjust to
14404 use it.
14405 (register_addr, fetch_register, store_register): New usrregs_info
14406 parameter. Adjust to use it.
14407 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14408 parameter regs_info. Adjust to use it.
14409 (linux_fetch_registers): Get the current inferior's regs_info, and
14410 adjust to use it.
14411 (linux_store_registers): Ditto.
14412 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14413 (initialize_low): Don't initialize the target_regsets here. Call
14414 initialize_low_arch.
14415 * linux-low.h (target_regsets): Delete declaration.
14416 (struct regsets_info): New.
14417 (struct usrregs_info): New.
14418 (struct regs_info): New.
14419 (struct process_info_private) <new_inferior>: New field.
14420 (struct linux_target_ops): Delete the num_regs, regmap, and
14421 regset_bitmap fields. New field regs_info.
14422 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14423 * i387-fp.c (num_xmm_registers): Delete.
14424 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14425 calls to new interface.
14426 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14427 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14428 Infer the number of xmm registers from the regcache's target
14429 description.
14430 * i387-fp.h (num_xmm_registers): Delete.
14431 * inferiors.c (add_thread): Don't install the thread's regcache
14432 here.
14433 * proc-service.c (gregset_info): Fetch the current inferior's
14434 regs_info. Adjust to use it.
14435 * regcache.c: Include tdesc.h.
14436 (register_bytes, reg_defs, num_registers)
14437 (gdbserver_expedite_regs): Delete.
14438 (get_thread_regcache): If the thread doesn't have a regcache yet,
14439 create one, instead of aborting gdbserver.
14440 (regcache_invalidate_one): Rename to ...
14441 (regcache_invalidate_thread): ... this.
14442 (regcache_invalidate_one): New.
14443 (regcache_invalidate): Only invalidate registers of the current
14444 process.
14445 (init_register_cache): Add target_desc parameter, and use it.
14446 (new_register_cache): Ditto. Assert the target description has a
14447 non zero registers_size.
14448 (regcache_cpy): Add assertions. Adjust.
14449 (realloc_register_cache, set_register_cache): Delete.
14450 (registers_to_string, registers_from_string): Adjust.
14451 (find_register_by_name, find_regno, find_register_by_number)
14452 (register_cache_size): Add target_desc parameter, and use it.
14453 (free_register_cache_thread, free_register_cache_thread_one)
14454 (regcache_release, register_cache_size): New.
14455 (register_size): Add target_desc parameter, and use it.
14456 (register_data, supply_register, supply_register_zeroed)
14457 (supply_regblock, supply_register_by_name, collect_register)
14458 (collect_register_as_string, collect_register_by_name): Adjust.
14459 * regcache.h (struct target_desc): Forward declare.
14460 (struct regcache) <tdesc>: New field.
14461 (init_register_cache, new_register_cache): Add target_desc
14462 parameter.
14463 (regcache_invalidate_thread): Declare.
14464 (regcache_invalidate_one): Delete declaration.
14465 (regcache_release): Declare.
14466 (find_register_by_number, register_cache_size, register_size)
14467 (find_regno): Add target_desc parameter.
14468 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14469 declarations.
14470 * remote-utils.c: Include tdesc.h.
14471 (outreg, prepare_resume_reply): Adjust.
14472 * server.c: Include tdesc.h.
14473 (gdbserver_xmltarget): Delete declaration.
14474 (get_features_xml, process_serial_event): Adjust.
14475 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14476 declare.
14477 (struct process_info) <tdesc>: New field.
14478 (ipa_tdesc): Declare.
14479 * tdesc.c: New file.
14480 * tdesc.h: New file.
14481 * tracepoint.c: Include tdesc.h.
14482 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14483 (get_context_regcache): Adjust to pass ipa_tdesc down.
14484 (do_action_at_tracepoint): Adjust to get the register cache size
14485 from the context regcache's description.
14486 (traceframe_walk_blocks): Adjust to get the register cache size
14487 from the current trace frame's description.
14488 (traceframe_get_pc): Adjust to get current trace frame's
14489 description and pass it down.
14490 (gdb_collect): Adjust to get the register cache size from the
14491 IPA's description.
14492 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14493 (gdbserver_xmltarget): Delete.
14494 (initialize_low_tracepoint): Set the ipa's target description.
14495 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14496 (initialize_low_tracepoint): Set the ipa's target description.
14497 * linux-x86-low.c: Include tdesc.h.
14498 [__x86_64__] (is_64bit_tdesc): New.
14499 (ps_get_thread_area, x86_get_thread_area): Use it.
14500 (i386_cannot_store_register): Rename to ...
14501 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14502 (i386_cannot_fetch_register): Rename to ...
14503 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14504 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14505 to new interface.
14506 (target_regsets): Rename to ...
14507 (x86_regsets): ... this.
14508 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14509 interface.
14510 (x86_siginfo_fixup): Use is_64bit_tdesc.
14511 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14512 (tdesc_x32_avx_linux, tdesc_x32_linux)
14513 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14514 Declare.
14515 (x86_linux_update_xmltarget): Delete.
14516 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14517 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14518 (AMD64_LINUX_USER64_CS): New.
14519 (x86_linux_read_description): New, based on
14520 x86_linux_update_xmltarget.
14521 (same_process_callback): New.
14522 (x86_arch_setup_process_callback): New.
14523 (x86_linux_update_xmltarget): New.
14524 (x86_regsets_info): New.
14525 (amd64_linux_regs_info): New.
14526 (i386_linux_usrregs_info): New.
14527 (i386_linux_regs_info): New.
14528 (x86_linux_regs_info): New.
14529 (x86_arch_setup): Reimplement.
14530 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14531 (x86_emit_ops): Ditto.
14532 (the_low_target): Adjust. Install x86_linux_regs_info,
14533 x86_cannot_fetch_register, and x86_cannot_store_register.
14534 (initialize_low_arch): New.
14535 * linux-ia64-low.c (tdesc_ia64): Declare.
14536 (ia64_fetch_register): Adjust.
14537 (ia64_usrregs_info, regs_info): New globals.
14538 (ia64_regs_info): New function.
14539 (the_low_target): Adjust.
14540 (initialize_low_arch): New function.
14541 * linux-sparc-low.c (tdesc_sparc64): Declare.
14542 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14543 Adjust.
14544 (sparc_arch_setup): New function.
14545 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14546 (the_low_target): Adjust.
14547 (initialize_low_arch): New function.
14548 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14549 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14550 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14551 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14552 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14553 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14554 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14555 (tdesc_powerpc_isa205_vsx64l): Declare.
14556 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14557 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14558 (ppc_set_pc, ppc_get_hwcap): Adjust.
14559 (ppc_usrregs_info): Forward declare.
14560 (!__powerpc64__) ppc_regmap_adjusted: New global.
14561 (ppc_arch_setup): Adjust to the current process'es target
14562 description.
14563 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14564 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14565 (ppc_store_evrregset): Adjust.
14566 (target_regsets): Rename to ...
14567 (ppc_regsets): ... this, and make static.
14568 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14569 (ppc_regs_info): New function.
14570 (the_low_target): Adjust.
14571 (initialize_low_arch): New function.
14572 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14573 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14574 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14575 (tdesc_s390x_linux64v2): Declare.
14576 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14577 (s390_fill_gregset, s390_store_last_break): Adjust.
14578 (target_regsets): Rename to ...
14579 (s390_regsets): ... this, and make static.
14580 (s390_get_pc, s390_set_pc): Adjust.
14581 (s390_get_hwcap): New target_desc parameter, and use it.
14582 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14583 (s390_arch_setup): Adjust to set the current process'es target
14584 description. Don't adjust the regmap.
14585 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14586 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14587 (regs_info_3264): New globals.
14588 (s390_regs_info): New function.
14589 (the_low_target): Adjust.
14590 (initialize_low_arch): New function.
14591 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14592 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14593 [__mips64] (init_registers_mips_linux)
14594 (init_registers_mips_dsp_linux): Delete defines.
14595 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14596 (have_dsp): New global.
14597 (mips_read_description): New, based on mips_arch_setup.
14598 (mips_arch_setup): Reimplement.
14599 (get_usrregs_info): New function.
14600 (mips_cannot_fetch_register, mips_cannot_store_register)
14601 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14602 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14603 (target_regsets): Rename to ...
14604 (mips_regsets): ... this, and make static.
14605 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14606 (dsp_regs_info, regs_info): New globals.
14607 (mips_regs_info): New function.
14608 (the_low_target): Adjust.
14609 (initialize_low_arch): New function.
14610 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14611 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14612 Declare.
14613 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14614 (arm_read_description): New, with bits factored from
14615 arm_arch_setup.
14616 (arm_arch_setup): Reimplement.
14617 (target_regsets): Rename to ...
14618 (arm_regsets): ... this, and make static.
14619 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14620 (arm_regs_info): New function.
14621 (the_low_target): Adjust.
14622 (initialize_low_arch): New function.
14623 * linux-m68k-low.c (tdesc_m68k): Declare.
14624 (target_regsets): Rename to ...
14625 (m68k_regsets): ... this, and make static.
14626 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14627 (m68k_regs_info): New function.
14628 (m68k_arch_setup): New function.
14629 (the_low_target): Adjust.
14630 (initialize_low_arch): New function.
14631 * linux-sh-low.c (tdesc_sharch): Declare.
14632 (target_regsets): Rename to ...
14633 (sh_regsets): ... this, and make static.
14634 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14635 (sh_regs_info, sh_arch_setup): New functions.
14636 (the_low_target): Adjust.
14637 (initialize_low_arch): New function.
14638 * linux-bfin-low.c (tdesc_bfin): Declare.
14639 (bfin_arch_setup): New function.
14640 (bfin_usrregs_info, regs_info): New globals.
14641 (bfin_regs_info): New function.
14642 (the_low_target): Adjust.
14643 (initialize_low_arch): New function.
14644 * linux-cris-low.c (tdesc_cris): Declare.
14645 (cris_arch_setup): New function.
14646 (cris_usrregs_info, regs_info): New globals.
14647 (cris_regs_info): New function.
14648 (the_low_target): Adjust.
14649 (initialize_low_arch): New function.
14650 * linux-cris-low.c (tdesc_crisv32): Declare.
14651 (cris_arch_setup): New function.
14652 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14653 (cris_regs_info): New function.
14654 (the_low_target): Adjust.
14655 (initialize_low_arch): New function.
14656 * linux-m32r-low.c (tdesc_m32r): Declare.
14657 (m32r_arch_setup): New function.
14658 (m32r_usrregs_info, regs_info): New globals.
14659 (m32r_regs_info): Adjust.
14660 (initialize_low_arch): New function.
14661 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14662 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14663 (tic6x_usrregs_info): Forward declare.
14664 (tic6x_read_description): New function, based on ...
14665 (tic6x_arch_setup): ... this. Reimplement.
14666 (target_regsets): Rename to ...
14667 (tic6x_regsets): ... this, and make static.
14668 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14669 (tic6x_regs_info): New function.
14670 (the_low_target): Adjust.
14671 (initialize_low_arch): New function.
14672 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14673 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14674 (target_regsets): Rename to ...
14675 (xtensa_regsets): ... this, and make static.
14676 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14677 globals.
14678 (xtensa_arch_setup, xtensa_regs_info): New functions.
14679 (the_low_target): Adjust.
14680 (initialize_low_arch): New function.
14681 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14682 (nios2_arch_setup): Set the current process'es tdesc.
14683 (target_regsets): Rename to ...
14684 (nios2_regsets): ... this.
14685 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14686 (nios2_regs_info): New function.
14687 (the_low_target): Adjust.
14688 (initialize_low_arch): New function.
14689 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14690 (aarch64_arch_setup): Set the current process'es tdesc.
14691 (target_regsets): Rename to ...
14692 (aarch64_regsets): ... this.
14693 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14694 (aarch64_regs_info): New function.
14695 (the_low_target): Adjust.
14696 (initialize_low_arch): New function.
14697 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14698 globals.
14699 (target_regsets): Rename to ...
14700 (tile_regsets): ... this.
14701 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14702 (tile_regs_info): New function.
14703 (tile_arch_setup): Set the current process'es tdesc.
14704 (the_low_target): Adjust.
14705 (initialize_low_arch): New function.
14706 * spu-low.c (tdesc_spu): Declare.
14707 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14708 * win32-arm-low.c (tdesc_arm): Declare.
14709 (arm_arch_setup): New function.
14710 (the_low_target): Install arm_arch_setup instead of
14711 init_registers_arm.
14712 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14713 (init_windows_x86): Rename to ...
14714 (i386_arch_setup): ... this. Set `win32_tdesc'.
14715 (the_low_target): Adjust.
14716 * win32-low.c (win32_tdesc): New global.
14717 (child_add_thread): Don't create the thread cache here.
14718 (do_initial_child_stuff): Set the new process'es tdesc.
14719 * win32-low.h (struct target_desc): Forward declare.
14720 (win32_tdesc): Declare.
14721 * lynx-i386-low.c (tdesc_i386): Declare global.
14722 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14723 * lynx-low.c (lynx_tdesc): New global.
14724 (lynx_add_process): Set the new process'es tdesc.
14725 * lynx-low.h (struct target_desc): Forward declare.
14726 (lynx_tdesc): Declare global.
14727 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14728 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14729 * nto-low.c (nto_tdesc): New global.
14730 (do_attach): Set the new process'es tdesc.
14731 * nto-low.h (struct target_desc): Forward declare.
14732 (nto_tdesc): Declare.
14733 * nto-x86-low.c (tdesc_i386): Declare.
14734 (nto_x86_arch_setup): Set `nto_tdesc'.
14735
14736 2013-06-04 Gary Benson <gbenson@redhat.com>
14737
14738 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14739 to qSupported response when appropriate.
14740 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14741 with nonzero-length annex.
14742 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14743 arguments supplied in annex.
14744
14745 2013-05-31 Doug Evans <dje@google.com>
14746
14747 PR server/15594
14748 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14749 64 bits in 64-cross-32 environment.
14750
14751 2013-05-28 Pedro Alves <palves@redhat.com>
14752
14753 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14754 (aarch64-without-fpu.c): Delete rule.
14755 * configure.srv (aarch64*-*-linux*): Remove references to
14756 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14757 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14758 declaration.
14759
14760 2013-05-24 Pedro Alves <palves@redhat.com>
14761
14762 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14763 instead of strchr/decode_address. Error if the range isn't split
14764 with a ','. Don't assume there's be a ':' in the action.
14765
14766 2013-05-23 Yao Qi <yao@codesourcery.com>
14767 Pedro Alves <palves@redhat.com>
14768
14769 * linux-low.c (lwp_in_step_range): New function.
14770 (linux_wait_1): If the thread was range stepping and stopped
14771 outside the stepping range, report the stop to GDB. Otherwise,
14772 continue stepping. Add range stepping debug output.
14773 (linux_set_resume_request): Copy the step range from the resume
14774 request to the lwp.
14775 (linux_supports_range_stepping): New.
14776 (linux_target_ops) <supports_range_stepping>: Set to
14777 linux_supports_range_stepping.
14778 * linux-low.h (struct linux_target_ops)
14779 <supports_range_stepping>: New field.
14780 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14781 * linux-x86-low.c (x86_supports_range_stepping): New.
14782 (the_low_target) <supports_range_stepping>: Set to
14783 x86_supports_range_stepping.
14784 * server.c (handle_v_cont): Handle 'r' action.
14785 (handle_v_requests): Append ";r" if the target supports range
14786 stepping.
14787 * target.h (struct thread_resume) <step_range_start,
14788 step_range_end>: New fields.
14789 (struct target_ops) <supports_range_stepping>:
14790 New field.
14791 (target_supports_range_stepping): New macro.
14792
14793 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14794
14795 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14796 confusion in comment.
14797
14798 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14799
14800 * lynx-low.c (struct process_info_private): New type.
14801 (lynx_add_process): New function.
14802 (lynx_create_inferior, lynx_attach): Replace calls to
14803 add_process by calls to lynx_add_process.
14804 (lynx_resume): If PTID is null, then try using
14805 current_process()->private->last_wait_event_ptid.
14806 Add comments.
14807 (lynx_clear_inferiors): Delete. The contents of that function
14808 has been inlined in lynx_mourn;
14809 (lynx_wait_1): Save the ptid in the process's private data.
14810 (lynx_mourn): Free the process' private data. Replace call
14811 to lynx_clear_inferiors by call to clear_inferiors.
14812
14813 2013-05-17 Yao Qi <yao@codesourcery.com>
14814
14815 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14816 the right place.
14817
14818 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14819
14820 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14821 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14822 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14823 PT_TEXT_END_ADDR guards. Update comments.
14824 (linux_target_op) <read_offsets>: Conditionally define to
14825 linux_read_offsets if the target is UCLIBC and if it defines
14826 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14827
14828 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14829 Andrew Jenner <andrew@codesourcery.com>
14830
14831 * Makefile.in (SFILES): Add linux-nios2-low.c.
14832 (clean): Add action to delete nios2-linux.c.
14833 (nios2-linux.c): New rule.
14834 * configure.srv: Add nios2*-*-linux*.
14835 * linux-nios2-low.c: New.
14836
14837 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14838
14839 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14840
14841 2013-04-25 Hui Zhu <hui@codesourcery.com>
14842
14843 PR gdb/15186
14844 * ax.c (ax_printf): Add fflush.
14845
14846 2013-04-22 Tom Tromey <tromey@redhat.com>
14847
14848 * Makefile.in (SFILES): Add filestuff.c.
14849 (OBS): Add filestuff.o.
14850 (filestuff.o): New target.
14851 * config.in, configure: Rebuild.
14852 * configure.ac: Check for fdwalk, pipe2.
14853
14854 2013-04-17 Pedro Alves <palves@redhat.com>
14855
14856 * configure.ac (USE_THREAD_DB): Delete variable.
14857 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14858 Don't AC_SUBST USE_THREAD_DB.
14859 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14860 * config.in, configure: Regenerate.
14861
14862 2013-04-16 Pedro Alves <palves@redhat.com>
14863
14864 * linux-low.h (struct lwp_info) <thread_known>: Move under
14865 the USE_THREAD_DB #ifdef.
14866
14867 2013-04-16 Pedro Alves <palves@redhat.com>
14868
14869 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14870 (linux-low.o): Delete rule.
14871 * linux-low.h: Always include "gdb_thread_db.h" instead of
14872 conditionally including thread_db.h.
14873 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14874 HAVE_THREAD_DB_H.
14875
14876 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14877
14878 * Makefile.in (install-only): Fix make install regression.
14879
14880 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14881
14882 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14883 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14884 installation.
14885 * gdbserver.1: Remove.
14886
14887 2013-03-22 Pedro Alves <palves@redhat.com>
14888
14889 * linux-low.c (handle_extended_wait): Don't call
14890 linux_enable_event_reporting.
14891
14892 2013-03-15 Tony Theodore <tonyt@logyst.com>
14893
14894 PR build/9098:
14895 * Makefile.in (SHELL): Use @SHELL@.
14896
14897 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14898
14899 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14900 compiler warning.
14901
14902 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14903
14904 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14905 Remove extraneous NULL element.
14906
14907 2013-03-13 Yao Qi <yao@codesourcery.com>
14908
14909 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14910 'V' block in trace frame.
14911
14912 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14913
14914 * target.h (struct target_ops): Add btrace ops.
14915 (target_supports_btrace): New macro.
14916 (target_enable_btrace): New macro.
14917 (target_disable_btrace): New macro.
14918 (target_read_btrace): New macro.
14919 * gdbthread.h (struct thread_info): Add btrace field.
14920 * server.c: Include btrace-common.h.
14921 (handle_btrace_general_set): New function.
14922 (handle_btrace_enable): New function.
14923 (handle_btrace_disable): New function.
14924 (handle_general_set): Call handle_btrace_general_set.
14925 (handle_qxfer_btrace): New function.
14926 (struct qxfer qxfer_packets[]): Add btrace entry.
14927 * inferiors.c (remove_thread): Disable btrace.
14928 * linux-low: Include linux-btrace.h.
14929 (linux_low_enable_btrace): New function.
14930 (linux_low_read_btrace): New function.
14931 (linux_target_ops): Add btrace ops.
14932 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14933 Add srv_linux_btrace=yes.
14934 (x86_64-*-linux*): Add linux-btrace.o.
14935 Add srv_linux_btrace=yes.
14936 * configure.ac: Define HAVE_LINUX_BTRACE.
14937 * config.in: Regenerated.
14938 * configure: Regenerated.
14939
14940 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14941
14942 * server.c (handle_qxfer): Preserve error message if -3 is
14943 returned.
14944 (qxfer): Document the -3 return value.
14945
14946 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14947
14948 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14949 (linux_btrace_h): New variable.
14950 (linux-btrace.o): New rule.
14951
14952 2013-03-08 Stan Shebs <stan@codesourcery.com>
14953 Hafiz Abid Qadeer <abidh@codesourcery.com>
14954
14955 * tracepoint.c (trace_buffer_size): New global.
14956 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14957 (init_trace_buffer): Change to one-argument function. Allocate
14958 trace buffer memory.
14959 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14960 handle QTBuffer:size packet.
14961 (cmd_bigqtbuffer_size): New function.
14962 (initialize_tracepoint): Call init_trace_buffer with
14963 DEFAULT_TRACE_BUFFER_SIZE.
14964 * server.c (handle_query): Add QTBuffer:size in the
14965 supported packets.
14966
14967 2013-03-07 Yao Qi <yao@codesourcery.com>
14968
14969 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14970 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14971 of -1.
14972 (cmd_qtsp): Adjust condition. Do post increment.
14973 Set cur_action and cur_step_action back to 0.
14974
14975 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14976
14977 PR server/15236
14978 * linux-low.c (linux_write_memory): Return early success if LEN is
14979 zero.
14980
14981 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14982
14983 * configure.srv: Add x86_64-*-cygwin* as target.
14984
14985 2013-02-28 Tom Tromey <tromey@redhat.com>
14986
14987 * configure.ac: Invoke AC_SYS_LARGEFILE.
14988 * configure, config.in: Rebuild.
14989
14990 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14991
14992 * win32-low.c: Throughout, fix format strings and casts of
14993 printf-like functions to avoid type related warnings on all
14994 platforms.
14995 (get_child_debug_event): Print dwDebugEventCode as hex since
14996 that's how it's usually documented.
14997
14998 2013-02-28 Yao Qi <yao@codesourcery.com>
14999
15000 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
15001 pulongest.
15002
15003 2013-02-27 Jiong Wang <jiwang@tilera.com>
15004
15005 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
15006 (reg-tilegx32.c): New rule.
15007 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
15008 * linux-tile-low.c (tile_arch_setup): New function. Invoke
15009 different register info initializer according to elf class.
15010 (init_registers_tilgx32): New function. The tilegx32 register info
15011 initializer.
15012 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
15013 (tile_store_gregset): Likewise.
15014
15015 2013-02-27 Yao Qi <yao@codesourcery.com>
15016
15017 * server.c (process_point_options): Print debug message when
15018 debug_threads is true.
15019
15020 2013-02-26 Yao Qi <yao@codesourcery.com>
15021
15022 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
15023
15024 2013-02-19 Pedro Alves <palves@redhat.com>
15025 Kai Tietz <ktietz@redhat.com>
15026
15027 PR gdb/15161
15028
15029 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
15030 instead of strtoul to extract address from packet.
15031 (process_serial_event) <'z'>: Likewise.
15032
15033 2013-02-18 Yao Qi <yao@codesourcery.com>
15034
15035 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
15036
15037 2013-02-14 Pedro Alves <palves@redhat.com>
15038
15039 Plug memory leak.
15040
15041 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
15042 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
15043
15044 2013-02-14 Pedro Alves <palves@redhat.com>
15045
15046 * tracepoint.c (cmd_qtdpsrc): Use savestring.
15047
15048 2013-02-14 Pedro Alves <palves@redhat.com>
15049
15050 * tracepoint.c (save_string): Delete.
15051 (add_tracepoint_action): Use savestring instead of save_string.
15052
15053 2013-02-12 Pedro Alves <palves@redhat.com>
15054
15055 * linux-xtensa-low.c: Ditto.
15056 * xtensa-xtregs.c: Ditto.
15057
15058 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
15059
15060 * thread-db.c (thread_db_get_tls_address): NULL pointer check
15061 thread_db.
15062
15063 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
15064
15065 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
15066 aarch64_num_wp_regs and aarch64_num_bp_regs to
15067 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
15068
15069 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
15070
15071 * linux-aarch64-low.c (ps_get_thread_area): Replace
15072 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
15073
15074 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
15075 Marcus Shawcroft <marcus.shawcroft@arm.com>
15076 Nigel Stephens <nigel.stephens@arm.com>
15077 Yufeng Zhang <yufeng.zhang@arm.com>
15078
15079 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
15080 (aarch64.c, aarch64-without-fpu.c): New targets.
15081 * configure.srv (aarch64*-*-linux*): New.
15082 * linux-aarch64-low.c: New file.
15083
15084 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
15085
15086 * linux-low.c (handle_extended_wait, linux_create_inferior)
15087 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
15088 (dequeue_one_deferred_signal, linux_resume_one_thread)
15089 (fetch_register, linux_write_memory, linux_enable_event_reporting)
15090 (linux_tracefork_grandchild, linux_test_for_tracefork)
15091 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
15092 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
15093 where the argument is 0.
15094
15095 2013-01-25 Yao Qi <yao@codesourcery.com>
15096
15097 * event-loop.c: Include "queue.h".
15098 (gdb_event_p): New typedef.
15099 (struct gdb_event) <next_event>: Remove.
15100 (event_queue): Change to QUEUE(gdb_event_p).
15101 (async_queue_event): Remove.
15102 (gdb_event_xfree): New.
15103 (initialize_event_loop): New.
15104 (process_event): Use API from QUEUE.
15105 (wait_for_event): Likewise.
15106 * server.c (main): Call initialize_event_loop.
15107 * server.h (initialize_event_loop): Declare.
15108
15109 2013-01-18 Yao Qi <yao@codesourcery.com>
15110
15111 * ax.h (struct eval_agent_expr_context): New.
15112 (gdb_eval_agent_expr): Update declaration.
15113 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
15114 TFRAME. Add new argument CTX.
15115 * server.h (struct eval_agent_expr_context): Declare.
15116 (agent_mem_read, agent_tsv_read): Update declaration.
15117 (agent_mem_read_string): Likewise.
15118 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
15119 (add_traceframe_block): Add new argument TPOINT.
15120 Increase TPOINT->traceframe_usage.
15121 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
15122 eval_tracepoint_agent_expr.
15123 (condition_true_at_tracepoint): Likewise.
15124 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
15125 (agent_mem_read_string, agent_tsv_read): Likewise.
15126
15127 2013-01-16 Yao Qi <yao@codesourcery.com>
15128
15129 * linux-low.c (linux_resume_one_lwp): Don't check
15130 'lwp->bp_reinsert != 0'.
15131
15132 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15133 Pedro Alves <palves@redhat.com>
15134
15135 * lynx-low.c (ptrace_request_to_str): Define a temporary
15136 macro and use it to simplify this function's implementation.
15137
15138 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15139
15140 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
15141 sets errno.
15142
15143 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15144
15145 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
15146
15147 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15148
15149 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
15150
15151 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15152
15153 * lynx-low.c (lynx_resume): Use the resume_info parameter
15154 to determine the ptid for the lynx_ptrace call, unless
15155 it is equal to minus_one_ptid, in which case we use the
15156 ptid of the current_inferior.
15157 (lynx_wait_1): After having received a thread create/exit
15158 event, resume the inferior's execution using the signaling
15159 thread's ptid, rather than the old ptid.
15160
15161 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15162
15163 * lynx-low.c (lynx_resume): Delete variable ret.
15164
15165 2013-01-01 Joel Brobecker <brobecker@adacore.com>
15166
15167 * gdbreplay.c (gdbreplay_version): Update copyright year.
15168 * server.c (gdbserver_version): Likewise.
15169
15170 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15171
15172 * lynx-low.c (lynx_wait_1): Add debug trace before adding
15173 new thread.
15174
15175 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15176
15177 * lynx-low.c (ptrace_request_to_str): Add handling for
15178 PTRACE_GETTRACESIG.
15179
15180 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15181
15182 * lynx-low.c (lynx_attach): Delete variable new_process.
15183
15184 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15185
15186 * lynx-low.c (lynx_create_inferior): Delete variable
15187 new_process.
15188
15189 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15190
15191 * lynx-low.c (ptrace_request_to_str): Do not handle
15192 PTRACE_GETTHREADLIST if this macro does not exist.
15193
15194 2012-12-15 Yao Qi <yao@codesourcery.com>
15195
15196 * Makefile.in (OBS): Add notif.o.
15197 * notif.c, notif.h: New.
15198 * server.c: Include "notif.h".
15199 (struct vstop_notif) <next>: Remove.
15200 <base>: New field.
15201 (queue_stop_reply): Update.
15202 (push_event, send_next_stop_reply): Remove.
15203 (discard_queued_stop_replies): Update.
15204 (notif_stop): New variable.
15205 (handle_v_stopped): Remove.
15206 (handle_v_requests): Don't call handle_v_stopped. Call
15207 handle_ack_notif instead.
15208 (queue_stop_reply_callback): Call notif_event_enque instead
15209 of queue_stop_reply.
15210 (handle_status): Don't call send_next_stop_reply, call
15211 notif_write_event instead.
15212 (kill_inferior_callback): Likewise.
15213 (detach_or_kill_inferior_callback): Likewise.
15214 (main): Call initialize_notif.
15215 (process_serial_event): Call QUEUE_is_empty.
15216 (handle_target_event): Call notif_push instead of push event.
15217 * server.h (push_event): Remove declaration.
15218
15219 2012-12-10 Tom Tromey <tromey@redhat.com>
15220
15221 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
15222 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
15223 macros.
15224 (.c.o): Rewrite.
15225 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
15226 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
15227 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
15228 (amd64-linux-ipa.o, ax.o): Rewrite.
15229 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
15230 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
15231 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
15232 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
15233 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
15234 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
15235 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
15236 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
15237 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
15238 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
15239 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
15240 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
15241 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
15242 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
15243 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
15244 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
15245 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
15246 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
15247 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
15248 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
15249 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
15250 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
15251 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
15252 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
15253 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
15254 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
15255 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
15256 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
15257 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
15258 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
15259 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
15260 (reg-tilegx.o): Remove.
15261 (all_object_files): New macro.
15262 Include .deps files.
15263 * aclocal.m4, configure: Rebuild.
15264 * acinclude.m4: Include depstand.m4, lead-dot.m4.
15265 * configure.ac: Invoke ZW_CREATE_DEPDIR,
15266 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
15267
15268 2012-12-05 Tom Tromey <tromey@redhat.com>
15269
15270 PR gdb/14917:
15271 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
15272
15273 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
15274
15275 * configure.ac: Check for linux/perf_event.h.
15276 * config.in: Regenerated.
15277 * configure: Regenerated.
15278
15279 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
15280
15281 * hostio.c (handle_readlink): Decrease buffer size
15282 parameter passed to readlink by one byte.
15283
15284 2012-11-26 Yao Qi <yao@codesourcery.com>
15285
15286 * configure.ac (build_warnings): Append '-Wempty-body'.
15287 * configure: Regenerated.
15288 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
15289 body.
15290
15291 2012-11-15 Pierre Muller <muller@sourceware.org>
15292
15293 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
15294 * config.in: Regenerate.
15295 * configure: Regenerate.
15296 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15297 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15298 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15299 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15300 header.
15301 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15302 instead of <sys/wait.h> header.
15303 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15304
15305 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15306
15307 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15308 (various make rules): Remove -DGDBSERVER
15309
15310 2012-11-09 Yao Qi <yao@codesourcery.com>
15311
15312 * spu-low.c (current_ptid): Move it to ..
15313 * gdbthread.h: ... here. New.
15314 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15315 * server.c (myresume, process_serial_event): Likewise.
15316 * thread-db.c (thread_db_find_new_threads): Likewise.
15317 * tracepoint.c (run_inferior_command): Likewise.
15318
15319 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15320
15321 * server.c (handle_search_memory_1): Include access length in
15322 warning message.
15323
15324 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15325
15326 * linux-crisv32-low.c: Fix compile errors.
15327
15328 2012-09-04 Yao Qi <yao@codesourcery.com>
15329
15330 * tracepoint.c (cmd_qtsv): Adjust debug message.
15331 Don't check CUR_TPOINT.
15332
15333 2012-08-28 Yao Qi <yao@codesourcery.com>
15334
15335 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15336 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15337 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15338 Remove declarations of xmalloc, xreallloc, xstrdup and
15339 freeargv.
15340 * Makefile.in (libiberty_h): New.
15341 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15342 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15343
15344 2012-08-23 Yao Qi <yao@codesourcery.com>
15345
15346 * server.h: Remove declaration of 'xsnprintf'.
15347
15348 2012-08-22 Keith Seitz <keiths@redhat.com>
15349
15350 * server.h: Include build-gnulib-gbserver/config.h.
15351 * gdbreplay.c: Likewise.
15352
15353 2012-08-08 Doug Evans <dje@google.com>
15354
15355 * Makefile.in (SFILES): Add gdb_vecs.c.
15356 (OBS): Add gdb_vecs.o.
15357 (gdb_vecs_h, host_defs_h): New variables.
15358 (thread-db.o): Add $(gdb_vecs_h) dependency.
15359 (gdb_vecs.o): New rule.
15360 * thread-db.c: #include "gdb_vecs.h".
15361 (thread_db_load_search): Use a vector to iterate over path elements.
15362 Handle text appearing after "$pdir".
15363
15364 * configure.ac: Add check for strstr.
15365 * config.in: Regenerate.
15366 * configure: Regenerate.
15367
15368 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15369
15370 * hostio.c (handle_pread): If pread fails, fall back to attempting
15371 lseek/read.
15372 (handle_pwrite): Likewise for pwrite.
15373
15374 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15375
15376 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15377 between unsupported TYPE and unimplementable ADDR/LEN combination.
15378 (arm_insert_point): Act on new return value.
15379
15380 2012-07-31 Pedro Alves <palves@redhat.com>
15381
15382 * server.c (process_point_options): Only skip tokens if we find
15383 one that is unrecognized. Don't treat 'X' specially while
15384 skipping unrecognized tokens.
15385
15386 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15387
15388 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15389 to 4-byte-align HW breakpoint addresses for Thumb.
15390
15391 2012-07-27 Yao Qi <yao@codesourcery.com>
15392
15393 PR remote/14161.
15394
15395 * server.h: Declare gdb_agent_about_to_close.
15396 * target.c (kill_inferior): Include "agent.h".
15397 New. Send command 'kill'.
15398 * target.h (kill_inferior): Removed macro.
15399 * tracepoint.c (gdb_agent_about_to_close): New.
15400 (gdb_agent_helper_thread): Handle command 'close'.
15401 Wait endlessly until the inferior stops.
15402 Install gdb_agent_remove_socket to atexit hook.
15403 (agent_socket_name): New static variable.
15404 (gdb_agent_socket_init): Replace local variable 'name' with
15405 'agent_socket_name'.
15406 (gdb_agent_remove_socket): New.
15407
15408 2012-07-27 Yao Qi <yao@codesourcery.com>
15409
15410 * server.c (process_point_options): Stop at 'X' when parsing.
15411
15412 2012-07-19 Michael Eager <eager@eagercon.com>
15413
15414 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15415 to hw_execute.
15416 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15417 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15418 hardware breakpoint.
15419
15420 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15421
15422 * gdbserver/linux-low.c (initialize_low): Call
15423 linux_ptrace_init_warnings.
15424
15425 2012-07-02 Doug Evans <dje@google.com>
15426
15427 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15428 pointer to int.
15429
15430 2012-07-02 Stan Shebs <stan@codesourcery.com>
15431
15432 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15433 (ax.o): Add it to build rule.
15434 (ax-ipa.o): Ditto.
15435 (OBS): Add format.o.
15436 (IPA_OBS): Add format.o.
15437 * server.c (handle_query): Claim support for breakpoint commands.
15438 (process_point_options): Add command case.
15439 (process_serial_event): Leave running if there are printfs in
15440 effect.
15441 * mem-break.h (any_persistent_commands): Declare.
15442 (add_breakpoint_commands): Declare.
15443 (gdb_no_commands_at_breakpoint): Declare.
15444 (run_breakpoint_commands): Declare.
15445 * mem-break.c (struct point_command_list): New struct.
15446 (struct breakpoint): New field command_list.
15447 (any_persistent_commands): New function.
15448 (add_commands_to_breakpoint): New function.
15449 (add_breakpoint_commands): New function.
15450 (gdb_no_commands_at_breakpoint): New function.
15451 (run_breakpoint_commands): New function.
15452 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15453 locally.
15454 * ax.c: Include format.h.
15455 (ax_printf): New function.
15456 (gdb_eval_agent_expr): Add printf opcode.
15457
15458 2012-06-13 Yao Qi <yao@codesourcery.com>
15459
15460 * server.c (start_inferior): Remove duplicated writes to fields
15461 'last_resume_kind' and 'last_status' of 'current_inferior'.
15462
15463 2012-06-12 Yao Qi <yao@codesourcery.com>
15464 Pedro Alves <palves@redhat.com>
15465
15466 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15467 comment.
15468 * server.c (handle_v_cont): Extend comment.
15469
15470 2012-06-11 Yao Qi <yao@codesourcery.com>
15471
15472 * linux-low.c (linux_attach): Add 'static'.
15473
15474 2012-06-06 Yao Qi <yao@codesourcery.com>
15475
15476 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15477
15478 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15479
15480 Fix gcc -flto compilation warning.
15481 * server.c (main): Make variable multi_mode and attach volatile.
15482
15483 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15484
15485 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15486 if the platform doesn't know about it.
15487
15488 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15489
15490 * Makefile.in (SFILES): Add linux-tile-low.c.
15491 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15492 * configure.srv: Handle tilegx-*-linux*.
15493 * linux-tile-low.c: New file.
15494
15495 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15496
15497 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15498
15499 2012-05-24 Pedro Alves <palves@redhat.com>
15500
15501 PR gdb/7205
15502
15503 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15504
15505 2012-05-24 Pedro Alves <palves@redhat.com>
15506
15507 PR gdb/7205
15508
15509 Replace target_signal with gdb_signal throughout.
15510
15511 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15512
15513 * linux-low.c (linux_store_registers): Avoid the copying sequence
15514 when no data has been retrieved by ptrace.
15515
15516 2012-05-22 Will Deacon <will.deacon@arm.com>
15517
15518 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15519 Include asm/ptrace.h.
15520 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15521 already defined.
15522
15523 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15524
15525 * linux-low.c (linux_store_registers): Don't re-retrieve data
15526 with ptrace that has already been obtained from /proc. Always
15527 copy any data retrieved with ptrace to the buffer supplied.
15528
15529 2012-05-11 Yao Qi <yao@codesourcery.com>
15530 Pedro Alves <palves@redhat.com>
15531
15532 * linux-low.c (enum stopping_threads_kind): New.
15533 (stopping_threads): Change type to `enum stopping_threads_kind'.
15534 (handle_extended_wait): If stopping and suspending threads, leave
15535 the new_lwp suspended too.
15536 (linux_wait_for_event): Adjust.
15537 (stop_all_lwps): Set `stopping_threads' to
15538 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15539 whether we're suspending threads or just stopping them. Assert no
15540 recursion happens.
15541
15542 2012-04-29 Yao Qi <yao@codesourcery.com>
15543
15544 * server.h: Move some code to ...
15545 * gdbthread.h: ... here. New.
15546 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15547 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15548 (nto-low.o, win32-low.o): Likewise.
15549 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15550 * regcache.c, remote-utils.c, server.c: Likewise.
15551 * target.c, tracepoint.c, win32-low.c: Likewise.
15552
15553 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15554
15555 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15556 (PTRACE_ARG4_TYPE): Likewise.
15557 (PTRACE_XFER_TYPE): Likewise.
15558 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15559 ptrace to PTRACE_ARG3_TYPE.
15560 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15561 (PTRACE_ARG4_TYPE): Likewise.
15562 (PTRACE_XFER_TYPE): Likewise.
15563 (linux_detach_one_lwp): Cast fourth argument of
15564 ptrace to long then PTRACE_ARG4_TYPE.
15565 (regsets_fetch_inferior_registers): Cast third argument of
15566 ptrace to long then PTRACE_ARG3_TYPE.
15567 (regsets_store_inferior_registers): Likewise.
15568
15569 2012-04-20 Pedro Alves <palves@redhat.com>
15570
15571 * configure: Regenerate.
15572
15573 2012-04-19 Pedro Alves <palves@redhat.com>
15574
15575 * Makefile.in (GNULIB_BUILDDIR): New.
15576 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15577 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15578 (all, install-only, uninstall, clean-info, all-lib, clean): No
15579 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15580 (maintainer-clean realclean distclean): Use subdir_do.
15581 (subdir_do): New.
15582 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15583 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15584 * acinclude.m4: Include acx_configure_dir.m4.
15585 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15586 calls. Call AC_PROG_RANLIB. Configure gnulib using
15587 ACX_CONFIGURE_DIR.
15588 (GNULIB): New.
15589 (GNULIB_STDINT_H): Adjust.
15590 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15591 * gdbreplay.c: Include build-gnulib/config.h.
15592 * server.h: Likewise.
15593 * aclocal.m4: Regenerate.
15594 * config.in: Regenerate.
15595 * configure: Regenerate.
15596
15597 2012-04-19 Pedro Alves <palves@redhat.com>
15598
15599 * Makefile.in (LIBGNU, INCGNU): Adjust.
15600 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15601 (all, install-only, uninstall, clean-info, all-lib, clean)
15602 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15603 * configure.ac: Adjust AC_OUTPUT output.
15604 * aclocal.m4: Regenerate.
15605 * configure: Regenerate.
15606
15607 2012-04-19 Pedro Alves <palves@redhat.com>
15608
15609 * Makefile.in (generated_files): New.
15610 (server_h): Remove the explicit dependency on config.h, and depend
15611 on $generated_files.
15612
15613 2012-04-19 Pedro Alves <palves@redhat.com>
15614
15615 * Makefile.in (INCGNU): Add -Ignulib.
15616
15617 2012-04-19 Pedro Alves <palves@redhat.com>
15618
15619 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15620 (INCGNU): ... this, and spell out -I here.
15621 (GNULIB_LIB): Rename to ...
15622 (LIBGNU): ... this.
15623 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15624
15625 2012-04-19 Pedro Alves <palves@redhat.com>
15626
15627 * config.in: Regenerate.
15628
15629 2012-04-19 Pedro Alves <palves@redhat.com>
15630
15631 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15632 * server.h (memmem): Remove declaration.
15633 * config.in: Regenerate.
15634 * configure: Regenerate.
15635
15636 2012-04-19 Yao Qi <yao@codesourcery.com>
15637
15638 * Makefile.in (SFILES): Add common/vec.c.
15639 (OBS): Add vec.o.
15640 (vec.o): New rule.
15641
15642 2012-04-19 Yao Qi <yao@codesourcery.com>
15643
15644 * remote-utils.c (prepare_resume_reply): Replace with macro
15645 target_core_of_thread.
15646 * server.c (handle_qxfer_threads_proper): Likewise.
15647 * target.h (traget_core_of_thread): New macro.
15648
15649 2012-04-18 Pedro Alves <palves@redhat.com>
15650
15651 * aclocal.m4: Regenerate.
15652 * configure: Regenerate.
15653
15654 2012-04-16 Yao Qi <yao@codesourcery.com>
15655
15656 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15657 duplicated on address.
15658
15659 2012-04-16 Yao Qi <yao@codesourcery.com>
15660
15661 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15662 (struct tracepoint_action_ops) <send>: New field.
15663 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15664 (agent_expr_send, x_tracepoint_action_send): New.
15665 (l_tracepoint_action_send): New.
15666 (cmd_qtdp): Download and install tracepoint
15667 according to `use_agent'.
15668 (run_inferior_command): Add one more parameter `len'.
15669 Update callers.
15670 (tracepoint_send_agent): New.
15671 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15672
15673 2012-04-16 Yao Qi <yao@codesourcery.com>
15674
15675 * tracepoint.c (download_tracepoints): Moved to ...
15676 (cmd_qtstart): ... here.
15677
15678 2012-04-14 Yao Qi <yao@codesourcery.com>
15679
15680 * tracepoint.c: Include inttypes.h.
15681 (struct collect_memory_action): Use sized types.
15682 (struct tracepoint): Likewise.
15683 (cmd_qtdp, stop_tracing): Update print specifiers.
15684 (cmd_qtp, response_tracepoint): Likewise.
15685 (collect_data_at_tracepoint): Likewise.
15686 (collect_data_at_step): Likewise.
15687
15688 2012-04-14 Yao Qi <yao@codesourcery.com>
15689
15690 Import gnulib module inttypes.
15691 * aclocal.m4, config.in, configure: Regenerated.
15692
15693 2012-04-14 Yao Qi <yao@codesourcery.com>
15694
15695 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15696 Makefile and config.status at last.
15697
15698 2012-04-13 Yao Qi <yao@codesourcery.com>
15699
15700 * tracepoint.c: Include stdint.h unconditionally.
15701
15702 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15703
15704 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15705 on BFD_HAVE_SYS_PROCFS_TYPE.
15706 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15707 * configure: Regenerate.
15708 * config.in: Likewise.
15709
15710 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15711
15712 * Makefile.in (clean): Also remove x32.c x32-linux.c
15713 x32-avx.c x32-avx-linux.c.
15714 (x32.o): New target.
15715 (x32.c): Likewise.
15716 (x32-linux.o): Likewise.
15717 (x32-linux.c): Likewise.
15718 (x32-avx.o): Likewise.
15719 (x32-avx.c): Likewise.
15720 (x32-avx-linux.o): Likewise.
15721 (x32-avx-linux.c): Likewise.
15722
15723 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15724 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15725 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15726 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15727 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15728 i386/x32-avx-linux.xml.
15729
15730 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15731 (init_registers_x32_avx_linux): Likwise.
15732 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15733 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15734
15735 2012-04-13 Pedro Alves <palves@redhat.com>
15736
15737 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15738 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15739 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15740 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15741 the sub-make.
15742
15743 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15744
15745 * linux-x86-low.c (compat_x32_clock_t): New.
15746 (compat_x32_siginfo_t): Likewise.
15747 (compat_x32_siginfo_from_siginfo): Likewise.
15748 (siginfo_from_compat_x32_siginfo): Likewise.
15749 (linux_is_elf64): Likewise.
15750 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15751 and siginfo_from_compat_x32_siginfo for x32.
15752 (x86_arch_setup): Set linux_is_elf64.
15753
15754 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15755
15756 PR gdb/13969
15757 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15758 e_machine field.
15759 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15760 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15761 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15762 compatible with process.
15763
15764 2012-04-12 Yao Qi <yao@codesourcery.com>
15765
15766 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15767 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15768 (install-only, install-info, clean): Handle sub dir gnulib.
15769 (all-lib, am--refresh): New targets.
15770 (memmem.o): Remove target.
15771 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15772 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15773 (AC_REPLACE_FUNCS): Remove memmem.
15774 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15775 (AC_OUTPUT): Generate Makefile in gnulib/.
15776 * aclocal.m4, config.in, configure: Regenerated.
15777
15778 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15779
15780 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15781
15782 2012-04-05 Pedro Alves <palves@redhat.com>
15783
15784 -Werror=strict-aliasing
15785
15786 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15787 pointer.
15788
15789 2012-04-04 Pedro Alves <palves@redhat.com>
15790
15791 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15792 (sparc_store_gregset_from_stack, sparc_store_gregset)
15793 (sparc_breakpoint_at): Fix formatting.
15794
15795 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15796
15797 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15798 are available.
15799 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15800 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15801 * config.in: Regenerate.
15802 * configure: Likewise.
15803
15804 2012-03-29 Pedro Alves <palves@redhat.com>
15805
15806 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15807 Correct ptrace arguments.
15808
15809 2012-03-28 Pedro Alves <palves@redhat.com>
15810
15811 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15812 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15813 (IA64_FR1_REGNUM): New defines.
15814 (ia64_fetch_register): New.
15815 (the_low_target): Install it.
15816 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15817 field.
15818 * linux-low.c (linux_fetch_registers): Try the
15819 the_low_target.fetch_register hook first.
15820
15821 * linux-arm-low.c (the_low_target): Adjust.
15822 * linux-bfin-low.c (the_low_target): Adjust.
15823 * linux-cris-low.c (the_low_target): Adjust.
15824 * linux-crisv32-low.c (the_low_target): Adjust.
15825 * linux-m32r-low.c (the_low_target): Adjust.
15826 * linux-m68k-low.c (the_low_target): Adjust.
15827 * linux-mips-low.c (the_low_target): Adjust.
15828 * linux-ppc-low.c (the_low_target): Adjust.
15829 * linux-s390-low.c (the_low_target): Adjust.
15830 * linux-sh-low.c (the_low_target): Adjust.
15831 * linux-sparc-low.c (the_low_target): Adjust.
15832 * linux-tic6x-low.c (the_low_target): Adjust.
15833 * linux-x86-low.c (the_low_target): Adjust.
15834 * linux-xtensa-low.c (the_low_target): Adjust.
15835
15836 2012-03-26 Pedro Alves <palves@redhat.com>
15837
15838 * server.c (handle_qxfer_libraries): Don't bail early if
15839 the_target->qxfer_libraries_svr4 is not NULL.
15840
15841 2012-03-26 Pedro Alves <palves@redhat.com>
15842
15843 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15844
15845 2012-03-23 Pedro Alves <palves@redhat.com>
15846
15847 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15848 "library-list-svr4" element's start tag when the the DSO list is
15849 empty.
15850
15851 2012-03-23 Pedro Alves <palves@redhat.com>
15852
15853 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15854 a variable whose type size is the same as the inferior's pointer
15855 size.
15856
15857 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15858
15859 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15860 struct siginfo.
15861 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15862 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15863 * linux-low.h: Include <signal.h>.
15864 (struct siginfo): Remove forward declaration.
15865 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15866 struct siginfo.
15867
15868 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15869
15870 * .gitignore: Ignore more files.
15871
15872 2012-03-19 Pedro Alves <palves@redhat.com>
15873 Jan Kratochvil <jan.kratochvil@redhat.com>
15874
15875 * server.c (cont_thread, general_thread): Add describing comments.
15876 (start_inferior): Clear `cont_thread'.
15877 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15878 of a process.
15879
15880 2012-03-15 Yao Qi <yao@codesourcery.com>
15881
15882 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15883 handling to ...
15884 (cmd_qtdp): ... here.
15885
15886 2012-03-15 Yao Qi <yao@codesourcery.com>
15887
15888 * tracepoint.c (struct tracepoint_action_ops): New.
15889 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15890 (m_tracepoint_action_download): New.
15891 (r_tracepoint_action_download): New.
15892 (x_tracepoint_action_download): New.
15893 (l_tracepoint_action_download): New.
15894 (add_tracepoint_action): Install `action->ops' according type.
15895 (download_tracepoint_1): Move code `download' function pointer
15896 of various tracepoint_action_ops.
15897
15898 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15899
15900 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15901 linux_ptrace_attach_warnings.
15902
15903 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15904
15905 * Makefile.in (linux-ptrace.o): New.
15906 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15907 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15908 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15909 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15910 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15911 of these targets.
15912 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15913
15914 2012-03-08 Yao Qi <yao@codesourcery.com>
15915 Pedro Alves <palves@redhat.com>
15916
15917 Fix PR server/13392.
15918 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15919 offset of JMP insn.
15920 * tracepoint.c (remove_tracepoint): New.
15921 (cmd_qtdp): Call remove_tracepoint when failed to install.
15922
15923 2012-03-07 Pedro Alves <palves@redhat.com>
15924
15925 * linux-low.c (get_detach_signal): New.
15926 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15927 Pass on pending signals to PTRACE_DETACH. Check the result of the
15928 ptrace call.
15929 * server.c (program_signals, program_signals_p): New.
15930 (handle_general_set): Handle QProgramSignals.
15931 * server.h (program_signals, program_signals_p): Declare.
15932
15933 2012-03-05 Pedro Alves <palves@redhat.com>
15934 Jan Kratochvil <jan.kratochvil@redhat.com>
15935
15936 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15937 New comment why.
15938
15939 2012-03-03 Yao Qi <yao@codesourcery.com>
15940
15941 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15942 agent_look_up_symbols.
15943
15944 2012-03-03 Yao Qi <yao@codesourcery.com>
15945
15946 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15947 (linux-x86-low.o): Likewise.
15948 * server.h: Remove in_process_agent_loaded.
15949 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15950 common/agent.c.
15951 Update callers.
15952
15953 2012-03-03 Yao Qi <yao@codesourcery.com>
15954
15955 * tracepoint.c (gdb_agent_capability): New global.
15956 (in_process_agent_loaded_ust): Renamed to
15957 `in_process_agent_supports_ust'.
15958 Update callers.
15959 (in_process_agent_supports_ust): Call agent_capability_check.
15960 (clear_installed_tracepoints): Assert that agent supports
15961 agent.
15962
15963 2012-03-03 Yao Qi <yao@codesourcery.com>
15964
15965 * linux-low.c (linux_supports_agent): New.
15966 (linux_target_ops): Initialize field `supports_agent' with
15967 linux_supports_agent.
15968 * target.h (struct target_ops) <supports_agent>: New.
15969 (target_supports_agent): New macro.
15970 * server.c (handle_general_set): Handle packet 'QAgent'.
15971 (handle_query): Send `QAgent+'.
15972 * Makefile.in (server.o): Depends on agent.h.
15973
15974 2012-03-03 Yao Qi <yao@codesourcery.com>
15975
15976 * Makefile.in (OBS): Add agent.o.
15977 Add new rule for agent.o.
15978 Track dependence of tracepoint.c on agent.h.
15979 * tracepoint.c (run_inferior_command_1):
15980 (run_inferior_command): Call agent_run_command.
15981 (gdb_ust_connect_sync_socket): Deleted. Move it to
15982 common/agent.c.
15983 (resume_thread, stop_thread): Likewise.
15984 (gdb_ust_socket_init): Renamed to ...
15985 (gdb_agent_socket_init): ... New.
15986 (gdb_ust_thread): Renamed to ...
15987 (gdb_agent_helper_thread): ... New.
15988 (gdb_ust_init): Move some code to ...
15989 (gdb_agent_init): ... here. New.
15990 [HAVE_UST]: Call gdb_ust_init.
15991 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15992 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15993 * config.in, configure: Regenerated.
15994
15995 2012-03-02 Pedro Alves <palves@redhat.com>
15996
15997 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15998 * linux-low.c (struct simple_pid_list): New.
15999 (stopped_pids): New a struct simple_pid_list pointer.
16000 (add_to_pid_list, pull_pid_from_list): New.
16001 (handle_extended_wait): Don't assume the first signal new children
16002 report is SIGSTOP. Adjust call to pull_pid_from_list.
16003 (linux_wait_for_lwp): Adjust.
16004
16005 2012-03-02 Yao Qi <yao@codesourcery.com>
16006
16007 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
16008 debug log.
16009
16010 2012-03-02 Yao Qi <yao@codesourcery.com>
16011
16012 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
16013 `stop_pc' and `tpoint'. Update caller.
16014
16015 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
16016
16017 * linux-low.h (linux_target_ops): Add regset_bitmap member.
16018 * linux-low.c (use_linux_regsets): New macro.
16019 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
16020 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
16021 (linux_register_in_regsets): New function.
16022 (usr_fetch_inferior_registers): Skip registers covered by
16023 regsets.
16024 (usr_store_inferior_registers): Likewise.
16025 (usr_fetch_inferior_registers): New macro.
16026 (usr_store_inferior_registers): Likewise.
16027 (linux_fetch_registers): Handle mixed regset/non-regset targets.
16028 (linux_store_registers): Likewise.
16029 * linux-mips-low.c (init_registers_mips_dsp_linux): New
16030 prototype.
16031 (init_registers_mips64_dsp_linux): Likewise.
16032 (init_registers_mips_linux): New macro.
16033 (init_registers_mips_dsp_linux): Likewise.
16034 (mips_dsp_num_regs): Likewise.
16035 (DSP_BASE, DSP_CONTROL): New fallback macros.
16036 (mips_base_regs): New macro.
16037 (mips_regmap): Use it. Fix the size.
16038 (mips_dsp_regmap): New variable.
16039 (mips_dsp_regset_bitmap): Likewise.
16040 (mips_arch_setup): New function.
16041 (mips_cannot_fetch_register): Use the_low_target.regmap rather
16042 than mips_regmap.
16043 (mips_cannot_store_register): Likewise.
16044 (the_low_target): Update .arch_setup, .num_regs and .regmap
16045 initializers. Add .regset_bitmap initializer.
16046 * linux-arm-low.c (the_low_target): Add .regset_bitmap
16047 initializer.
16048 * linux-bfin-low.c (the_low_target): Likewise.
16049 * linux-cris-low.c (the_low_target): Likewise.
16050 * linux-crisv32-low.c (the_low_target): Likewise.
16051 * linux-ia64-low.c (the_low_target): Likewise.
16052 * linux-m32r-low.c (the_low_target): Likewise.
16053 * linux-m68k-low.c (the_low_target): Likewise.
16054 * linux-ppc-low.c (the_low_target): Likewise.
16055 * linux-s390-low.c (the_low_target): Likewise.
16056 * linux-sh-low.c (the_low_target): Likewise.
16057 * linux-sparc-low.c (the_low_target): Likewise.
16058 * linux-tic6x-low.c (the_low_target): Likewise.
16059 * linux-x86-low.c (the_low_target): Likewise.
16060 * linux-xtensa-low.c (the_low_target): Likewise.
16061 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
16062 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
16063 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
16064 srv_xmlfiles.
16065 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
16066 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
16067
16068 2012-02-29 Yao Qi <yao@codesourcery.com>
16069 Pedro Alves <palves@redhat.com>
16070
16071 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
16072 `step_over_finished' is true.
16073
16074 2012-02-27 Pedro Alves <palves@redhat.com>
16075
16076 * linux-low.c (pid_is_stopped): Delete, moved to common/.
16077 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
16078
16079 2012-02-27 Pedro Alves <palves@redhat.com>
16080
16081 PR server/9684
16082 * linux-low.c (pid_is_stopped): New.
16083 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
16084
16085 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
16086
16087 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
16088 of conditions.
16089
16090 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
16091
16092 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
16093
16094 2012-02-24 Luis Machado <lgustavo@codesourcery>
16095
16096 * server.c (handle_query): Advertise support for target-side
16097 breakpoint condition evaluation.
16098 (process_point_options): New function.
16099 (process_serial_event): When inserting a breakpoint, check for
16100 a target-side condition that should be evaluated.
16101
16102 * mem-break.c: Include regcache.h and ax.h.
16103 (point_cond_list_t): New data structure.
16104 (breakpoint) <cond_list>: New field.
16105 (find_gdb_breakpoint_at): Make non-static.
16106 (delete_gdb_breakpoint_at): Clear any target-side
16107 conditions.
16108 (clear_gdb_breakpoint_conditions): New function.
16109 (add_condition_to_breakpoint): Likewise.
16110 (add_breakpoint_condition): Likewise.
16111 (gdb_condition_true_at_breakpoint): Likewise.
16112 (gdb_breakpoint_here): Return result directly instead
16113 of going through a local variable.
16114
16115 * mem-break.h (find_gdb_breakpoint_at): New prototype.
16116 (clear_gdb_breakpoint_conditions): Likewise.
16117 (add_breakpoint_condition): Likewise.
16118 (gdb_condition_true_at_breakpoint): Likewise.
16119
16120 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
16121 (need_step_over_p): Take target-side breakpoint condition into
16122 consideration.
16123
16124 2012-02-24 Luis Machado <lgustavo@codesourcery>
16125
16126 * server.h: Include tracepoint.h.
16127 (agent_mem_read, agent_get_trace_state_variable_value,
16128 agent_set_trace_state_variable_value,
16129 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
16130 get_set_tsv_func_addr): New prototypes.
16131
16132 * ax.h: New include file.
16133 * ax.c: New source file.
16134
16135 * tracepoint.c: Include ax.h.
16136 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
16137 agent_expr, eval_result_type): Move to ax.h.
16138 (parse_agent_expr): Rename to ...
16139 (gdb_parse_agent_expr): ... this, make it non-static and move
16140 to ax.h.
16141 (unparse_agent_expr) Rename to ...
16142 (gdb_unparse_agent_expr): ... this, make it non-static and move
16143 to ax.h.
16144 (eval_agent_expr): Rename to ...
16145 (eval_tracepoint_agent_expr): ... this.
16146 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
16147 forward declarations.
16148 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
16149 (agent_get_trace_state_variable_value): New function.
16150 (agent_set_trace_state_variable_value): New function.
16151 (cmd_qtdp): Call gdb_parse_agent_expr (...).
16152 (response_tracepoint): Call gdb_unparse_agent_expr (...).
16153 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
16154 (condition_true_at_tracepoint): Likewise.
16155 (parse_agent_expr): Rename to ...
16156 (gdb_parse_agent_expr): ... this and move to ax.c.
16157 (unparse_agent_expr): Rename to ...
16158 (gdb_unparse_agent_expr): ... this and move to ax.c.
16159 (gdb_agent_op_name): Move to ax.c.
16160 (eval_agent_expr): Rename to ...
16161 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
16162 and move to ax.c.
16163 (eval_tracepoint_agent_expr): New function.
16164 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
16165 non-static.
16166 (current_insn_ptr, emit_error, struct bytecode_address): Move to
16167 ax.c.
16168 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
16169 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
16170 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
16171 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
16172 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
16173 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
16174 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
16175 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
16176 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
16177 (compile_bytecodes): Remove forward declaration.
16178 (is_goto_target): Move to ax.c.
16179 (compile_bytecodes): Move to ax.c and call
16180 agent_get_trace_state_variable_value (...) and
16181 agent_set_trace_state_variable_value (...).
16182
16183 * Makefile.in: Update ax.c and IPA dependencies.
16184
16185 2012-02-24 Pedro Alves <palves@redhat.com>
16186
16187 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
16188 (cmd_bigqtbuffer_circular): ... this. Only handle
16189 'QTBuffer:circular:'.
16190 (handle_tracepoint_general_set): Adjust.
16191
16192 2012-02-16 Yao Qi <yao@codesourcery.com>
16193
16194 * inferiors.c: Move code to ...
16195 * dll.c: .... here. New.
16196 * server.h: Declare clear_dlls.
16197 * Makefile.in (SFILES): Add dll.c.
16198 (OBS): Add dll.o
16199 (dll.o): New rule.
16200
16201 2012-02-11 Yao Qi <yao@codesourcery.com>
16202
16203 * server.c: (handle_monitor_command): Add a new parameter
16204 `own_buf'.
16205 (handle_query): Update caller.
16206
16207 2012-02-09 Joel Brobecker <brobecker@adacore.com>
16208
16209 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
16210 * configure, config.in: Regenerate.
16211 * hostio.c: Provide an alternate implementation if HAVE_READLINK
16212 is not defined.
16213
16214 2012-02-02 Pedro Alves <palves@redhat.com>
16215
16216 Try SIGKILL first, then PTRACE_KILL.
16217 * linux-low.c (linux_kill_one_lwp): New.
16218 (linux_kill_one_lwp): Rename to ...
16219 (kill_one_lwp_callback): ... this. Use the new
16220 linux_kill_one_lwp.
16221
16222 2012-02-02 Pedro Alves <palves@redhat.com>
16223
16224 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
16225 inferior.
16226
16227 2012-01-27 Pedro Alves <palves@redhat.com>
16228
16229 * linux-low.c (linux_child_pid_to_exec_file): Delete.
16230 (elf_64_file_p): Make static.
16231 (linux_pid_exe_is_elf_64_file): New.
16232 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
16233 Delete declarations.
16234 (linux_pid_exe_is_elf_64_file): Declare.
16235 * linux-x86-low.c (x86_arch_setup): Use
16236 linux_pid_exe_is_elf_64_file.
16237
16238 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16239
16240 * linux-low.c (linux_wait_for_event_1): Rename to ...
16241 (linux_wait_for_event): ... here and merge it with former
16242 linux_wait_for_event - new variable wait_ptid, use it.
16243 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
16244
16245 2012-01-23 Pedro Alves <palves@redhat.com>
16246
16247 * server.c (main): Avoid yet another case of infinite loop while
16248 detaching/killing after a longjmp.
16249
16250 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16251
16252 Code cleanup.
16253 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
16254
16255 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
16256
16257 * hostio.c (handle_readlink): New function.
16258 (handle_vFile): Call it to handle "vFile:readlink" packets.
16259
16260 2012-01-20 Pedro Alves <palves@redhat.com>
16261 Ulrich Weigand <ulrich.weigand@linaro.org>
16262
16263 * server.c (handle_v_requests): Only support vAttach and vRun to
16264 start multiple processes when in extended protocol mode.
16265
16266 2012-01-17 Pedro Alves <palves@redhat.com>
16267
16268 * tracepoint.c (initialize_tracepoint): Use mmap instead of
16269 memalign plus mprotect to allocate the scratch buffer.
16270
16271 2012-01-13 Pedro Alves <palves@redhat.com>
16272
16273 * server.c (attach_inferior): Clear `cont_thread'.
16274
16275 2012-01-13 Pedro Alves <palves@redhat.com>
16276
16277 * server.c (main): Avoid infinite loop while detaching/killing
16278 after a longjmp.
16279
16280 2012-01-09 Doug Evans <dje@google.com>
16281
16282 * server.c (start_inferior): Set last_ptid in --wrapper case.
16283
16284 2012-01-06 Yao Qi <yao@codesourcery.com>
16285
16286 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
16287 defined.
16288 [IN_PROCESS_AGENT] (debug_agent): New global variable.
16289
16290 2012-01-04 Yao Qi <yao@codesourcery.com>
16291
16292 * tracepoint.c (cmd_qtdp): Print debug message
16293 for static tracepoint.
16294
16295 2012-01-04 Yao Qi <yao@codesourcery.com>
16296
16297 * tracepoint.c (trace_vdebug): Differentiate debug message
16298 between gdbserver and IPA.
16299
16300 2012-01-03 Yao Qi <yao@codesourcery.com>
16301
16302 * tracepoint.c (tracepoint_was_hit): Don't collect for
16303 static tracepoint.
16304
16305 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16306
16307 * terminal.h: Reformat copyright header.
16308
16309 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16310
16311 * server.c (gdbserver_version): Update copyright year.
16312 * gdbreplay.c (gdbreplay_version): Likewise.
16313
16314 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16315
16316 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16317
16318 Revert:
16319 2011-12-18 Hui Zhu <teawater@gmail.com>
16320 * linux-low.c (linux_create_inferior): Save return value to ret.
16321
16322 2011-12-18 Hui Zhu <teawater@gmail.com>
16323
16324 * linux-low.c (linux_create_inferior): Save return value to ret.
16325
16326 2011-12-16 Doug Evans <dje@google.com>
16327
16328 * linux-low.c (linux_create_inferior): If stdio connection,
16329 redirect stdin from /dev/null, stdout to stderr.
16330 * remote-utils.c (remote_is_stdio): New static global.
16331 (remote_connection_is_stdio): New function.
16332 (remote_prepare): Handle stdio connection.
16333 (remote_open): Ditto.
16334 (remote_close): Don't close stdin for stdio connections.
16335 (read_prim,write_prim): New functions. Replace all calls to
16336 read/write to these.
16337 * server.c (main): Watch for "-" argument. Move call to
16338 remote_prepare before start_inferior.
16339 * server.h (STDIO_CONNECTION_NAME): New macro.
16340 (remote_connection_is_stdio): Declare.
16341
16342 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16343 in debugging output.
16344
16345 2011-12-15 Yao Qi <yao@codesourcery.com>
16346
16347 * tracepoint.c: Include sys/syscall.h.
16348 (gdb_ust_thread): Remove preprocessor conditional.
16349
16350 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16351
16352 * linux-low.c (linux_detach_one_lwp): Call
16353 the_low_target.prepare_to_resume before detaching.
16354
16355 2011-12-14 Yao Qi <yao@codesourcery.com>
16356
16357 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16358 of write.
16359
16360 2011-12-14 Yao Qi <yao@codesourcery.com>
16361
16362 * i386-low.c (i386_low_stopped_data_address): Initialize local
16363 variable `control'.
16364
16365 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16366
16367 PR remote/13492
16368
16369 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16370 DR_CONTROL unless necessary. Extend comments.
16371 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16372 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16373
16374 2011-12-13 Yao Qi <yao@codesourcery.com>
16375
16376 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16377 macros.
16378 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16379
16380 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16381
16382 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16383 Print new debug message for such case.
16384
16385 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16386
16387 Fix overlapping memcpy.
16388 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16389 the read_inferior_memory transfer.
16390 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16391 write_inferior_memory transfer.
16392 (set_fast_tracepoint_jump): New variable buf. Use it for the
16393 read_inferior_memory and write_inferior_memory transfers.
16394 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16395 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16396 Use it for the write_inferior_memory transfer.
16397 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16398 buffers.
16399
16400 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16401
16402 * linux-low.c (fetch_register, store_register): Make code
16403 consistent, fix formatting.
16404
16405 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16406
16407 * linux-low.c (usr_store_inferior_registers): Factor out code
16408 to handle individual registers into...
16409 (store_register): ... this new function.
16410
16411 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16412
16413 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16414 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16415 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16416 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16417 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16418 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16419 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16420 (srv_xmlfiles): Add new XML files.
16421
16422 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16423 and <sys/uio.h>.
16424 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16425 (init_registers_s390_linux32v1): Add prototype.
16426 (init_registers_s390_linux32v2): Likewise.
16427 (init_registers_s390_linux64v1): Likewise.
16428 (init_registers_s390_linux64v2): Likewise.
16429 (init_registers_s390x_linux64v1): Likewise.
16430 (init_registers_s390x_linux64v2): Likewise.
16431 (s390_num_regs): Increment to 52.
16432 (s390_regmap): Add orig_r2 register.
16433 (s390_num_regs_3264): Increment to 68.
16434 (s390_regmap_3264): Add orig_r2 register.
16435 (s390_collect_ptrace_register): Handle orig_r2 register.
16436 (s390_supply_ptrace_register): Likewise.
16437 (s390_fill_last_break): New function.
16438 (s390_store_last_break): Likewise.
16439 (s390_fill_system_call): New function.
16440 (s390_store_system_call): Likewise.
16441 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16442 register sets.
16443 (s390_check_regset): New function.
16444 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16445 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16446 Update target_regsets for available register sets.
16447
16448 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16449 Jan Kratochvil <jan.kratochvil@redhat.com>
16450
16451 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16452 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16453 New.
16454 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16455 * linux-low.h (struct process_info_private): New member r_debug.
16456 * server.c (handle_qxfer_libraries): Call
16457 the_target->qxfer_libraries_svr4.
16458 (handle_qxfer_libraries_svr4): New function.
16459 (qxfer_packets): New entry "libraries-svr4".
16460 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16461 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16462 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16463 PACKET_qXfer_libraries_svr4.
16464
16465 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16466
16467 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16468 PSW address/mask between 8-byte and 16-byte formats.
16469 (s390_supply_ptrace_register): Likewise.
16470 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16471 basic addressing mode bit.
16472
16473 2011-11-24 Stan Shebs <stan@codesourcery.com>
16474
16475 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16476
16477 2011-11-17 Stan Shebs <stan@codesourcery.com>
16478
16479 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16480 (tracing_start_time): New global.
16481 (tracing_stop_time): New global.
16482 (tracing_user_name): New global.
16483 (tracing_notes): New global.
16484 (tracing_stop_note): New global.
16485 (cmd_qtstart): Set traceframe_usage, start_time.
16486 (stop_tracing): Set stop_time.
16487 (cmd_qtstatus): Report additional status.
16488 (cmd_qtp): New function.
16489 (handle_tracepoint_query): Call it.
16490 (cmd_qtnotes): New function.
16491 (handle_tracepoint_general_set): Call it.
16492 (get_timestamp): Rename from tsv_get_timestamp.
16493
16494 2011-11-14 Stan Shebs <stan@codesourcery.com>
16495 Kwok Cheung Yeung <kcy@codesourcery.com>
16496
16497 * linux-x86-low.c (small_jump_insn): New.
16498 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16499 trampoline and error message, build a trampoline and issue a small
16500 jump instruction to it.
16501 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16502 trampoline and error message.
16503 (x86_get_min_fast_tracepoint_insn_len): New.
16504 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16505 * linux-low.h (struct linux_target_ops): Add arguments to
16506 install_fast_tracepoint_jump_pad operation, add new operation.
16507 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16508 arguments.
16509 (linux_get_min_fast_tracepoint_insn_len): New function.
16510 (linux_target_op): Add new operation.
16511 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16512 (gdb_trampoline_buffer_end): Ditto.
16513 (gdb_trampoline_buffer_error): Ditto.
16514 (struct ipa_sym_addresses): Add fields for new IPA variables.
16515 (symbol_list): Add entries for new IPA variables.
16516 (struct tracepoint): Add fields to hold the address range of the
16517 trampoline used by the tracepoint.
16518 (trampoline_buffer_head): New static variable.
16519 (trampoline_buffer_tail): Ditto.
16520 (claim_trampoline_space): New function.
16521 (have_fast_tracepoint_trampoline_buffer): New function.
16522 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16523 structure.
16524 (install_fast_tracepoint): Ditto, also add error buffer argument.
16525 (cmd_qtminftpilen): New function.
16526 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16527 (fast_tracepoint_from_trampoline_address): New function.
16528 (fast_tracepoint_collecting): Handle trampoline as part of jump
16529 pad space.
16530 (set_trampoline_buffer_space): New function.
16531 (initialize_tracepoint): Initialize new IPA variables.
16532 * target.h (struct target_ops): Add arguments to
16533 install_fast_tracepoint_jump_pad operation, add new
16534 get_min_fast_tracepoint_insn_len operation.
16535 (target_get_min_fast_tracepoint_insn_len): New.
16536 (install_fast_tracepoint_jump_pad): Add arguments.
16537 * server.h (IPA_BUFSIZ): Define.
16538 * linux-i386-ipa.c: Include extra header files.
16539 (initialize_fast_tracepoint_trampoline_buffer): New function.
16540 (initialize_low_tracepoint): Call it.
16541 * server.h (set_trampoline_buffer_space): Declare.
16542 (claim_trampoline_space): Ditto.
16543 (have_fast_tracepoint_trampoline_buffer): Ditto.
16544
16545 2011-11-14 Yao Qi <yao@codesourcery.com>
16546
16547 * server.c (handle_query): Handle InstallInTrace for qSupported.
16548 * tracepoint.c (add_tracepoint): Sort list.
16549 (install_tracepoint, download_tracepoint): New.
16550 (cmd_qtdp): Call them to install and download tracepoints.
16551 (sort_tracepoints): Removed.
16552 (cmd_qtstart): Update.
16553
16554 2011-11-14 Yao Qi <yao@codesourcery.com>
16555
16556 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16557 * mem-break.h: Declare.
16558 * tracepoint.c (cmd_qtstart): Move some code to ...
16559 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16560 New.
16561 (download_tracepoints): Move some code to ...
16562 (download_tracepoint_1): ... here. New.
16563
16564 2011-11-08 Yao Qi <yao@codesourcery.com>
16565
16566 * remote-utils.c (relocate_instruction): A comment fix.
16567
16568 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16569
16570 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16571 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16572 dr_status_mirror and dr_control_mirror from debug_reg_state.
16573 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16574 (i386_initial_stuff): Remove use of deleted globals.
16575 (i386_get_thread_context, i386_set_thread_context,
16576 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16577 from debug_reg_state.
16578
16579 2011-11-05 Yao Qi <yao@codesourcery.com>
16580
16581 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16582 address as TPOINT's.
16583
16584 2011-11-02 Stan Shebs <stan@codesourcery.com>
16585
16586 * tracepoint.c (agent_mem_read_string): New function.
16587 (eval_agent_expr): Call it for tracenz.
16588 * server.c (handle_query): Report support for tracenz.
16589
16590 2011-11-02 Yao Qi <yao@codesourcery.com>
16591
16592 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16593
16594 2011-11-02 Yao Qi <yao@codesourcery.com>
16595
16596 * target.h: Fix a typo in comment.
16597
16598 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16599
16600 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16601 clobber the breakpoints' shadows with fast tracepoint jumps.
16602 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16603 * target.c (write_inferior_memory): Also pass MYADDR down to
16604 check_mem_write.
16605
16606 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16607
16608 * configure.ac: Check support for personality routine.
16609 * configure: Regenerate.
16610 * config.in: Likewise.
16611 * linux-low.c: Include <sys/personality.h>.
16612 Define ADDR_NO_RANDOMIZE if necessary.
16613 (linux_create_inferior): Disable address space randomization when
16614 forking inferior, if requested.
16615 (linux_supports_disable_randomization): New function.
16616 (linux_target_ops): Install it.
16617 * server.h (disable_randomization): Declare.
16618 * server.c (disable_randomization): New global variable.
16619 (handle_general_set): Handle QDisableRandomization.
16620 (handle_query): Likewise for qSupported.
16621 (main): Support --disable-randomization and --no-disable-randomization
16622 command line arguments.
16623 * target.h (struct target_ops): Add supports_disable_randomization.
16624 (target_supports_disable_randomization): New macro.
16625
16626 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16627
16628 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16629 ifdef check.
16630 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16631 [!PT_GETDSBT] (target_loadmap): New definition.
16632 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16633 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16634 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16635 and PT_GETDSBT to LINUX_LOADMAP.
16636 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16637 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16638
16639 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16640
16641 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16642 (arm_linux_hwbp_cap): New static variable.
16643 (arm_linux_get_hwbp_cap): Replace by ...
16644 (arm_linux_init_hwbp_cap): ... this new function.
16645 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16646 (arm_linux_get_hw_watchpoint_count): Likewise.
16647 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16648 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16649 (arm_prepare_to_resume): Use perror_with_name instead of error.
16650
16651 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16652
16653 * linux-arm-low.c: Include <signal.h>.
16654 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16655 (struct arm_linux_hwbp_cap): New data type.
16656 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16657 (struct arm_linux_hw_breakpoint): New data type.
16658 (MAX_BPTS, MAX_WPTS): Define.
16659 (struct arch_process_info, struct arch_lwp_info): New data types.
16660 (arm_linux_get_hwbp_cap): New function.
16661 (arm_linux_get_hw_breakpoint_count): Likewise.
16662 (arm_linux_get_hw_watchpoint_count): Likewise.
16663 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16664 (arm_hwbp_control_initialize): Likewise.
16665 (arm_hwbp_control_is_enabled): Likewise.
16666 (arm_hwbp_control_is_initialized): Likewise.
16667 (arm_hwbp_control_disable): Likewise.
16668 (arm_linux_hw_breakpoint_equal): Likewise.
16669 (arm_linux_hw_point_initialize): Likewise.
16670 (struct update_registers_data): New data structure.
16671 (update_registers_callback: New function.
16672 (arm_insert_point): Likewise.
16673 (arm_remove_point): Likewise.
16674 (arm_stopped_by_watchpoint): Likewise.
16675 (arm_stopped_data_address): Likewise.
16676 (arm_new_process): Likewise.
16677 (arm_new_thread): Likewise.
16678 (arm_prepare_to_resume): Likewise.
16679 (the_low_target): Register arm_insert_point, arm_remove_point,
16680 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16681 arm_new_thread, and arm_prepare_to_resume.
16682
16683 2011-09-15 Stan Shebs <stan@codesourcery.com>
16684
16685 * server.h (struct emit_ops): Add compare-goto fields.
16686 * tracepoint.c (gdb_agent_op_sizes): New table.
16687 (emit_eq_goto): New function.
16688 (emit_ne_goto): New function.
16689 (emit_lt_goto): New function.
16690 (emit_le_goto): New function.
16691 (emit_gt_goto): New function.
16692 (emit_ge_goto): New function.
16693 (is_goto_target): New function.
16694 (compile_bytecodes): Recognize special cases of compare-goto
16695 combinations and call specialized emitters for them.
16696 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16697 (amd64_emit_ne_goto): New function.
16698 (amd64_emit_lt_goto): New function.
16699 (amd64_emit_le_goto): New function.
16700 (amd64_emit_gt_goto): New function.
16701 (amd64_emit_ge_goto): New function.
16702 (amd64_emit_ops): Add the new functions.
16703 (i386_emit_eq_goto): New function.
16704 (i386_emit_ne_goto): New function.
16705 (i386_emit_lt_goto): New function.
16706 (i386_emit_le_goto): New function.
16707 (i386_emit_gt_goto): New function.
16708 (i386_emit_ge_goto): New function.
16709 (i386_emit_ops): Add the new functions.
16710
16711 2011-09-08 Stan Shebs <stan@codesourcery.com>
16712
16713 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16714 (i386_emit_epilogue): Restore %ebx.
16715
16716 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16717
16718 * server.c (step_thread): Remove definition.
16719 (process_serial_event): Don't handle Hs.
16720 * server.h (step_thread): Remove declaration.
16721 * target.c (set_desired_inferior): Remove use of step_thread.
16722
16723 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16724
16725 * linux-low.c: Include linux-procfs.h.
16726 (linux_attach_lwp_1): Update comments.
16727 (linux_attach): Scan for existing threads when attaching to a
16728 process that is the tgid.
16729 * Makefile.in: Update dependencies.
16730
16731 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16732
16733 * configure.srv: Add linux-procfs.o dependencies.
16734
16735 2011-08-14 Yao Qi <yao@codesourcery.com>
16736
16737 * target.h (struct target_ops): Fix indent.
16738 * win32-low.c (win32_target_ops): Fix comment.
16739
16740 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16741 Yao Qi <yao@codesourcery.com>
16742
16743 * Makefile.in (clean): Remove tic6x-*.c files.
16744 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16745 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16746 (tic6x-c64xp-linux.c): Likewise.
16747 * configure.srv: Add support for tic6x-*-uclinux.
16748 * linux-tic6x-low.c: New.
16749 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16750
16751 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16752 Yao Qi <yao@codesourcery.com>
16753
16754 * target.h (struct target_ops): Add read_loadmap.
16755 * linux-low.c (struct target_loadseg): New type.
16756 (struct target_loadmap): New type.
16757 (linux_read_loadmap): New function.
16758 (linux_target_ops): Add linux_read_loadmap.
16759 * server.c (handle_query): Support qXfer:fdpic:read packet.
16760 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16761 to NULL.
16762
16763 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16764
16765 * win32-low.c: Include <stdint.h>.
16766
16767 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16768
16769 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16770 to the inferior here.
16771 (i386_remove_aligned_watchpoint): Ditto.
16772 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16773 fit part of the watchpoint in the debug registers.
16774 (i386_update_inferior_debug_regs): New.
16775 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16776 registers, and only update the inferior on success.
16777 (i386_low_remove_watchpoint): Ditto.
16778
16779 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16780
16781 * linux-low.c (compare_ints, unique, list_threads, show_process,
16782 linux_core_of_thread): Delete.
16783 (linux_target_ops): Change linux_core_of_thread to
16784 linux_common_core_of_thread.
16785 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16786 * utils.c (malloc_failure): Change type of argument.
16787 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16788 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16789 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16790 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16791 (IPA_OBJS): Add common-utils-ipa.o.
16792 (ptid_h, linux_osdata_h): New macros.
16793 (server_h): Add common/common-utils.h, common/xml-utils.h,
16794 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16795 common/ptid.h.
16796 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16797 ptid.o, buffer.o): New rules.
16798 (linux-low.o): Add common/linux-osdata.h as a dependency.
16799 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16800 * configure.ac: Add AC_HEADER_DIRENT check.
16801 * config.in: Regenerate.
16802 * configure: Regenerate.
16803 * remote-utils.c (xml_escape_text): Delete.
16804 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16805 buffer_xml_printf): Move to common/buffer.c.
16806 * server.c (main): Remove call to initialize_inferiors.
16807 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16808 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16809 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16810 internal_error, gdb_assert, gdb_assert_fail): Delete.
16811 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16812 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16813 common/buffer.h.
16814 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16815 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16816 initialize_inferiors): Delete.
16817
16818 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16819
16820 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16821 symbol error.
16822
16823 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16824
16825 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16826 assertion.
16827 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16828
16829 2011-05-26 Yao Qi <yao@codesourcery.com>
16830
16831 * Makefile.in (thread-db.o): Track dependence to
16832 common/gdb_thread_db.h.
16833 * thread-db.c: include gdb_thread_db.h from right place.
16834
16835 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16836
16837 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16838 __FILE__ and __LINE__ to internal_error.
16839
16840 2011-05-13 Doug Evans <dje@google.com>
16841
16842 * thread-db.c (try_thread_db_load_from_sdir): New function.
16843 (try_thread_db_load_from_dir): New function.
16844 (thread_db_load_search): Handle $sdir, ignore $pdir.
16845 Remove trying of system directories if search of
16846 libthread-db-search-path fails, that is now done via $sdir.
16847
16848 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16849
16850 * server.c (handle_query): Add EnableDisableTracepoints to the list
16851 of supported features.
16852 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16853 tracepoints.
16854 (cmd_qtenable_disable): New.
16855 (cmd_qtstart): Install tracepoints even if disabled.
16856 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16857 receiving a QTEnable or QTDisable packet.
16858 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16859 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16860 tracepoints.
16861 (gdb_probe): Skip data collection if static tracepoint is disabled.
16862
16863 2011-05-10 Doug Evans <dje@google.com>
16864
16865 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16866
16867 2011-05-04 Doug Evans <dje@google.com>
16868
16869 * linux-low.c (linux_join): Skip process lookup.
16870 * spu-low.c (spu_join): Ditto.
16871 * server.c (join_inferiors_callback): Delete.
16872 (process_serial_event): For 'D' packet (detach) call join_inferior
16873 directly.
16874
16875 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16876
16877 * README: Don't mention xscale*-*-linux*.
16878 * configure.srv (xscale*-*-linux*): Don't handle target.
16879
16880 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16881
16882 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16883 casting pointers.
16884 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16885 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16886 (i386_emit_void_call_2): Likewise.
16887
16888 2011-04-26 Yao Qi <yao@codesourcery.com>
16889
16890 * linux-low.c: Move common macros to linux-ptrace.h.
16891 Include linux-ptrace.h.
16892 * Makefile.in (linux_ptrace_h): New.
16893 (linux-low.o): Depends on linux-ptrace.h.
16894
16895 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16896
16897 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16898 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16899 (remote_prepare): New function with most of the TCP code from ...
16900 (remote_open): ... here. Detect PORT here unconditionally. Move also
16901 setting transport_is_reliable.
16902 * server.c (run_once): New variable.
16903 (gdbserver_usage): Document it.
16904 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16905 the first run if RUN_ONCE.
16906 * server.h (run_once, remote_prepare): New declarations.
16907
16908 2011-04-19 Tom Tromey <tromey@redhat.com>
16909
16910 * win32-low.c (handle_load_dll): Remove duplicate "the".
16911
16912 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16913
16914 Remove support for old Cygwin 1.5 versions.
16915 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16916 function to avoid warning.
16917 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16918 warning.
16919
16920 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16921
16922 * gdbserver/server.h (Macro _): Define it if not available.
16923
16924 2011-03-14 Michael Snyder <msnyder@vmware.com>
16925
16926 * hostio.c (handle_close): Remove unnecessary null test.
16927
16928 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16929
16930 * Makefile.in (maintainer-clean realclean distclean): Remove
16931 "make ... subdir_do" command.
16932
16933 2011-03-10 Michael Snyder <msnyder@vmware.com>
16934
16935 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16936
16937 * server.c (handle_v_run): Free alloced buffer on early return.
16938
16939 2011-03-09 Yao Qi <yao@codesourcery.com>
16940
16941 Revert:
16942 2011-03-04 Yao Qi <yao@codesourcery.com>
16943
16944 * Makefile.in: Remove GNU make feature --directory.
16945
16946 2011-03-05 Yao Qi <yao@codesourcery.com>
16947
16948 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16949 (subdir_do): New make target. Copied from gdb/Makefile.
16950 (maintainer-clean, realclean, distclean, clean): Call corresponding
16951 make targets in common/Makefile.
16952
16953 2011-02-11 Yao Qi <yao@codesourcery.com>
16954
16955 * configure.ac: Call AC_PROG_RANLIB.
16956 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16957 * configure: Regenerate.
16958
16959 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16960
16961 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16962
16963 2011-03-06 Yao Qi <yao@codesourcery.com>
16964
16965 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16966
16967 2011-03-05 Yao Qi <yao@codesourcery.com>
16968
16969 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16970 (subdir_do): New make target. Copied from gdb/Makefile.
16971 (maintainer-clean, realclean, distclean, clean): Call corresponding
16972 make targets in common/Makefile.
16973
16974 2011-03-04 Yao Qi <yao@codesourcery.com>
16975
16976 * Makefile.in: Remove GNU make feature --directory.
16977
16978 2011-03-04 Michael Snyder <msnyder@vmware.com>
16979
16980 * server.c (queue_stop_reply): Call xmalloc not malloc.
16981
16982 2011-03-02 Michael Snyder <msnyder@vmware.com>
16983
16984 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16985
16986 2011-02-28 Michael Snyder <msnyder@vmware.com>
16987
16988 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16989 (cmd_qtframe): Ditto.
16990 (cmd_qtbuffer): Ditto.
16991 (cmd_bigqtbuffer): Ditto.
16992
16993 * utils.c (decimal2str): Initialize 'width' to nine, then
16994 don't mess with it.
16995
16996 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16997
16998 * hostio.c (require_data): Free *data, not data.
16999
17000 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17001
17002 * hostio.c (require_data): Use free, not xfree.
17003
17004 2011-02-27 Michael Snyder <msnyder@vmware.com>
17005
17006 * server.c (handle_query): Discard unused value.
17007
17008 * hostio.c (require_data): Free malloc memory before returning
17009 error.
17010
17011 2011-02-26 Michael Snyder <msnyder@vmware.com>
17012
17013 * linux-low.c (list_threads): Call closedir for dirent.
17014
17015 2011-02-27 Michael Snyder <msnyder@vmware.com>
17016
17017 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
17018 a case statement falls through.
17019
17020 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
17021
17022 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
17023 in comparison.
17024
17025 2011-02-26 Michael Snyder <msnyder@vmware.com>
17026
17027 * utils.c (decimal2str): Eliminate dead code and dead param.
17028 (pulongest): Drop dead param from call to decimal2str.
17029 (plongest): Ditto.
17030
17031 2011-02-24 Joel Brobecker <brobecker@adacore.com>
17032
17033 Revert the following patch (not approved yet):
17034 2011-02-21 Hui Zhu <teawater@gmail.com>
17035 * tracepoint.c (tp_printf): New function.
17036 (eval_agent_expr): Handle gdb_agent_op_printf.
17037
17038 2011-02-21 Hui Zhu <teawater@gmail.com>
17039
17040 * tracepoint.c (tp_printf): New function.
17041 (eval_agent_expr): Handle gdb_agent_op_printf.
17042
17043 2011-02-18 Tom Tromey <tromey@redhat.com>
17044
17045 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
17046 (tracepoint.o): Likewise.
17047 * tracepoint.c (enum gdb_agent_op): Use ax.def.
17048 (gdb_agent_op_names): Likewise.
17049
17050 2011-02-18 Tom Tromey <tromey@redhat.com>
17051
17052 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
17053 gdb_agent_op_rot>: New constants.
17054 (gdb_agent_op_names): Add pick and roll.
17055 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
17056 cases.
17057
17058 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
17059
17060 * aclocal.m4: Regenerated with aclocal-1.11.1.
17061
17062 2011-02-14 Pedro Alves <pedro@codesourcery.com>
17063
17064 * server.c (handle_qxfer_traceframe_info): New.
17065 (qxfer_packets): Register "traceframe-info".
17066 (handle_query): Report support for qXfer:traceframe-info:read+.
17067 * tracepoint.c (match_blocktype): New.
17068 (traceframe_find_block_type): Rename to ...
17069 (traceframe_walk_blocks): ... this. Add callback filter argument,
17070 and use it.
17071 (traceframe_find_block_type): New, reimplemented on top of
17072 traceframe_walk_blocks.
17073 (build_traceframe_info_xml): New.
17074 (traceframe_read_info): New.
17075 * server.h (traceframe_read_info): Declare.
17076
17077 2011-02-11 Yao Qi <yao@codesourcery.com>
17078
17079 * configure.ac: Call AC_PROG_RANLIB.
17080 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
17081 * configure: Regenerate.
17082
17083 2011-02-07 Pedro Alves <pedro@codesourcery.com>
17084
17085 * server.c (gdb_read_memory): Change return semantics to allow
17086 partial transfers.
17087 (handle_search_memory_1): Adjust.
17088 (process_serial_event) <'m' packet>: Handle partial transfers.
17089 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
17090
17091 2011-01-28 Pedro Alves <pedro@codesourcery.com>
17092
17093 * regcache.c (init_register_cache): Initialize
17094 regcache->register_status.
17095 (free_register_cache): Release regcache->register_status.
17096 (regcache_cpy): Copy register_status.
17097 (registers_to_string): Print 'x's for unavailable registers.
17098 (supply_register): Mark the register's status valid or
17099 unavailable, depending on whether a buffer was passed in or not.
17100 (supply_register_zeroed): New.
17101 (supply_regblock): Mark the registers' status valid or
17102 unavailable, depending on whether a buffer was passed in or not.
17103 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
17104 (struct regcache): New `register_status' field.
17105 (supply_register_zeroed): Declare.
17106 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
17107 supply_register_zeroed, rather than passing a NULL buffer to
17108 supply_register.
17109 * tracepoint.c (fetch_traceframe_registers): Update comment.
17110
17111 2011-01-28 Pedro Alves <pedro@codesourcery.com>
17112
17113 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
17114 buffer explicit.
17115
17116 2011-01-25 Pedro Alves <pedro@codesourcery.com>
17117
17118 * server.h (decode_xfer_write): Change prototype.
17119 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
17120 and don't extract the annex here.
17121 * server.c (decode_xfer_read): Remove `annex' parameter,
17122 and don't extract the annex here.
17123 (decode_xfer): New.
17124 (struct qxfer): New.
17125 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
17126 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
17127 (handle_qxfer_statictrace): New functions, abstracted out from
17128 handle_query, and made to use the struct qxfer interface.
17129 (handle_threads_qxfer_proper): Rename to ...
17130 (handle_qxfer_threads_proper): ... this.
17131 (handle_threads_qxfer): Rename to ...
17132 (handle_qxfer_threads): ... this. Adjust.
17133 (qxfer_packets): New array.
17134 (handle_qxfer): New function.
17135 (handle_query): Use handle_qxfer.
17136
17137 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
17138
17139 * gdbreplay.c: Shorten lines of >= 80 columns.
17140 * linux-low.c: Ditto.
17141 * linux-ppc-low.c: Ditto.
17142 * linux-s390-low.c: Ditto.
17143 * linux-sparc-low.c: Ditto.
17144 * linux-x86-low.c: Ditto.
17145 * linux-xtensa-low.c: Ditto.
17146 * mem-break.c: Ditto.
17147 * nto-low.c: Ditto.
17148 * regcache.h: Ditto.
17149 * remote-utils.c: Ditto.
17150 * server.c: Ditto.
17151 * server.h: Ditto.
17152 * thread-db.c: Ditto.
17153 * tracepoint.c: Ditto.
17154 * utils.c: Ditto.
17155 * win32-low.h: Ditto.
17156
17157 2011-01-05 Joel Brobecker <brobecker@adacore.com>
17158
17159 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
17160 update.
17161
17162 2011-01-01 Joel Brobecker <brobecker@adacore.com>
17163
17164 * server.c (gdbserver_version): Update copyright year in version
17165 output.
17166 * gdbreplay.c (gdbreplay_version): Ditto.
17167
17168 2010-12-29 Jie Zhang <jie.zhang@analog.com>
17169
17170 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
17171 * linux-bfin-low.c: New file.
17172 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
17173 PT_DATA_ADDR for BFIN targets.
17174 * Makefile.in (SFILES): Add linux-bfin-low.c.
17175 (clean): Remove reg-bfin.c.
17176 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
17177 * README: Mention supported Blackfin targets.
17178
17179 2010-12-23 Mike Frysinger <vapier@gentoo.org>
17180
17181 * .gitignore: New file.
17182
17183 2010-11-16 Mike Frysinger <vapier@gentoo.org>
17184
17185 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
17186
17187 2010-10-22 Jie Zhang <jie@codesourcery.com>
17188
17189 * Makefile.in: Add FLAGS_TO_PASS variable.
17190 (install): Remove dependency of install-only and recursively
17191 invoke make for install-only.
17192
17193 2010-10-04 Doug Evans <dje@google.com>
17194
17195 * Makefile.in (uninstall): Use $(DESTDIR).
17196
17197 2010-09-24 Pedro Alves <pedro@codesourcery.com>
17198
17199 PR gdb/11842
17200
17201 * linux-x86-low.c (compat_siginfo_from_siginfo)
17202 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
17203 si_code is < 0. Check for si_code == SI_TIMER before checking for
17204 si_code < 0.
17205
17206 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17207
17208 * lynx-i386-low.c: New file.
17209 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
17210
17211 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17212
17213 * lynx-low.c (ptrace_request_to_str): Remove handling for
17214 request values that have been removed in LynxOS 5.x.
17215
17216 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17217
17218 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
17219 <ptrace.h>
17220
17221 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
17222
17223 * configure.ac: Add --enable-inprocess-agent option.
17224 * configure: Rebuilt.
17225
17226 2010-09-06 Yao Qi <yao@codesourcery.com>
17227
17228 * linux-low.c (linux_kill): Remove unused variable.
17229 (linux_stabilize_threads): Likewise.
17230 * server.c (start_inferior): Likewise.
17231 (queue_stop_reply_callback): Likewise.
17232 * tracepoint.c (do_action_at_tracepoint): Likewise.
17233
17234 2010-09-06 Yao Qi <yao@codesourcery.com>
17235
17236 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
17237 on return.
17238
17239 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
17240
17241 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
17242
17243 2010-09-06 Pedro Alves <pedro@codesourcery.com>
17244
17245 * Makefile.in (install-only): Replace $IPA_DEPFILES with
17246 "$(IPA_DEPFILES)".
17247
17248 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17249
17250 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
17251 gdbserver/lynx-ppc-low.c: New files.
17252 * Makefile.in (lynx_low_h): New variable.
17253 (lynx-low.o, lynx-ppc-low.o): New rules.
17254 * configure.ac: On LynxOS, link with -lnetinet.
17255 * configure.srv: Add handling of powerpc-*-lynxos* targets.
17256 * configure: regenerate.
17257
17258 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17259
17260 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
17261 * configure.ac: Add check for vasprintf and vsnprintf.
17262 * configure, config.in: Regenerate.
17263 * server.h (vasprintf, vsnprintf): Add conditional declarations.
17264
17265 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17266
17267 * gdbreplay.c: Move include of alloca.h up, next to include of
17268 malloc.h.
17269 * server.h: Add include of malloc.h.
17270 * mem-break.c: Remove include of malloc.h.
17271 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
17272
17273 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17274
17275 * Makefile.in (memmem.o): Build with -Wno-error.
17276
17277 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17278
17279 * utils.c (xsnprintf): Make non-static.
17280 * server.h: Add xsnprintf declaration.
17281 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
17282 replace calls to snprintf by calls to xsnprintf throughout.
17283
17284 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17285
17286 * configure.ac: Add configure check for alloca.
17287 * configure, config.in: Regenerate.
17288 * server.h: Include alloca.h if it exists.
17289 * gdbreplay.c: Include alloca.h if it exists.
17290
17291 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17292
17293 * linux-low.c (__SIGRTMIN): Define if not already defined.
17294 (linux_create_inferior): Check for __ANDROID__ rather than
17295 __SIGRTMIN.
17296 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17297 are already deferred.
17298 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17299 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17300 stopped and already has a pending signal to report.
17301 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17302 a pending signal to report or is moving out of a jump pad.
17303 (linux_init_signals): Check for __ANDROID__ rather than
17304 __SIGRTMIN.
17305
17306 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17307
17308 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17309 debug_threads check. Avoid a linear search when not doing debug
17310 output.
17311
17312 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17313
17314 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17315 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17316 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17317 (process_event): Change local fd's type to gdb_fildes_t.
17318 (create_file_handler): Adjust prototype.
17319 (delete_file_handler): Adjust prototype.
17320 (handle_file_event): Adjust prototype. Use pfildes.
17321 (create_file_event): Adjsut prototype.
17322 * remote-utils.c (remote_desc, listen_desc): Change type to
17323 gdb_fildes_t.
17324 * server.h: New gdb_fildes_t typedef.
17325 [USE_WIN32API]: Include winsock2.h.
17326 (delete_file_handler, add_file_handler): Adjust prototypes.
17327 (pfildes): Declare.
17328 * utils.c (pfildes): New.
17329
17330 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17331
17332 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17333 * configure: Regenerate.
17334
17335 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17336
17337 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17338 (linux_done_accessing_memory): ... this.
17339 (linux_target_ops): Adjust.
17340 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17341 * nto-low.c (nto_target_ops): Adjust comment.
17342 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17343 * spu-low.c (spu_target_ops): Adjust comment.
17344 * target.h (target_ops): Rename unprepare_to_access_memory field
17345 to done_accessing_memory.
17346 (unprepare_to_access_memory): Rename to ...
17347 (done_accessing_memory): ... this.
17348
17349 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17350
17351 * linux-low.c (linux_prepare_to_access_memory): New.
17352 (linux_unprepare_to_access_memory): New.
17353 (linux_target_ops): Install them.
17354 * server.c (read_memory): Rename to ...
17355 (gdb_read_memory): ... this. Use
17356 prepare_to_access_memory/prepare_to_access_memory.
17357 (write_memory): Rename to ...
17358 (gdb_write_memory): ... this. Use
17359 prepare_to_access_memory/prepare_to_access_memory.
17360 (handle_search_memory_1): Adjust.
17361 (process_serial_event): Adjust.
17362 * target.h (struct target_ops): New fields
17363 prepare_to_access_memory and unprepare_to_access_memory.
17364 (prepare_to_access_memory, unprepare_to_access_memory): New.
17365 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17366 prepare_to_access_memory/prepare_to_access_memory.
17367 * nto-low.c (nto_target_ops): Adjust.
17368 * spu-low.c (spu_target_ops): Adjust.
17369 * win32-low.c (win32_target_ops): Adjust.
17370
17371 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17372
17373 * Makefile.in (WARN_CFLAGS): Get it from configure.
17374 (WERROR_CFLAGS): New.
17375 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17376 * configure.ac: Introduce --enable-werror, which adds -Werror to
17377 the compiler command line. Enabled by default. Disable with
17378 --disable-werror. Add -Wdeclaration-after-statement
17379 Wpointer-arith and -Wformat-nonliteral to warning flags.
17380 * configure: Regenerate.
17381
17382 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17383
17384 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17385
17386 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17387
17388 * gdbreplay.c (remote_error): New.
17389 (gdbchar): New.
17390 (expect): Use gdbchar. Check for error reading from GDB.
17391 Clarify sync error output.
17392 (play): Check for errors writing to GDB.
17393 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17394 * remote-utils.c (getpkt): Check for errors writing to the remote
17395 descriptor.
17396
17397 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17398
17399 * linux-low.c (linux_wait_1): Move non-debugging code out of
17400 `debug_threads' control.
17401
17402 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17403
17404 * linux-low.c (linux_wait_1): Don't set last_status here.
17405 * server.c (push_event, queue_stop_reply_callback): Assert we're
17406 not pushing a TARGET_WAITKIND_IGNORE event.
17407 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17408 (myresume, handle_target_event): Set the thread's last_resume_kind
17409 and last_status from the target returned status.
17410
17411 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17412
17413 PR threads/10729
17414
17415 * linux-x86-low.c (update_debug_registers_callback): New.
17416 (i386_dr_low_set_addr): Use it.
17417 (i386_dr_low_get_addr): New.
17418 (i386_dr_low_set_control): Use update_debug_registers_callback.
17419 (i386_dr_low_get_control): New.
17420 (i386_dr_low_get_status): Adjust.
17421 * linux-low.c (linux_stop_lwp): New.
17422 * linux-low.h (linux_stop_lwp): Declare.
17423
17424 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17425 argument instead of a i386_debug_reg_state.
17426 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17427 a i386_debug_reg_state.
17428 (i386_insert_aligned_watchpoint): Adjust.
17429 (i386_remove_aligned_watchpoint): Adjust.
17430 (i386_low_stopped_data_address): Read the debug registers from the
17431 inferior instead of from the mirrors.
17432 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17433 (i386_dr_low_get_addr): Declare.
17434 (i386_dr_low_get_control): Declare.
17435 (i386_dr_low_get_status): Change prototype.
17436
17437 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17438 (i386_dr_low_get_addr): New.
17439 (i386_dr_low_get_control): New.
17440 (i386_dr_low_get_status): Adjust prototype. Return
17441 dr_status_mirror.
17442 (i386_initial_stuff): Clear dr_status_mirror and
17443 dr_control_mirror.
17444 (i386_get_thread_context): Adjust.
17445 (i386_set_thread_context): Adjust.
17446 (i386_thread_added): Adjust.
17447
17448 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17449
17450 * linux-low.h (linux_thread_area): Delete declaration.
17451
17452 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17453
17454 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17455 after its termination.
17456
17457 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17458
17459 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17460 (gdb_wants_all_stopped): Delete.
17461 (linux_wait_1): Don't call them.
17462 * server.c (handle_v_cont): Tag all threads as want-stopped.
17463 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17464 stopped as "client-wants-stopped".
17465
17466 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17467
17468 * Makefile.in (signals_h): New.
17469 (server_h): Depend on it.
17470 (server.o): Don't depend on $(signals_def).
17471 (signals.o): Depend on $(signals_def).
17472
17473 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17474
17475 * Makefile.in (signals_def): New.
17476 (server_h): Append include/gdb/signals.h and signals_def.
17477 (server.o): Append signals_def.
17478
17479 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17480
17481 * server.c (handle_target_event): Use target_signal_to_host for
17482 resume_info.sig initialization.
17483 * target.h (struct thread_resume) <sig>: New comment.
17484
17485 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17486
17487 * server.c (handle_query): strcpy() the returned string from paddress()
17488 instead of sprintf().
17489 * utils.c (paddress): Return phex_nz().
17490
17491 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17492
17493 * server.c (handle_v_cont): Call mourn_inferior if process
17494 just exited.
17495 (myresume): Likewise.
17496
17497 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17498
17499 Static tracepoints, and integration with UST.
17500
17501 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17502 * mem-break.c (uninsert_all_breakpoints)
17503 (reinsert_all_breakpoints): New.
17504 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17505 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17506 (gdb_agent_ust_loaded, helper_thread_id)
17507 (gdb_agent_helper_thread_id): New macros.
17508 (struct ipa_sym_addresses): Add addr_ust_loaded,
17509 addr_helper_thread_id, addr_cmd_buf.
17510 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17511 (in_process_agent_loaded_ust): New.
17512 (write_e_ust_not_loaded): New.
17513 (maybe_write_ipa_ust_not_loaded): New.
17514 (struct collect_static_trace_data_action): New.
17515 (enum tracepoint_type) <static_tracepoint>: New.
17516 (struct tracepoint) <handle>: Mention static tracepoints.
17517 (struct static_tracepoint_ctx): New.
17518 (CMD_BUF_SIZE): New.
17519 (add_tracepoint_action): Handle static tracepoint actions.
17520 (unprobe_marker_at): New.
17521 (clear_installed_tracepoints): Handle static tracepoints.
17522 (cmd_qtdp): Handle static tracepoints.
17523 (probe_marker_at): New.
17524 (cmd_qtstart): Handle static tracepoints.
17525 (response_tracepoint): Handle static tracepoints.
17526 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17527 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17528 (get_context_regcache): Handle static tracepoints.
17529 (do_action_at_tracepoint): Handle static tracepoint actions.
17530 (traceframe_find_block_type): Handle static trace data blocks.
17531 (traceframe_read_sdata): New.
17532 (download_tracepoints): Download static tracepoint actions.
17533 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17534 (GDB_PROBE_NAME): New.
17535 (ust_ops): New.
17536 (GET_UST_SYM): New.
17537 (USTF): New.
17538 (dlsym_ust): New.
17539 (ust_marker_to_static_tracepoint): New.
17540 (gdb_probe): New.
17541 (collect_ust_data_at_tracepoint): New.
17542 (gdb_ust_probe): New.
17543 (UNIX_PATH_MAX, SOCK_DIR): New.
17544 (gdb_ust_connect_sync_socket): New.
17545 (resume_thread, stop_thread): New.
17546 (run_inferior_command): New.
17547 (init_named_socket): New.
17548 (gdb_ust_socket_init): New.
17549 (cstr_to_hexstr): New.
17550 (next_st): New.
17551 (first_marker, next_marker): New.
17552 (response_ust_marker): New.
17553 (cmd_qtfstm, cmd_qtsstm): New.
17554 (unprobe_marker_at, probe_marker_at): New.
17555 (cmd_qtstmat, gdb_ust_thread): New.
17556 (gdb_ust_init): New.
17557 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17558 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17559 (ST_REGENTRY): New.
17560 (x86_64_st_collect_regmap): New.
17561 (X86_64_NUM_ST_COLLECT_GREGS): New.
17562 (AMD64_RIP_REGNUM): New.
17563 (supply_static_tracepoint_registers): New.
17564 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17565 (ST_REGENTRY): New.
17566 (i386_st_collect_regmap): New.
17567 (i386_NUM_ST_COLLECT_GREGS): New.
17568 (supply_static_tracepoint_registers): New.
17569 * server.c (handle_query): Handle qXfer:statictrace:read.
17570 <qSupported>: Report support for StaticTracepoints, and
17571 qXfer:statictrace:read features.
17572 * server.h (traceframe_read_sdata)
17573 (supply_static_tracepoint_registers): Declare.
17574 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17575 (unpack_varlen_hex): Include in IPA build.
17576 * Makefile.in (ustlibs, ustinc): New.
17577 (IPA_OBJS): Add remote-utils-ipa.o.
17578 ($(IPA_LIB)): Link -ldl and -lpthread.
17579 (UST_CFLAGS): New.
17580 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17581 * config.in, configure: Regenerate.
17582
17583 2010-06-20 Ian Lance Taylor <iant@google.com>
17584 Pedro Alves <pedro@codesourcery.com>
17585
17586 * linux-x86-low.c (always_true): Delete.
17587 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17588 trying to fool the compiler with always_true.
17589
17590 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17591
17592 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17593 conditions in gdbserver.
17594
17595 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17596
17597 * spu-low.c (spu_read_memory): Wrap around local store limit.
17598 (spu_write_memory): Likewise.
17599
17600 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17601
17602 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17603 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17604 LONGEST uses.
17605 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17606 uses.
17607 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17608 uses with LONGEST uses.
17609
17610 2010-06-14 Stan Shebs <stan@codesourcery.com>
17611 Pedro Alves <pedro@codesourcery.com>
17612
17613 Bytecode compiler.
17614
17615 * linux-x86-low.c: Include limits.h.
17616 (add_insns): New.
17617 (always_true): New.
17618 (EMIT_ASM): New.
17619 (EMIT_ASM32): New.
17620 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17621 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17622 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17623 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17624 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17625 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17626 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17627 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17628 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17629 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17630 (amd64_emit_void_call_2): New.
17631 (amd64_emit_ops): New.
17632 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17633 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17634 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17635 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17636 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17637 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17638 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17639 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17640 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17641 (i386_emit_stack_adjust, i386_emit_int_call_1)
17642 (i386_emit_void_call_2): New.
17643 (i386_emit_ops): New.
17644 (x86_emit_ops): New.
17645 (the_low_target): Install x86_emit_ops.
17646 * server.h (struct emit_ops): New.
17647 (get_raw_reg_func_addr): Declare.
17648 (current_insn_ptr, emit_error): Declare.
17649 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17650 (set_trace_state_variable_value): New defines.
17651 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17652 addr_get_trace_state_variable_value and
17653 addr_set_trace_state_variable_value.
17654 (symbol_list): New fields for get_raw_reg,
17655 get_trace_state_variable_value and set_trace_state_variable_value.
17656 (condfn): New typedef.
17657 (struct tracepoint): New field `compiled_cond'.
17658 (do_action_at_tracepoint): Clear compiled_cond.
17659 (get_trace_state_variable_value, set_trace_state_variable_value):
17660 Export in the IPA.
17661 (condition_true_at_tracepoint): If there's a compiled condition,
17662 run that.
17663 (current_insn_ptr, emit_error): New globals.
17664 (struct bytecode_address): New.
17665 (get_raw_reg_func_addr): New.
17666 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17667 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17668 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17669 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17670 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17671 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17672 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17673 (compile_tracepoint_condition, compile_bytecodes): New.
17674 * target.h (emit_ops): Forward declare.
17675 (struct target_ops): New field emit_ops.
17676 (target_emit_ops): New.
17677 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17678 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17679 * linux-low.c (linux_emit_ops): New.
17680 (linux_target_ops): Install it.
17681 * linux-low.h (struct linux_target_ops): New field emit_ops.
17682
17683 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17684
17685 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17686 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17687
17688 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17689 Stan Shebs <stan@codesourcery.com>
17690
17691 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17692 (all): Depend on $(extra_libraries).
17693 (install-only): Install the IPA.
17694 (IPA_OBJS, IPA_LIB): New.
17695 (clean): Remove the IPA lib.
17696 (IPAGENT_CFLAGS): New.
17697 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17698 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17699 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17700 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17701 * configure.ac: Check for atomic builtins support in the compiler.
17702 (IPA_DEPFILES, extra_libraries): Define.
17703 * configure.srv (ipa_obj): Add description.
17704 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17705 (i[34567]86-*-linux*): Set ipa_obj.
17706 (x86_64-*-linux*): Set ipa_obj.
17707 * linux-low.c (stabilizing_threads): New.
17708 (supports_fast_tracepoints): New.
17709 (linux_detach): Stabilize threads before detaching.
17710 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17711 the lwp is either not stabilizing, or is moving out of a jump pad.
17712 (linux_fast_tracepoint_collecting): New.
17713 (maybe_move_out_of_jump_pad): New.
17714 (enqueue_one_deferred_signal): New.
17715 (dequeue_one_deferred_signal): New.
17716 (linux_wait_for_event_1): If moving out of a jump pad, defer
17717 pending signals to later.
17718 (linux_stabilize_threads): New.
17719 (linux_wait_1): Check if threads need moving out of jump pads, and
17720 do it if so.
17721 (stuck_in_jump_pad_callback): New.
17722 (move_out_of_jump_pad_callback): New.
17723 (lwp_running): New.
17724 (linux_resume_one_lwp): Handle moving out of jump pads.
17725 (linux_set_resume_request): Dequeue deferred signals.
17726 (need_step_over_p): Also step over fast tracepoint jumps.
17727 (start_step_over): Also uninsert fast tracepoint jumps.
17728 (finish_step_over): Also reinsert fast tracepoint jumps.
17729 (linux_install_fast_tracepoint_jump): New.
17730 (linux_target_ops): Install linux_stabilize_threads and
17731 linux_install_fast_tracepoint_jump_pad.
17732 * linux-low.h (linux_target_ops) <get_thread_area,
17733 install_fast_tracepoint_jump_pad>: New fields.
17734 (struct lwp_info) <collecting_fast_tracepoint,
17735 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17736 (linux_get_thread_area): Declare.
17737 * linux-x86-low.c (jump_insn): New.
17738 (x86_get_thread_area): New.
17739 (append_insns): New.
17740 (push_opcode): New.
17741 (amd64_install_fast_tracepoint_jump_pad): New.
17742 (i386_install_fast_tracepoint_jump_pad): New.
17743 (x86_install_fast_tracepoint_jump_pad): New.
17744 (the_low_target): Install x86_get_thread_area and
17745 x86_install_fast_tracepoint_jump_pad.
17746 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17747 (struct fast_tracepoint_jump): New.
17748 (fast_tracepoint_jump_insn): New.
17749 (fast_tracepoint_jump_shadow): New.
17750 (find_fast_tracepoint_jump_at): New.
17751 (fast_tracepoint_jump_here): New.
17752 (delete_fast_tracepoint_jump): New.
17753 (set_fast_tracepoint_jump): New.
17754 (uninsert_fast_tracepoint_jumps_at): New.
17755 (reinsert_fast_tracepoint_jumps_at): New.
17756 (set_breakpoint_at): Use write_inferior_memory.
17757 (uninsert_raw_breakpoint): Use write_inferior_memory.
17758 (check_mem_read): Mask out fast tracepoint jumps.
17759 (check_mem_write): Mask out fast tracepoint jumps.
17760 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17761 (set_fast_tracepoint_jump): Declare.
17762 (delete_fast_tracepoint_jump)
17763 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17764 (reinsert_fast_tracepoint_jumps_at): Declare.
17765 * regcache.c: Don't compile many functions when building the
17766 in-process agent library.
17767 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17768 the register buffer in the heap.
17769 (free_register_cache): If the register buffer isn't owned by the
17770 regcache, don't free it.
17771 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17772 pre-existing register caches.
17773 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17774 type.
17775 (convert_ascii_to_int): : Constify `from' parameter type.
17776 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17777 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17778 the needed buffer in-place.
17779 (relocate_instruction): New.
17780 * server.c (handle_query) <qSymbols>: If the target supports
17781 tracepoints, give it a chance of looking up symbols. Report
17782 support for fast tracepoints.
17783 (handle_status): Stabilize threads.
17784 (process_serial_event): Adjust.
17785 * server.h (struct fast_tracepoint_jump): Forward declare.
17786 (struct process_info) <fast_tracepoint_jumps>: New field.
17787 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17788 (decode_X_packet, decode_M_packet): Adjust.
17789 (relocate_instruction): Declare.
17790 (in_process_agent_loaded): Declare.
17791 (tracepoint_look_up_symbols): Declare.
17792 (struct fast_tpoint_collect_status): Declare.
17793 (fast_tracepoint_collecting): Declare.
17794 (force_unlock_trace_buffer): Declare.
17795 (handle_tracepoint_bkpts): Declare.
17796 (initialize_low_tracepoint)
17797 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17798 * target.h (struct target_ops) <stabilize_threads,
17799 install_fast_tracepoint_jump_pad>: New fields.
17800 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17801 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17802 [HAVE_STDINT_H]: Include stdint.h.
17803 (trace_debug_1): Rename to ...
17804 (trace_vdebug): ... this.
17805 (trace_debug): Rename to ...
17806 (trace_debug_1): ... this. Add `level' parameter.
17807 (trace_debug): New.
17808 (ATTR_USED, ATTR_NOINLINE): New.
17809 (IP_AGENT_EXPORT): New.
17810 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17811 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17812 (about_to_request_buffer_space, trace_buffer_is_full)
17813 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17814 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17815 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17816 (traceframe_write_count, traceframes_created)
17817 (trace_state_variables)
17818 New renaming defines.
17819 (struct ipa_sym_addresses): New.
17820 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17821 (symbol_list): New.
17822 (ipa_sym_addrs): New.
17823 (all_tracepoint_symbols_looked_up): New.
17824 (in_process_agent_loaded): New.
17825 (write_e_ipa_not_loaded): New.
17826 (maybe_write_ipa_not_loaded): New.
17827 (tracepoint_look_up_symbols): New.
17828 (debug_threads) [IN_PROCESS_AGENT]: New.
17829 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17830 (UNKNOWN_SIDE_EFFECTS): New.
17831 (stop_tracing): New.
17832 (flush_trace_buffer): New.
17833 (stop_tracing_bkpt): New.
17834 (flush_trace_buffer_bkpt): New.
17835 (read_inferior_integer): New.
17836 (read_inferior_uinteger): New.
17837 (read_inferior_data_pointer): New.
17838 (write_inferior_data_pointer): New.
17839 (write_inferior_integer): New.
17840 (write_inferior_uinteger): New.
17841 (struct collect_static_trace_data_action): Delete.
17842 (enum tracepoint_type): New.
17843 (struct tracepoint) <type>: New field `type'.
17844 <actions_str, step_actions, step_actions_str>: Only include in
17845 GDBserver.
17846 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17847 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17848 (tracepoints): Use IP_AGENT_EXPORT.
17849 (last_tracepoint): Don't include in the IPA.
17850 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17851 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17852 (alloced_trace_state_variables): New.
17853 (trace_state_variables): Use IP_AGENT_EXPORT.
17854 (traceframe_t): Delete unused variable.
17855 (circular_trace_buffer): Don't include in the IPA.
17856 (trace_buffer_start): Delete.
17857 (struct trace_buffer_control): New.
17858 (trace_buffer_free): Delete.
17859 (struct ipa_trace_buffer_control): New.
17860 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17861 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17862 New.
17863 (trace_buffer_ctrl): New.
17864 (TRACE_BUFFER_CTRL_CURR): New.
17865 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17866 Reimplement as macros.
17867 (trace_buffer_wrap): Delete.
17868 (traceframe_write_count, traceframe_read_count)
17869 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17870 (struct tracepoint_hit_ctx) <type>: New field.
17871 (struct fast_tracepoint_ctx): New.
17872 (memory_barrier): New.
17873 (cmpxchg): New.
17874 (record_tracepoint_error): Update atomically in the IPA.
17875 (clear_inferior_trace_buffer): New.
17876 (about_to_request_buffer_space): New.
17877 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17878 updating the same buffer.
17879 (add_tracepoint): Default the tracepoint's type to trap
17880 tracepoint, and orig_size to -1.
17881 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17882 internal variables.
17883 (create_trace_state_variable): New parameter `gdb'. Handle it.
17884 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17885 (cmd_qtdp): Handle fast tracepoints.
17886 (cmd_qtdv): Adjust.
17887 (max_jump_pad_size): New.
17888 (gdb_jump_pad_head): New.
17889 (get_jump_space_head): New.
17890 (claim_jump_space): New.
17891 (sort_tracepoints): New.
17892 (MAX_JUMP_SIZE): New.
17893 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17894 IPA.
17895 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17896 support. Upload fast traceframes, and delete internal IPA
17897 breakpoints.
17898 (stop_tracing_handler): New.
17899 (flush_trace_buffer_handler): New.
17900 (cmd_qtstop): Upload fast tracepoints.
17901 (response_tracepoint): Handle fast tracepoints.
17902 (tracepoint_finished_step): Upload fast traceframes. Set the
17903 tracepoint hit context's tracepoint type.
17904 (handle_tracepoint_bkpts): New.
17905 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17906 type. Add comment about fast tracepoints.
17907 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17908 non-existing action_str field.
17909 (get_context_regcache): Handle fast tracepoints.
17910 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17911 to the regcache.
17912 (fast_tracepoint_from_jump_pad_address): New.
17913 (fast_tracepoint_from_ipa_tpoint_address): New.
17914 (collecting_t): New.
17915 (force_unlock_trace_buffer): New.
17916 (fast_tracepoint_collecting): New.
17917 (collecting): New.
17918 (gdb_collect): New.
17919 (write_inferior_data_ptr): New.
17920 (target_tp_heap): New.
17921 (target_malloc): New.
17922 (download_agent_expr): New.
17923 (UALIGN): New.
17924 (download_tracepoints): New.
17925 (download_trace_state_variables): New.
17926 (upload_fast_traceframes): New.
17927 (IPA_FIRST_TRACEFRAME): New.
17928 (IPA_NEXT_TRACEFRAME_1): New.
17929 (IPA_NEXT_TRACEFRAME): New.
17930 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17931 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17932 (gdb_jump_pad_buffer_end): New.
17933 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17934 (initialize_tracepoint): Adjust.
17935 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17936 buffer. Initialize the low module.
17937 * utils.c (PREFIX, TOOLNAME): New.
17938 (malloc_failure): Use PREFIX.
17939 (error): In the IPA, an error causes an exit.
17940 (fatal, warning): Use PREFIX.
17941 (internal_error): Use TOOLNAME.
17942 (NUMCELLS): Increase to 10.
17943 * configure, config.in: Regenerate.
17944
17945 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17946
17947 * server.c (handle_query) <qSupported>: Do two passes over the
17948 qSupported string to avoid nesting strtok.
17949
17950 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17951
17952 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17953 (CDEPS): New.
17954 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17955 -Wl,--dynamic-list.
17956 * configure: Regenerate.
17957 * proc-service.list: New.
17958
17959 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17960
17961 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17962 New comment.
17963
17964 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17965
17966 * gdbreplay.c (remote_open): Check error return from socket() call by
17967 its equality to -1 not by it being negative.
17968 * remote-utils.c (remote_open): Likewise.
17969
17970 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17971
17972 * config.h: Regenerate.
17973
17974 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17975
17976 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17977 doesn't provide PTRACE_GET_THREAD_AREA.
17978
17979 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17980
17981 * linux-m68k-low.c: Include <asm/ptrace.h>
17982 (ps_get_thread_area): Implement.
17983
17984 2010-05-03 Doug Evans <dje@google.com>
17985
17986 * event-loop.c (struct callback_event): New struct.
17987 (callback_list): New global.
17988 (append_callback_event, delete_callback_event): New functions.
17989 (process_callback): New function.
17990 (start_event_loop): Call it.
17991 * remote-utils.c (NOT_SCHEDULED): Define.
17992 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17993 moved out of readchar.
17994 (readchar): Rewrite. Call reschedule before returning.
17995 (reset_readchar): New function.
17996 (remote_close): Call it.
17997 (process_remaining, reschedule): New functions.
17998 * server.h (callback_handler_func): New typedef.
17999 (append_callback_event, delete_callback_event): Declare.
18000
18001 2010-05-03 Pedro Alves <pedro@codesourcery.com>
18002
18003 * proc-service.c (ps_pglobal_lookup): Use
18004 thread_db_look_up_one_symbol.
18005 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
18006 parameter. Use it instead of all_symbols_looked_up.
18007 * server.h (struct process_info) <all_symbols_looked_up>: Delete
18008 field.
18009 (all_symbols_looked_up): Don't declare.
18010 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
18011 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
18012 field.
18013 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
18014 Set all_symbols_looked_up here.
18015 (thread_db_look_up_one_symbol): New.
18016 (thread_db_get_tls_address): Adjust.
18017 (thread_db_load_search, try_thread_db_load_1): Always allocate the
18018 thread_db object on the heap, and tentatively set it in the
18019 process structure.
18020 (thread_db_init): Don't set all_symbols_looked_up here.
18021 * linux-low.h (thread_db_look_up_one_symbol): Declare.
18022
18023 2010-05-03 Pedro Alves <pedro@codesourcery.com>
18024
18025 * linux-low.c (linux_kill, linux_detach): Adjust.
18026 (status_pending_p_callback): Remove redundant statement. Check
18027 for !TARGET_WAITIKIND_IGNORE, instead of
18028 TARGET_WAITKIND_STOPPED.
18029 (handle_tracepoints): Make sure LWP is locked. Adjust.
18030 (linux_wait_for_event_1): Adjust.
18031 (linux_cancel_breakpoints): New.
18032 (unsuspend_one_lwp): New.
18033 (unsuspend_all_lwps): New.
18034 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
18035 (send_sigstop_callback): Change return type to int, add new
18036 `except' parameter and handle it.
18037 (suspend_and_send_sigstop_callback): New.
18038 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
18039 pass them down. If SUSPEND, also increment the lwp's suspend
18040 count.
18041 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
18042 (need_step_over_p): Don't consider suspended LWPs.
18043 (start_step_over): Adjust.
18044 (proceed_one_lwp): Change return type to int, add new `except'
18045 parameter and handle it.
18046 (unsuspend_and_proceed_one_lwp): New.
18047 (proceed_all_lwps): Use find_inferior instead of
18048 for_each_inferior.
18049 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
18050 also decrement the suspend count of LWPs. Pass `except' down,
18051 instead of hacking its suspend count.
18052 (linux_pause_all): Add `freeze' parameter. Adjust.
18053 (linux_unpause_all): New.
18054 (linux_target_ops): Install linux_unpause_all.
18055 * server.c (handle_status): Adjust.
18056 * target.h (struct target_ops): New fields `unpause_all' and
18057 `cancel_breakpoints'. Add new parameter to `pause_all'.
18058 (pause_all): Add new `freeze' parameter.
18059 (unpause_all): New.
18060 (cancel_breakpoints): New.
18061 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
18062 cancel breakpoints.
18063 (cmd_qtstart): Pause threads.
18064 (stop_tracing): Pause threads, and cancel breakpoints.
18065 * win32-low.c (win32_target_ops): Adjust.
18066
18067 2010-05-03 Pedro Alves <pedro@codesourcery.com>
18068
18069 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
18070 the inferior right away from here...
18071 (linux_wait_1): ... to here, and adjust to check the thread's
18072 last_resume_kind instead of the lwp's step or stop_expected flags.
18073
18074 2010-05-02 Pedro Alves <pedro@codesourcery.com>
18075
18076 * README: Use consistent `GDB' and `GDBserver' spellings.
18077
18078 2010-05-02 Pedro Alves <pedro@codesourcery.com>
18079
18080 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
18081 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
18082 (linux_detach_one_lwp): Assume the lwp is stopped.
18083 (any_thread_of): Delete.
18084 (linux_detach): Stop all lwps here. Don't blindly delete all
18085 breakpoints.
18086 (delete_lwp_callback): New.
18087 (linux_mourn): Delete all lwps of the process that is gone.
18088 (linux_wait_1): Don't delete the last lwp of the process here.
18089 * mem-break.h (mark_breakpoints_out): Declare.
18090 * mem-break.c (mark_breakpoints_out): New.
18091 (free_all_breakpoints): Use it.
18092 * server.c (handle_target_event): If the process is gone, mark
18093 breakpoints out.
18094 * thread-db.c (struct thread_db) <create_bp>: New field.
18095 (thread_db_enable_reporting): Fix prototype. Store a thread event
18096 breakpoint reference in the thread_db struct.
18097 (thread_db_load_search): Clear the thread_db object.
18098 (try_thread_db_load_1): Ditto.
18099 (switch_to_process): New.
18100 (disable_thread_event_reporting): Use it.
18101 (remove_thread_event_breakpoints): New.
18102 (thread_db_detach, thread_db_mourn): Use it.
18103
18104 2010-05-01 Pedro Alves <pedro@codesourcery.com>
18105
18106 * linux-low.c (linux_enable_event_reporting): New.
18107 (linux_wait_for_event_1, handle_extended_wait): Use it.
18108
18109 2010-04-30 Pedro Alves <pedro@codesourcery.com>
18110
18111 * linux-low.c (linux_kill_one_lwp, linux_kill)
18112 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
18113 (send_sigstop): Take an lwp_info as parameter instead. Queue a
18114 SIGSTOP even if the LWP is stopped.
18115 (send_sigstop_callback): New.
18116 (stop_all_lwps): Use send_sigstop_callback instead.
18117 (linux_resume_one_thread): Adjust.
18118 (proceed_one_lwp): Still proceed an LWP that the client has
18119 requested to stop, if we haven't reported it as stopped yet. Make
18120 sure that LWPs the client want stopped, have a pending SIGSTOP.
18121
18122 2010-04-26 Doug Evans <dje@google.com>
18123
18124 * server.c (handle_general_set): Make static.
18125
18126 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
18127 Print received char after testing for error/eof instead of before.
18128 (input_interrupt): Tweak comment.
18129
18130 2010-04-23 Doug Evans <dje@google.com>
18131
18132 * server.c (start_inferior): Print inferior argv if --debug.
18133
18134 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
18135
18136 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
18137 * nto-x86-low.c: Include server.h
18138
18139 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
18140
18141 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
18142 be consistent with other sources of this directory.
18143 (init_registers_amd64): Correct name of source file of this function
18144 in the comment.
18145
18146 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18147
18148 * configure.srv (x86_64-*-mingw*): New configuration for Windows
18149 64-bit executables.
18150
18151 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18152
18153 * win32-i386-low.c: Add 64-bit support.
18154 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
18155 (init_registers_amd64): Declare.
18156 (mappings): Add 64-bit version of array.
18157 (init_windows_x86): New function.
18158 (the_low_target): Change init_arch field to init_windows_x86.
18159
18160 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18161
18162 * win32-low.c: Adapt to support also 64-bit architecture.
18163 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
18164 (get_image_name): Use SIZE_T type for local variable `done'.
18165 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
18166 (toolhelp_get_dll_name): Idem.
18167 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
18168 Use uintptr_t typecast to avoid warning.
18169 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
18170 (handle_exception): Use phex_nz to avoid warning.
18171 (win32_wait): Remove unused local variable `process'.
18172
18173 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18174
18175 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
18176 `amd64-avx.o'.
18177
18178 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
18179
18180 * configure.ac: Use `ws2_32' library for srv_mingw.
18181 * configure: Regenerate.
18182 * gdbreplay.c: Include winsock2.h instead of winsock.h.
18183 * remote-utils.c: Likewise.
18184
18185 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
18186
18187 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
18188 if __x86_64__ is defined.
18189
18190 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18191
18192 * configure: Regenerate.
18193
18194 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18195
18196 * server.c (handle_query): Handle 'qGetTIBAddr' query.
18197 * target.h (target_ops): New get_tib_address field.
18198 * win32-low.h (win32_thread_info): Add thread_local_base field.
18199 * win32-low.c (child_add_thread): Add tlb argument.
18200 Set thread_local_base field to TLB.
18201 (get_child_debug_event): Adapt to child_add_thread change.
18202 (win32_get_tib_address): New function.
18203 (win32_target_ops): Set get_tib_address field to
18204 win32_get_tib_address.
18205 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
18206
18207 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18208
18209 * linux-low.c (linux_mourn): Also remove the process.
18210 * server.c (handle_target_event): Don't remove the process here.
18211 * nto-low.c (nto_mourn): New.
18212 (nto_target_ops): Install it.
18213 * spu-low.c (spu_mourn): New.
18214 (spu_target_ops): Install it.
18215 * win32-low.c (win32_mourn): New.
18216 (win32_target_ops): Install it.
18217
18218 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18219
18220 * server.h (buffer_xml_printf): Remove redundant `;'.
18221
18222 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18223
18224 * regcache.c (set_register_cache): Invalidate regcaches before
18225 changing the register cache layout.
18226 (regcache_invalidate_one): Allow a NULL regcache.
18227 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
18228 regcaches before changing the register cache layout or the target
18229 regsets.
18230
18231 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
18232
18233 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
18234 variable warning on Linux/x86-64.
18235
18236 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18237
18238 GDBserver disconnected tracing support.
18239
18240 * linux-low.c (linux_remove_process): Delete.
18241 (add_lwp): Don't set last_resume_kind here.
18242 (linux_kill): Use `mourn'.
18243 (linux_detach): Use `thread_db_detach', and `mourn'.
18244 (linux_mourn): New.
18245 (linux_attach_lwp_1): Adjust comment.
18246 (linux_attach): last_resume_kind moved the thread_info; adjust.
18247 (status_pending_p_callback): Adjust.
18248 (linux_wait_for_event_1): Adjust.
18249 (count_events_callback, select_singlestep_lwp_callback)
18250 (select_event_lwp_callback, cancel_breakpoints_callback)
18251 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
18252 (proceed_one_lwp): Adjust.
18253 (linux_async): Add debug output.
18254 (linux_thread_stopped): New.
18255 (linux_pause_all): New.
18256 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
18257 linux_pause_all.
18258 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
18259 (thread_db_free): Delete declaration.
18260 (thread_db_detach, thread_db_mourn): Declare.
18261 * thread-db.c (thread_db_init): Use thread_db_mourn.
18262 (thread_db_free): Delete, split in two.
18263 (disable_thread_event_reporting): New.
18264 (thread_db_detach): New.
18265 (thread_db_mourn): New.
18266
18267 * server.h (struct thread_info) <last_resume_kind>: New field.
18268 <attached>: Add comment.
18269 <gdb_detached>: New field.
18270 (handler_func): Change return type to int.
18271 (handle_serial_event, handle_target_event): Ditto.
18272 (gdb_connected): Declare.
18273 (tracing): Delete.
18274 (disconnected_tracing): Declare.
18275 (stop_tracing): Declare.
18276
18277 * server.c (handle_query) <qSupported>: Report support for
18278 disconnected tracing.
18279 (queue_stop_reply_callback): Account for running threads.
18280 (gdb_wants_thread_stopped): New.
18281 (gdb_wants_all_threads_stopped): New.
18282 (gdb_reattached_process): New.
18283 (handle_status): Clear the `gdb_detached' flag of all processes.
18284 In all-stop, stop all threads.
18285 (main): Be sure to leave tfind mode. Handle disconnected tracing.
18286 (process_serial_event): If the remote connection breaks, or if an
18287 exit was forced with "monitor exit", force an event loop exit.
18288 Handle disconnected tracing on detach.
18289 (handle_serial_event): Adjust.
18290 (handle_target_event): If GDB isn't connected, forward events back
18291 to the inferior, unless the last process exited, in which case,
18292 exit gdbserver. Adjust interface.
18293
18294 * remote-utils.c (remote_open): Don't block in accept. Instead
18295 register an event loop source on the listen socket file
18296 descriptor. Refactor bits into ...
18297 (listen_desc): ... this new global.
18298 (gdb_connected): ... this new function.
18299 (enable_async_notification): ... this new function.
18300 (handle_accept_event): ... this new function.
18301 (remote_close): Clear remote_desc.
18302
18303 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18304
18305 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18306 New fields.
18307 (mourn_inferior): Define.
18308 (target_process_qsupported): Avoid the dangling else problem.
18309 (thread_stopped): Define.
18310 (pause_all): Define.
18311 (target_waitstatus_to_string): Declare.
18312 * target.c (target_waitstatus_to_string): New.
18313
18314 * tracepoint.c (tracing): Make extern.
18315 (disconnected_tracing): New.
18316 (stop_tracing): Make extern. Handle tracing stops due to GDB
18317 disconnecting.
18318 (cmd_qtdisconnected): New.
18319 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18320 (handle_tracepoint_general_set): Handle QTDisconnected.
18321
18322 * event-loop.c (event_handler_func): Change return type to int.
18323 (process_event): Bail out if the event handler wants the event
18324 loop to stop.
18325 (handle_file_event): Ditto.
18326 (start_event_loop): Bail out if the event handler wants the event
18327 loop to stop.
18328
18329 * nto-low.c (nto_target_ops): Adjust.
18330 * spu-low.c (spu_wait): Don't remove the process here.
18331 (spu_target_ops): Adjust.
18332 * win32-low.c (win32_wait): Don't remove the process here.
18333 (win32_target_ops): Adjust.
18334
18335 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18336
18337 * regcache.c (realloc_register_cache): Invalidate inferior's
18338 regcache before recreating it.
18339
18340 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18341
18342 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18343
18344 2010-04-09 Stan Shebs <stan@codesourcery.com>
18345 Pedro Alves <pedro@codesourcery.com>
18346
18347 * server.h (LONGEST): New.
18348 (struct thread_info) <while_stepping>: New field.
18349 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18350 Declare.
18351 (initialize_tracepoint, handle_tracepoint_general_set)
18352 (handle_tracepoint_query, tracepoint_finished_step)
18353 (tracepoint_was_hit, release_while_stepping_state_list):
18354 (current_traceframe): Declare.
18355 * server.c (handle_general_set): Handle tracepoint packets.
18356 (read_memory): New.
18357 (write_memory): New.
18358 (handle_search_memory_1): Use read_memory.
18359 (handle_query): Report support for conditional tracepoints, trace
18360 state variables, and tracepoint sources. Handle tracepoint
18361 queries.
18362 (main): Initialize the tracepoints module.
18363 (process_serial_event): Handle traceframe reads/writes.
18364
18365 * linux-low.c (handle_tracepoints): New.
18366 (linux_wait_1): Call it.
18367 (linux_resume_one_lwp): Handle while-stepping.
18368 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18369 (linux_target_ops): Install them.
18370 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18371 New field.
18372 * linux-x86-low.c (x86_supports_tracepoints): New.
18373 (the_low_target). Install it.
18374
18375 * mem-break.h (delete_breakpoint): Declare.
18376 * mem-break.c (delete_breakpoint): Make external.
18377
18378 * target.h (struct target_ops): Add `supports_tracepoints',
18379 `read_pc', and `write_pc' fields.
18380 (target_supports_tracepoints): Define.
18381 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18382 (phex_nz): New.
18383
18384 * regcache.h (struct regcache) <registers_owned>: New field.
18385 (init_register_cache, regcache_cpy): Declare.
18386 (regcache_read_pc, regcache_write_pc): Declare.
18387 (register_cache_size): Declare.
18388 (supply_regblock): Declare.
18389 * regcache.c (init_register_cache): New.
18390 (new_register_cache): Use it.
18391 (regcache_cpy): New.
18392 (register_cache_size): New.
18393 (supply_regblock): New.
18394 (regcache_read_pc, regcache_write_pc): New.
18395
18396 * tracepoint.c: New.
18397
18398 * Makefile.in (OBS): Add tracepoint.o.
18399 (tracepoint.o): New rule.
18400
18401 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18402
18403 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18404 (i386-mmx.o): New.
18405 (i386-mmx.c): Likewise.
18406 (i386-mmx-linux.o): Likewise.
18407 (i386-mmx-linux.c): Likewise.
18408
18409 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18410 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18411 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18412 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18413
18414 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18415 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18416 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18417
18418 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18419
18420 * Makefile.in (clean): Updated.
18421 (i386-avx.o): New.
18422 (i386-avx.c): Likewise.
18423 (i386-avx-linux.o): Likewise.
18424 (i386-avx-linux.c): Likewise.
18425 (amd64-avx.o): Likewise.
18426 (amd64-avx.c): Likewise.
18427 (amd64-avx-linux.o): Likewise.
18428 (amd64-avx-linux.c): Likewise.
18429
18430 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18431 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18432 (srv_amd64_regobj): Add amd64-avx.o.
18433 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18434 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18435 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18436 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18437 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18438 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18439 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18440
18441 * i387-fp.c: Include "i386-xstate.h".
18442 (i387_xsave): New.
18443 (i387_cache_to_xsave): Likewise.
18444 (i387_xsave_to_cache): Likewise.
18445 (x86_xcr0): Likewise.
18446
18447 * i387-fp.h (i387_cache_to_xsave): Likewise.
18448 (i387_xsave_to_cache): Likewise.
18449 (x86_xcr0): Likewise.
18450
18451 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18452 * linux-crisv32-low.c (target_regsets): Likewise.
18453 * linux-m68k-low.c (target_regsets): Likewise.
18454 * linux-mips-low.c (target_regsets): Likewise.
18455 * linux-ppc-low.c (target_regsets): Likewise.
18456 * linux-s390-low.c (target_regsets): Likewise.
18457 * linux-sh-low.c (target_regsets): Likewise.
18458 * linux-sparc-low.c (target_regsets): Likewise.
18459 * linux-xtensa-low.c (target_regsets): Likewise.
18460
18461 * linux-low.c: Include <sys/uio.h>.
18462 (regsets_fetch_inferior_registers): Support nt_type.
18463 (regsets_store_inferior_registers): Likewise.
18464 (linux_process_qsupported): New.
18465 (linux_target_ops): Add linux_process_qsupported.
18466
18467 * linux-low.h (regset_info): Add nt_type.
18468 (linux_target_ops): Add process_qsupported.
18469
18470 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18471 and <sys/uio.h>.
18472 (init_registers_i386_avx_linux): New.
18473 (init_registers_amd64_avx_linux): Likewise.
18474 (xmltarget_i386_linux_no_xml): Likewise.
18475 (xmltarget_amd64_linux_no_xml): Likewise.
18476 (PTRACE_GETREGSET): Likewise.
18477 (PTRACE_SETREGSET): Likewise.
18478 (x86_fill_xstateregset): Likewise.
18479 (x86_store_xstateregset): Likewise.
18480 (use_xml): Likewise.
18481 (x86_linux_update_xmltarget): Likewise.
18482 (x86_linux_process_qsupported): Likewise.
18483 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18484 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18485 init_registers_i386_linux here. Call
18486 x86_linux_update_xmltarget.
18487 (the_low_target): Add x86_linux_process_qsupported.
18488
18489 * server.c (handle_query): Call target_process_qsupported.
18490
18491 * target.h (target_ops): Add process_qsupported.
18492 (target_process_qsupported): New.
18493
18494 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18495
18496 * inferiors.c (add_thread): Set last_status kind to
18497 TARGET_WAITKIND_IGNORE.
18498 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18499 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18500 (linux_wait_1): Move `thread' local definition to block that uses
18501 it. Don't NULL initialize `event_child'.
18502 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18503 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18504 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18505
18506 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18507
18508 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18509 an extended waitstatus, or by a watchpoint.
18510 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18511 thread was stepping or has been stopped by a watchpoint.
18512
18513 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18514
18515 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18516 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18517 of another, then delete the previous, and validate all
18518 breakpoints.
18519 (validate_inserted_breakpoint): New.
18520 (delete_disabled_breakpoints): New.
18521 (validate_breakpoints): New.
18522 (check_mem_read): Validate breakpoints before trusting their
18523 shadow. Delete disabled breakpoints.
18524 (check_mem_write): Validate breakpoints before trusting they
18525 should be inserted. Delete disabled breakpoints.
18526 * mem-break.h (validate_breakpoints):
18527 * server.c (handle_query): Validate breakpoints when we see a
18528 qSymbol query.
18529
18530 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18531
18532 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18533 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18534 if we could tell there's a GDB breakpoint at stop_pc.
18535 (need_step_over_p): Don't do a step over if we find a GDB
18536 breakpoint at the resume PC.
18537
18538 * mem-break.c (struct raw_breakpoint): New.
18539 (enum bkpt_type): New type `gdb_breakpoint'.
18540 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18541 fields. New field `raw'.
18542 (find_raw_breakpoint_at): New.
18543 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18544 breakpoint instead.
18545 (set_breakpoint_at): Adjust.
18546 (delete_raw_breakpoint): New.
18547 (release_breakpoint): New.
18548 (delete_breakpoint): Rename to...
18549 (delete_breakpoint_1): ... this. Add proc parameter. Use
18550 release_breakpoint. Return ENOENT.
18551 (delete_breakpoint): Reimplement.
18552 (find_breakpoint_at): Delete.
18553 (find_gdb_breakpoint_at): New.
18554 (delete_breakpoint_at): Delete.
18555 (set_gdb_breakpoint_at): New.
18556 (delete_gdb_breakpoint_at): New.
18557 (gdb_breakpoint_here): New.
18558 (set_reinsert_breakpoint): Use release_breakpoint.
18559 (uninsert_breakpoint): Rename to ...
18560 (uninsert_raw_breakpoint): ... this.
18561 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18562 (reinsert_raw_breakpoint): Change parameter type to
18563 raw_breakpoint.
18564 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18565 instead.
18566 (check_breakpoints): Adjust. Use release_breakpoint.
18567 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18568 (breakpoint_inserted_here): Ditto.
18569 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18570 Don't trust the breakpoint's shadow if it is not inserted.
18571 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18572 (delete_all_breakpoints): Adjust.
18573 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18574 use delete_breakpoint_1.
18575
18576 * mem-break.h (breakpoints_supported): Delete declaration.
18577 (set_gdb_breakpoint_at): Declare.
18578 (gdb_breakpoint_here): Declare.
18579 (delete_breakpoint_at): Delete.
18580 (delete_gdb_breakpoint_at): Declare.
18581
18582 * server.h (struct raw_breakpoint): Forward declare.
18583 (struct process_info): New field `raw_breakpoints'.
18584
18585 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18586 breakpoints.
18587
18588 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18589
18590 * linux-low.c (status_pending_p_callback): Fix comment.
18591 (linux_wait_for_event_1): Move most of the internal breakpoint
18592 handling from here...
18593 (linux_wait_1): ... to here.
18594 (count_events_callback): New.
18595 (select_singlestep_lwp_callback): New.
18596 (select_event_lwp_callback): New.
18597 (cancel_breakpoints_callback): New.
18598 (select_event_lwp): New.
18599 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18600 priority to all LWPs that have had events that should be reported
18601 to the client. Cancel breakpoints when about to reporting the
18602 event to the client, not while stopping lwps. No longer cancel
18603 finished single-steps here.
18604 (cancel_finished_single_step): Delete.
18605 (cancel_finished_single_steps): Delete.
18606
18607 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18608
18609 * mem-break.c (enum bkpt_type): New.
18610 (struct breakpoint): New field `type'.
18611 (set_breakpoint_at): Change return type to struct breakpoint
18612 pointer. Set type to `other_breakpoint' by default.
18613 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18614 in the breakpoint list.
18615 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18616 (reinsert_breakpoint): Rename to ...
18617 (reinsert_raw_breakpoint): ... this.
18618 (reinsert_breakpoints_at): Adjust.
18619 * mem-break.h (struct breakpoint): Declare.
18620 (set_breakpoint_at): Change return type to struct breakpoint
18621 pointer.
18622
18623 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18624
18625 * server.c (handle_query): Assign, not compare.
18626
18627 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18628
18629 Teach linux gdbserver to step-over-breakpoints.
18630
18631 * linux-low.c (can_hardware_single_step): New.
18632 (supports_breakpoints): New.
18633 (handle_extended_wait): If stopping threads, read the stop pc of
18634 the new cloned LWP.
18635 (get_pc): New.
18636 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18637 low target doesn't support retrieving the PC.
18638 (add_lwp): Set last_resume_kind to resume_continue.
18639 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18640 (linux_attach): Don't clear stop_expected. Set the lwp's
18641 last_resume_kind to resume_stop.
18642 (linux_detach_one_lwp): Don't check for removed breakpoints.
18643 (check_removed_breakpoint): Delete.
18644 (status_pending_p): Rename to ...
18645 (status_pending_p_callback): ... this. Don't check for removed
18646 breakpoints. Don't consider threads that are stopped from GDB's
18647 perspective.
18648 (linux_wait_for_lwp): Always read the stop_pc here.
18649 (cancel_breakpoint): New.
18650 (step_over_bkpt): New global.
18651 (linux_wait_for_event_1): Implement stepping over breakpoints.
18652 (gdb_wants_lwp_stopped): New.
18653 (gdb_wants_all_stopped): New.
18654 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18655 single-step traps here. Store the thread's last reported target
18656 wait status.
18657 (send_sigstop): Don't clear stop_expected. Always set it,
18658 instead.
18659 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18660 (cancel_finished_single_step): New.
18661 (cancel_finished_single_steps): New.
18662 (wait_for_sigstop): Don't cancel finished single-step traps here.
18663 (linux_resume_one_lwp): Don't check for removed breakpoints.
18664 Don't set `step' on non-hardware step archs.
18665 (linux_set_resume_request): Ignore resume_stop requests if already
18666 stopping or stopped. Set the lwp's last_resume_kind.
18667 (resume_status_pending_p): Don't check for removed breakpoints.
18668 (need_step_over_p): New.
18669 (start_step_over): New.
18670 (finish_step_over): New.
18671 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18672 requests. Clear the thread's last reported target waitstatus.
18673 Don't use the `suspended' flag. Don't consider pending breakpoints.
18674 (linux_resume): Start a step-over if necessary.
18675 (proceed_one_lwp): New.
18676 (proceed_all_lwps): New.
18677 (unstop_all_lwps): New.
18678 * linux-low.h (struct lwp_info): Rewrite comment for the
18679 `suspended' flag. Add the `stop_pc' field. Delete the
18680 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18681 Add `'last_resume_kind' and `need_step_over' fields.
18682 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18683 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18684 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18685 (set_raw_breakpoint_at): New.
18686 (set_breakpoint_at): Rewrite to use it.
18687 (reinsert_breakpoint_handler): Delete.
18688 (set_reinsert_breakpoint): New.
18689 (reinsert_breakpoint_by_bp): Delete.
18690 (delete_reinsert_breakpoints): New.
18691 (uninsert_breakpoint): Rewrite.
18692 (uninsert_breakpoints_at): New.
18693 (reinsert_breakpoint): Rewrite.
18694 (reinsert_breakpoints_at): New.
18695 (check_breakpoints): Rewrite.
18696 (breakpoint_here): New.
18697 (breakpoint_inserted_here): New.
18698 (check_mem_read): Adjust.
18699 * mem-break.h (breakpoints_supported, breakpoint_here)
18700 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18701 (reinsert_breakpoint_by_bp): Delete declaration.
18702 (delete_reinsert_breakpoints): Declare.
18703 (reinsert_breakpoint): Delete declaration.
18704 (reinsert_breakpoints_at): Declare.
18705 (uninsert_breakpoint): Delete declaration.
18706 (uninsert_breakpoints_at): Declare.
18707 (check_breakpoints): Adjust prototype.
18708 * server.h: Adjust include order.
18709 (struct thread_info): Declare here. Add a `last_status' field.
18710
18711 2010-03-23 Michael Snyder <msnyder@vmware.com>
18712
18713 * server.c (crc32): New function.
18714 (handle_query): Add handling for 'qCRC:' request.
18715
18716 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18717
18718 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18719 lwp had been stopped by a watchpoint.
18720
18721 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18722
18723 * server.h (internal_error): Declare.
18724 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18725 * utils.c (internal_error): New function.
18726
18727 2010-03-15 Andreas Schwab <schwab@redhat.com>
18728
18729 * configure.srv: Fix typo setting srv_regobj.
18730
18731 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18732
18733 * linux-low.c (fetch_register): Avoid passing a non string literal
18734 format to `error'.
18735 (usr_store_inferior_registers): Ditto.
18736
18737 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18738
18739 * linux-low.c (linux_write_memory): Bail out early if peeking
18740 memory failed.
18741
18742 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18743
18744 * linux-low.h (struct lwp_info): New fields
18745 `stopped_by_watchpoint' and `stopped_data_address'.
18746 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18747 here, and cache them in the lwp object.
18748 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18749 directly.
18750 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18751 field.
18752 (linux_stopped_by_watchpoint): Rewrite.
18753 (linux_stopped_data_address): Rewrite.
18754
18755 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18756
18757 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18758 switching the current inferior, not before.
18759
18760 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18761
18762 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18763 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18764 i386-linux.c and amd64-linux.c.
18765 (reg-i386.o): Removed.
18766 (reg-i386.c): Likewise.
18767 (reg-i386-linux.o): Likewise.
18768 (reg-i386-linux.c): Likewise.
18769 (reg-x86-64.o): Likewise.
18770 (reg-x86-64.c): Likewise.
18771 (reg-x86-64-linux.o): Likewise.
18772 (reg-x86-64-linux.c): Likewise.
18773 (i386.o): New.
18774 (i386.c): Likewise.
18775 (i386-linux.o): Likewise.
18776 (i386-linux.c): Likewise.
18777 (amd64.o): Likewise.
18778 (amd64.c): Likewise.
18779 (amd64-linux.o): Likewise.
18780 (amd64-linux.c): Likewise.
18781
18782 * configure.srv (srv_i386_regobj): New.
18783 (srv_i386_linux_regobj): Likewise.
18784 (srv_amd64_regobj): Likewise.
18785 (srv_amd64_linux_regobj): Likewise.
18786 (srv_i386_32bit_xmlfiles): Likewise.
18787 (srv_i386_64bit_xmlfiles): Likewise.
18788 (srv_i386_xmlfiles): Likewise.
18789 (srv_amd64_xmlfiles): Likewise.
18790 (srv_i386_linux_xmlfiles): Likewise.
18791 (srv_amd64_linux_xmlfiles): Likewise.
18792 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18793 srv_xmlfiles to $srv_i386_xmlfiles.
18794 (i[34567]86-*-mingw32ce*): Likewise.
18795 (i[34567]86-*-mingw*): Likewise.
18796 (i[34567]86-*-nto*): Likewise.
18797 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18798 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18799 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18800 (x86_64-*-linux*): Likewise.
18801
18802 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18803 (init_registers_amd64_linux): New.
18804 (x86_arch_setup): Replace init_registers_x86_64_linux with
18805 init_registers_amd64_linux.
18806
18807 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18808
18809 * configure.ac: Check for libdl. If it is not available link against
18810 static libthread_db.
18811 * configure: Regenerate.
18812
18813 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18814
18815 PR9605
18816
18817 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18818 handing a read watchpoint.
18819 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18820
18821 2010-02-12 Doug Evans <dje@google.com>
18822
18823 * linux-low.c (linux_supports_tracefork_flag): Document.
18824 (linux_look_up_symbols): Add comment.
18825
18826 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18827
18828 * regcache.c (supply_register): Clear regcache if buf is NULL.
18829
18830 2010-02-02 Nicolas Roche <roche@sourceware.org>
18831 Joel Brobecker <brobecker@adacore.com>
18832
18833 * inferiors.c (find_inferior): Add function documentation.
18834 (unloaded_dll): Handle the case where the unloaded dll has not
18835 been previously registered in the dll list.
18836
18837 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18838
18839 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18840 (thumb2_breakpoint): New.
18841 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18842
18843 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18844
18845 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18846 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18847 breakpoints.
18848
18849 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18850
18851 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18852
18853 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18854
18855 * linux-s390-low.c (s390_collect_ptrace_register)
18856 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18857
18858 2010-01-21 Doug Evans <dje@google.com>
18859
18860 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18861 (PTRACE_ARG4_TYPE): New macro.
18862 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18863 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18864 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18865 (usr_store_inferior_registers): Ditto.
18866 (linux_read_memory, linux_write_memory): Ditto.
18867 (linux_test_for_tracefork): Ditto.
18868
18869 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18870 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18871
18872 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18873
18874 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18875 target.
18876
18877 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18878
18879 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18880 prototype to take a regcache. Adjust.
18881
18882 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18883
18884 * regcache.h (struct thread_info): Forward declare.
18885 (struct regcache): New.
18886 (new_register_cache): Adjust prototype.
18887 (get_thread_regcache): Declare.
18888 (free_register_cache): Adjust prototype.
18889 (registers_to_string, registers_from_string): Ditto.
18890 (supply_register, supply_register_by_name, collect_register)
18891 (collect_register_as_string, collect_register_by_name): Ditto.
18892 * regcache.c (struct inferior_regcache_data): Delete.
18893 (get_regcache): Rename to ...
18894 (get_thread_regcache): ... this. Adjust. Switch inferior before
18895 fetching registers.
18896 (regcache_invalidate_one): Adjust.
18897 (regcache_invalidate): Fix prototype.
18898 (new_register_cache): Return the new register cache.
18899 (free_register_cache): Change prototype.
18900 (realloc_register_cache): Adjust.
18901 (registers_to_string): Change prototype to take a regcache. Adjust.
18902 (registers_from_string): Ditto.
18903 (register_data): Ditto.
18904 (supply_register): Ditto.
18905 (supply_register_by_name): Ditto.
18906 (collect_register): Ditto.
18907 (collect_register_as_string): Ditto.
18908 (collect_register_by_name): Ditto.
18909 * server.c (process_serial_event): Adjust.
18910 * linux-low.h (regset_fill_func, regset_store_func): Change
18911 prototype.
18912 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18913 Change prototype.
18914 * linux-low.c (get_stop_pc): Adjust.
18915 (check_removed_breakpoint): Adjust.
18916 (linux_wait_for_event): Adjust.
18917 (linux_resume_one_lwp): Adjust.
18918 (fetch_register): Add regcache parameter. Adjust.
18919 (usr_store_inferior_registers): Ditto.
18920 (regsets_fetch_inferior_registers): Ditto.
18921 (regsets_store_inferior_registers): Ditto.
18922 (linux_fetch_registers, linux_store_registers): Ditto.
18923 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18924 regcache. Adjust.
18925 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18926 Ditto.
18927 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18928 prototype to take a regcache.
18929 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18930 * remote-utils.c (convert_ascii_to_int, outreg)
18931 (prepare_resume_reply): Change prototype to take a regcache.
18932 Adjust.
18933 * target.h (struct target_ops) <fetch_registers, store_registers>:
18934 Change prototype to take a regcache.
18935 (fetch_inferior_registers, store_inferior_registers): Change
18936 prototype to take a regcache. Adjust.
18937 * proc-service.c (ps_lgetregs): Adjust.
18938 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18939 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18940 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18941 take a regcache. Adjust.
18942 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18943 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18944 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18945 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18946 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18947 (cris_cannot_fetch_register):
18948 (cris_breakpoint_at): Change prototype to take a regcache.
18949 Adjust.
18950 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18951 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18952 to take a regcache. Adjust.
18953 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18954 Adjust.
18955 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18956 take a regcache. Adjust.
18957 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18958 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18959 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18960 * linux-mips-low.c (mips_get_pc):
18961 (mips_set_pc): Change prototype to take a regcache. Adjust.
18962 (mips_reinsert_addr): Adjust.
18963 (mips_collect_register): Change prototype to take a regcache.
18964 Adjust.
18965 (mips_supply_register):
18966 (mips_collect_register_32bit, mips_supply_register_32bit)
18967 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18968 (mips_store_fpregset): Ditto.
18969 * linux-ppc-low.c (ppc_supply_ptrace_register)
18970 (ppc_supply_ptrace_register): Ditto.
18971 (parse_spufs_run): Adjust.
18972 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18973 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18974 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18975 take a regcache. Adjust.
18976 * linux-s390-low.c (s390_collect_ptrace_register)
18977 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18978 (s390_set_pc): Change prototype to take a regcache. Adjust.
18979 (s390_arch_setup): Adjust.
18980 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18981 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18982 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18983 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18984 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18985 regcache. Adjust.
18986 (sparc_breakpoint_at): Adjust.
18987 * linux-xtensa-low.c (xtensa_fill_gregset):
18988 (xtensa_store_gregset):
18989 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18990 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18991 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18992 prototype to take a regcache. Adjust.
18993 * win32-arm-low.c (arm_fetch_inferior_register)
18994 (arm_store_inferior_register): Change prototype to take a
18995 regcache. Adjust.
18996 * win32-i386-low.c (i386_fetch_inferior_register)
18997 (i386_store_inferior_register): Change prototype to take a
18998 regcache. Adjust.
18999 * win32-low.c (child_fetch_inferior_registers)
19000 (child_store_inferior_registers): Change prototype to take a
19001 regcache. Adjust.
19002 (win32_wait): Adjust.
19003 (win32_fetch_inferior_registers): Change prototype to take a
19004 regcache. Adjust.
19005 (win32_store_inferior_registers): Adjust.
19006 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
19007 store_inferior_register>: Change prototype to take a regcache.
19008
19009 2010-01-20 Doug Evans <dje@google.com>
19010
19011 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
19012 #ifdef.
19013 (linux_wait_for_event1, linux_init_signals): Ditto.
19014 (W_STOPCODE): Provide definition if missing.
19015
19016 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
19017
19018 * linux-low.c (linux_core_of_thread): New.
19019 (compare_ints, show_process, list_threads): New.
19020 (linux_qxfer_osdata): Report threads and cores.
19021 (linux_target_op): Register linux_core_of_thread.
19022 * remote-utils.c (prepare_resume_reply): Report the core.
19023 (buffer_xml_printf): Support %d specifier.
19024 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
19025 New.
19026 (handle_query): Handle qXfer:threads. Announce availability
19027 thereof.
19028 * target.h (struct target_ops): New field core_of_thread.
19029
19030 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
19031
19032 * Makefile.in (clean): Remove new generated files.
19033 (reg-s390.o, reg-s390.c): Remove rules.
19034 (reg-s390x.o, reg-s390x.c): Likewise.
19035 (s390-linux32.o, s390-linux32.c): Add rules.
19036 (s390-linux64.o, s390-linux64.c): Likewise.
19037 (s390x-linux64.o, s390x-linux64.c): Likewise.
19038 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
19039 * linux-s390-low.c: Include <elf.h>.
19040 (HWCAP_S390_HIGH_GPRS): Define if undefined.
19041 (init_registers_s390): Remove prototype.
19042 (init_registers_s390x): Likewise.
19043 (init_registers_s390_linux32): Add prototype.
19044 (init_registers_s390_linux64): Likewise.
19045 (init_registers_s390x_linux64): Likewise.
19046 (s390_num_regs_3264): New define.
19047 (s390_regmap_3264): New global variable.
19048 (s390_cannot_fetch_register): Remove obsolete check.
19049 (s390_cannot_store_register): Likewise.
19050 (s390_collect_ptrace_register): Handle upper/lower register halves.
19051 (s390_supply_ptrace_register): Likewise.
19052 (s390_fill_gregset): Update to register number changes.
19053 (s390_get_hwcap): New routine.
19054 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
19055 Install appropriate regmap and register set.
19056
19057 2010-01-01 Joel Brobecker <brobecker@adacore.com>
19058
19059 * server.c (gdbserver_version): Update copyright year to 2010.
19060 * gdbreplay.c (gdbreplay_version): Likewise.
19061
19062 2009-12-28 Doug Evans <dje@google.com>
19063
19064 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
19065 elf/external.h. Include <elf.h> instead but only if necessary.
19066
19067 2009-12-28 Pedro Alves <pedro@codesourcery.com>
19068
19069 * linux-low.c (linux_remove_process): Remove `detaching'
19070 parameter. Don't release/detach from thread_db here.
19071 (linux_kill): Release/detach from thread_db here, ...
19072 (linux_detach): ... and here, before actually detaching.
19073 (linux_wait_1): ... and here, when a process exits.
19074 * thread-db.c (any_thread_of): New.
19075 (thread_db_free): Switch the current inferior to a thread of the
19076 passed in process.
19077
19078 2009-12-21 Doug Evans <dje@google.com>
19079
19080 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
19081
19082 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
19083 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
19084 warning ifndef __NR_tkill. Move setting of errno there too.
19085 Delete unnecessary resetting of errno after syscall.
19086 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
19087
19088 * configure.ac: Check for dladdr.
19089 * config.in: Regenerate.
19090 * configure: Regenerate.
19091 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
19092 (try_thread_db_load): Update.
19093
19094 * linux-low.c (my_waitpid): Delete unnecessary prototype.
19095
19096 2009-12-18 Doug Evans <dje@google.com>
19097
19098 * event-loop.c: Include unistd.h if it exists.
19099
19100 * linux-low.c (my_waitpid): Move definition away from being in
19101 between linux_tracefork_child/linux_test_for_tracefork.
19102
19103 * gdb_proc_service.h (psaddr_t): Fix type.
19104 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
19105 signature to match glibc.
19106
19107 2009-12-16 Doug Evans <dje@google.com>
19108
19109 * linux-low.c (linux_read_memory): Fix argument to read.
19110
19111 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19112
19113 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
19114 events, don't leave current_inferior pointing at null.
19115
19116 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19117
19118 * win32-low.c (LOG): Delete.
19119 (OUTMSG): Output to stderr.
19120 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
19121 on compile time LOG macro.
19122 (win32_wait): Fix debug output.
19123
19124 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19125
19126 * win32-low.c (win32_add_one_solib): If the dll name is
19127 "ntdll.dll", prepend the system directory to the dll path.
19128
19129 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
19130
19131 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
19132
19133 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
19134 Vladimir Prus <vladimir@codesourcery.com>
19135
19136 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
19137 * configure.ac: Check for __mcoldfire__ and set
19138 gdb_cv_m68k_is_coldfire.
19139 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
19140 reg-cf.o and reg-m68k.o.
19141 * configure: Regenerated.
19142
19143 2009-11-16 Pedro Alves <pedro@codesourcery.com>
19144
19145 * linux-low.c (linux_remove_process): Add `detaching' parameter.
19146 Pass it to thread_db_free.
19147 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
19148 proper `detaching' argument to linux_remove_process.
19149 * linux-low.h (thread_db_free): Add `detaching' parameter.
19150 * thread-db.c (thread_db_init): Pass false as `detaching' argument
19151 to thread_db_free.
19152 (thread_db_free): Add `detaching' parameter. Only
19153 call td_ta_clear_event if detaching from process.
19154
19155 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
19156
19157 * thread-db.c (thread_db_free): Fix typo.
19158
19159 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
19160
19161 PR gdb/10838
19162 * thread-db.c (thread_db_free): Call td_ta_clear_event.
19163
19164 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
19165
19166 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
19167 with an i686 compiler.
19168 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
19169 needed.
19170 * configure: Rebuilt.
19171
19172 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
19173
19174 PR gdb/10783
19175
19176 * server.c (handle_search_memory_1): Correct read_addr initialization
19177 in loop for searching subsequent chunks.
19178
19179 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
19180
19181 * configure.ac: New --with-libthread-db option.
19182 * thread-db.c: Allow direct dependence on libthread_db.
19183 (thread_db_free): Adjust.
19184 * config.in: Regenerate.
19185 * configure: Likewise.
19186
19187 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
19188
19189 PR gdb/10757
19190 * thread-db.c (attach_thread): New function.
19191 (maybe_attach_thread): Return success/failure.
19192 (find_new_threads_callback): Adjust.
19193 (thread_db_find_new_threads): Loop until no new threads.
19194
19195 2009-10-13 Pedro Alves <pedro@codesourcery.com>
19196
19197 * proc-service.c (ps_lgetregs): Formatting.
19198
19199 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
19200
19201 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
19202 * configure.ac: Adjust.
19203 * linux-low.h (struct process_info_private): Move members to struct
19204 thread_db.
19205 (thread_db_free, thread_db_handle_monitor_command): New prototype.
19206 * linux-low.c (linux_remove_process): Adjust.
19207 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
19208 * server.c (handle_query): Move code ...
19209 (handle_monitor_command): ... here. New function.
19210 * target.h (struct target_ops): New member.
19211 * thread-db.c (struct thread_db): New.
19212 (libthread_db_search_path): New variable.
19213 (thread_db_create_event, thread_db_enable_reporting)
19214 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
19215 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
19216 (try_thread_db_load_1, dladdr_to_soname): New functions.
19217 (try_thread_db_load, thread_db_load_search): New functions.
19218 (thread_db_init): Search for libthread_db.
19219 (thread_db_free): New function.
19220 (thread_db_handle_monitor_command): Likewise.
19221 * config.in: Regenerate.
19222 * configure: Regenerate.
19223
19224 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
19225
19226 * spu-low.c (spu_kill): Wait for inferior to terminate.
19227 Call clear_inferiors.
19228 (spu_detach): Call clear_inferiors.
19229
19230 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19231
19232 * aclocal.m4: Regenerate.
19233 * config.in: Likewise.
19234 * configure: Likewise.
19235
19236 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19237
19238 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
19239 (parse_spufs_run): New function.
19240 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
19241 (ppc_breakpoint_at): Handle SPU breakpoints.
19242
19243 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19244
19245 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
19246 (SPUFS_MAGIC): Define.
19247 (spu_enumerate_spu_ids): New function.
19248 (linux_qxfer_spu): New function.
19249 (linux_target_ops): Install linux_qxfer_spu.
19250
19251 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19252
19253 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
19254 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
19255 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
19256 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
19257 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
19258 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
19259 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
19260 (init_registers_powerpc_cell32l): Add prototype.
19261 (init_registers_powerpc_cell64l): Likewise.
19262 (ppc_arch_setup): Detect Cell/B.E. architecture.
19263
19264 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19265
19266 * Makefile.in (datarootdir): New variable.
19267
19268 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19269
19270 * linux-low.c (linux_write_memory): Update debugging output.
19271 * Makefile.in (clean): Add new descriptions.
19272 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
19273 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
19274 * configure.srv: Add new files for arm*-*-linux*.
19275 * linux-arm-low.c: Add new declarations.
19276 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
19277 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
19278 (HWCAP_VFPv3D16): New.
19279 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
19280 instead of __IWMMXT__.
19281 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
19282 (arm_arch_setup): New.
19283 (target_regsets): Remove #ifdef. Add VFP regset.
19284 (the_low_target): Use arm_arch_setup.
19285
19286 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19287
19288 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
19289 the main thread again.
19290
19291 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
19292
19293 Adding Neutrino gdbserver.
19294 * configure: Regenerated.
19295 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19296 * configure.srv (i[34567]86-*-nto*): New target.
19297 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19298 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19299 (nto_comctrl) [__QNX__]: New function.
19300 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19301
19302 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19303
19304 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19305 srv_tgtobj.
19306
19307 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19308 Pedro Alves <pedro@codesourcery.com>
19309
19310 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19311 don't support CONTEXT_EXTENDED_REGISTERS.
19312 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19313 (the_low_target): Install them.
19314 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19315 failing with ERROR_PIPE_NOT_CONNECTED.
19316
19317 2009-06-30 Doug Evans <dje@google.com>
19318 Pierre Muller <muller@ics.u-strasbg.fr>
19319
19320 Add h/w watchpoint support to x86-linux, win32-i386.
19321 * Makefile.in (SFILES): Add i386-low.c
19322 (i386_low_h): Define.
19323 (i386-low.o): Add dependencies.
19324 (linux-x86-low.o): Add i386-low.h dependency.
19325 (win32-i386-low.o): Ditto.
19326 * i386-low.c: New file.
19327 * i386-low.h: New file.
19328 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19329 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19330 * linux-low.c (linux_add_process): Initialize arch_private.
19331 (linux_remove_process): Free arch_private.
19332 (add_lwp): Initialize arch_private.
19333 (delete_lwp): Free arch_private.
19334 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19335 provided.
19336 * linux-low.h (process_info_private): New member arch_private.
19337 (lwp_info): New member arch_private.
19338 (linux_target_ops): New members new_process, new_thread,
19339 prepare_to_resume.
19340 (ptid_of): New macro.
19341 * linux-x86-low.c: Include stddef.h, i386-low.h.
19342 (arch_process_info): New struct.
19343 (arch_lwp_info): New struct.
19344 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19345 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19346 (i386_dr_low_get_status): New function.
19347 (x86_insert_point, x86_remove_point): New functions.
19348 (x86_stopped_by_watchpoint): New function.
19349 (x86_stopped_data_address): New function.
19350 (x86_linux_new_process, x86_linux_new_thread): New functions.
19351 (x86_linux_prepare_to_resume): New function.
19352 (the_low_target): Add entries for insert_point, remove_point,
19353 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19354 prepare_to_resume.
19355 * server.c (debug_hw_points): New global.
19356 (monitor_show_help): Document set debug-hw-points.
19357 (handle_query): Process "set debug-hw-points".
19358 * server.h (debug_hw_points): Declare.
19359 (paddress): Declare.
19360 * utils.c (NUMCELLS, CELLSIZE): New macros.
19361 (get_sell, xsnprintf, paddress): New functions.
19362 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19363 remove_point, stopped_by_watchpoint, stopped_data_address.
19364 * win32-i386-low.c: Include i386-low.h.
19365 (debug_reg_state): Replaces dr.
19366 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19367 (i386_dr_low_get_status): New function.
19368 (i386_insert_point, i386_remove_point): New functions.
19369 (i386_stopped_by_watchpoint): New function.
19370 (i386_stopped_data_address): New function.
19371 (i386_initial_stuff): Update.
19372 (get_thread_context,set_thread_context,i386_thread_added): Update.
19373 (the_low_target): Add entries for insert_point,
19374 remove_point, stopped_by_watchpoint, stopped_data_address.
19375 * win32-low.c (win32_insert_watchpoint): New function.
19376 (win32_remove_watchpoint): New function.
19377 (win32_stopped_by_watchpoint): New function.
19378 (win32_stopped_data_address): New function.
19379 (win32_target_ops): Add entries for insert_watchpoint,
19380 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19381 * win32-low.h (win32_target_ops): New members insert_point,
19382 remove_point, stopped_by_watchpoint, stopped_data_address.
19383
19384 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19385
19386 * server.c (process_serial_event): Re-return unsupported, not
19387 error, if the type isn't recognized. Re-allow supporting only
19388 insert or remove packets. Also call require_running for
19389 breakpoints. Add missing break statement to default case. Tidy.
19390 * target.h (struct target_ops): Rename insert_watchpoint to
19391 insert_point, and remove_watchpoint to remove_point.
19392
19393 * linux-low.h (struct linux_target_ops): Likewise.
19394 * linux-low.c (linux_insert_watchpoint): Rename to ...
19395 (linux_insert_point): ... this. Adjust.
19396 (linux_remove_watchpoint): Rename to ...
19397 (linux_remove_point): ... this. Adjust.
19398 (linux_target_ops): Adjust.
19399 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19400 (cris_insert_point): ... this.
19401 (cris_remove_watchpoint): Rename to ...
19402 (cris_remove_point): ... this.
19403 (the_low_target): Adjust.
19404
19405 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19406
19407 * server.c (handle_v_kill): Pass signal_pid to
19408 kill_inferior if multi_process is zero.
19409
19410 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19411
19412 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19413 * target.h (target_ops): Comment for *_watchpoint to make it clear
19414 the functions can get types '0' and '1'.
19415
19416 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19417
19418 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19419 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19420 * regcache.c (get_regcache): Likewise.
19421 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19422 * win32-low.c (child_fetch_inferior_registers): Remove check for
19423 regno 0.
19424
19425 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19426 Pedro Alves <pedro@codesourcery.com>
19427
19428 * target.h (struct target_ops) <supports_multi_process>: New
19429 callback.
19430 (target_supports_multi_process): New.
19431 * server.c (handle_query): Even if GDB reports support, only
19432 enable multi-process if the target also supports it. Report
19433 multi-process support only if the target backend supports it.
19434 * linux-low.c (linux_supports_multi_process): New function.
19435 (linux_target_ops): Install it as target_supports_multi_process
19436 callback.
19437
19438 2009-05-24 Doug Evans <dje@google.com>
19439
19440 Global renaming of find_thread_pid to find_thread_ptid.
19441 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19442 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19443 All callers updated.
19444
19445 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19446 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19447 directly.
19448
19449 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19450 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19451 (linux_resume_one_lwp): Ditto.
19452
19453 2009-05-23 Doug Evans <dje@google.com>
19454
19455 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19456 from struct inferior_list_entry * to struct lwp_info *.
19457 All callers updated.
19458
19459 2009-05-13 Doug Evans <dje@google.com>
19460
19461 * linux-x86-low.c: Don't include assert.h.
19462 (x86_siginfo_fixup): Use fatal, not assert.
19463 (x86_arch_setup): Fix comment.
19464
19465 2009-05-12 Doug Evans <dje@google.com>
19466
19467 Biarch support for i386/amd64 gdbserver.
19468 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19469 Add linux-x86-low.c.
19470 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19471 (linux-x86-low.o): Add.
19472 * linux-x86-64-low.c: Delete.
19473 * linux-i386-low.c: Delete.
19474 * linux-x86-low.c: New file.
19475 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19476 linux-x86-low.o.
19477 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19478 linux-x86-low.o.
19479 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19480 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19481 (linux_child_pid_to_exec_file): New function.
19482 (elf_64_header_p, elf_64_file_p): New functions.
19483 (siginfo_fixup): New function.
19484 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19485 give target a chance to convert layout.
19486 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19487 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19488
19489 2009-05-07 Doug Evans <dje@google.com>
19490
19491 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19492 (regsets_store_inferior_registers): Ditto.
19493
19494 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19495
19496 PR server/10048
19497
19498 * linux-low.c (must_set_ptrace_flags): Delete.
19499 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19500 of the global.
19501 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19502 `lwp->must_set_ptrace_flags' instead.
19503 (linux_wait_for_event_1): Set ptrace options here.
19504 (linux_wait_1): ... not here.
19505
19506 2009-04-30 Doug Evans <dje@google.com>
19507
19508 * inferiors.c (started_inferior_callback): New function.
19509 (attached_inferior_callback): New function.
19510 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19511 * server.c (print_started_pid, print_attached_pid): New functions.
19512 (detach_or_kill_for_exit): New function.
19513 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19514 * server.h (have_started_inferiors_p): Declare.
19515 (have_attached_inferiors_p): Declare.
19516
19517 * inferiors.c (remove_process): Fix memory leak, free process.
19518 * linux-low.c (linux_remove_process): New function.
19519 (linux_kill): Call it instead of remove_process.
19520 (linux_detach, linux_wait_1): Ditto.
19521
19522 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19523
19524 * configure.srv: Add x86 Windows CE target.
19525
19526 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19527
19528 * inferiors.c (get_thread_process): Make global.
19529 * server.h (get_thread_process): Add prototype.
19530 * thread-db.c (find_one_thread): Use get_thread_process
19531 instead of current_process.
19532 (thread_db_get_tls_address): Do not crash if called when
19533 thread layer is not yet initialized.
19534
19535 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19536
19537 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19538 * spu-low.c (current_tid): Rename to ...
19539 (current_ptid): ... this.
19540 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19541 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19542 ptid_get_lwp (current_ptid) instead of current_tid.
19543 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19544 instead of current_tid. Use find_process_pid to verify pid
19545 argument is valid. Pass proper argument to remove_process.
19546 (spu_thread_alive): Compare current_ptid instead of current_tid.
19547 (spu_resume): Likewise.
19548
19549 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19550
19551 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19552 variable.
19553
19554 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19555
19556 Implement the multiprocess extensions, and add linux multiprocess
19557 support.
19558
19559 * server.h (ULONGEST): Declare.
19560 (struct ptid, ptid_t): New.
19561 (minus_one_ptid, null_ptid): Declare.
19562 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19563 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19564 (struct inferior_list_entry): Change `id' type from unsigned from
19565 to ptid_t.
19566 (struct sym_cache, struct breakpoint, struct
19567 process_info_private): Forward declare.
19568 (struct process_info): Declare.
19569 (current_process): Declare.
19570 (all_processes): Declare.
19571 (initialize_inferiors): Declare.
19572 (add_thread): Adjust to use ptid_t.
19573 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19574 (add_process, remove_process, find_thread_pid): Declare.
19575 (find_inferior_id): Adjust to use ptid_t.
19576 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19577 (multi_process): Declare.
19578 (push_event): Adjust to use ptid_t.
19579 (read_ptid, write_ptid): Declare.
19580 (prepare_resume_reply): Adjust to use ptid_t.
19581 (clear_symbol_cache): Declare.
19582 * inferiors.c (all_processes): New.
19583 (null_ptid, minus_one_ptid): New.
19584 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19585 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19586 (add_thread): Change unsigned long to ptid. Remove gdb_id
19587 parameter. Adjust.
19588 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19589 (gdb_id_to_thread): Rename to ...
19590 (find_thread_pid): ... this. Change unsigned long to ptid.
19591 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19592 (loaded_dll, pull_pid_from_list): Adjust.
19593 (add_process, remove_process, find_process_pid)
19594 (get_thread_process, current_process, initialize_inferiors): New.
19595 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19596 (struct target_waitstatus) <related_pid>: Ditto.
19597 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19598 return type to int.
19599 (struct target_ops) <join>: Add `pid' argument.
19600 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19601 (struct target_ops) <wait>: Add `ptid' field. Change return type
19602 to ptid.
19603 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19604 (mywait): Add `ptid' argument. Change return type to ptid_t.
19605 (target_pid_to_str): Declare.
19606 * target.c (set_desired_inferior): Adjust to use ptids.
19607 (mywait): Add new `ptid' argument. Adjust.
19608 (target_pid_to_str): New.
19609 * mem-break.h (free_all_breakpoints): Declare.
19610 * mem-break.c (breakpoints): Delelete.
19611 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19612 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19613 to use per-process breakpoint list.
19614 (free_all_breakpoints): New.
19615 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19616 (symbol_cache, all_symbols_looked_up): Delete.
19617 (hexchars): New.
19618 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19619 read_ptid): New.
19620 (prepare_resume_reply): Change ptid argument's type from unsigned
19621 long to ptid_t. Adjust. Implement W;process and X;process.
19622 (free_sym_cache, clear_symbol_cache): New.
19623 (look_up_one_symbol): Adjust to per-process symbol cache. *
19624 * server.c (cont_thread, general_thread, step_thread): Change type
19625 to ptid_t.
19626 (attached): Delete.
19627 (multi_process): New.
19628 (last_ptid): Change type to ptid_t.
19629 (struct vstop_notif) <ptid>: Change type to ptid_t.
19630 (queue_stop_reply, push_event): Change `ptid' argument's type to
19631 ptid_t.
19632 (discard_queued_stop_replies): Add `pid' argument.
19633 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19634 changes. Don't reference the `attached' global.
19635 (attach_inferior): Adjust to mywait interface changes.
19636 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19637 features. Handle and report "multiprocess+". Handle
19638 "qAttached:PID".
19639 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19640 changes.
19641 (handle_v_kill): New.
19642 (handle_v_stopped): Adjust to use target_pid_to_str.
19643 (handle_v_requests): Allow multiple attaches and runs when
19644 multiprocess extensions are in effect. Handle "vKill".
19645 (myresume): Adjust to use ptids.
19646 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19647 (handle_status): Adjust to discard_queued_stop_replies interface
19648 change.
19649 (first_thread_of, kill_inferior_callback)
19650 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19651 (main): Call initialize_inferiors. Adjust to use ptids, killing
19652 and detaching from all inferiors. Handle multiprocess packet
19653 variants.
19654 * linux-low.h: Include gdb_proc_service.h.
19655 (struct process_info_private): New.
19656 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19657 <lwpid_of>: Use ptid_get_lwp.
19658 (get_lwp_thread): Adjust.
19659 (struct lwp_info): Add `dead' member.
19660 (find_lwp_pid): Declare.
19661 * linux-low.c (thread_db_active): Delete.
19662 (new_inferior): Adjust comment.
19663 (inferior_pid): Delete.
19664 (linux_add_process): New.
19665 (handle_extended_wait): Adjust.
19666 (add_lwp): Change unsigned long to ptid.
19667 (linux_create_inferior): Add process to processes table. Adjust
19668 to use ptids. Don't set new_inferior here.
19669 (linux_attach_lwp): Rename to ...
19670 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19671 it. Adjust to use ptids.
19672 (linux_attach_lwp): New.
19673 (linux_attach): Add process to processes table. Don't set
19674 new_inferior here.
19675 (struct counter): New.
19676 (second_thread_of_pid_p, last_thread_of_process_p): New.
19677 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19678 multiple processes.
19679 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19680 processes. Remove process from process table.
19681 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19682 to multiple processes.
19683 (any_thread_of): New.
19684 (linux_detach): Add `pid' argument, and handle it. Remove process
19685 from processes table.
19686 (linux_join): Add `pid' argument. Handle it.
19687 (linux_thread_alive): Change unsighed long argument to ptid_t.
19688 Consider dead lwps as not being alive.
19689 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19690 threads we're not interested in.
19691 (same_lwp, find_lwp_pid): New.
19692 (linux_wait_for_lwp): Change `pid' argument's type from int to
19693 ptid_t. Adjust.
19694 (linux_wait_for_event): Rename to ...
19695 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19696 from int to ptid_t. Adjust.
19697 (linux_wait_for_event): New.
19698 (linux_wait_1): Add `ptid' argument. Change return type to
19699 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19700 that exit from the process table.
19701 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19702 Adjust.
19703 (mark_lwp_dead): New.
19704 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19705 stopping all threads, mark its main lwp as dead.
19706 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19707 ptids.
19708 (fetch_register, usr_store_inferior_registers)
19709 (regsets_fetch_inferior_registers)
19710 (regsets_store_inferior_registers, linux_read_memory)
19711 (linux_write_memory): Inline `inferior_pid'.
19712 (linux_look_up_symbols): Adjust to use per-process
19713 `thread_db_active'.
19714 (linux_request_interrupt): Adjust to use ptids.
19715 (linux_read_auxv): Inline `inferior_pid'.
19716 (initialize_low): Don't reference thread_db_active.
19717 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19718 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19719 (ps_getpid): Return the pid of the current inferior.
19720 * thread-db.c (proc_handle, thread_agent): Delete.
19721 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19722 per-process data.
19723 (find_one_thread): Change argument type to ptid_t. Adjust to
19724 per-process data.
19725 (maybe_attach_thread): Adjust to per-process data and ptids.
19726 (thread_db_find_new_threads): Ditto.
19727 (thread_db_init): Ditto.
19728 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19729 processes table. Adjust to use ptids.
19730 (spu_kill, spu_detach): Adjust interface. Remove process from
19731 processes table.
19732 (spu_join, spu_thread_alive): Adjust interface.
19733 (spu_wait): Adjust interface. Remove process from processes
19734 table. Adjust to use ptids.
19735 * win32-low.c (current_inferior_tid): Delete.
19736 (current_inferior_ptid): New.
19737 (debug_event_ptid): New.
19738 (thread_rec): Take a ptid. Adjust.
19739 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19740 (child_delete_thread): Ditto.
19741 (do_initial_child_stuff): Add `attached' argument. Add process to
19742 processes table.
19743 (child_fetch_inferior_registers, child_store_inferior_registers):
19744 Adjust.
19745 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19746 (win32_attach): Pass 1 to do_initial_child_stuff.
19747 (win32_kill): Adjust interface. Remove process from processes
19748 table.
19749 (win32_detach): Ditto.
19750 (win32_join): Adjust interface.
19751 (win32_thread_alive): Take a ptid.
19752 (win32_resume): Adjust to use ptids.
19753 (get_child_debug_event): Ditto.
19754 (win32_wait): Adjust interface. Remove exiting process from
19755 processes table.
19756
19757 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19758
19759 Non-stop mode support.
19760
19761 * server.h (non_stop): Declare.
19762 (gdb_client_data, handler_func): Declare.
19763 (delete_file_handler, add_file_handler, start_event_loop):
19764 Declare.
19765 (handle_serial_event, handle_target_event, push_event)
19766 (putpkt_notif): Declare.
19767 * target.h (enum resume_kind): New.
19768 (struct thread_resume): Replace `step' field by `kind' field.
19769 (TARGET_WNOHANG): Define.
19770 (struct target_ops) <wait>: Add `options' argument.
19771 <supports_non_stop, async, start_non_stop>: New fields.
19772 (target_supports_non_stop, target_async): New.
19773 (start_non_stop): Declare.
19774 (mywait): Add `options' argument.
19775 * target.c (mywait): Add `options' argument. Print child exit
19776 notifications here.
19777 (start_non_stop): New.
19778 * server.c (non_stop, own_buf, mem_buf): New globals.
19779 (struct vstop_notif): New.
19780 (notif_queue): New global.
19781 (queue_stop_reply, push_event, discard_queued_stop_replies)
19782 (send_next_stop_reply): New.
19783 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19784 interface changes.
19785 (attach_inferior): In non-stop mode, don't wait for the target
19786 here.
19787 (handle_general_set): Handle QNonStop.
19788 (handle_query): When handling qC, return the current general
19789 thread, instead of the first thread of the list.
19790 (handle_query): If the backend supports non-stop mode, include
19791 QNonStop+ in the qSupported query response.
19792 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19793 and non-stop mode.
19794 (handle_v_attach, handle_v_run): Handle non-stop mode.
19795 (handle_v_stopped): New.
19796 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19797 (myresume): Adjust to use resume_kind. Handle non-stop.
19798 (queue_stop_reply_callback): New.
19799 (handle_status): Handle non-stop mode.
19800 (main): Clear non_stop flag on reconnection. Use the event-loop.
19801 Refactor serial protocol handling from here ...
19802 (process_serial_event): ... to this new function. When GDB
19803 selects any thread, select one here. In non-stop mode, wait until
19804 GDB acks all pending events before exiting.
19805 (handle_serial_event, handle_target_event): New.
19806 * remote-utils.c (remote_open): Install remote_desc in the event
19807 loop.
19808 (remote_close): Remove remote_desc from the event loop.
19809 (putpkt_binary): Rename to...
19810 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19811 (putpkt_binary): New as wrapper around putpkt_binary_1.
19812 (putpkt_notif): New.
19813 (prepare_resume_reply): In non-stop mode, don't change the
19814 general_thread.
19815 * event-loop.c: New.
19816 * Makefile.in (OBJ): Add event-loop.o.
19817 (event-loop.o): New rule.
19818
19819 * linux-low.h (pid_of): Moved here.
19820 (lwpid_of): New.
19821 (get_lwp_thread): Use lwpid_of.
19822 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19823 * linux-low.c (pid_of): Delete.
19824 (inferior_pid): Use lwpid_of.
19825 (linux_event_pipe): New.
19826 (target_is_async_p): New.
19827 (delete_lwp): New.
19828 (handle_extended_wait): Use lwpid_of.
19829 (add_lwp): Don't set lwpid field.
19830 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19831 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19832 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19833 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19834 first. Adjust to linux_wait_for_event interface changes. Use
19835 lwpid_of.
19836 (linux_detach): Don't delete the main lwp here.
19837 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19838 (status_pending_p): Don't consider explicitly suspended lwps.
19839 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19840 pointer. Add OPTIONS argument. Change return type to int. Use
19841 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19842 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19843 pointer. Add status pointer argument. Return a pid instead of a
19844 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19845 changes. In non-stop mode, don't switch to a random thread.
19846 (linux_wait): Rename to...
19847 (linux_wait_1): ... this. Add target_options argument, and handle
19848 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19849 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19850 clean exit and signal exit code. Don't stop all threads in
19851 non-stop mode. In all-stop mode, only stop all threads when
19852 reporting a stop to GDB. Handle explicit thread stop requests.
19853 (async_file_flush, async_file_mark): New.
19854 (linux_wait): New.
19855 (send_sigstop): Use lwpid_of.
19856 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19857 interface changes. In non-stop mode, don't switch to a random
19858 thread.
19859 (linux_resume_one_lwp): Use lwpid_of.
19860 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19861 (linux_resume_one_thread): ... this. Handle resume_stop. In
19862 non-stop mode, don't look for pending flag in all threads.
19863 (resume_status_pending_p): Don't consider explicitly suspended
19864 threads.
19865 (my_waitpid): Reimplement. Emulate __WALL.
19866 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19867 Use lwpid_of.
19868 (sigchld_handler, linux_supports_non_stop, linux_async)
19869 (linux_start_non_stop): New.
19870 (linux_target_ops): Register linux_supports_non_stop, linux_async
19871 and linux_start_non_stop.
19872 (initialize_low): Install SIGCHLD handler.
19873 * thread-db.c (thread_db_create_event, find_one_thread)
19874 (thread_db_get_tls_address): Use lwpid_of.
19875 * win32-low.c (win32_detach): Adjust to use resume_kind.
19876 (win32_wait): Add `options' argument.
19877 * spu-low.c (spu_resume): Adjust to use resume_kind.
19878 (spu_wait): Add `options' argument.
19879
19880 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19881
19882 Decouple target code from remote protocol.
19883
19884 * target.h (enum target_waitkind): New.
19885 (struct target_waitstatus): New.
19886 (struct target_ops) <wait>: Return an unsigned long. Take a
19887 target_waitstatus pointer instead of a char pointer.
19888 (mywait): Likewise.
19889 * target.c (mywait): Change prototype to return an unsigned long.
19890 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19891 * server.h (thread_from_wait, old_thread_from_wait): Delete
19892 declarations.
19893 (prepare_resume_reply): Change prototype to take a
19894 target_waitstatus.
19895 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19896 (last_status, last_ptid): New.
19897 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19898 pid instead of a signal.
19899 (attach_inferior): Remove "status" and "signal" parameters.
19900 Adjust.
19901 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19902 not as an address.
19903 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19904 (handle_v_requests, myresume): Remove "status" and "signal"
19905 parameters. Adjust.
19906 (handle_status): New.
19907 (main): Delete local `status'. Adjust.
19908 * remote-utils.c: Include target.h.
19909 (prepare_resume_reply): Change prototype to take a
19910 target_waitstatus. Adjust.
19911
19912 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19913 interface.
19914 * spu-low.c (spu_wait): Adjust.
19915 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19916 Delete.
19917 (win32_wait): Adjust.
19918
19919 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19920
19921 * target.h (struct thread_resume): Delete leave_stopped member.
19922 (struct target_ops): Add a `n' argument to the `resume' callback.
19923 * server.c (start_inferior): Adjust.
19924 (handle_v_cont, myresume): Adjust.
19925 * linux-low.c (check_removed_breakpoint): Adjust to resume
19926 interface change, and to removed leave_stopped field.
19927 (resume_ptr): Delete.
19928 (struct thread_resume_array): New.
19929 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19930 resume interface change.
19931 (linux_continue_one_thread, linux_queue_one_thread)
19932 (resume_status_pending_p): Check if the resume field is NULL
19933 instead of checking the leave_stopped member.
19934 (linux_resume): Adjust to the target resume interface change.
19935 * spu-low.c (spu_resume): Adjust to the target resume interface
19936 change.
19937 * win32-low.c (win32_detach, win32_resume): Ditto.
19938
19939 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19940
19941 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19942 flag.
19943 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19944 pending.
19945 (linux_continue_one_thread): Only preserve the stepping flag if
19946 there's a pending breakpoint.
19947
19948 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19949
19950 * server.c (main): After the inferior having exited, call
19951 remote_close before exiting gdbserver.
19952
19953 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19954
19955 Fix size of FPSCR in Power 7 processors.
19956 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19957 (PPC_FEATURE_HAS_DFP): New #define.
19958 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19959 size of the FPSCR.
19960
19961 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19962
19963 * server.c (handle_query) Whitespace and formatting.
19964
19965 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19966
19967 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19968 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19969 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19970 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19971 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19972 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19973 Makefile.in, configure.ac: Fix whitespace throughout.
19974 * configure: Regenerate.
19975
19976 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19977
19978 * inferiors.c (find_inferior): Make it safe for the callback
19979 function to delete the currently iterated inferior.
19980
19981 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19982
19983 * Makefile.in (linuw_low_h): Move higher.
19984 (thread-db.o): Depend on $(linux_low_h).
19985
19986 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19987
19988 Rename "process" to "lwp" throughout.
19989
19990 * linux-low.c (all_processes): Rename to...
19991 (all_lwps): ... this.
19992 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19993 (add_process): Rename to ...
19994 (add_lwp): ... this. Adjust.
19995 (linux_create_inferior): Adjust.
19996 (linux_attach_lwp): Adjust.
19997 (linux_attach): Adjust.
19998 (linux_kill_one_process): Rename to ...
19999 (linux_kill_one_lwp): ... this. Adjust.
20000 (linux_kill): Adjust.
20001 (linux_detach_one_process): Rename to ...
20002 (linux_detach_one_lwp): ... this. Adjust.
20003 (linux_detach): Adjust.
20004 (check_removed_breakpoint): Adjust.
20005 (status_pending_p): Adjust.
20006 (linux_wait_for_process): Rename to ...
20007 (linux_wait_for_lwp): ... this. Adjust.
20008 (linux_wait_for_event): Adjust.
20009 (send_sigstop): Adjust.
20010 (wait_for_sigstop): Adjust.
20011 (stop_all_processes): Rename to ...
20012 (stop_all_lwps): ... this.
20013 (linux_resume_one_process): Rename to ...
20014 (linux_resume_one_lwp): ... this. Adjust.
20015 (linux_set_resume_request, linux_continue_one_thread)
20016 (linux_queue_one_thread, resume_status_pending_p)
20017 (usr_store_inferior_registers, regsets_store_inferior_registers)
20018 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
20019 Adjust.
20020 * linux-low.h (get_process): Rename to ...
20021 (get_lwp): ... this. Adjust.
20022 (get_thread_process): Rename to ...
20023 (get_thread_lwp): ... this. Adjust.
20024 (get_process_thread): Rename to ...
20025 (get_lwp_thread): ... this. Adjust.
20026 (struct process_info): Rename to ...
20027 (struct lwp_info): ... this.
20028 (all_processes): Rename to ...
20029 (all_lwps): ... this.
20030 * proc-service.c (ps_lgetregs): Adjust.
20031 * thread-db.c (thread_db_create_event, find_one_thread)
20032 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
20033
20034 2009-03-14 Pedro Alves <pedro@codesourcery.com>
20035
20036 * server.c (handle_query): Handle "qAttached".
20037
20038 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
20039
20040 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
20041 GPLv3, update license URL.
20042
20043 2009-03-01 Doug Evans <dje@google.com>
20044
20045 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
20046 (server_h): Add gdb_signals.h.
20047 (signals.o): Update.
20048 * server.h (target_signal_from_host,target_signal_to_host_p)
20049 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
20050
20051 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
20052
20053 * remote-utils.c (getpkt): Also generate remote-debug
20054 information if noack_mode is set.
20055
20056 2009-02-06 Pedro Alves <pedro@codesourcery.com>
20057
20058 * server.c (handle_query): Report qXfer:siginfo:read and
20059 qXfer:siginfo:write as supported and handle them.
20060 * target.h (struct target_ops) <qxfer_siginfo>: New field.
20061 * linux-low.c (linux_xfer_siginfo): New.
20062 (linux_target_ops): Set it.
20063
20064 2009-01-26 Pedro Alves <pedro@codesourcery.com>
20065
20066 * server.c (gdbserver_usage): Mention --remote-debug.
20067 (main): Accept '--remote-debug' switch.
20068
20069 2009-01-18 Doug Evans <dje@google.com>
20070
20071 * regcache.c (new_register_cache): No need to check result of xcalloc.
20072 * server.c (handle_search_memory): Back out calls to xmalloc,
20073 result is checked and error is returned to user upon failure.
20074 (handle_query): Ditto. Add more checks for result of malloc.
20075 (handle_v_cont): Check result of malloc, report error back to
20076 user upon failure.
20077 (handle_v_run): Ditto. Call freeargv.
20078 * server.h (freeargv): Declare.
20079 * utils.c (freeargv): New fn.
20080
20081 2009-01-15 Doug Evans <dje@google.com>
20082
20083 * gdbreplay.c (perror_with_name): Make arg const char *.
20084 * server.h (target_signal_to_name): Make return type const char *.
20085 * thread-db.c (thread_db_err_str): Make return type const char *.
20086 * utils.c (perror_with_name): Make arg const char *.
20087
20088 2009-01-14 Pedro Alves <pedro@codesourcery.com>
20089
20090 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
20091 when handling a EXIT_PROCESS_DEBUG_EVENT.
20092
20093 2009-01-06 Joel Brobecker <brobecker@adacore.com>
20094
20095 * gdbreplay.c (gdbreplay_version): Update copyright year.
20096 * server.c (gdbserver_version): Likewise.
20097
20098 2009-01-05 Doug Evans <dje@google.com>
20099
20100 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
20101 (handle_extended_wait): Improve comment.
20102
20103 2008-12-13 Doug Evans <dje@google.com>
20104
20105 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
20106 * server.h (ATTR_MALLOC): New macro.
20107 (xmalloc,xcalloc,xstrdup): Declare.
20108 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
20109 * inferiors.c: Ditto.
20110 * linux-low.c: Ditto.
20111 * mem-break.c: Ditto.
20112 * regcache.c: Ditto.
20113 * remote-utils.c: Ditto.
20114 * server.c: Ditto.
20115 * target.c: Ditto.
20116 * win32-low.c: Ditto.
20117
20118 2008-12-12 Doug Evans <dje@google.com>
20119
20120 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
20121 in debugging printf.
20122
20123 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
20124
20125 2008-12-09 Doug Evans <dje@google.com>
20126
20127 * linux-low.h (struct process_info): Delete member tid, unused.
20128 * thread-db.c (find_one_thread): Update.
20129 (maybe_attach_thread): Update.
20130
20131 2008-12-02 Pedro Alves <pedro@codesourcery.com>
20132
20133 * target.h (struct target_ops): Add qxfer_osdata member.
20134 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
20135 and dirent.h.
20136 (linux_qxfer_osdata): New functions.
20137 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
20138 callback.
20139 * server.c (handle_query): Handle "qXfer:osdata:read:".
20140 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
20141 (buffer_xml_printf): New functions.
20142 * server.h (struct buffer): New.
20143 (buffer_grow_str, buffer_grow_str0): New macros.
20144 (buffer_grow, buffer_free, buffer_init, buffer_finish)
20145 (buffer_xml_printf): Declare.
20146
20147 2008-11-24 Doug Evans <dje@google.com>
20148
20149 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
20150
20151 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
20152
20153 * server.c (handle_v_run): Always use the supplied argument list.
20154
20155 2008-11-19 Bob Wilson <bob.wilson@acm.org>
20156
20157 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
20158 (xtensa_regmap_table): Add entry for scompare1.
20159
20160 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
20161
20162 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
20163 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
20164 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
20165 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
20166 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
20167 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
20168 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
20169 XML target descriptions.
20170 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
20171 when inferior is running on an ISA 2.05 or later processor. Add
20172 special case to return offset for full 64-bit slot of FPSCR when
20173 in 32-bits.
20174
20175 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
20176
20177 * Makefile.in (SFILES, clean): Added sparc64 files.
20178 (reg-sparc64.o, reg-sparc64.c): New.
20179 * configure.srv (sparc*-*-linux*): New configuration.
20180 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
20181 syscall arguments for SPARC.
20182 (regsets_store_inferior_registers): Likewise.
20183 * linux-sparc-low.c: New file.
20184
20185 2008-10-21 Doug Evans <dje@google.com>
20186
20187 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
20188 (READLINE_DIR,READLINE_DEP): Delete.
20189 (INTERNAL_CFLAGS): Update.
20190 (LINTFLAGS): Update.
20191
20192 2008-10-10 Pedro Alves <pedro@codesourcery.com>
20193
20194 * server.c (handle_v_run): If GDB didn't specify an argv, use the
20195 whole argv from the last run, not just argv[0].
20196
20197 2008-09-08 Pedro Alves <pedro@codesourcery.com>
20198
20199 * regcache.c (new_register_cache): Return NULL if the register
20200 cache size isn't known yet.
20201 (free_register_cache): Avoid dereferencing a NULL regcache.
20202
20203 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20204
20205 * configure.srv: Merge MIPS and MIPS64.
20206
20207 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
20208
20209 * Makefile.in (uninstall): Apply $(EXEEXT) too.
20210
20211 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
20212
20213 * Makefile.in: Add required vsx dependencies.
20214
20215 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
20216 Declare init_registers_powerpc_vsx32l.
20217 Declare init_registers_powerpc_vsx64l.
20218 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
20219 (ppc_arch_setup): Check for VSX in hwcap.
20220 (ppc_fill_vsxregset): New function.
20221 (ppc_store_vsxregset): New function.
20222 Add new VSX entry in regset_info target_regsets.
20223
20224 * configure.srv: Add new VSX dependencies.
20225
20226 2008-08-12 Pedro Alves <pedro@codesourcery.com>
20227
20228 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
20229 (remote_open): Set or clear transport_is_reliable.
20230 (putpkt_binary): Don't expect acks in noack mode.
20231 (getpkt): Don't send ack/nac in noack mode.
20232 * server.c (handle_general_set): Handle QStartNoAckMode.
20233 (handle_query): If connected by tcp pass QStartNoAckMode+ in
20234 qSupported.
20235 (main): Reset noack_mode on every connection.
20236 * server.h (noack_mode): Declare.
20237
20238 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
20239
20240 * Makefile.in (GDBREPLAY_OBS): New variable.
20241 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
20242
20243 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
20244 Daniel Jacobowitz <dan@codesourcery.com>
20245
20246 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
20247 (usr_store_inferior_registers): Likewise.
20248 (regsets_store_inferior_registers): Likewise.
20249
20250 2008-07-31 Rolf Jansen <rj@surtec.com>
20251 Pedro Alves <pedro@codesourcery.com>
20252
20253 * configure.ac: Check for memmem declaration.
20254 * server.c [HAVE_MALLOC_H]: Include malloc.h.
20255 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
20256 (disable_packet_qfThreadInfo): Unconditionally compile.
20257 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
20258 * configure, config.in: Regenerate.
20259
20260 2008-07-28 Doug Kwan <dougkwan@google.com>
20261
20262 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
20263 (linux_write_memory): Remove declaration of errno.
20264
20265 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
20266
20267 * linux-low.c (handle_extended_wait): Do not use "status"
20268 variable uninitialized.
20269
20270 2008-07-07 Pedro Alves <pedro@codesourcery.com>
20271
20272 * server.c (handle_v_attach): Inhibit reporting dll changes.
20273
20274 2008-06-27 Pedro Alves <pedro@codesourcery.com>
20275
20276 * remote-utils.c (prepare_resume_reply): If requested, don't
20277 output "thread:TID" in the T stop reply.
20278
20279 * server.c (disable_packet_vCont, disable_packet_Tthread)
20280 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
20281 (handle_query): If requested, disable support for qC, qfThreadInfo
20282 and qsThreadInfo.
20283 (handle_v_requests): If requested, disable support for vCont.
20284 (gdbserver_show_disableable): New.
20285 (main): Handle --disable-packet and --disable-packet=LIST.
20286
20287 * server.h (disable_packet_vCont, disable_packet_Tthread)
20288 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
20289
20290 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
20291
20292 * server.c (gdbserver_usage): Mention --version.
20293
20294 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20295
20296 * Makefile.in (gdbreplay.o): New rule.
20297
20298 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20299
20300 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20301 message, not gdbserver.
20302
20303 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20304 Nathan Sidwell <nathan@codesourcery.com>
20305 Joseph Myers <joseph@codesourcery.com>
20306
20307 * acinclude.m4: Include ../../config/acx.m4.
20308 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20309 * configure, config.in: Regenerate.
20310 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20311 * server.c (gdbserver_version): Print PKGVERSION.
20312 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20313 (main): Adjust gdbserver_usage calls.
20314 * gdbreplay.c (version, host_name): Add declarations.
20315 (gdbreplay_version, gdbreplay_usage): New.
20316 (main): Accept --version and --help options.
20317
20318 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20319
20320 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20321 (arm_breakpoint_at): Handle Thumb.
20322 (the_low_target): Add comment.
20323
20324 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20325
20326 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20327
20328 2008-05-09 Doug Evans <dje@google.com>
20329
20330 * server.h (decode_search_memory_packet): Declare.
20331 * remote-utils.c (decode_search_memory_packet): New fn.
20332 * server.c (handle_search_memory_1): New fn.
20333 (handle_search_memory): New fn.
20334 (handle_query): Process qSearch:memory packets.
20335
20336 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20337
20338 * regcache.c (registers_length): Remove.
20339 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20340 full register packet.
20341 * regcache.h (registers_length): Remove prototype.
20342 * server.h (PBUFSIZ): Define to 16384.
20343
20344 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20345
20346 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20347 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20348 powerpc-64l.o, and powerpc-altivec64l.o.
20349 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20350 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20351 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20352 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20353 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20354 to srv_xmlfiles.
20355
20356 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20357 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20358 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20359 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20360 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20361 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20362 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20363 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20364 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20365 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20366 (clean): Update.
20367
20368 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20369 (init_registers_powerpc_32l): ... this new prototype.
20370 (init_registers_powerpc_32): Remove, replace by ...
20371 (init_registers_powerpc_altivec32l): ... this new prototype.
20372 (init_registers_powerpc_e500): Remove, replace by ...
20373 (init_registers_powerpc_e500l): ... this new prototype.
20374 (init_registers_ppc64): Remove, replace by ...
20375 (init_registers_powerpc_64l): ... this new prototype.
20376 (init_registers_powerpc_64): Remove, replace by ...
20377 (init_registers_powerpc_altivec64l): ... this new prototype.
20378 (ppc_num_regs): Set to 73.
20379 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20380 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20381 (ppc_cannot_store_register): Handle orig_r3 and trap.
20382 (ppc_arch_setup): Update init_registers_... calls.
20383 (ppc_fill_gregset): Handle orig_r3 and trap.
20384
20385 * inferiors.c (clear_inferiors): Reset current_inferior.
20386
20387 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20388
20389 * acinclude.m4: Add override.m4.
20390 * configure: Regenerate.
20391
20392 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20393
20394 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20395 initial call to init_register_ppc64.
20396
20397 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20398
20399 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20400 single powerpc*-*-linux* case.
20401 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20402
20403 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20404
20405 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20406 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20407 from reg_xmlfiles.
20408 * linux-ppc-low.c: Include <elf.h>.
20409 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20410 (ppc_hwcap): New global variable.
20411 (ppc_regmap): Remove __SPE__ #ifdef sections.
20412 (ppc_regmap_e500): New global variable.
20413 (ppc_cannot_store_register): Update __SPE__ special case.
20414 (ppc_get_hwcap): New function.
20415 (ppc_arch_setup): Use it to determine whether inferior supports
20416 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20417 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20418 Do not access registers if target does not support AltiVec.
20419 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20420 Do not access registers if target does not support SPE.
20421 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20422
20423 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20424
20425 * linux-low.c (disabled_regsets, num_regsets): New.
20426 (use_regsets_p): Delete.
20427 (linux_wait_for_process): Clear disabled_regsets.
20428 (regsets_fetch_inferior_registers): Check and set it.
20429 (regsets_store_inferior_registers): Likewise.
20430 (linux_fetch_registers, linux_store_registers): Do not use
20431 use_regsets_p.
20432 (initialize_low): Allocate disabled_regsets.
20433
20434 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20435
20436 * Makefile.in (LIBOBJS): New.
20437 (OBS): Use LIBOBJS.
20438 (memmem.o): New rule.
20439 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20440 * configure: Regenerated.
20441
20442 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20443
20444 * server.c (handle_query): Never return "unsupported" for
20445 qXfer:features:read queries.
20446
20447 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20448
20449 * server.c (get_features_xml): Fix inverted condition.
20450 (handle_query): Always support qXfer:feature:read.
20451
20452 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20453
20454 * server.c (wrapper_argv): New.
20455 (start_inferior): Handle wrapper_argv. If set, expect an extra
20456 trap.
20457 (gdbserver_usage): Document --wrapper.
20458 (main): Parse --wrapper.
20459
20460 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20461
20462 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20463 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20464 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20465 (ppc_set_pc): Likewise.
20466 (ppc_arch_setup): New function.
20467 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20468 of collect_register.
20469 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20470
20471 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20472
20473 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20474 instead of linux-ppc64-low.o.
20475 * linux-ppc64-low.c: Remove file.
20476 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20477 (linux-ppc64-low.o): Remove rule.
20478
20479 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20480 (init_registers_powerpc_64): Likewise.
20481 (ppc_regmap): Conditionally define depending on __powerpc64__.
20482 (ppc_cannot_store_register): Do not special-case "fpscr" when
20483 compiled on __powerpc64__.
20484 (ppc_collect_ptrace_register): New function.
20485 (ppc_supply_ptrace_register): New function.
20486 (ppc_breakpoint): Change type to "unsigned int".
20487 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20488 (the_low_target): Conditionally provide initializers for the
20489 arch_setup member depending on __powerpc64__. Install
20490 collect_ptrace_register and supply_ptrace_register members.
20491
20492 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20493
20494 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20495 * server.c (gdbserver_xmltarget): Define.
20496 (get_features_xml): Use it to replace "target.xml" and arch_string.
20497
20498 * configure.srv: Remove srv_xmltarget. Add XML files that were
20499 mentioned there to srv_xmlfiles instead. Remove conditional tests
20500 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20501 srv_xmlfiles and srv_regobj to include all possible choices.
20502 * configure.ac (srv_xmltarget): Remove.
20503 (srv_xmlfiles): Do not add "target.xml".
20504 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20505 checks for supplementary target information.
20506 * configure: Regenerate.
20507 * Makefile.in (XML_TARGET): Remove.
20508 (target.xml): Remove rule.
20509 (clean): Do not clean up target.xml.
20510 (.PRECIOUS): Do not mention target.xml.
20511
20512 * target.h (struct target_ops): Remove arch_string member.
20513 * linux-low.c (linux_arch_string): Remove.
20514 (linux_target_ops): Remove arch_string initializer.
20515 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20516 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20517 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20518 * spu-low.c (spu_arch_string): Remove.
20519 (spu_target_ops): Remove arch_string initializer.
20520 * win32-low.c (win32_arch_string): Remove.
20521 (win32_target_ops): Remove arch_string initializer.
20522 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20523 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20524 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20525
20526 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20527
20528 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20529 by collect_ptrace_register and supply_ptrace_register hooks.
20530 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20531 instead of checking for the_low_target.left_pad_xfer.
20532 (usr_store_inferior_registers): Use collect_ptrace_register callback
20533 instead of checking for the_low_target.left_pad_xfer.
20534
20535 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20536 (s390_supply_ptrace_register): Likewise.
20537 (s390_fill_gregset): Call s390_collect_ptrace_register.
20538 (the_low_target): Update.
20539
20540 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20541 (ppc_supply_ptrace_register): Likewise.
20542 (the_low_target): Update.
20543
20544 * linux-i386-low.c (the_low_target): Update.
20545 * linux-x86-64-low.c (the_low_target): Update.
20546
20547 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20548
20549 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20550 reg-s390.o and reg-s390x.o.
20551
20552 * linux-low.c (new_inferior): New global variable.
20553 (linux_create_inferior, linux_attach): Set it.
20554 (linux_wait_for_process): Call the_low_target.arch_setup after the
20555 target has stopped for the first time.
20556 (initialize_low): Do not call the_low_target.arch_setup.
20557
20558 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20559 (s390_set_pc): Likewise.
20560 (s390_arch_setup): New function.
20561 (the_low_target): Use s390_arch_setup as arch_setup routine.
20562
20563 * regcache.c (realloc_register_cache): New function.
20564 (set_register_cache): Call it for each existing regcache.
20565
20566 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20567
20568 * server.h (init_registers): Remove prototype.
20569
20570 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20571 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20572 instead of init_registers ().
20573 * linux-arm-low.c (init_registers_arm): Add prototype.
20574 (init_registers_arm_with_iwmmxt): Likewise.
20575 (the_low_target): Add initializer for arch_setup field.
20576 * linux-cris-low.c (init_registers_cris): Add prototype.
20577 (the_low_target): Add initializer for arch_setup field.
20578 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20579 (the_low_target): Add initializer for arch_setup field.
20580 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20581 (the_low_target): Add initializer for arch_setup field.
20582 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20583 (the_low_target): Add initializer for arch_setup field.
20584 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20585 (the_low_target): Add initializer for arch_setup field.
20586 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20587 (the_low_target): Add initializer for arch_setup field.
20588 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20589 (init_registers_mips64_linux): Likewise.
20590 (the_low_target): Add initializer for arch_setup field.
20591 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20592 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20593 (the_low_target): Add initializer for arch_setup field.
20594 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20595 (init_registers_powerpc_64): Likewise.
20596 (the_low_target): Add initializer for arch_setup field.
20597 * linux-s390-low.c (init_registers_s390): Add prototype.
20598 (init_registers_s390x): Likewise.
20599 (the_low_target): Add initializer for arch_setup field.
20600 * linux-sh-low.c (init_registers_sh): Add prototype.
20601 (the_low_target): Add initializer for arch_setup field.
20602 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20603 (the_low_target): Add initializer for arch_setup field.
20604 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20605 (the_low_target): Add initializer for arch_setup field.
20606
20607 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20608 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20609 instead of init_registers ().
20610 * win32-arm-low.c (init_registers_arm): Add prototype.
20611 (the_low_target): Add initializer for arch_setup field.
20612 * win32-i386-low.c (init_registers_i386): Add prototype.
20613 (the_low_target): Add initializer for arch_setup field.
20614
20615 * spu-low.c (init_registers_spu): Add prototype.
20616 (initialize_low): Call initialie_registers_spu () instead of
20617 initialize_registers ().
20618
20619 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20620
20621 * server.c (handle_v_requests): When handling the vRun and vAttach
20622 packets, if already debugging a process, don't kill it. Return an
20623 error instead.
20624
20625 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20626
20627 * server.c (handle_query): Correct length check.
20628
20629 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20630
20631 * win32-low.c (do_initial_child_stuff): Add process handle
20632 parameter. Set current_process_handle and current_process_id from the
20633 parameters. Clear globals.
20634 (win32_create_inferior): Don't set current_process_handle and
20635 current_process_id here. Instead pass them on the call to
20636 do_initial_child_stuff.
20637 (win32_attach): Likewise.
20638 (win32_clear_inferiors): New.
20639 (win32_kill): Don't close the current process handle or the
20640 current thread handle here. Instead call win32_clear_inferiors.
20641 (win32_detach): Don't open a new handle to the process. Call
20642 win32_clear_inferiors.
20643 (win32_join): Don't rely on current_process_handle; open a new
20644 handle using the process id.
20645 (win32_wait): Call win32_clear_inferiors when the inferior process
20646 has exited.
20647
20648 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20649
20650 * server.c (monitor_show_help): Add "exit".
20651
20652 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20653
20654 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20655 (clean): Add reg-xtensa.c.
20656 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20657 * configure.srv (xtensa*-*-linux*) New target.
20658 * linux-xtensa-low.c: New.
20659 * xtensa-xtregs.c: New.
20660
20661 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20662
20663 * hostio.c: Don't include errno.h.
20664 (errno_to_fileio_errno): Move to hostio-errno.
20665 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20666 error number outputting to the target->hostio_last_error callback.
20667 (hostio_packet_error): Use FILEIO_EINVAL directly.
20668 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20669 calls to hostio_error.
20670 * hostio-errno.c: New.
20671 * server.h (hostio_last_error_from_errno): Declare.
20672 * target.h (target_ops): Add hostio_last_error member.
20673 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20674 as hostio_last_error handler.
20675 * spu-low.c (spu_target_ops): Likewise.
20676 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20677 (wince_hostio_last_error): New functions.
20678 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20679 as hostio_last_error handler.
20680 (win32_target_ops) [!_WIN32_WCE]: Register
20681 hostio_last_error_from_errno as hostio_last_error handler.
20682 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20683 (hostio-errno.o): New rule.
20684 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20685 * configure.srv (srv_hostio_err_objs): New variable. Default to
20686 hostio-errno.o.
20687 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20688 * configure: Regenerate.
20689
20690 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20691
20692 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20693 (linux_kill, linux_detach): Clean up the process list.
20694 * remote-utils.c (remote_open): Improve port number parsing.
20695 (putpkt_binary, input_interrupt): Only send interrupts if the target
20696 is running.
20697 * server.c (extended_protocol): Make static.
20698 (attached): Define earlier.
20699 (exit_requested, response_needed, program_argv): New variables.
20700 (target_running): New.
20701 (start_inferior): Clear attached here.
20702 (attach_inferior): Set attached here.
20703 (require_running): Define.
20704 (handle_query): Use require_running and target_running. Implement
20705 "monitor exit".
20706 (handle_v_attach, handle_v_run): New.
20707 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20708 (gdbserver_usage): Update.
20709 (main): Redo argument parsing. Handle --debug and --multi. Handle
20710 --attach along with other options or after the port. Save
20711 program_argv. Support no initial program. Resynchronize
20712 communication with GDB after an error. Handle "monitor exit".
20713 Use require_running and target_running. Always allow the extended
20714 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20715 restart in extended mode.
20716 * README: Refer to the GDB manual. Update --attach usage.
20717
20718 2007-12-20 Andreas Schwab <schwab@suse.de>
20719
20720 * linux-low.c (STACK_SIZE): Define.
20721 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20722 (linux_test_for_tracefork): Likewise.
20723
20724 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20725
20726 * linux-low.c (linux_wait_for_event): Update messages. Do not
20727 reinsert auto-delete breakpoints.
20728 * mem-break.c (struct breakpoint): Change return type of handler to
20729 int.
20730 (set_breakpoint_at): Update handler type.
20731 (reinsert_breakpoint_handler): Return 1 instead of calling
20732 delete_breakpoint.
20733 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20734 setting a new one.
20735 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20736 * mem-break.h (set_breakpoint_at): Update handler type.
20737 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20738 * win32-low.c (auto_delete_breakpoint): New.
20739 (get_child_debug_event): Use it.
20740
20741 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20742
20743 * configure.ac: Check for pread and pwrite.
20744 * hostio.c (handle_pread): Fall back to lseek and read.
20745 (handle_pwrite): Fall back to lseek and write.
20746 * config.in, configure: Regenerated.
20747
20748 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20749
20750 * server.c (myresume): Add own_buf argument.
20751 (main): Update calls.
20752
20753 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20754
20755 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20756 * remote-utils.c (remote_open): Do not call disable_async_io.
20757 (block_async_io): Delete.
20758 (unblock_async_io): Make static.
20759 (initialize_async_io): New.
20760 * server.c (handle_v_cont): Handle async I/O here.
20761 (myresume): Likewise. Move other common resume tasks here...
20762 (main): ... from here. Call initialize_async_io. Disable async
20763 I/O before the main loop.
20764 * server.h (initialize_async_io): Declare.
20765 (block_async_io, unblock_async_io): Delete prototypes.
20766 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20767
20768 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20769
20770 * remote-utils.c (readchar): Allow binary data in received messages.
20771
20772 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20773
20774 * win32-low.c (attaching): New global.
20775 (win32_create_inferior): Clear the `attaching' global.
20776 (win32_attach): Set the `attaching' global.
20777 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20778 attaching. Only set a breakpoint at the entry point if not
20779 attaching.
20780
20781 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20782
20783 * server.c (main): Don't report dll events on the initial
20784 connection on attaches.
20785
20786 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20787
20788 * server.c (main): Relax numerical bases supported for the pid of
20789 the --attach command line argument.
20790
20791 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20792
20793 * win32-low.c (win32_attach): Call OpenProcess before
20794 DebugActiveProcess, not after. Add last error output to error
20795 call.
20796
20797 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20798
20799 * win32-low.c (win32_get_thread_context)
20800 (win32_set_thread_context): New functions.
20801 (thread_rec): Use win32_get_thread_context.
20802 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20803 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20804 field.
20805
20806 2007-12-03 Leo Zayas
20807 Pedro Alves <pedro_alves@portugalmail.pt>
20808
20809 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20810 global variables.
20811 (child_add_thread): Minor cleanup.
20812 (child_continue): Resume artificially suspended threads before
20813 calling ContinueDebugEvent.
20814 (suspend_one_thread): New.
20815 (fake_breakpoint_event): New.
20816 (get_child_debug_event): Change return type to int. Check here if
20817 gdb sent an interrupt request. If a soft interrupt was requested,
20818 fake a breakpoint event. Return 0 if there is no event to handle,
20819 and 1 otherwise.
20820 (win32_wait): Don't check here if gdb sent an interrupt request.
20821 Ensure there is a valid event to handle.
20822 (win32_request_interrupt): Add soft interruption method as last
20823 resort.
20824
20825 2007-12-03 Leo Zayas
20826 Pedro Alves <pedro_alves@portugalmail.pt>
20827
20828 * win32-low.h (win32_thread_info): Add descriptions to the
20829 structure members. Replace `suspend_count' counter by a
20830 `suspended' flag.
20831 * win32-low.c (thread_rec): Update condition of when to get the
20832 context from the inferior. Rely on ContextFlags being set if it
20833 has already been retrieved. Only suspend the inferior thread if
20834 we haven't already. Warn if that fails.
20835 (continue_one_thread): s/suspend_count/suspended/. Only call
20836 ResumeThread once. Warn if that fails.
20837
20838 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20839
20840 * win32-low.c (win32_wait): Don't read from the inferior when it
20841 has already exited.
20842
20843 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20844
20845 * Makefile.in (win32_low_h): New variable.
20846 (win32-low.o): Add dependency on $(win32_low_h).
20847 (win32-arm-low.o, win32-i386-low.o): New rules.
20848
20849 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20850
20851 * hostio.c: Correct copyright year.
20852
20853 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20854
20855 * Makefile.in (OBS): Add hostio.o.
20856 (hostio.o): New rule.
20857 * server.h (handle_vFile): Declare.
20858 * hostio.c: New file.
20859 * server.c (handle_v_requests): Take packet_len and new_packet_len
20860 for binary packets. Call handle_vFile.
20861 (main): Update call to handle_v_requests.
20862
20863 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20864
20865 * linux-low.c: Include <sched.h>.
20866
20867 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20868
20869 * linux-low.c (linux_tracefork_grandchild): New.
20870 (linux_tracefork_child): Use clone.
20871 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20872
20873 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20874
20875 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20876
20877 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20878
20879 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20880
20881 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20882
20883 * inferiors.c (change_inferior_id): Delete.
20884 (add_pid_to_list, pull_pid_from_list): New.
20885 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20886 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20887 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20888 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20889 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20890 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20891 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20892 (using_threads): Always set to 1.
20893 (handle_extended_wait): New.
20894 (add_process): Do not set TID.
20895 (linux_create_inferior): Set must_set_ptrace_flags.
20896 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20897 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20898 (linux_thread_alive): Rename TID argument to LWPID.
20899 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20900 (linux_wait_for_event): Do not use TID or check using_threads. Update
20901 call to dead_thread_notify. Call handle_extended_wait.
20902 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20903 (send_sigstop): Delete sigstop_sent.
20904 (wait_for_sigstop): Avoid TID.
20905 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20906 (linux_test_for_tracefork): New.
20907 (linux_lookup_signals): Use thread_db_active and
20908 linux_supports_tracefork_flag.
20909 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20910 * linux-low.h (get_process_thread): Avoid TID.
20911 (struct process_ifo): Move thread_known and tid to the end. Remove
20912 sigstop_sent.
20913 (linux_attach_lwp, thread_db_init): Update prototypes.
20914 * server.h (change_inferior_id): Delete prototype.
20915 (add_pid_to_list, pull_pid_from_list): New prototypes.
20916 * thread-db.c (thread_db_use_events): New.
20917 (find_first_thread): Rename to...
20918 (find_one_thread): ...this. Update callers and messages. Do not
20919 call fatal. Check thread_db_use_events. Do not call
20920 change_inferior_id or new_thread_notify.
20921 (maybe_attach_thread): Update. Do not call new_thread_notify.
20922 (thread_db_init): Set thread_db_use_events. Check use_events.
20923 * utils.c (fatal, warning): Correct message prefix.
20924
20925 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20926
20927 * Makefile.in (clean): Remove new files.
20928 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20929 (powerpc-64.o, powerpc-64.c): New rules.
20930 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20931 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20932 with SPE.
20933 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20934 SPE targets.
20935 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20936 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20937 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20938 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20939 (target_regsets): Add AltiVec and SPE register sets.
20940 * configure.ac: Check for AltiVec and SPE.
20941 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20942 (ppc_fill_vrregset, ppc_store_vrregset): New.
20943 (target_regsets): Add AltiVec register set.
20944 * configure: Regenerated.
20945
20946 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20947
20948 * linux-low.c (O_LARGEFILE): Define.
20949 (linux_read_memory): Use /proc/PID/mem.
20950 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20951 * configure, config.in: Regenerated.
20952
20953 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20954
20955 * linux-low.c (linux_wait_for_event): Do not pass signals while
20956 single-stepping.
20957
20958 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20959
20960 * win32-low.c (create_process): New.
20961 (win32_create_inferior): Use create_process instead of
20962 CreateProcess. If create_process failed retry appending an ".exe"
20963 suffix. Store the GetLastError result immediatelly after
20964 create_process calls and use it on the call to error.
20965
20966 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20967
20968 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20969
20970 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20971
20972 * configure.ac: Switch license to GPLv3.
20973
20974 2007-08-01 Michael Snyder <msnyder@access-company.com>
20975
20976 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20977
20978 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20979
20980 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20981 typedef.
20982 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20983 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20984 CloseToolhelp32Snapshot.
20985 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20986 CloseToolhelp32Snapshot.
20987
20988 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20989
20990 * server.c (main): Check for inferior exit before main loop.
20991
20992 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20993
20994 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20995 instead of on tmp_desc.
20996
20997 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20998 Daniel Jacobowitz <dan@codesourcery.com>
20999
21000 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
21001 (add_thread): Minor cleanups.
21002 (clear_inferiors): Move lower in the file. Clear the DLL
21003 list.
21004 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
21005 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
21006 (xml_escape_text): New.
21007 * server.c (handle_query): Handle qXfer:libraries:read. Report it
21008 for qSupported.
21009 (handle_v_cont): Report errors.
21010 (gdbserver_version): Update.
21011 (main): Correct size of own_buf. Do not report initial DLL events.
21012 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
21013 (unloaded_dll, xml_escape_text): New.
21014 * win32-low.c (enum target_waitkind): Update comments.
21015 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
21016 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
21017 (win32_EnumProcessModules, win32_GetModuleInformation)
21018 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
21019 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
21020 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
21021 (win32_Module32First, win32_Module32Next, load_toolhelp)
21022 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
21023 (get_child_debug_event): Handle DLL events.
21024 (win32_wait): Likewise.
21025
21026 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21027
21028 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
21029 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
21030
21031 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
21032
21033 * win32-low.c (handle_output_debug_string): Ignore event if not
21034 waiting.
21035
21036 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
21037
21038 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
21039
21040 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
21041
21042 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
21043
21044 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
21045
21046 * inferiors.c (change_inferior_id): Add comment.
21047 * linux-low.c (check_removed_breakpoint): Add an early
21048 prototype. Improve debug output.
21049 (linux_attach): Doc update.
21050 (linux_detach_one_process, linux_detach): Clean up before releasing
21051 each process.
21052 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
21053 * linux-low.h (struct process_info): Doc improvement.
21054 * mem-break.c (delete_all_breakpoints): New.
21055 * mem-break.h (delete_all_breakpoints): New prototype.
21056 * thread-db.c (find_first_thread): New.
21057 (thread_db_create_event): Call it instead of
21058 thread_db_find_new_threads. Clean up unused variables.
21059 (maybe_attach_thread): Remove first thread handling.
21060 (thread_db_find_new_threads): Use find_first_thread.
21061 (thread_db_get_tls_address): Likewise.
21062
21063 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
21064
21065 * thread-db.c (thread_db_find_new_threads): Add prototype.
21066 (thread_db_create_event): Check for the main thread before adding
21067 a new thread.
21068 (maybe_attach_thread): Only enable event reporting if TID == 0.
21069 (thread_db_get_tls_address): Check for new threads.
21070
21071 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
21072
21073 * linux-low.c (linux_create_inferior): Try execv before execvp.
21074 * spu-low.c (spu_create_inferior): Likewise.
21075
21076 2007-06-13 Mike Frysinger <vapier@gentoo.org>
21077
21078 * linux-low.c (linux_create_inferior): Change execv to execvp.
21079 * spu-low.c (spu_create_inferior): Likewies.
21080
21081 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
21082
21083 * Makefile.in (clean): Clean new files instead of deleted ones.
21084 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
21085 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
21086 rules.
21087 * configure.srv: Specify XML files and new regformats for MIPS and
21088 MIPS64 GNU/Linux.
21089 * linux-mips-low.c (mips_num_regs): Set to only used registers.
21090 (mips_regmap): Do not fetch $0. Remove unused registers. Add
21091 an entry for the restart register.
21092 (mips_cannot_fetch_register, mips_cannot_store_register)
21093 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
21094 register names to match the XML descriptions.
21095 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
21096 restart register instead of $0.
21097
21098 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
21099 Markus Deuling <deuling@de.ibm.com>
21100
21101 * remote-utils.c (decode_xfer_write): New function.
21102 * server.h (decode_xfer_write): Add prototype.
21103 * server.c (handle_query): Add PACKET_LEN argument. Support
21104 qXfer:spu:read and qXfer:spu:write packets.
21105 (main): Pass packet_len to handle_query.
21106 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
21107 * target.h (target_ops): Add qxfer_spu.
21108
21109 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
21110
21111 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
21112 accessing non-seekable spufs files.
21113
21114 2007-05-16 Markus Deuling <deuling@de.ibm.com>
21115
21116 * server.c (handle_query): Add reply for qC packet.
21117
21118 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21119 Leo Zayas <lerele@champenstudios@com>
21120
21121 * server.h (check_remote_input_interrupt_request): New function.
21122 * remote_utils.c (INVALID_DESCRIPTOR): New define.
21123 (remote_desc): Initialize with INVALID_DESCRIPTOR.
21124 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
21125 (check_remote_input_interrupt_request): New function.
21126 * server.h (check_remote_input_interrupt_request): Declare.
21127 * win32-low.c (winapi_DebugBreakProcess,
21128 winapi_GenerateConsoleCtrlEvent): New typedefs.
21129 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
21130 to 250 ms.
21131 (win32_wait): Check for remote interrupt request
21132 with check_remote_input_interrupt_request.
21133 (win32_request_interrupt): New function.
21134 (win32_target_op): Set request_interrupt to win32_request_interrupt.
21135
21136 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21137
21138 * win32-low.c (debug_registers_changed,
21139 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
21140 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
21141 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
21142 (thread_rec): Get context using the low target.
21143 (child_add_thread): Call thread_added on the low target,
21144 which does the same thing.
21145 (regptr): Delete.
21146 (do_initial_child_stuff): Remove debug registers references.
21147 Set context using the low target. Resume threads after
21148 setting the contexts.
21149 (child_continue): Remove dead variable. Remove debug
21150 registers references.
21151 (child_fetch_inferior_registers): Go through the low target.
21152 (do_child_store_inferior_registers): Remove.
21153 (child_store_inferior_registers): Go through the low target.
21154 (win32_resume): Remove debug registers references.
21155 Set context using the low target.
21156 (handle_exception): Change return type to void. Don't record
21157 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
21158 first chance exception.
21159 (get_child_debug_event): Change return type to void. Remove
21160 goto loop. Always return after waiting for debug event.
21161 (win32_wait): Convert to switch statement. Handle spurious
21162 events.
21163
21164 * win32-i386-low.c (debug_registers_changed,
21165 debug_registers_used): New.
21166 (initial_stuff): Rename to ...
21167 (i386_initial_stuff): ... this. Clear debug registers
21168 state variables.
21169 (store_debug_registers): Delete.
21170 (i386_get_thread_context): New.
21171 (load_debug_registers): Delete.
21172 (i386_set_thread_context): New.
21173 (i386_thread_added): New.
21174 (single_step): Rename to ...
21175 (i386_single_step): ... this.
21176 (do_fetch_inferior_registers): Rename to ...
21177 (i386_fetch_inferior_register): ... this.
21178 (i386_store_inferior_register): New.
21179 (the_low_target): Adapt to new interface.
21180
21181 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
21182 (arm_get_thread_context): New.
21183 (arm_set_thread_context): New.
21184 (regptr): New.
21185 (do_fetch_inferior_registers): Rename to ...
21186 (arm_fetch_inferior_register): ... this.
21187 (arm_store_inferior_register): New.
21188 (arm_wince_breakpoint): Reimplement as unsigned long.
21189 (arm_wince_breakpoint_len): Define.
21190 (the_low_target): Adapt to new interface.
21191
21192 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
21193 load_debug_registers. Add get_thread_context, set_thread_context,
21194 thread_added and store_inferior_register. Rename
21195 fetch_inferior_registers to fetch_inferior_register.
21196 (regptr): Remove declaration.
21197
21198 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21199
21200 * linux-low.c (linux_detach): Change return type to int. Return 0.
21201 * spu-low.c (spu_detach): Likewise.
21202
21203 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21204
21205 * target.h (target_ops): Change return type of detach to int.
21206 Add join.
21207 (join_inferior): New.
21208 * server.c (main): Don't skip detach support on mingw32.
21209 If the inferior doesn't support detaching return error.
21210 Call join_inferior instead of using waitpid.
21211 * linux-low.c (linux_join): New.
21212 (linux_target_op): Add linux_join.
21213 * spu-low.c (spu_join): New.
21214 (spu_target_ops): Add spu_join.
21215 * win32-low.c (win32_detach): Adapt to new interface.
21216 Reopen current_process_handle before detaching. Issue a child
21217 resume before detaching.
21218 (win32_join): New.
21219 (win32_target_op): Add win32_join.
21220
21221 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21222
21223 * win32-low.c (win32-attach): Fix return value.
21224 * target.h (target_ops): Describe ATTACH return values.
21225
21226 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21227
21228 * win32-low.c (GETPROCADDRESS): Define.
21229 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
21230 (winapi_DebugSetProcessKillOnExit): Likewise.
21231 (win32_create_inferior): Force usage of ansi CreateProcessA.
21232 (win32_attach): Use GETPROCADDRESS.
21233 (win32_detach): Likewise.
21234
21235 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21236
21237 * win32-low.c (win32_wait): Don't use WSTOPSIG.
21238
21239 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
21240
21241 * win32-low.c: Commit leftover changes from 2007-03-29.
21242
21243 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21244
21245 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
21246 fields short instead of int. Add explicit padding.
21247 (i387_cache_to_fsave): Remove unnecessary casts.
21248 (i387_fsave_to_cache): Doc fix.
21249 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
21250
21251 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21252
21253 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
21254 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
21255
21256 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21257
21258 * configure.srv (arm*-*-mingw32ce*): Move near the other
21259 arm targets.
21260
21261 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21262
21263 * configure.ac: Add errno checking.
21264 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
21265 sys/file.h and malloc.h.
21266 (AC_CHECK_DECLS): Add perror.
21267 (srv_mingwce): Handle.
21268 * configure.srv (i[34567]86-*-cygwin*): Add
21269 win32-i386-low.o to srv_tgtobj.
21270 (i[34567]86-*-mingw*): Likewise.
21271 (arm*-*-mingw32ce*): Add case.
21272 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21273 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
21274 [__MINGW32CE__] (strerror): New function.
21275 [__MINGW32CE__] (errno): Define to GetLastError.
21276 [__MINGW32CE__] (COUNTOF): New macro.
21277 (remote_open): Remove extra close call.
21278 * mem-break.c (delete_breakpoint_at): New function.
21279 * mem-break.h (delete_breakpoint_at): Declare.
21280 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21281 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
21282 [USE_WIN32API] (read, write): Add char* casts.
21283 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
21284 * server.h: Include wincecompat.h on Windows CE.
21285 [HAVE_ERRNO_H]: Check.
21286 (perror): Declare if not declared.
21287 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
21288 (perror_with_name): Remove errno declaration.
21289 * wincecompat.h: New.
21290 * wincecompat.c: New.
21291 * win32-low.h: New.
21292 * win32-arm-low.c: New.
21293 * win32-i386-low.c: New.
21294 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21295 (OUTMSG2): Make it safe.
21296 (_T): New macro.
21297 (COUNTOF): New macro.
21298 (NUM_REGS): Get it from the low target.
21299 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21300 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21301 (thread_rec): Let low target handle debug registers.
21302 (child_add_thread): Likewise.
21303 (child_init_thread_list): Likewise.
21304 (continue_one_thread): Likewise.
21305 (regptr): New.
21306 (do_child_fetch_inferior_registers): Move to ...
21307 * win32-i386-low.c: ... here, and rename to ...
21308 (do_fetch_inferior_registers): ... this.
21309 * win32-low.c (child_fetch_inferior_registers):
21310 Go through the low target.
21311 (do_child_store_inferior_registers): Use regptr.
21312 (strwinerror): New function.
21313 (win32_create_inferior): Handle Windows CE.
21314 Use strwinerror instead of strerror on Windows error
21315 codes. Add program to the error output.
21316 Don't close the main thread handle on Windows CE.
21317 (win32_attach): Use coredll.dll on Windows CE.
21318 (win32_kill): Close current process and current
21319 thread handles.
21320 (win32_detach): Use coredll.dll on Windows CE.
21321 (win32_resume): Let low target handle debug registers, and
21322 step request.
21323 (handle_exception): Add/Remove initial breakpoint. Avoid
21324 non-existant WSTOPSIG on Windows CE.
21325 (win32_read_inferior_memory): Cast to remove warning.
21326 (win32_arch_string): Go through the low target.
21327 (initialize_low): Call set_breakpoint_data with the low
21328 target's breakpoint.
21329 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21330 FOP_REGNUM, mappings): Move to ...
21331 * win32-i386-low.c: ... here.
21332 * win32-low.c (win32_thread_info): Move to ...
21333 * win32-low.h: ... here.
21334 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21335 win32-arm-low.c and wincecompat.c.
21336 (all:): Add $EXEEXT.
21337 (install-only:): Likewise.
21338 (gdbserver:): Likewise.
21339 (gdbreplay:): Likewise.
21340 * config.in: Regenerate.
21341 * configure: Regenerate.
21342
21343 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21344
21345 * win32-low.c: Rename typedef thread_info to
21346 win32_thread_info throughout.
21347
21348 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21349
21350 * win32-i386-low.c: Rename to ...
21351 * win32-low.c: ... this.
21352 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21353 * Makefile.in: Likewise.
21354
21355 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21356
21357 * remote-utils.c (monitor_output): Constify msg parameter.
21358 * server.h (monitor_output): Likewise.
21359 * win32-i386-low.c (handle_output_debug_string): New.
21360 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21361 handle_output_debug_string.
21362 (get_child_debug_event): Likewise.
21363
21364 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21365
21366 * server.c (main): Correct strtoul check.
21367
21368 2007-03-27 Jon Ringle <jon@ringle.org>
21369
21370 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21371
21372 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21373
21374 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21375
21376 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21377
21378 * terminal.h: Check HAVE_SGTTY_H.
21379
21380 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21381
21382 * remote-utils.c (remote_open): Print out the assigned port number.
21383
21384 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21385
21386 * remote-utils.c (monitor_output): New function.
21387 * server.c (debug_threads): Define here.
21388 (monitor_show_help): New function.
21389 (handle_query): Handle qRcmd.
21390 (main): Do not handle 'd' packet.
21391 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21392 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21393 of debug_threads.
21394
21395 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21396
21397 * Makefile.in (EXEEXT): New.
21398 (clean): Use $(EXEEXT).
21399
21400 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21401
21402 * target.h (target_ops): Rename send_signal to request_interrupt,
21403 and remove enum target_signal parameter.
21404 * linux-low.c (linux_request_interrupt): Rename from
21405 linux_send_signal, and always send SIGINT.
21406 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21407 and always send SIGINT.
21408 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21409 of send_signal.
21410 (input_interrupt): Likewise.
21411
21412 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21413
21414 * server.c (get_features_xml): Check if target implemented
21415 arch_string.
21416 * win32-i386-low.c (win32_arch_string): New.
21417 (win32_target_ops): Add win32_arch_string as arch_string member.
21418
21419 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21420
21421 * spu-low.c (spu_arch_string): New.
21422 (spu_target_ops): Add spu_arch_string.
21423
21424 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21425
21426 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21427 * configure.ac: Do not check for terminal.h.
21428 * configure, config.in: Regenerated.
21429
21430 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21431
21432 * Makefile.in (OBS): Add $(XML_BUILTIN).
21433 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21434 (clean): Update.
21435 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21436 (arm-with-iwmmxt.c): New.
21437 * config.in, configure: Regenerate.
21438 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21439 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21440 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21441 (arm*-*-linux*): Add iWMMXt and regset support.
21442 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21443 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21444 (arm_store_wmmxregset, target_regsets): New.
21445 * server.c (get_features_xml): Take annex argument. Check builtin
21446 XML documents.
21447 (handle_query): Handle multiple annexes.
21448
21449 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21450
21451 * remote-utils.c [USE_WIN32API] (read, write): Define.
21452 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21453 write.
21454
21455 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21456
21457 * linux-i386-low.c (the_low_target): Set arch_string.
21458 * linux-x86-64-low.c (the_low_target): Likewise.
21459 * linux-low.c (linux_arch_string): New.
21460 (linux_target_ops): Add it.
21461 * linux-low.h (struct linux_target_ops): Add arch_string.
21462 * server.c (write_qxfer_response): Use const void * for DATA.
21463 (get_features_xml): New.
21464 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21465 * target.h (struct target_ops): Add arch_string method.
21466
21467 2007-01-03 Denis Pilat <denis.pilat@st.com>
21468 Daniel Jacobowitz <dan@codesourcery.com>
21469
21470 * linux-low.c (linux_kill): Handle being called with no threads.
21471 * win32-i386-low.c (win32_kill): Likewise.
21472 (get_child_debug_event): Clear current_process_handle.
21473
21474 2006-12-30 Denis PILAT <denis.pilat@st.com>
21475 Daniel Jacobowitz <dan@codesourcery.com>
21476
21477 * remote-utils.c (remote_open): Check the type of specified
21478 serial port devices before opening them.
21479 * server.c (main): Kill the inferior if an error occurs during
21480 the first remote_open.
21481
21482 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21483
21484 * README: Update supported targets.
21485
21486 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21487
21488 * Makefile.in (clean): Remove reg-mips64.c.
21489 (reg-mips64.c, reg-mips64.o): New rules.
21490 * configure.srv: Handle mips64. Include regset support for mips.
21491 * linux-mips-low.c (union mips_register): New.
21492 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21493 (mips_breakpoint, mips_breakpoint_at): Use int.
21494 (mips_collect_register, mips_supply_register)
21495 (mips_collect_register_32bit, mips_supply_register_32bit)
21496 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21497 (mips_store_fpregset, target_regsets): New.
21498 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21499
21500 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21501
21502 * configure.srv: Add target "spu*-*-*".
21503 * Makefile.in (clean): Remove reg-spu.c.
21504 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21505 * spu-low.c: New file.
21506
21507 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21508
21509 * configure.ac: Correct td_thr_tls_get_addr test.
21510 * configure: Regenerated.
21511
21512 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21513
21514 * linux-low.c (linux_wait_for_event): Reformat. Use the
21515 pass_signals array.
21516 * remote-utils.c (decode_address_to_semicolon): New.
21517 * server.c (pass_signals, handle_general_set): New.
21518 (handle_query): Mention QPassSignals for qSupported.
21519 (main): Call handle_general_set.
21520 * server.h (pass_signals, decode_address_to_semicolon): New.
21521
21522 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21523
21524 * server.c (handle_query): Correct error handling for read_auxv.
21525
21526 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21527
21528 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21529 and srv_linux_thread_db to yes.
21530 * linux-s390-low.c (s390_fill_gregset): New function.
21531 (target_regsets): Define data structure.
21532
21533 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21534
21535 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21536 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21537 * config.in, configure: Regenerated.
21538 * inferiors.c (gdb_id_to_thread): New function.
21539 (gdb_id_to_thread_id): Use it.
21540 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21541 * linux-low.h (struct process_info): Add th member.
21542 (thread_db_get_tls_address): New prototype.
21543 * remote-utils.c (decode_address): Make non-static.
21544 * server.c (handle_query): Handle qGetTLSAddr.
21545 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21546 * target.h (struct target_ops): Add get_tls_address.
21547 * thread-db.c (maybe_attach_thread): Save the thread handle.
21548 (thread_db_get_tls_address): New.
21549
21550 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21551
21552 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21553 (linux_resume_one_process): Take a siginfo_t *. Update all
21554 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21555 (struct pending_signals): Add a siginfo_t.
21556 (linux_wait_for_process): Always set last_status.
21557 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21558 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21559 * linux-low.h (struct process_info): Add last_status.
21560
21561 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21562
21563 * remote-utils.c (try_rle): New function.
21564 (putpkt_binary): Use it.
21565
21566 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21567
21568 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21569 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21570 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21571 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21572 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21573 point registers.
21574
21575 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21576
21577 * server.c (terminal_fd): New variable.
21578 (old_foreground_pgrp): Likewise.
21579 (restore_old_foreground_pgrp): New function.
21580 (start_inferior): Record the terminal file descriptor in terminal_fd
21581 and its original foreground group in old_foreground_pgrp. Register
21582 restore_old_foreground_pgrp with atexit().
21583
21584 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21585
21586 * server.c (handle_query): Correct qPart to qXfer.
21587
21588 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21589
21590 * configure.ac: Check for more headers which are missing on
21591 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21592 * configure.srv: Add Cygwin and mingw32.
21593 * remote-utils.c: Don't include headers unconditionally which
21594 are missing on mingw32. Include <winsock.h> for mingw32.
21595 (remote_open): Adjust for mingw32 support. Flush
21596 standard error after writing to it.
21597 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21598 (unblock_async_io, enable_async_io, disable_async_io)
21599 (readchar, getpkt): Update for Winsock support.
21600 (prepare_resume_reply): Expect a protocol signal number.
21601 * server.c: Disable <sys/wait.h> on mingw32.
21602 (start_inferior): Adjust for mingw32 support. Flush
21603 standard error after writing to it.
21604 (attach_inferior): Likewise. Use protocol signal
21605 numbers.
21606 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21607 and names.
21608 * win32-i386-low.c: New file.
21609 * Makefile.in (XM_CLIBS): Set.
21610 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21611 (win32-i386-low.o): New dependency rule.
21612 * linux-low.c (linux_wait): Use target signal numbers.
21613 * target.h (struct target_ops): Doc fix.
21614 * server.h (target_signal_to_name): New prototype.
21615 * gdbreplay.c: Don't include headers unconditionally which
21616 are missing on mingw32. Include <winsock.h> for mingw32.
21617 (remote_close, remote_open): Adjust for Winsock support.
21618 * configure, config.in: Regenerated.
21619
21620 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21621
21622 * server.c (decode_xfer_read, write_qxfer_response): New.
21623 (handle_query): Take a packet length argument. Handle
21624 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21625 the qSupported response.
21626 (main): Update call to handle_query.
21627
21628 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21629
21630 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21631 (putpkt_binary): Renamed from putpkt and adjusted for binary
21632 data.
21633 (putpkt): New wrapper for putpkt_binary.
21634 (readchar): Don't mask off the high bit.
21635 (decode_X_packet): New function.
21636 * server.c (main): Call putpkt_binary if a handler sets the packet
21637 length. Save the length of the incoming packet. Handle 'X'.
21638 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21639
21640 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21641
21642 * server.c (handle_query): Handle qSupported.
21643
21644 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21645
21646 * remote-utils.c (all_symbols_looked_up): New variable.
21647 (look_up_one_symbol): Check it.
21648 * server.h (look_up_one_symbol): New declaration.
21649 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21650
21651 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21652
21653 * Makefile.in (linux-arm-low.o): Update dependencies.
21654 * linux-arm-low.c: Include "gdb_proc_service.h".
21655 (PTRACE_GET_THREAD_AREA): Define.
21656 (ps_get_thread_area): New function.
21657
21658 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21659
21660 * configure.srv (m68k*-*-uclinux*): New target.
21661 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21662 (linux_resume_one_process): Remove extraneous cast.
21663 (linux_read_offsets): New.
21664 (linux_target_op): Add linux_read_offsets on mmuless systems.
21665 * server.c (handle_query): Add qOffsets logic.
21666 * target.h (struct target_ops): Add read_offsets.
21667
21668 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21669
21670 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21671 (PTRACE_GET_THREAD_AREA): Define.
21672 (ps_get_thread_area): New function.
21673 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21674 (linux-x86-64-low.o): Update.
21675
21676 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21677
21678 * configure.ac: Remove checks for prfpregset_t.
21679 * gdb_proc_service.h: New file.
21680 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21681 new "gdb_proc_service.h".
21682 * proc-service.c: Likewise.
21683 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21684 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21685 * Makefile.in (gdb_proc_service_h): Updated.
21686 * configure, config.in: Regenerated.
21687
21688 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21689
21690 * remote-utils.c (prepare_resume_reply): Move declaration
21691 of gdb_id_from_wait to the top of the block.
21692
21693 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21694
21695 * linux-low.c (regsets_store_inferior_registers): Read the regset
21696 from the target before filling it.
21697
21698 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21699
21700 * server.c (attach_inferior): Return SIGTRAP for a successful
21701 attach.
21702
21703 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21704
21705 * Makefile.in (OBS): Add version.o.
21706 (STAGESTUFF): Delete.
21707 (version.o): Add dependencies.
21708 (version.c): Replace rule.
21709 (clean): Remove version.c.
21710 * server.c (gdbserver_version): New.
21711 (gdbserver_usage): Use printf.
21712 (main): Handle --version and --help.
21713 * server.h (version, host_name): Add declarations.
21714
21715 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21716
21717 * linux-arm-low.c:
21718 * linux-arm-low.c:
21719 * inferiors.c:
21720 * i387-fp.h:
21721 * i387-fp.c:
21722 * gdbreplay.c:
21723 * regcache.c:
21724 * proc-service.c:
21725 * mem-break.h:
21726 * mem-break.c:
21727 * linux-x86-64-low.c:
21728 * linux-sh-low.c:
21729 * linux-s390-low.c:
21730 * linux-ppc64-low.c:
21731 * linux-ppc-low.c:
21732 * linux-mips-low.c:
21733 * linux-m68k-low.c:
21734 * linux-m32r-low.c:
21735 * linux-low.h:
21736 * linux-low.c:
21737 * linux-ia64-low.c:
21738 * linux-i386-low.c:
21739 * linux-crisv32-low.c:
21740 * thread-db.c:
21741 * terminal.h:
21742 * target.h:
21743 * target.c:
21744 * server.h:
21745 * server.c:
21746 * remote-utils.c:
21747 * regcache.h:
21748 * utils.c:
21749 * Makefile.in:
21750 * configure.ac:
21751 * gdbserver.1: Add (C) after Copyright. Update the FSF
21752 address.
21753
21754 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21755
21756 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21757 (arm_breakpoint_at): Recognize both breakpoints.
21758 (the_low_target): Use the correct breakpoint instruction.
21759
21760 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21761
21762 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21763 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21764 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21765 (the_low_target): Update.
21766
21767 2005-10-25 Andreas Schwab <schwab@suse.de>
21768
21769 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21770
21771 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21772 (ia64_num_regs): Reduce to 462.
21773
21774 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21775
21776 * acinclude.m4: Correct quoting.
21777 * aclocal.m4: Regenerated.
21778
21779 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21780 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21781 (thread_db_init): Call thread_db_err_str.
21782 * configure.ac: Check for TD_VERSION.
21783 * config.in, configure: Regenerated.
21784
21785 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21786
21787 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21788
21789 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21790
21791 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21792 is not available. Define HAVE_PTRACE_GETREGS if it is.
21793 * config.in, configure: Regenerated.
21794 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21795 * linux-i386-low.c, linux-m68k-low.c: Update to use
21796 HAVE_PTRACE_GETREGS.
21797 * linux-low.c (regsets_fetch_inferior_registers)
21798 (regsets_store_inferior_registers): Only return 0 if we processed
21799 GENERAL_REGS.
21800 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21801 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21802
21803 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21804
21805 * inferiors.c (struct thread_info): Add gdb_id.
21806 (add_thread): Add gdb_id argument.
21807 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21808 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21809 calls to add_thread.
21810 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21811 * server.c (handle_query): Use thread_to_gdb_id.
21812 (handle_v_cont, main): Use gdb_id_to_thread_id.
21813 * server.h (add_thread): Update prototype.
21814 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21815 prototypes.
21816
21817 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21818
21819 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21820 left-padded registers.
21821 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21822 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21823
21824 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21825
21826 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21827 * configure: Regenerate.
21828 * config.in: Regenerate.
21829 * server.h (NEED_DECLARATION_STRERROR):
21830 Replace with !HAVE_DECL_STRERROR.
21831
21832 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21833
21834 * linux-low.c (linux_wait, linux_send_signal): Don't test
21835 an unsigned long variable for > 0 if it could be MAX_ULONG.
21836 * server.c (myresume): Likewise.
21837 * target.c (set_desired_inferior): Likewise.
21838
21839 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21840
21841 * configure.ac: Simplify and improve check for socklen_t.
21842 * configure, config.in: Regenerate.
21843
21844 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21845
21846 * acconfig.h: Remove.
21847 * configure.ac: Add a test for socklen_t. Use three-argument
21848 AC_DEFINE throughout.
21849 * config.in: Regenerated using autoheader 2.59.
21850 * configure: Regenerated.
21851
21852 * gdbreplay.c (socklen_t): Provide a default.
21853 (remote_open): Use socklen_t.
21854 * remote-utils.c (socklen_t): Provide a default.
21855 (remote_open): Use socklen_t.
21856 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21857 unsigned char.
21858
21859 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21860 char for buffers.
21861 * linux-low.c (linux_read_memory, linux_write_memory)
21862 (linux_read_auxv): Likewise.
21863 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21864 (check_mem_write): Likewise.
21865 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21866 Likewise.
21867 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21868 (registers_from_string, register_data): Likewise.
21869 * server.c (handle_query, main): Likewise.
21870 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21871 (decode_M_packet): Likewise.
21872 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21873 * target.h (struct target_ops): Update read_memory, write_memory,
21874 and read_auxv.
21875 (read_inferior_memory, write_inferior_memory): Update.
21876 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21877 to unsigned char *.
21878 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21879 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21880 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21881 linux-s390-low.c, linux-sh-low.c: Update for changes in
21882 read_inferior_memory and the_low_target->breakpoint.
21883
21884 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21885
21886 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21887 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21888 * configure.srv: Add powerpc64-*-linux*.
21889 * linux-ppc64-low.c: New file.
21890
21891 2005-05-23 Orjan Friberg <orjanf@axis.com>
21892
21893 * linux-cris-low.c: New file with support for CRIS.
21894 * linux-crisv32-low.c: Ditto for CRISv32.
21895 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21896 (clean): Add reg-cris.c and reg-crisv32.c.
21897 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21898 reg-crisv32.o, and reg-crisv32.c to make rules.
21899 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21900 recognized targets.
21901
21902 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21903
21904 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21905 of sizeof (PTRACE_XFER_TYPE).
21906 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21907
21908 2005-05-12 Orjan Friberg <orjanf@axis.com>
21909
21910 * target.h (struct target_ops): Add insert_watchpoint,
21911 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21912 pointers for hardware watchpoint support.
21913 * linux-low.h (struct linux_target_ops): Ditto.
21914 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21915 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21916 to linux_target_ops.
21917 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21918 reply packet.
21919 * server.c (main): Recognize 'Z' and 'z' packets.
21920
21921 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21922
21923 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21924 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21925 (the_low_target): Add new members.
21926
21927 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21928
21929 * proc-service.c (ps_lgetregs): Search all_processes instead of
21930 all_threads.
21931
21932 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21933
21934 * server.c (start_inferior): Change return type to int.
21935 (attach_inferior): Change sigptr to int *.
21936 (handle_v_cont, handle_v_requests): Change signal to int *.
21937 (main): Change signal to int.
21938
21939 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21940
21941 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21942 * configure.srv: Add m32r*-*-linux*.
21943 * linux-m32r-low.c: New file.
21944
21945 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21946
21947 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21948
21949 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21950
21951 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21952 Take unsigned long arguments for PIDs.
21953 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21954 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21955 (wait_for_sigstop, linux_resume_one_process)
21956 (regsets_fetch_inferior_registers, linux_send_signal)
21957 (linux_read_auxv): Likewise. Update the types of variables holding
21958 PIDs. Update format string specifiers.
21959 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21960 * remote-utils.c (prepare_resume_reply): Likewise.
21961 * server.c (cont_thread, general_thread, step_thread)
21962 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21963 unsigned long.
21964 (handle_query): Update format specifiers.
21965 (handle_v_cont, main): Use strtoul for thread IDs.
21966 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21967 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21968 (general_thread, step_thread, thread_from_wait)
21969 (old_thread_from_wait): Update.
21970 * target.h (struct thread_resume): Use unsigned long for THREAD.
21971 (struct target_ops): Use unsigned long for arguments to attach and
21972 thread_alive.
21973
21974 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21975
21976 * acinclude.m4: Include bfd/bfd.m4 directly.
21977 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21978 <agriffis@toolchain.org>.
21979 * aclocal.m4, configure: Regenerated.
21980
21981 2005-01-07 Andrew Cagney <cagney@gnu.org>
21982
21983 * configure.ac: Rename configure.in, require autoconf 2.59.
21984 * configure: Re-generate.
21985
21986 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21987
21988 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21989 LIBS when finished.
21990 * aclocal.m4: Regenerated.
21991 * configure: Regenerated.
21992
21993 2004-11-21 Andreas Schwab <schwab@suse.de>
21994
21995 * linux-m68k-low.c (m68k_num_gregs): Define.
21996 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21997 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21998 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21999 (m68k_breakpoint_at): New. Add to the_low_target.
22000
22001 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
22002 srv_linux_thread_db to yes.
22003
22004 2004-10-20 Joel Brobecker <brobecker@gnat.com>
22005
22006 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
22007 (ARCH_SET_FS): Likewise.
22008 (ARCH_GET_FS): Likewise.
22009 (ARCH_GET_GS): Likewise.
22010
22011 2004-10-16 Daniel Jacobowitz <dan@debian.org>
22012
22013 * linux-i386-low.c (ps_get_thread_area): New.
22014 * linux-x86-64-low.c (ps_get_thread_area): New.
22015 * linux-low.c: Include <sys/syscall.h>.
22016 (linux_kill_one_process): Don't kill the first thread here.
22017 (linux_kill): Kill the first thread here.
22018 (kill_lwp): New function.
22019 (send_sigstop, linux_send_signal): Use it.
22020 * proc-service.c: Clean up #ifdefs.
22021 (fpregset_info): Delete.
22022 (ps_lgetregs): Update and enable implementation.
22023 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
22024 implementations.
22025 * remote-utils.c (struct sym_cache, symbol_cache): New.
22026 (input_interrupt): Print a clearer message.
22027 (async_io_enabled): New variable.
22028 (enable_async_io, disable_async_io): Use it. Update comments.
22029 (look_up_one_symbol): Use the symbol cache.
22030 * thread-db.c (thread_db_look_up_symbols): New function.
22031 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
22032
22033 2004-10-16 Daniel Jacobowitz <dan@debian.org>
22034
22035 * configure.in: Test for -rdynamic.
22036 * configure: Regenerated.
22037 * Makefile (INTERNAL_LDFLAGS): New.
22038 (gdbserver, gdbreplay): Use it.
22039
22040 2004-09-02 Andrew Cagney <cagney@gnu.org>
22041
22042 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
22043
22044 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
22045
22046 * linux-low.c (linux_wait): Clear all_processes list also.
22047
22048 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
22049
22050 * linux-low.c: Include <errno.h>. Remove extern declaration of
22051 errno.
22052
22053 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
22054
22055 * gdbreplay.c, server.h, utils.c: Update copyright years.
22056
22057 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
22058
22059 * server.c (main): Print child status or termination signal from
22060 variable 'signal', not 'sig'.
22061
22062 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
22063
22064 * linux-low.c (linux_read_memory): Change return type to
22065 int. Check for and return error from ptrace().
22066 * target.c (read_inferior_memory): Change return type to int. Pass
22067 back return status from the_target->read_memory().
22068 * target.h (struct target_ops): Adapt *read_memory() prototype.
22069 Update comment.
22070 (read_inferior_memory): Adapt prototype.
22071 * server.c (main): Return an error packet if
22072 read_inferior_memory() returns an error.
22073
22074 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
22075
22076 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
22077 Unify with other clean targets.
22078
22079 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22080
22081 * server.c (handle_v_cont): Call set_desired_inferior.
22082
22083 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22084
22085 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
22086
22087 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22088
22089 * linux-low.c (linux_wait): Unblock async I/O.
22090 (linux_resume): Block and enable async I/O.
22091 * remote-utils.c (block_async_io, unblock_async_io): New functions.
22092 * server.h (block_async_io, unblock_async_io): Add prototypes.
22093
22094 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22095
22096 * remote-utils.c (remote_open): Print a status notice after
22097 opening a TCP port.
22098 * server.c (attach_inferior): Print a status notice after
22099 attaching.
22100
22101 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22102
22103 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
22104
22105 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
22106
22107 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
22108 error packet.
22109 * server.c, target.h: Update copyright years.
22110
22111 2004-02-25 Roland McGrath <roland@redhat.com>
22112
22113 * target.h (struct target_ops): New member `read_auxv'.
22114 * server.c (handle_query): Handle qPart:auxv:read: query using that.
22115 * linux-low.c (linux_read_auxv): New function.
22116 (linux_target_ops): Initialize `read_auxv' member to that.
22117
22118 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
22119
22120 Committed by Jim Blandy <jimb@redhat.com>.
22121
22122 * linux-s390-low.c (s390_num_regs): Update.
22123 (s390_regmap): Remove control registers. Use __s390x__ predefine
22124 instead of GPR_SIZE to distiguish s390 and s390x targets.
22125
22126 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
22127
22128 * linux-low.c: Update copyright year.
22129 (check_removed_breakpoint): Clear pending_is_breakpoint.
22130 (linux_set_resume_request, linux_queue_one_thread)
22131 (resume_status_pending_p): New functions.
22132 (linux_continue_one_thread): Use process->resume.
22133 (linux_resume): Only resume threads if there are no pending events.
22134 * linux-low.h (struct process_info): Add resume request
22135 pointer.
22136
22137 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
22138
22139 * regcache.c (new_register_cache): Clear the allocated register
22140 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
22141
22142 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
22143
22144 * linux-low.c (linux_resume): Take a struct thread_resume *
22145 argument.
22146 (linux_wait): Update call.
22147 (resume_ptr): New static variable.
22148 (linux_continue_one_thread): Renamed from
22149 linux_continue_one_process. Use resume_ptr.
22150 (linux_resume): Use linux_continue_one_thread.
22151 * server.c (handle_v_cont, handle_v_requests): New functions.
22152 (myresume): New function.
22153 (main): Handle 'v' case.
22154 * target.h (struct thread_resume): New type.
22155 (struct target_ops): Change argument of "resume" to struct
22156 thread_resume *.
22157 (myresume): Delete macro.
22158
22159 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
22160
22161 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
22162 (uninstall): Support DESTDIR.
22163
22164 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
22165
22166 * configure.srv: Add xscale*linux copy of arm*linux entry.
22167
22168 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
22169
22170 * linux-arm-low.c (arm_reinsert_addr): New function.
22171 (the_low_target): Add arm_reinsert_addr.
22172
22173 2003-07-08 Mark Kettenis <kettenis@gnu.org>
22174
22175 * mem-break.c: Remove whitespace at end of file.
22176
22177 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22178
22179 * configure.in: Check whether we need to prototype strerror.
22180 * server.h: Optionally prototype strerror.
22181 * gdbreplay.c (perror_with_name): Use strerror.
22182 * linux-low.c (linux_attach_lwp): Use strerror.
22183 * utils.c (perror_with_name): Use strerror.
22184 * config.in, configure: Regenerated.
22185
22186 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22187
22188 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
22189 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
22190
22191 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
22192
22193 * Makefile.in (SFILES): Update.
22194 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
22195 low-sun3.c: Remove files.
22196
22197 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
22198
22199 * linux-low.c: Move comment to linux_thread_alive where it belonged.
22200 (linux_detach_one_process, linux_detach): New functions.
22201 (linux_target_ops): Add linux_detach.
22202 * server.c (main): Handle 'D' packet.
22203 * target.h (struct target_ops): Add "detach" member.
22204 (detach_inferior): Define.
22205
22206 2003-06-13 Mark Kettenis <kettenis@gnu.org>
22207
22208 From Kelley Cook <kelleycook@wideopenwest.com>:
22209 * configure.srv: Accept i[34567]86 variants.
22210
22211 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
22212
22213 * linux-low.c (linux_wait_for_event): Correct comment typos.
22214 (linux_resume_one_process): Call check_removed_breakpoint.
22215 (linux_send_signal): New function.
22216 (linux_target_ops): Add linux_send_signal.
22217 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
22218 of kill.
22219 * target.h (struct target_ops): Add send_signal.
22220
22221 2003-05-29 Jim Blandy <jimb@redhat.com>
22222
22223 * linux-low.c (usr_store_inferior_registers): Transfer buf in
22224 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
22225 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
22226 away part of the register's value.
22227
22228 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
22229
22230 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
22231 (linux_wait_for_event, linux_init_signals): Likewise.
22232
22233 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
22234
22235 * configure.in: Check for stdlib.h.
22236 * configure: Regenerated.
22237 * config.in: Regenerated.
22238
22239 2003-01-04 Andreas Schwab <schwab@suse.de>
22240
22241 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
22242
22243 2003-01-02 Andrew Cagney <ac131313@redhat.com>
22244
22245 * Makefile.in: Remove obsolete code.
22246
22247 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
22248
22249 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
22250 defined(PT_FPR0_HI).
22251
22252 2002-11-17 Stuart Hughes <seh@zee2.com>
22253
22254 * linux-arm-low.c (arm_num_regs): Increase.
22255 (arm_regmap): Include status register.
22256
22257 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
22258
22259 * linux-low.c (register_addr): Remove incorrect -1 check.
22260
22261 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
22262
22263 * linux-low.c (linux_create_inferior): Call setpgid. Return
22264 the new PID.
22265 (unstopped_p, linux_signal_pid): Remove.
22266 (linux_target_ops): Remove linux_signal_pid.
22267 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
22268 global instead of target method.
22269 * target.h (struct target_ops): Remove signal_pid. Update comment
22270 for create_inferior.
22271 * server.c (signal_pid): New variable.
22272 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
22273 gdbserver. Set the child to be the foreground process group.
22274 (attach_inferior): Set signal_pid.
22275
22276 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
22277
22278 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
22279
22280 2002-08-20 Jim Blandy <jimb@redhat.com>
22281
22282 * Makefile.in (LDFLAGS): Allow the configure script to establish a
22283 default for this.
22284
22285 2002-08-01 Andrew Cagney <cagney@redhat.com>
22286
22287 * Makefile.in: Make chill references obsolete.
22288
22289 2002-07-24 Kevin Buettner <kevinb@redhat.com>
22290
22291 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
22292 * configure: Regenerate.
22293 * config.in: Regenerate.
22294
22295 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22296
22297 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22298 (perror_with_name, remote_close, remote_open, expect, play): Static.
22299
22300 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22301
22302 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22303 byte offsets instead of an array of indexes.
22304 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22305
22306 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22307
22308 * regcache.c: Add comment.
22309
22310 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22311
22312 * thread-db.c: New file.
22313 * proc-service.c: New file.
22314 * acinclude.m4: New file.
22315 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22316 proc-service.o, and thread-db.o.
22317 (linux-low.o): Add USE_THREAD_DB.
22318 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22319 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22320 * aclocal.m4: Regenerated.
22321 * config.in: Regenerated.
22322 * configure: Regenerated.
22323 * configure.in: Check for proc_service.h, sys/procfs.h,
22324 thread_db.h, and linux/elf.h headrs.
22325 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22326 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22327 Check for -lthread_db and thread support.
22328 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22329 PowerPC, and SuperH.
22330 * i387-fp.c: Constify arguments.
22331 * i387-fp.h: Likewise.
22332 * inferiors.c: (struct thread_info): Renamed from
22333 `struct inferior_info'. Remove PID member. Use generic inferior
22334 list header. All uses updated.
22335 (inferiors, signal_pid): Removed.
22336 (all_threads): New variable.
22337 (get_thread): Define.
22338 (add_inferior_to_list): New function.
22339 (for_each_inferior): New function.
22340 (change_inferior_id): New function.
22341 (add_inferior): Removed.
22342 (remove_inferior): New function.
22343 (add_thread): New function.
22344 (free_one_thread): New function.
22345 (remove_thread): New function.
22346 (clear_inferiors): Use for_each_inferior and free_one_thread.
22347 (find_inferior): New function.
22348 (find_inferior_id): New function.
22349 (inferior_target_data): Update argument type.
22350 (set_inferior_target_data): Likewise.
22351 (inferior_regcache_data): Likewise.
22352 (set_inferior_regcache_data): Likewise.
22353 * linux-low.c (linux_bp_reinsert): Remove.
22354 (all_processes, stopping_threads, using_thrads)
22355 (struct pending_signals, debug_threads, pid_of): New.
22356 (inferior_pid): Replace with macro.
22357 (struct inferior_linux_data): Remove.
22358 (get_stop_pc, add_process): New functions.
22359 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22360 Use add_process and add_thread.
22361 (linux_attach_lwp): New function, based on old linux_attach. Use
22362 add_process and add_thread. Set stop_expected for new threads.
22363 (linux_attach): New function.
22364 (linux_kill_one_process): New function.
22365 (linux_kill): Kill all LWPs.
22366 (linux_thread_alive): Use find_inferior_id.
22367 (check_removed_breakpoints, status_pending_p): New functions.
22368 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22369 Update. Use WNOHANG. Wait for cloned processes also. Update process
22370 struct for the found process.
22371 (linux_wait_for_event): New function.
22372 (linux_wait): Use it. Support LWPs.
22373 (send_sigstop, wait_for_sigstop, stop_all_processes)
22374 (linux_resume_one_process, linux_continue_one_process): New functions.
22375 (linux_resume): Support LWPs.
22376 (REGISTER_RAW_SIZE): Remove.
22377 (fetch_register): Use register_size instead. Call supply_register.
22378 (usr_store_inferior_registers): Likewise. Call collect_register.
22379 Fix recursive case.
22380 (regsets_fetch_inferior_registers): Improve error message.
22381 (regsets_store_inferior_registers): Add debugging.
22382 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22383 (unstopped_p, linux_signal_pid): New functions.
22384 (linux_target_ops): Add linux_signal_pid.
22385 (linux_init_signals): New function.
22386 (initialize_low): Call it. Initialize using_threads.
22387 * regcache.c (inferior_regcache_data): Add valid
22388 flag.
22389 (get_regcache): Fetch registers lazily. Add fetch argument
22390 and update all callers.
22391 (regcache_invalidate_one, regcache_invalidate): New
22392 functions.
22393 (new_register_cache): Renamed from create_register_cache.
22394 Return the new regcache.
22395 (free_register_cache): Change argument to a void *.
22396 (registers_to_string, registers_from_string): Call get_regcache
22397 with fetch flag set.
22398 (register_data): Make static. Pass fetch flag to get_regcache.
22399 (supply_register): Call get_regcache with fetch flag clear.
22400 (collect_register): Call get_regcache with fetch flag set.
22401 (collect_register_as_string): New function.
22402 * regcache.h: Update.
22403 * remote-utils.c (putpkt): Flush after debug output and use
22404 stderr.
22405 Handle input interrupts while waiting for an ACK.
22406 (input_interrupt): Use signal_pid method.
22407 (getpkt): Flush after debug output and use stderr.
22408 (outreg): Use collect_register_as_string.
22409 (new_thread_notify, dead_thread_notify): New functions.
22410 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22411 and general_thread.
22412 (look_up_one_symbol): Flush after debug output.
22413 * server.c (step_thread, server_waiting): New variables.
22414 (start_inferior): Don't use signal_pid. Update call to mywait.
22415 (attach_inferior): Update call to mywait.
22416 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22417 (main): Don't fetch/store registers explicitly. Use
22418 set_desired_inferior. Support proposed ``Hs'' packet. Update
22419 calls to mywait.
22420 * server.h: Update.
22421 (struct inferior_list, struct_inferior_list_entry): New.
22422 * target.c (set_desired_inferior): New.
22423 (write_inferior_memory): Constify.
22424 (mywait): New function.
22425 * target.h: Update.
22426 (struct target_ops): New signal_pid method.
22427 (mywait): Removed macro, added prototype.
22428
22429 * linux-low.h (regset_func): Removed.
22430 (regset_fill_func, regset_store_func): New.
22431 (enum regset_type): New.
22432 (struct regset_info): Add type field. Use new operation types.
22433 (struct linux_target_ops): stop_pc renamed to get_pc.
22434 Add decr_pc_after_break and breakpoint_at.
22435 (get_process, get_thread_proess, get_process_thread)
22436 (strut process_info, all_processes, linux_attach_lwp)
22437 (thread_db_init): New.
22438
22439 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22440 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22441 (the_low_target): Add new members.
22442 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22443 (i386_store_fpxregset): Constify.
22444 (target_regsets): Add new kind identifier.
22445 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22446 (i386_set_pc): Add debugging.
22447 (i386_breakpoint_at): New function.
22448 (the_low_target): Add new members.
22449 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22450 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22451 (mips_breakpoint_at): New.
22452 (the_low_target): Add new members.
22453 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22454 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22455 (the_low_target): Add new members.
22456 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22457 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22458 (the_low_target): Add new members.
22459 * linux-x86-64-low.c (target_regsets): Add new kind
22460 identifier.
22461
22462 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22463
22464 From Martin Pool <mbp@samba.org>:
22465 * server.c (gdbserver_usage): New function.
22466 (main): Call it.
22467
22468 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22469
22470 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22471 stop_at -> stop_pc.
22472
22473 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22474
22475 * Makefile.in: Remove obsolete code.
22476
22477 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22478
22479 * linux-low.c (regsets_fetch_inferior_registers),
22480 (regsets_store_inferior_registers): Removed cast to int from
22481 ptrace() calls.
22482 * regcache.h: Added declaration of struct inferior_info.
22483
22484 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22485
22486 * inferiors.c (struct inferior_info): Add regcache_data.
22487 (add_inferior): Call create_register_cache.
22488 (clear_inferiors): Call free_register_cache.
22489 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22490 * regcache.c (struct inferior_regcache_data): New.
22491 (registers): Remove.
22492 (get_regcache): New function.
22493 (create_register_cache, free_register_cache): New functions.
22494 (set_register_cache): Don't initialize the register cache here.
22495 (registers_to_string, registers_from_string, register_data): Call
22496 get_regcache.
22497 * regcache.h: Add prototypes.
22498 * server.h: Likewise.
22499
22500 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22501
22502 * mem-break.c: New file.
22503 * mem-break.h: New file.
22504 * Makefile.in: Add mem-break.o rule; update server.h
22505 dependencies.
22506 * inferiors.c (struct inferior_info): Add target_data
22507 member.
22508 (clear_inferiors): Free target_data member if set.
22509 (inferior_target_data, set_inferior_target_data): New functions.
22510 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22511 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22512 * linux-low.c (linux_bp_reinsert): New variable.
22513 (struct inferior_linux_data): New.
22514 (linux_create_inferior): Use set_inferior_target_data.
22515 (linux_attach): Likewise. Call add_inferior.
22516 (linux_wait_for_one_inferior): New function.
22517 (linux_wait): Call it.
22518 (linux_write_memory): Add const.
22519 (initialize_low): Call set_breakpoint_data.
22520 * linux-low.h (struct linux_target_ops): Add breakpoint
22521 handling members.
22522 * server.c (attach_inferior): Remove extra add_inferior
22523 call.
22524 * server.h: Include mem-break.h. Update inferior.c
22525 prototypes.
22526 * target.c (read_inferior_memory)
22527 (write_inferior_memory): New functions.
22528 * target.h (read_inferior_memory)
22529 (write_inferior_memory): Change macros to prototypes.
22530 (struct target_ops): Update comments. Add const to write_memory
22531 definition.
22532
22533 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22534
22535 * linux-low.c (usr_store_inferior_registers): Support
22536 registers which are allowed to fail to store.
22537 * linux-low.h (linux_target_ops): Likewise.
22538 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22539 (ppc_cannot_store_register): FPSCR may not be storable.
22540
22541 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22542
22543 * server.h: Include <string.h> if HAVE_STRING_H.
22544 * ChangeLog: Correct paths in last ChangeLog entry.
22545
22546 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22547
22548 * linux-low.h: Remove obsolete prototypes.
22549 (struct linux_target_ops): New.
22550 (extern the_low_target): New.
22551 * linux-low.c (num_regs, regmap): Remove declarations.
22552 (register_addr): Use the_low_target explicitly.
22553 (fetch_register): Likewise.
22554 (usr_fetch_inferior_registers): Likewise.
22555 (usr_store_inferior_registers): Likewise.
22556 * linux-arm-low.c (num_regs): Remove.
22557 (arm_num_regs): Define.
22558 (arm_regmap): Renamed from regmap, made static.
22559 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22560 made static.
22561 (arm_cannot_store_register): Renamed from cannot_store_register,
22562 made static.
22563 (the_low_target): New.
22564 * linux-i386-low.c (num_regs): Remove.
22565 (i386_num_regs): Define.
22566 (i386_regmap): Renamed from regmap, made static.
22567 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22568 made static.
22569 (i386_cannot_store_register): Renamed from cannot_store_register,
22570 made static.
22571 (the_low_target): New.
22572 * linux-ia64-low.c (num_regs): Remove.
22573 (ia64_num_regs): Define.
22574 (ia64_regmap): Renamed from regmap, made static.
22575 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22576 made static.
22577 (ia64_cannot_store_register): Renamed from cannot_store_register,
22578 made static.
22579 (the_low_target): New.
22580 * linux-m68k-low.c (num_regs): Remove.
22581 (m68k_num_regs): Define.
22582 (m68k_regmap): Renamed from regmap, made static.
22583 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22584 made static.
22585 (m68k_cannot_store_register): Renamed from cannot_store_register,
22586 made static.
22587 (the_low_target): New.
22588 * linux-mips-low.c (num_regs): Remove.
22589 (mips_num_regs): Define.
22590 (mips_regmap): Renamed from regmap, made static.
22591 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22592 made static.
22593 (mips_cannot_store_register): Renamed from cannot_store_register,
22594 made static.
22595 (the_low_target): New.
22596 * linux-ppc-low.c (num_regs): Remove.
22597 (ppc_num_regs): Define.
22598 (ppc_regmap): Renamed from regmap, made static.
22599 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22600 made static.
22601 (ppc_cannot_store_register): Renamed from cannot_store_register,
22602 made static.
22603 (the_low_target): New.
22604 * linux-s390-low.c (num_regs): Remove.
22605 (s390_num_regs): Define.
22606 (s390_regmap): Renamed from regmap, made static.
22607 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22608 made static.
22609 (s390_cannot_store_register): Renamed from cannot_store_register,
22610 made static.
22611 (the_low_target): New.
22612 * linux-sh-low.c (num_regs): Remove.
22613 (sh_num_regs): Define.
22614 (sh_regmap): Renamed from regmap, made static.
22615 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22616 made static.
22617 (sh_cannot_store_register): Renamed from cannot_store_register,
22618 made static.
22619 (the_low_target): New.
22620 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22621 (the_low_target): New.
22622
22623 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22624
22625 * Makefile.in: Add stamp-h target.
22626 * configure.in: Create stamp-h.
22627 * configure: Regenerated.
22628
22629 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22630
22631 * inferiors.c: New file.
22632 * target.c: New file.
22633 * target.h: New file.
22634 * Makefile.in: Add target.o and inferiors.o. Update
22635 dependencies.
22636 * linux-low.c (inferior_pid): New static variable,
22637 moved from server.c.
22638 (linux_create_inferior): Renamed from create_inferior.
22639 Call add_inferior. Return 0 on success instead of a PID.
22640 (linux_attach): Renamed from myattach.
22641 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22642 (linux_thread_alive): Renamed from mythread_alive.
22643 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22644 child dies.
22645 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22646 (regsets_store_inferior_registers): Correct error message.
22647 Add missing ``return 0''.
22648 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22649 (linux_store_registers): Renamed from store_inferior_registers.
22650 (linux_read_memory): Renamed from read_inferior_memory.
22651 (linux_write_memory): Renamed from write_inferior_memory.
22652 (linux_target_ops): New structure.
22653 (initialize_low): Call set_target_ops ().
22654 * remote-utils.c (unhexify): New function.
22655 (hexify): New function.
22656 (input_interrupt): Send signals to ``signal_pid''.
22657 * server.c (inferior_pid): Remove.
22658 (start_inferior): Update create_inferior call.
22659 (attach_inferior): Call add_inferior.
22660 (handle_query): New function.
22661 (main): Call handle_query for `q' packets.
22662 * server.h: Include "target.h". Remove obsolete prototypes.
22663 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22664
22665 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22666
22667 * Makefile.in: Add WARN_CFLAGS. Update configury
22668 dependencies.
22669 * configure.in: Check for <string.h>
22670 * configure: Regenerate.
22671 * config.in: Regenerate.
22672 * gdbreplay.c: Include needed system headers.
22673 (remote_open): Remove strchr prototype.
22674 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22675 * regcache.c (supply_register): Change buf argument to const void *.
22676 (supply_register_by_name): Likewise.
22677 (collect_register): Change buf argument to void *.
22678 (collect_register_by_name): Likewise.
22679 * regcache.h: Add missing prototypes.
22680 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22681 * server.c (handle_query): New function.
22682 (attached): New static variable, moved out of main.
22683 (main): Quiet longjmp clobber warnings.
22684 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22685 * utils.c (error): Remove NORETURN.
22686 (fatal): Likewise.
This page took 0.593639 seconds and 5 git commands to generate.