[gdb/testsuite] Make inline-locals.c deterministic
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * tdesc.cc (allocate_target_description): Add header comment.
4 (target_desc_deleter::operator()): New function.
5 * tdesc.h (struct target_desc): Declare as final.
6
7 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
8
9 * server.cc (handle_query): Use std::vector of
10 std::string for `qsupported` vector. Use separate
11 vector for unknowns.
12 * target.h (class process_stratum_target) <process_qsupported>:
13 Change parameters to array_view of const char *.
14 (target_process_qsupported): Remove `count` parameter.
15 * target.cc (process_stratum_target::process_qsupported): Change
16 parameters to array_view of const char *.
17 * linux-x86-low.cc (class x86_target) <process_qsupported>:
18 Likewise.
19
20 2020-06-29 Tom de Vries <tdevries@suse.de>
21
22 * ax.h: Include gdbsupport/debug_agent.h.
23
24 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
25
26 * tdesc.cc (struct tdesc_compatible_info): New struct.
27 (tdesc_compatible_info_list): New function.
28 (tdesc_compatible_info_arch_name): New function.
29
30 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
31
32 Use std::list to stop pending signal instead of manually-created
33 linked list.
34 * linux-low.h: Include <list>.
35 (struct pending_signal): Move here from linux-low.cc.
36 (struct lwp_info) <pending_signals>
37 <pending_signals_to_report>: Update the type.
38 * linux-low.cc (struct pending_signals): Remove.
39 (linux_process_target::delete_lwp)
40 (linux_process_target::add_lwp)
41 (enqueue_one_deferred_signal)
42 (dequeue_one_deferred_signal)
43 (enqueue_pending_signal)
44 (linux_process_target::resume_one_lwp_throw)
45 (linux_process_target::thread_needs_step_over)
46 (linux_process_target::resume_one_thread)
47 (linux_process_target::proceed_one_lwp): Update the use of pending
48 signal list.
49
50 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
51
52 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
53 Remove.
54
55 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
56
57 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
58 * configure.srv: Remove mingw32ce cases.
59 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
60 * win32-low.h (to_back_slashes): Remove.
61 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
62
63 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
64
65 * Makefile.in (SFILES): linux-tile-low.cc.
66 * configure.srv: Remove tilegx case.
67 * linux-tile-low.cc: Remove.
68
69 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
70
71 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
72 * configure.srv: Remove m32r case.
73 * linux-m32r-low.cc: Remove.
74
75 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
76
77 * Makefile.in (SFILES): Remove linux-cris-low.c.
78 * configure.srv: Remove cris cases.
79 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
80
81 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
82
83 * Makefile.in (SFILES): Remove linux-bfin-low.c.
84 * configure.srv: Remove bfin case.
85 * linux-bfin-low.cc: Remove.
86 * linux-low.cc: Remove BFIN-conditional code.
87
88 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
89
90 * configure: Re-generate.
91 * configure.ac: Remove srv_qnx test.
92 * configure.srv: Remove nto case.
93 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
94 * remote-utils.c: Remove __QNX__-guarded code.
95
96 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
97
98 * configure: Re-generate.
99 * configure.ac: Remove srv_lynxos test.
100 * configure.srv: Remove lynxos cases.
101 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
102 Remove.
103
104 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
105
106 * README: Fix a few outdated or incoherent things.
107
108 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
109
110 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
111 (win32_clear_inferiors): Use open_process_used.
112 (get_child_debug_event): Likewise.
113
114 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
115
116 PR gdbserver/25893
117 * linux-low.cc (linux_process_target::create_inferior),
118 lynx-low.cc (lynx_process_target::create_inferior),
119 win32-low.cc (win32_process_target::create_inferior): Use
120 construct_inferior_arguments instead of stringify_argv
121 to get string representation which properly escapes
122 special characters.
123 * server.cc (handle_v_run): Just pass empty program arg
124 as such, since any further processing is now handled via
125 construct_inferior_arguments.
126
127 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
128
129 * nto-low.cc (nto_process_target::create_inferior): Pass
130 argv to spawnp function as char **.
131
132 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
133
134 * server.cc (captured_main), (handle_v_run): No longer
135 insert extra NULL element to args vector.
136
137 2020-05-23 Pedro Alves <palves@redhat.com>
138
139 * gdb-safe-ctype.h: New.
140
141 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
142
143 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
144 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
145 (ia64_target::low_breakpoint_at): Ditto.
146
147 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
148
149 * win32-i386-low.cc (i386_supports_z_point_type): Handle
150 Z_PACKET_HW_BP z_type.
151 (i386_insert_point): Handle raw_bkpt_type type.
152 (i386_remove_point): Likewise.
153
154 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
155
156 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
157 Add arch/i386.o.
158 * win32-arm-low.cc (arm_num_regs): New function.
159 (struct win32_target_ops): Use arm_num_regs.
160 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
161 processes.
162 (i386_get_thread_context): Likewise.
163 (i386_prepare_to_resume): Likewise.
164 (i386_thread_added): Likewise.
165 (i386_single_step): Likewise.
166 (i386_fetch_inferior_register): Likewise.
167 (i386_store_inferior_register): Likewise.
168 (i386_arch_setup): Likewise.
169 (i386_win32_num_regs): New function.
170 (struct win32_target_ops): Use i386_win32_num_regs.
171 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
172 processes.
173 (win32_require_context): Likewise.
174 (child_add_thread): Likewise.
175 (do_initial_child_stuff): Likewise.
176 (continue_one_thread): Likewise.
177 (win32_process_target::resume): Likewise.
178 (load_psapi): Likewise.
179 (win32_add_all_dlls): Likewise.
180 (maybe_adjust_pc): Likewise.
181 (win32_process_target::qxfer_siginfo): Likewise.
182 (initialize_low): Likewise.
183 * win32-low.h (struct win32_target_ops): Change num_regs to
184 callback function.
185
186 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
187
188 * configure.ac: Remove check for fs_base/gs_base in
189 user_regs_struct.
190 * configure: Re-generate.
191 * config.in: Re-generate.
192 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
193 x86_store_gregset): Adjust.
194
195 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
196
197 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
198 comparison.
199
200 2020-04-16 Tom Tromey <tromey@adacore.com>
201
202 * win32-low.cc (windows_nat::handle_access_violation): New
203 function.
204
205 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
206
207 * win32-low.cc (get_child_debug_event): Fix format string warning.
208
209 2020-04-13 Tom Tromey <tom@tromey.com>
210
211 * server.h (gdb_fildes_t): Remove typedef.
212 * remote-utils.c (remote_desc, list_desc): Now int.
213 (INVALID_DESCRIPTOR): Remove.
214 (gdb_connected, remote_close)
215 (check_remote_input_interrupt_request): Update.
216 * utils.h (pfildes): Don't declare.
217 * utils.c (pfildes): Remove.
218
219 2020-04-13 Tom Tromey <tom@tromey.com>
220
221 * server.h (handle_serial_event, handle_target_event): Update.
222 * server.c: Don't call initialize_event_loop.
223 (keep_processing_events): New global.
224 (handle_serial_event): Return void. Set keep_processing_events.
225 (handle_target_event): Return void.
226 (start_event_loop): Move from event-loop.c. Rewrite.
227 * remote-utils.c (handle_accept_event): Return void.
228 (reset_readchar): Use delete_timer.
229 (process_remaining): Return void.
230 (reschedule): Use create_timer.
231 * event-loop.h: Remove.
232 * event-loop.cc: Remove.
233 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
234
235 2020-04-13 Tom Tromey <tom@tromey.com>
236
237 * server.c (invoke_async_signal_handlers)
238 (check_async_event_handlers, flush_streams, gdb_select): New
239 functions.
240
241 2020-04-13 Tom Tromey <tom@tromey.com>
242
243 * configure: Rebuild.
244 * config.in: Rebuild.
245
246 2020-04-08 Tom Tromey <tromey@adacore.com>
247
248 PR gdb/22992
249 * win32-low.c (child_continue): Call matching_pending_stop.
250 (get_child_debug_event): Call fetch_pending_stop. Push pending
251 stop when needed.
252
253 2020-04-08 Tom Tromey <tromey@adacore.com>
254
255 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
256 (win32_process_target::supports_stopped_by_sw_breakpoint):
257 Declare.
258 * win32-low.c (win32_supports_z_point_type): Always handle
259 Z_PACKET_SW_BP.
260 (win32_insert_point): Call insert_memory_breakpoint when needed.
261 (win32_remove_point): Call remove_memory_breakpoint when needed.
262 (win32_process_target::stopped_by_sw_breakpoint)
263 (win32_process_target::supports_stopped_by_sw_breakpoint): New
264 methods.
265 (win32_target_ops): Update.
266 (maybe_adjust_pc): New function.
267 (win32_wait): Call maybe_adjust_pc.
268
269 2020-04-08 Tom Tromey <tromey@adacore.com>
270
271 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
272 field.
273 * win32-i386-low.c (the_low_target): Update.
274 * win32-arm-low.c (the_low_target): Update.
275
276 2020-04-08 Tom Tromey <tromey@adacore.com>
277
278 * win32-low.h (win32_process_target::read_pc)
279 (win32_process_target::write_pc): Declare.
280 * win32-low.c (win32_process_target::read_pc)
281 (win32_process_target::write_pc): New methods.
282 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
283 functions.
284 (the_low_target): Update.
285 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
286 functions.
287 (the_low_target): Update.
288
289 2020-04-08 Tom Tromey <tromey@adacore.com>
290
291 * win32-low.c (win32_kill, get_child_debug_event): Use
292 wait_for_debug_event.
293
294 2020-04-08 Tom Tromey <tromey@adacore.com>
295
296 * win32-low.c (child_continue): Call continue_last_debug_event.
297
298 2020-04-08 Tom Tromey <tromey@adacore.com>
299
300 * win32-low.c (handle_exception): Remove.
301 (windows_nat::handle_ms_vc_exception): New function.
302 (get_child_debug_event): Add "continue_status" parameter.
303 Update.
304 (win32_wait): Update.
305
306 2020-04-08 Tom Tromey <tromey@adacore.com>
307
308 * win32-low.c (windows_nat::handle_load_dll): Rename from
309 handle_load_dll. No longer static.
310 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
311 No longer static.
312
313 2020-04-08 Tom Tromey <tromey@adacore.com>
314
315 * win32-low.c (handle_output_debug_string): Add parameter. Change
316 return type.
317 (win32_kill, get_child_debug_event): Update.
318
319 2020-04-08 Tom Tromey <tromey@adacore.com>
320
321 * win32-low.c (current_process_handle, current_process_id)
322 (main_thread_id, last_sig, current_event, siginfo_er): Move to
323 nat/windows-nat.c.
324
325 2020-04-08 Tom Tromey <tromey@adacore.com>
326
327 * win32-low.c (get_image_name): Remove.
328 (handle_load_dll): Update.
329
330 2020-04-08 Tom Tromey <tromey@adacore.com>
331
332 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
333 No longer static. Change parameters.
334 (child_add_thread, child_fetch_inferior_registers)
335 (child_store_inferior_registers, win32_resume)
336 (win32_get_tib_address): Update.
337
338 2020-04-08 Tom Tromey <tromey@adacore.com>
339
340 * win32-low.h (struct win32_target_ops): Use qualified names where
341 needed.
342 * win32-i386-low.c: Add "using namespace".
343 * win32-low.c: Add "using namespace".
344 * win32-arm-low.c: Add "using namespace".
345
346 2020-04-08 Tom Tromey <tromey@adacore.com>
347
348 * win32-low.c (delete_thread_info): Don't call CloseHandle.
349
350 2020-04-08 Tom Tromey <tromey@adacore.com>
351
352 * win32-low.c (win32_require_context, suspend_one_thread): Use
353 windows_thread_info::suspend.
354 (continue_one_thread): Use windows_thread_info::resume.
355 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
356
357 2020-04-08 Tom Tromey <tromey@adacore.com>
358
359 * win32-i386-low.c (update_debug_registers)
360 (i386_prepare_to_resume, i386_thread_added): Update.
361
362 2020-04-08 Tom Tromey <tromey@adacore.com>
363
364 * win32-low.c (child_add_thread): Use new.
365 (delete_thread_info): Use delete.
366
367 2020-04-08 Tom Tromey <tromey@adacore.com>
368
369 * win32-low.h (struct windows_thread_info): Remove.
370
371 2020-04-08 Tom Tromey <tromey@adacore.com>
372
373 * win32-low.h (struct windows_thread_info): Rename from
374 win32_thread_info. Remove typedef.
375 (struct win32_target_ops, win32_require_context): Update.
376 * win32-low.c (win32_get_thread_context)
377 (win32_set_thread_context, win32_prepare_to_resume)
378 (win32_require_context, thread_rec, child_add_thread)
379 (delete_thread_info, continue_one_thread)
380 (child_fetch_inferior_registers, child_store_inferior_registers)
381 (win32_resume, suspend_one_thread, win32_get_tib_address):
382 Update.
383 * win32-i386-low.c (update_debug_registers)
384 (win32_get_current_dr, i386_get_thread_context)
385 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
386 (i386_fetch_inferior_register, i386_store_inferior_register):
387 Update.
388 * win32-arm-low.c (arm_get_thread_context)
389 (arm_fetch_inferior_register, arm_store_inferior_register):
390 Update.
391
392 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
393
394 * linux-low.h (struct linux_target_ops): Remove.
395 (the_low_target): Remove.
396 * linux-x86-low.cc (the_low_target): Remove.
397 * linux-aarch64-low.cc (the_low_target): Ditto.
398 * linux-arm-low.cc (the_low_target): Ditto.
399 * linux-bfin-low.cc (the_low_target): Ditto.
400 * linux-cris-low.cc (the_low_target): Ditto.
401 * linux-crisv32-low.cc (the_low_target): Ditto.
402 * linux-ia64-low.cc (the_low_target): Ditto.
403 * linux-m32r-low.cc (the_low_target): Ditto.
404 * linux-m68k-low.cc (the_low_target): Ditto.
405 * linux-mips-low.cc (the_low_target): Ditto.
406 * linux-nios2-low.cc (the_low_target): Ditto.
407 * linux-ppc-low.cc (the_low_target): Ditto.
408 * linux-riscv-low.cc (the_low_target): Ditto.
409 * linux-s390-low.cc (the_low_target): Ditto.
410 * linux-sh-low.cc (the_low_target): Ditto.
411 * linux-sparc-low.cc (the_low_target): Ditto.
412 * linux-tic6x-low.cc (the_low_target): Ditto.
413 * linux-tile-low.cc (the_low_target): Ditto.
414 * linux-xtensa-low.cc (the_low_target): Ditto.
415
416 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
417
418 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
419 linux target define the op by overriding the declaration in
420 process_stratum_target.
421
422 * linux-low.h (struct linux_target_ops): Remove the op.
423 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
424 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
425 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
426 (x86_get_ipa_tdesc_idx): Turn into...
427 (x86_target::get_ipa_tdesc_idx): ...this.
428 (the_low_target): Remove the op field.
429 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
430 (ppc_get_ipa_tdesc_idx): Turn into...
431 (ppc_target::get_ipa_tdesc_idx): ...this.
432 (the_low_target): Remove the op field.
433 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
434 (s390_get_ipa_tdesc_idx): Turn into...
435 (s390_target::get_ipa_tdesc_idx): ...this.
436 (the_low_target): Remove the op field.
437
438 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
439
440 Turn the 'get_syscall_trapinfo' linux target op into a method
441 of process_stratum_target.
442
443 * linux-low.h (struct linux_target_ops): Remove the op.
444 (class linux_process_target) <get_syscall_trapinfo>
445 <gdb_catch_this_syscall>
446 <low_supports_catch_syscall>
447 <low_get_syscall_trapinfo>: Declare.
448 * linux-low.cc (get_syscall_trapinfo): Turn into...
449 (linux_process_target::get_syscall_trapinfo): ...this.
450 (linux_process_target::low_get_syscall_trapinfo): Define.
451 (gdb_catch_this_syscall_p): Turn into...
452 (linux_process_target::gdb_catch_this_syscall): ...this.
453 (linux_process_target::low_supports_catch_syscall): Define.
454
455 Update the callers below.
456
457 (linux_process_target::wait_1)
458 (linux_process_target::supports_catch_syscall)
459
460 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
461 <low_get_syscall_trapinfo>: Declare.
462 (x86_target::low_supports_catch_syscall): Define.
463 (x86_get_syscall_trapinfo): Turn into...
464 (x86_target::low_get_syscall_trapinfo): ...this.
465 (the_low_target): Remove the op field.
466 * linux-aarch64-low.cc (class aarch64_target)
467 <low_supports_catch_syscall>
468 <low_get_syscall_trapinfo>: Declare.
469 (aarch64_target::low_supports_catch_syscall): Define.
470 (aarch64_get_syscall_trapinfo): Turn into...
471 (aarch64_target::low_get_syscall_trapinfo): ...this.
472 (the_low_target): Remove the op field.
473 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
474 <low_get_syscall_trapinfo>: Declare.
475 (arm_target::low_supports_catch_syscall): Define.
476 (arm_get_syscall_trapinfo): Turn into...
477 (arm_target::low_get_syscall_trapinfo): ...this.
478 (the_low_target): Remove the op field.
479 * linux-ppc-low.cc (the_low_target): Remove the op field.
480 * linux-s390-low.cc (the_low_target): Remove the op field.
481
482 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
483
484 Remove the 'supports_hardware_single_step' linux target op and
485 override the process_stratum_target's op definition in
486 linux_process_target to return true.
487
488 * linux-low.h (struct linux_target_ops): Remove the op.
489 (class linux_process_target) <finish_step_over>
490 <maybe_hw_step>: Declare.
491 * linux-low.cc (can_hardware_single_step): Remove.
492 (maybe_hw_step): Turn into...
493 (linux_process_target::maybe_hw_step): ...this.
494 (finish_step_over): Turn into...
495 (linux_process_target::finish_step_over): ...this.
496 (linux_process_target::supports_hardware_single_step): Update
497 to return true.
498
499 Update the callers below.
500
501 (linux_process_target::single_step)
502 (linux_process_target::resume_one_lwp_throw)
503
504 * linux-arm-low.cc (class arm_target)
505 <supports_hardware_single_step>: Declare.
506 (arm_supports_hardware_single_step): Turn into...
507 (arm_target::supports_hardware_single_step): ...this.
508 (the_low_target): Remove the op field.
509 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
510 (the_low_target): Remove the op field.
511 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
512 Remove.
513 (the_low_target): Remove the op field.
514 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
515 (the_low_target): Remove the op field.
516 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
517 (the_low_target): Remove the op field.
518 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
519 (the_low_target): Remove the op field.
520 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
521 (the_low_target): Remove the op field.
522 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
523 (the_low_target): Remove the op field.
524 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
525 (the_low_target): Remove the op field.
526 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
527 (the_low_target): Remove the op field.
528 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
529 (the_low_target): Remove the op field.
530 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
531 (the_low_target): Remove the op field.
532 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
533 Remove.
534 (the_low_target): Remove the op field.
535
536 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
537
538 Turn the 'supports_range_stepping' linux target op into a method
539 of linux_process_target.
540
541 * linux-low.h (struct linux_target_ops): Remove the op.
542 (class linux_process_target) <low_supports_range_stepping>: Declare.
543 * linux-low.cc (linux_process_target::low_supports_range_stepping):
544 Define.
545 (linux_process_target::supports_range_stepping): Update the call
546 site.
547 * linux-x86-low.cc (class x86_target)
548 <low_supports_range_stepping>: Declare.
549 (x86_supports_range_stepping): Turn into...
550 (x86_target::low_supports_range_stepping): ...this.
551 (the_low_target): Remove the op field.
552 * linux-aarch64-low.cc (class aarch64_target)
553 <low_supports_range_stepping>: Declare.
554 (aarch64_supports_range_stepping): Turn into...
555 (aarch64_target::low_supports_range_stepping): ...this.
556 (the_low_target): Remove the op field.
557 * linux-arm-low.cc (the_low_target): Remove the op field.
558 * linux-bfin-low.cc (the_low_target): Ditto.
559 * linux-crisv32-low.cc (the_low_target): Ditto.
560 * linux-m32r-low.cc (the_low_target): Ditto.
561 * linux-m68k-low.cc (the_low_target): Ditto.
562 * linux-ppc-low.cc (the_low_target): Ditto.
563 * linux-s390-low.cc (the_low_target): Ditto.
564 * linux-sh-low.cc (the_low_target): Ditto.
565 * linux-tic6x-low.cc (the_low_target): Ditto.
566 * linux-tile-low.cc (the_low_target): Ditto.
567 * linux-xtensa-low.cc (the_low_target): Ditto.
568
569 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
570
571 Remove the 'emit_ops' linux target ops and let the concrete
572 linux target define the op by overriding the declaration of
573 process_stratum_target.
574
575 * linux-low.h (struct linux_target_ops): Remove the op.
576 (class linux_process_target) <emit_ops>: Remove.
577 * linux-low.cc (linux_process_target::emit_ops): Remove.
578 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
579 (x86_emit_ops): Turn into...
580 (x86_target::emit_ops): ...this.
581 (the_low_target): Remove the op field.
582 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
583 (aarch64_emit_ops): Turn into...
584 (aarch64_target::emit_ops): ...this.
585 (the_low_target): Remove the op field.
586 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
587 (ppc_emit_ops): Turn into...
588 (ppc_target::emit_ops): ...this.
589 (the_low_target): Remove the op field.
590 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
591 (s390_emit_ops): Turn into...
592 (s390_target::emit_ops): ...this.
593 (the_low_target): Remove the op field.
594 * linux-arm-low.cc (the_low_target): Remove the op field.
595 * linux-bfin-low.cc (the_low_target): Ditto.
596 * linux-crisv32-low.cc (the_low_target): Ditto.
597 * linux-m32r-low.cc (the_low_target): Ditto.
598 * linux-m68k-low.cc (the_low_target): Ditto.
599 * linux-sh-low.cc (the_low_target): Ditto.
600 * linux-tic6x-low.cc (the_low_target): Ditto.
601 * linux-tile-low.cc (the_low_target): Ditto.
602 * linux-xtensa-low.cc (the_low_target): Ditto.
603
604 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
605
606 Remove the 'install_fast_tracepoint_jump_pad' and
607 'get_min_fast_tracepoint_insn_len' linux target ops to let the
608 concrete linux target define the ops by overriding the declarations
609 of process_stratum_target.
610
611 * linux-low.h (struct linux_target_ops): Remove the ops.
612 (class linux_process_target) <supports_fast_tracepoints>
613 <install_fast_tracepoint_jump_pad>
614 <get_min_fast_tracepoint_insn_len>: Remove.
615 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
616 (linux_process_target::install_fast_tracepoint_jump_pad)
617 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
618 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
619 <install_fast_tracepoint_jump_pad>
620 <get_min_fast_tracepoint_insn_len>: Declare.
621 (x86_target::supports_fast_tracepoints): Define.
622 (x86_install_fast_tracepoint_jump_pad): Turn into...
623 (x86_target::install_fast_tracepoint_jump_pad): ...this.
624 (x86_get_min_fast_tracepoint_insn_len): Turn into...
625 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
626 (the_low_target): Remove the op fields.
627 * linux-aarch64-low.cc (class aarch64_target)
628 <supports_fast_tracepoints>
629 <install_fast_tracepoint_jump_pad>
630 <get_min_fast_tracepoint_insn_len>: Declare.
631 (aarch64_target::supports_fast_tracepoints): Define.
632 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
633 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
634 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
635 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
636 (the_low_target): Remove the op fields.
637 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
638 <install_fast_tracepoint_jump_pad>
639 <get_min_fast_tracepoint_insn_len>: Declare.
640 (ppc_target::supports_fast_tracepoints): Define.
641 (ppc_install_fast_tracepoint_jump_pad): Turn into...
642 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
643 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
644 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
645 (the_low_target): Remove the op fields.
646 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
647 <install_fast_tracepoint_jump_pad>
648 <get_min_fast_tracepoint_insn_len>: Declare.
649 (s390_target::supports_fast_tracepoints): Define.
650 (s390_install_fast_tracepoint_jump_pad): Turn into...
651 (s390_target::install_fast_tracepoint_jump_pad): ...this.
652 (s390_get_min_fast_tracepoint_insn_len): Turn into...
653 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
654 (the_low_target): Remove the op fields.
655 * linux-arm-low.cc (the_low_target): Remove the op fields.
656 * linux-bfin-low.cc (the_low_target): Ditto.
657 * linux-crisv32-low.cc (the_low_target): Ditto.
658 * linux-m32r-low.cc (the_low_target): Ditto.
659 * linux-m68k-low.cc (the_low_target): Ditto.
660 * linux-sh-low.cc (the_low_target): Ditto.
661 * linux-tic6x-low.cc (the_low_target): Ditto.
662 * linux-tile-low.cc (the_low_target): Ditto.
663 * linux-xtensa-low.cc (the_low_target): Ditto.
664
665 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
666
667 Turn the 'get_thread_area' linux target op into a method of
668 process_stratum_target.
669
670 * linux-low.h (struct linux_target_ops): Remove the op.
671 (class linux_process_target) <stuck_in_jump_pad>
672 <linux_fast_tracepoint_collecting>
673 <low_get_thread_area>: Declare.
674 * linux-low.cc (supports_fast_tracepoints): Remove.
675 (linux_fast_tracepoint_collecting): Turn into...
676 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
677 (linux_process_target::low_get_thread_area): Define.
678 (stuck_in_jump_pad_callback): Turn into...
679 (linux_process_target::stuck_in_jump_pad): ...this.
680
681 Update the caller below.
682
683 (linux_process_target::stabilize_threads)
684
685 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
686 Declare.
687 (x86_get_thread_area): Turn into...
688 (x86_target::low_get_thread_area): ...this.
689 (the_low_target): Remove the op field.
690 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
691 Declare.
692 (aarch64_get_thread_area): Turn into...
693 (aarch64_target::low_get_thread_area): ...this.
694 (the_low_target): Remove the op field.
695 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
696 Declare.
697 (ppc_get_thread_area): Turn into...
698 (ppc_target::low_get_thread_area): ...this.
699 (the_low_target): Remove the op field.
700 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
701 Declare.
702 (s390_get_thread_area): Turn into...
703 (s390_target::low_get_thread_area): ...this.
704 (the_low_target): Remove the op field.
705 * linux-arm-low.cc (the_low_target): Remove the op field.
706 * linux-bfin-low.cc (the_low_target): Ditto.
707 * linux-crisv32-low.cc (the_low_target): Ditto.
708 * linux-m32r-low.cc (the_low_target): Ditto.
709 * linux-m68k-low.cc (the_low_target): Ditto.
710 * linux-sh-low.cc (the_low_target): Ditto.
711 * linux-tic6x-low.cc (the_low_target): Ditto.
712 * linux-tile-low.cc (the_low_target): Ditto.
713 * linux-xtensa-low.cc (the_low_target): Ditto.
714
715 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
716
717 Remote the 'supports_tracepoints' linux target op and let the
718 concrete linux target define it by overriding the op declared in
719 process_stratum_target.
720
721 * linux-low.h (struct linux_target_ops): Remove the op.
722 (class linux_process_target) <supports_tracepoints>: Remove.
723 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
724 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
725 Declare.
726 (x86_supports_tracepoints): Turn into...
727 (x86_target::supports_tracepoints): ...this.
728 (the_low_target): Remove the op field.
729 * linux-aarch64-low.cc (class aarch64_target)
730 <supports_tracepoints>: Declare.
731 (aarch64_supports_tracepoints): Turn into...
732 (aarch64_target::supports_tracepoints): ...this.
733 (the_low_target): Remove the op field.
734 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
735 Declare.
736 (ppc_supports_tracepoints): Turn into...
737 (ppc_target::supports_tracepoints): ...this.
738 (the_low_target): Remove the op field.
739 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
740 Declare.
741 (s390_supports_tracepoints): Turn into...
742 (s390_target::supports_tracepoints): ...this.
743 (the_low_target): Remove the op field.
744 * linux-arm-low.cc (the_low_target): Remove the op field.
745 * linux-bfin-low.cc (the_low_target): Ditto.
746 * linux-crisv32-low.cc (the_low_target): Ditto.
747 * linux-m32r-low.cc (the_low_target): Ditto.
748 * linux-m68k-low.cc (the_low_target): Ditto.
749 * linux-sh-low.cc (the_low_target): Ditto.
750 * linux-tic6x-low.cc (the_low_target): Ditto.
751 * linux-tile-low.cc (the_low_target): Ditto.
752 * linux-xtensa-low.cc (the_low_target): Ditto.
753
754 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
755
756 Remove the 'process_qsupported' linux target op and let a concrete
757 linux target define the op by overriding the op declaration in
758 process_stratum_target.
759
760 * linux-low.h (struct linux_target_ops): Remove the op.
761 (class linux_process_target) <process_qsupported>: Remove.
762 * linux-low.cc (linux_process_target::process_qsupported): Remove.
763 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
764 (x86_linux_process_qsupported): Turn into...
765 (x86_target::process_qsupported): ...this.
766 (the_low_target): Remove the op field.
767 * linux-aarch64-low.cc (the_low_target): Remove the op
768 field.
769 * linux-arm-low.cc (the_low_target): Ditto.
770 * linux-bfin-low.cc (the_low_target): Ditto.
771 * linux-crisv32-low.cc (the_low_target): Ditto.
772 * linux-m32r-low.cc (the_low_target): Ditto.
773 * linux-m68k-low.cc (the_low_target): Ditto.
774 * linux-ppc-low.cc (the_low_target): Ditto.
775 * linux-s390-low.cc (the_low_target): Ditto.
776 * linux-sh-low.cc (the_low_target): Ditto.
777 * linux-tic6x-low.cc (the_low_target): Ditto.
778 * linux-tile-low.cc (the_low_target): Ditto.
779 * linux-xtensa-low.cc (the_low_target): Ditto.
780
781 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
782
783 Turn the 'prepare_to_resume' linux target op into a method of
784 linux_process_target.
785
786 * linux-low.h (struct linux_target_ops): Remove the op.
787 (class linux_process_target) <low_prepare_to_resume>: Declare.
788 * linux-low.cc (linux_process_target::low_prepare_to_resume):
789 Define.
790
791 Update the callers below:
792
793 (linux_process_target::resume_one_lwp_throw)
794 (linux_process_target::low_prepare_to_resume)
795
796 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
797 Declare.
798 (x86_target::low_prepare_to_resume): Define.
799 (the_low_target): Remove the op field.
800 * linux-aarch64-low.cc (class aarch64_target)
801 <low_prepare_to_resume>: Declare.
802 (aarch64_target::low_prepare_to_resume): Define.
803 (the_low_target): Remove the op field.
804 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
805 Declare.
806 (arm_prepare_to_resume): Turn into...
807 (arm_target::low_prepare_to_resume): ...this.
808 (the_low_target): Remove the op field.
809 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
810 Declare.
811 (mips_linux_prepare_to_resume): Turn into...
812 (mips_target::low_prepare_to_resume): ...this.
813 (the_low_target): Remove the op field.
814 * linux-bfin-low.cc (the_low_target): Remove the op field.
815 * linux-crisv32-low.cc (the_low_target): Ditto.
816 * linux-m32r-low.cc (the_low_target): Ditto.
817 * linux-m68k-low.cc (the_low_target): Ditto.
818 * linux-ppc-low.cc (the_low_target): Ditto.
819 * linux-s390-low.cc (the_low_target): Ditto.
820 * linux-sh-low.cc (the_low_target): Ditto.
821 * linux-tic6x-low.cc (the_low_target): Ditto.
822 * linux-tile-low.cc (the_low_target): Ditto.
823 * linux-xtensa-low.cc (the_low_target): Ditto.
824
825 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
826
827 Turn the 'new_process', 'delete_process', 'new_thread',
828 'delete_thread', and 'new_fork' linux target ops into methods
829 of linux_process_target.
830
831 * linux-low.h (struct linux_target_ops): Remove the ops.
832 (class linux_process_target) <add_linux_process>
833 <add_lwp>
834 <delete_lwp>
835 <attach_lwp>
836 <detach_one_lwp>
837 <check_zombie_leaders>
838 <filter_exit_event>
839 <low_new_process>
840 <low_delete_process>
841 <low_new_thread>
842 <low_delete_thread>
843 <low_new_fork>: Declare.
844 * linux-low.cc (delete_lwp): Turn into...
845 (linux_process_target::delete_lwp): ...this.
846 (linux_process_target::low_delete_thread): Define.
847 (linux_add_process): Turn into...
848 (linux_process_target::add_linux_process): ...this.
849 (linux_process_target::low_new_process): Define.
850 (linux_process_target::low_delete_process): Define.
851 (linux_process_target::low_new_fork): Define.
852 (add_lwp): Turn into...
853 (linux_process_target::add_lwp): ...this.
854 (linux_process_target::low_new_thread): Define.
855 (linux_attach_lwp): Turn into...
856 (linux_process_target::attach_lwp): ...this.
857 (linux_detach_one_lwp): Turn into...
858 (linux_process_target::detach_one_lwp): ...this.
859 (linux_detach_lwp_callback): Remove and inline...
860 (linux_process_target::detach): ...here.
861 (check_zombie_leaders): Turn into...
862 (linux_process_target::check_zombie_leaders): ...this.
863 (filter_exit_event): Turn into...
864 (linux_process_target::filter_exit_event): ...this.
865
866 Update the callers below.
867
868 (linux_process_target::handle_extended_wait)
869 (linux_process_target::create_inferior)
870 (attach_proc_task_lwp_callback)
871 (linux_process_target::attach)
872 (linux_process_target::detach)
873 (linux_process_target::mourn)
874 * thread-db.cc (attach_thread)
875
876 * linux-x86-low.cc (class x86_target) <low_new_process>
877 <low_delete_process>
878 <low_new_thread>
879 <low_delete_thread>
880 <low_new_fork>: Declare.
881 (x86_linux_new_process): Turn into...
882 (x86_target::low_new_process): ...this.
883 (x86_linux_delete_process): Turn into...
884 (x86_target::low_delete_process): ...this.
885 (x86_target::low_new_thread): Define.
886 (x86_target::low_delete_thread): Define.
887 (x86_linux_new_fork): Turn into...
888 (x86_target::low_new_fork): ...this.
889 (the_low_target): Remove the op fields.
890 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
891 <low_delete_process>
892 <low_new_thread>
893 <low_delete_thread>
894 <low_new_fork>: Declare.
895 (aarch64_linux_new_process): Turn into...
896 (aarch64_target::low_new_process): ...this.
897 (aarch64_linux_delete_process): Turn into...
898 (aarch64_target::low_delete_process): ...this.
899 (aarch64_target::low_new_thread): Define.
900 (aarch64_target::low_delete_thread): Define.
901 (aarch64_linux_new_fork): Turn into...
902 (aarch64_target::low_new_fork): ...this.
903 (the_low_target): Remove the op fields.
904 * linux-arm-low.cc (class arm_target) <low_new_process>
905 <low_delete_process>
906 <low_new_thread>
907 <low_delete_thread>
908 <low_new_fork>: Declare.
909 (arm_new_process): Turn into...
910 (arm_target::low_new_process): ...this.
911 (arm_delete_process): Turn into...
912 (arm_target::low_delete_process): ...this.
913 (arm_new_thread): Turn into...
914 (arm_target::low_new_thread): ...this.
915 (arm_delete_thread): Turn into...
916 (arm_target::low_delete_thread): ...this.
917 (arm_new_fork): Turn into...
918 (arm_target::low_new_fork): ...this.
919 (the_low_target): Remove the op fields.
920 * linux-mips-low.cc (class mips_target) <low_new_process>
921 <low_delete_process>
922 <low_new_thread>
923 <low_delete_thread>
924 <low_new_fork>: Declare.
925 (mips_linux_new_process): Turn into...
926 (mips_target::low_new_process): ...this.
927 (mips_linux_delete_process): Turn into...
928 (mips_target::low_delete_process): ...this.
929 (mips_linux_new_thread): Turn into...
930 (mips_target::low_new_thread): ...this.
931 (mips_linux_delete_thread): Turn into...
932 (mips_target::low_delete_thread): ...this.
933 (mips_linux_new_fork): Turn into...
934 (mips_target::low_new_fork): ...this.
935 (the_low_target): Remove the op fields.
936 * linux-bfin-low.cc (the_low_target): Remove the op fields.
937 * linux-crisv32-low.cc (the_low_target): Ditto.
938 * linux-m32r-low.cc (the_low_target): Ditto.
939 * linux-m68k-low.cc (the_low_target): Ditto.
940 * linux-ppc-low.cc (the_low_target): Ditto.
941 * linux-s390-low.cc (the_low_target): Ditto.
942 * linux-sh-low.cc (the_low_target): Ditto.
943 * linux-tic6x-low.cc (the_low_target): Ditto.
944 * linux-tile-low.cc (the_low_target): Ditto.
945 * linux-xtensa-low.cc (the_low_target): Ditto.
946
947 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
948
949 Turn the 'siginfo_fixup' linux target op into a method of
950 linux_process_target.
951
952 * linux-low.h (struct linux_target_ops): Remove the op.
953 (class linux_process_target) <siginfo_fixup>
954 <low_siginfo_fixup>: Declare.
955 * linux-low.cc (siginfo_fixup): Turn into...
956 (linux_process_target::siginfo_fixup): ...this.
957 (linux_process_target::low_siginfo_fixup): Define.
958 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
959 (x86_siginfo_fixup): Turn into...
960 (x86_target::low_siginfo_fixup): ...this.
961 (the_low_target): Remove the op field.
962 * linux-aarch64-low.cc (class aarch64_target):
963 <low_siginfo_fixup>: Declare.
964 (aarch64_linux_siginfo_fixup): Turn into...
965 (aarch64_target::low_siginfo_fixup): ...this.
966 (the_low_target): Remove the op field.
967 * linux-arm-low.cc (the_low_target): Remove the op field.
968 * linux-bfin-low.cc (the_low_target): Ditto.
969 * linux-crisv32-low.cc (the_low_target): Ditto.
970 * linux-m32r-low.cc (the_low_target): Ditto.
971 * linux-m68k-low.cc (the_low_target): Ditto.
972 * linux-mips-low.cc (the_low_target): Ditto.
973 * linux-ppc-low.cc (the_low_target): Ditto.
974 * linux-s390-low.cc (the_low_target): Ditto.
975 * linux-sh-low.cc (the_low_target): Ditto.
976 * linux-tic6x-low.cc (the_low_target): Ditto.
977 * linux-tile-low.cc (the_low_target): Ditto.
978 * linux-xtensa-low.cc (the_low_target): Ditto.
979
980 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
981
982 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
983 linux target ops into methods of linux_process_target.
984
985 * linux-low.h (struct linux_target_ops): Remove the ops.
986 (class linux_process_target) <low_collect_ptrace_register>
987 <low_store_ptrace_register>: Declare.
988 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
989 (linux_process_target::low_supply_ptrace_register): Define.
990
991 Update the callers below.
992
993 (linux_process_target::fetch_register)
994 (linux_process_target::store_register)
995
996 * linux-x86-low.cc (the_low_target): Remove the op fields.
997 * linux-aarch64-low.cc (the_low_target): Ditto.
998 * linux-arm-low.cc (the_low_target): Ditto.
999 * linux-bfin-low.cc (the_low_target): Ditto.
1000 * linux-crisv32-low.cc (the_low_target): Ditto.
1001 * linux-m32r-low.cc (the_low_target): Ditto.
1002 * linux-m68k-low.cc (the_low_target): Ditto.
1003 * linux-sh-low.cc (the_low_target): Ditto.
1004 * linux-sparc-low.cc (the_low_target): Ditto.
1005 * linux-tic6x-low.cc (the_low_target): Ditto.
1006 * linux-tile-low.cc (the_low_target): Ditto.
1007 * linux-xtensa-low.cc (the_low_target): Ditto.
1008 * linux-mips-low.cc (class mips_target)
1009 <low_collect_ptrace_register>
1010 <low_supply_ptrace_register>: Declare.
1011 (mips_collect_ptrace_register): Turn into ...
1012 (mips_target::low_collect_ptrace_register): ...this.
1013 (mips_supply_ptrace_register): Turn into...
1014 (mips_target::low_supply_ptrace_register): ...this.
1015 (the_low_target): Remove the op fields.
1016 * linux-ppc-low.cc (class ppc_target)
1017 <low_collect_ptrace_register>
1018 <low_supply_ptrace_register>: Declare.
1019 (ppc_collect_ptrace_register): Turn into ...
1020 (ppc_target::low_collect_ptrace_register): ...this.
1021 (ppc_supply_ptrace_register): Turn into ...
1022 (ppc_target::low_supply_ptrace_register): ...this.
1023 (ppc_fill_gregset): Update for the calls to
1024 low_collect_ptrace_register.
1025 (the_low_target): Remove the op fields.
1026 * linux-s390-low.cc (class s390_target)
1027 <low_collect_ptrace_register>
1028 <low_supply_ptrace_register>: Declare.
1029 (s390_collect_ptrace_register): Turn into ...
1030 (s390_target::low_collect_ptrace_register): ...this.
1031 (s390_supply_ptrace_register): Turn into ...
1032 (s390_target::low_supply_ptrace_register): ...this.
1033 (s390_fill_gregset): Update for the calls to
1034 low_collect_ptrace_register.
1035 (the_low_target): Remove the op fields.
1036
1037 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1038
1039 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1040 target ops into methods of linux_process_target.
1041
1042 * linux-low.h (struct linux_target_ops): Remove the ops.
1043 (class linux_process_target) <check_stopped_by_watchpoint>
1044 <low_stopped_by_watchpoint>
1045 <low_stopped_data_address>: Declare.
1046 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1047 (linux_process_target::check_stopped_by_watchpoint): ...this.
1048 (linux_process_target::low_stopped_by_watchpoint): Define.
1049 (linux_process_target::low_stopped_data_address): Define.
1050 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1051 <low_stopped_data_address>: Declare.
1052 (x86_stopped_by_watchpoint): Turn into...
1053 (x86_target::low_stopped_by_watchpoint): ...this.
1054 (x86_stopped_data_address): Turn into...
1055 (x86_target::low_stopped_data_address): ...this.
1056 (the_low_target): Remove the op fields.
1057 * linux-aarch64-low.cc (class aarch64_target)
1058 <low_stopped_by_watchpoint>
1059 <low_stopped_data_address>: Declare.
1060 (aarch64_stopped_by_watchpoint): Turn into...
1061 (aarch64_target::low_stopped_by_watchpoint): ...this.
1062 (aarch64_stopped_data_address): Turn into...
1063 (aarch64_target::low_stopped_data_address): ...this.
1064 (the_low_target): Remove the op fields.
1065 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1066 <low_stopped_data_address>: Declare.
1067 (arm_stopped_by_watchpoint): Turn into...
1068 (arm_target::low_stopped_by_watchpoint): ...this.
1069 (arm_stopped_data_address): Turn into...
1070 (arm_target::low_stopped_data_address): ...this.
1071 (the_low_target): Remove the op fields.
1072 * linux-crisv32-low.cc (class crisv32_target)
1073 <low_stopped_by_watchpoint>
1074 <low_stopped_data_address>: Declare.
1075 (cris_stopped_by_watchpoint): Turn into...
1076 (crisv32_target::low_stopped_by_watchpoint): ...this.
1077 (cris_stopped_data_address): Turn into...
1078 (crisv32_target::low_stopped_data_address): ...this.
1079 (the_low_target): Remove the op fields.
1080 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1081 <low_stopped_data_address>: Declare.
1082 (mips_stopped_by_watchpoint): Turn into...
1083 (mips_target::low_stopped_by_watchpoint): ...this.
1084 (mips_stopped_data_address): Turn into...
1085 (mips_target::low_stopped_data_address): ...this.
1086 (the_low_target): Remove the op fields.
1087 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1088 * linux-m32r-low.cc (the_low_target): Ditto.
1089 * linux-m68k-low.cc (the_low_target): Ditto.
1090 * linux-ppc-low.cc (the_low_target): Ditto.
1091 * linux-s390-low.cc (the_low_target): Ditto.
1092 * linux-sh-low.cc (the_low_target): Ditto.
1093 * linux-sparc-low.cc (the_low_target): Ditto.
1094 * linux-tic6x-low.cc (the_low_target): Ditto.
1095 * linux-tile-low.cc (the_low_target): Ditto.
1096 * linux-xtensa-low.cc (the_low_target): Ditto.
1097
1098 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1099
1100 Turn the 'insert_point' and 'remove_point' linux target ops into
1101 methods of linux_process_target.
1102
1103 * linux-low.h (struct linux_target_ops): Remove the ops.
1104 (class linux_process_target) <low_insert_point>
1105 <low_remove_point>: Declare.
1106 * linux-low.cc (linux_process_target::low_insert_point)
1107 (linux_process_target::low_remove_point): Define.
1108 (linux_process_target::insert_point)
1109 (linux_process_target::remove_point): Update for calls to
1110 low_insert_point and low_remove_point.
1111 * linux-x86-low.cc (class x86_target) <low_insert_point>
1112 <low_remove_point>: Declare.
1113 (x86_insert_point): Turn into...
1114 (x86_target::low_insert_point): ...this.
1115 (x86_remove_point): Turn into...
1116 (x86_target::low_remove_point): ...this.
1117 (the_low_target): Remove the op fields.
1118 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1119 <low_remove_point>: Declare.
1120 (aarch64_insert_point): Turn into...
1121 (aarch64_target::low_insert_point): ...this.
1122 (aarch64_remove_point): Turn into...
1123 (aarch64_target::low_remove_point): ...this.
1124 (the_low_target): Remove the op fields.
1125 * linux-arm-low.cc (class arm_target) <low_insert_point>
1126 <low_remove_point>: Declare.
1127 (arm_insert_point): Turn into...
1128 (arm_target::low_insert_point): ...this.
1129 (arm_remove_point): Turn into...
1130 (arm_target::low_remove_point): ...this.
1131 (the_low_target): Remove the op fields.
1132 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1133 <low_remove_point>: Declare.
1134 (crisv32_insert_point): Turn into...
1135 (crisv32_target::low_insert_point): ...this.
1136 (crisv32_remove_point): Turn into...
1137 (crisv32_target::low_remove_point): ...this.
1138 (the_low_target): Remove the op fields.
1139 * linux-mips-low.cc (class mips_target) <low_insert_point>
1140 <low_remove_point>: Declare.
1141 (mips_insert_point): Turn into...
1142 (mips_target::low_insert_point): ...this.
1143 (mips_remove_point): Turn into...
1144 (mips_target::low_remove_point): ...this.
1145 (the_low_target): Remove the op fields.
1146 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1147 <low_remove_point>: Declare.
1148 (ppc_insert_point): Turn into...
1149 (ppc_target::low_insert_point): ...this.
1150 (ppc_remove_point): Turn into...
1151 (ppc_target::low_remove_point): ...this.
1152 (the_low_target): Remove the op fields.
1153 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1154 * linux-m32r-low.cc (the_low_target): Ditto.
1155 * linux-m68k-low.cc (the_low_target): Ditto.
1156 * linux-s390-low.cc (the_low_target): Ditto.
1157 * linux-sh-low.cc (the_low_target): Ditto.
1158 * linux-sparc-low.cc (the_low_target): Ditto.
1159 * linux-tic6x-low.cc (the_low_target): Ditto.
1160 * linux-tile-low.cc (the_low_target): Ditto.
1161 * linux-xtensa-low.cc (the_low_target): Ditto.
1162
1163 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1164
1165 Remove the 'supports_z_point_type' linux target op and let the
1166 concrete linux target define it by overriding the op declared in
1167 process_stratum_target.
1168
1169 * linux-low.cc (linux_process_target::supports_z_point_type):
1170 Remove.
1171 * linux-low.h (struct linux_target_ops): Remove the op.
1172 (class linux_process_target) <supports_z_point_type>: Remove.
1173 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1174 Declare.
1175 (x86_supports_z_point_type): Turn into...
1176 (x86_target::supports_z_point_type): ...this.
1177 (the_low_target): Remove the op field.
1178 * linux-aarch64-low.cc (class aarch64_target)
1179 <supports_z_point_type>: Declare.
1180 (aarch64_supports_z_point_type): Turn into...
1181 (aarch64_target::supports_z_point_type): ...this.
1182 (the_low_target): Remove the op field.
1183 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1184 Declare.
1185 (arm_supports_z_point_type): Turn into...
1186 (arm_target::supports_z_point_type): ...this.
1187 (the_low_target): Remove the op field.
1188 * linux-crisv32-low.cc (class crisv32_target)
1189 <supports_z_point_type>: Declare.
1190 (cris_supports_z_point_type): Turn into...
1191 (crisv32_target::supports_z_point_type): ...this.
1192 (the_low_target): Remove the op field.
1193 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1194 Declare.
1195 (mips_supports_z_point_type): Turn into...
1196 (mips_target::supports_z_point_type): ...this.
1197 (the_low_target): Remove the op field.
1198 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1199 Declare.
1200 (ppc_supports_z_point_type): Turn into...
1201 (ppc_target::supports_z_point_type): ...this.
1202 (the_low_target): Remove the op field.
1203 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1204 Declare.
1205 (s390_supports_z_point_type): Turn into...
1206 (s390_target::supports_z_point_type): ...this.
1207 (the_low_target): Remove the op field.
1208 * linux-bfin-low.cc (the_low_target): Remove the op field.
1209 * linux-m32r-low.cc (the_low_target): Ditto.
1210 * linux-m68k-low.cc (the_low_target): Ditto.
1211 * linux-sh-low.cc (the_low_target): Ditto.
1212 * linux-sparc-low.cc (the_low_target): Ditto.
1213 * linux-tic6x-low.cc (the_low_target): Ditto.
1214 * linux-tile-low.cc (the_low_target): Ditto.
1215 * linux-xtensa-low.cc (the_low_target): Ditto.
1216
1217 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1218
1219 Turn the 'breakpoint_at' linux target op into a method of
1220 linux_process_target.
1221
1222 * linux-low.h (struct linux_target_ops): Remove the op.
1223 (class linux_process_target) <low_breakpoint_at>: Declare.
1224
1225 Update the callers below:
1226
1227 * linux-low.cc (linux_process_target::save_stop_reason)
1228 (linux_process_target::thread_still_has_status_pending)
1229 (linux_process_target::wait_1)
1230
1231 * linux-x86-low.cc (class x86_target)
1232 <low_breakpoint_at>: Declare.
1233 (x86_breakpoint_at): Turn into...
1234 (x86_target::low_breakpoint_at): ...this.
1235 (the_low_target): Remove the op field.
1236 * linux-aarch64-low.cc (class aarch64_target)
1237 <low_breakpoint_at>: Declare.
1238 (aarch64_breakpoint_at): Turn into...
1239 (aarch64_target::low_breakpoint_at): ...this.
1240 (the_low_target): Remove the op field.
1241 * linux-arm-low.cc (class arm_target)
1242 <low_breakpoint_at>: Declare.
1243 (arm_target::low_breakpoint_at): Define.
1244 (the_low_target): Remove the op field.
1245 * linux-bfin-low.cc (class bfin_target)
1246 <low_breakpoint_at>: Declare.
1247 (bfin_breakpoint_at): Turn into...
1248 (bfin_target::low_breakpoint_at): ...this.
1249 (the_low_target): Remove the op field.
1250 * linux-cris-low.cc (class cris_target)
1251 <low_breakpoint_at>: Declare.
1252 (cris_breakpoint_at): Turn into...
1253 (cris_target::low_breakpoint_at): ...this.
1254 (the_low_target): Remove the op field.
1255 * linux-crisv32-low.cc (class crisv32_target)
1256 <low_breakpoint_at>: Declare.
1257 (crisv32_breakpoint_at): Turn into...
1258 (crisv32_target::low_breakpoint_at): ...this.
1259 (the_low_target): Remove the op field.
1260 * linux-ia64-low.cc (class ia64_target)
1261 <low_breakpoint_at>: Declare.
1262 (ia64_target::low_breakpoint_at): Define.
1263 * linux-m32r-low.cc (class m32r_target)
1264 <low_breakpoint_at>: Declare.
1265 (m32r_breakpoint_at): Turn into...
1266 (m32r_target::low_breakpoint_at): ...this.
1267 (the_low_target): Remove the op field.
1268 * linux-m68k-low.cc (class m68k_target)
1269 <low_breakpoint_at>: Declare.
1270 (m68k_breakpoint_at): Turn into...
1271 (m68k_target::low_breakpoint_at): ...this.
1272 (the_low_target): Remove the op field.
1273 * linux-mips-low.cc (class mips_target)
1274 <low_breakpoint_at>: Declare.
1275 (mips_breakpoint_at): Turn into...
1276 (mips_target::low_breakpoint_at): ...this.
1277 (the_low_target): Remove the op field.
1278 * linux-nios2-low.cc (class nios2_target)
1279 <low_breakpoint_at>: Declare.
1280 (nios2_breakpoint_at): Turn into...
1281 (nios2_target::low_breakpoint_at): ...this.
1282 (the_low_target): Remove the op field.
1283 * linux-ppc-low.cc (class ppc_target)
1284 <low_breakpoint_at>: Declare.
1285 (ppc_breakpoint_at): Turn into...
1286 (ppc_target::low_breakpoint_at): ...this.
1287 (the_low_target): Remove the op field.
1288 * linux-riscv-low.cc (class riscv_target)
1289 <low_breakpoint_at>: Declare.
1290 (riscv_breakpoint_at): Turn into...
1291 (riscv_target::low_breakpoint_at): ...this.
1292 (the_low_target): Remove the op field.
1293 * linux-s390-low.cc (class s390_target)
1294 <low_breakpoint_at>: Declare.
1295 (s390_breakpoint_at): Turn into...
1296 (s390_target::low_breakpoint_at): ...this.
1297 (the_low_target): Remove the op field.
1298 * linux-sh-low.cc (class sh_target)
1299 <low_breakpoint_at>: Declare.
1300 (sh_breakpoint_at): Turn into...
1301 (sh_target::low_breakpoint_at): ...this.
1302 (the_low_target): Remove the op field.
1303 * linux-sparc-low.cc (class sparc_target)
1304 <low_breakpoint_at>: Declare.
1305 (sparc_breakpoint_at): Turn into...
1306 (sparc_target::low_breakpoint_at): ...this.
1307 (the_low_target): Remove the op field.
1308 * linux-tic6x-low.cc (class tic6x_target)
1309 <low_breakpoint_at>: Declare.
1310 (tic6x_breakpoint_at): Turn into...
1311 (tic6x_target::low_breakpoint_at): ...this.
1312 (the_low_target): Remove the op field.
1313 * linux-tile-low.cc (class tile_target)
1314 <low_breakpoint_at>: Declare.
1315 (tile_breakpoint_at): Turn into...
1316 (tile_target::low_breakpoint_at): ...this.
1317 (the_low_target): Remove the op field.
1318 * linux-xtensa-low.cc (class xtensa_target)
1319 <low_breakpoint_at>: Declare.
1320 (xtensa_breakpoint_at): Turn into...
1321 (xtensa_target::low_breakpoint_at): ...this.
1322 (the_low_target): Remove the op field.
1323
1324 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1325
1326 Turn the 'decr_pc_after_break' linux_target_ops field into
1327 a method of linux_process_target.
1328
1329 * linux-low.h (struct linux_target_ops)
1330 <decr_pc_after_break>: Remove.
1331 (class linux_process_target) <low_decr_pc_after_break>: New method
1332 declaration.
1333 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1334 New method implementation.
1335
1336 Update the users below.
1337
1338 (linux_process_target::save_stop_reason)
1339 (linux_process_target::wait_1)
1340 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1341 New declaration.
1342 (x86_target::low_decr_pc_after_break): New method implementation.
1343 (the_low_target): Remove the field.
1344 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1345 New declaration.
1346 (bfin_target::low_decr_pc_after_break): New method implementation.
1347 (the_low_target): Remove the field.
1348 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1349 New declaration.
1350 (m68k_target::low_decr_pc_after_break): New method implementation.
1351 (the_low_target): Remove the field.
1352 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1353 New declaration.
1354 (s390_target::low_decr_pc_after_break): New method implementation.
1355 (the_low_target): Remove the field.
1356 * linux-aarch64-low.cc (the_low_target): Remove the field.
1357 * linux-arm-low.cc (the_low_target): Remove the field.
1358 * linux-cris-low.cc (the_low_target): Remove the field.
1359 * linux-crisv32-low.cc (the_low_target): Remove the field.
1360 * linux-m32r-low.cc (the_low_target): Remove the field.
1361 * linux-mips-low.cc (the_low_target): Remove the field.
1362 * linux-nios2-low.cc (the_low_target): Remove the field.
1363 * linux-ppc-low.cc (the_low_target): Remove the field.
1364 * linux-riscv-low.cc (the_low_target): Remove the field.
1365 * linux-sh-low.cc (the_low_target): Remove the field.
1366 * linux-sparc-low.cc (the_low_target): Remove the field.
1367 * linux-tic6x-low.cc (the_low_target): Remove the field.
1368 * linux-tile-low.cc (the_low_target): Remove the field.
1369 * linux-xtensa-low.cc (the_low_target): Remove the field.
1370
1371 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1372
1373 Remove the 'supports_software_single_step' linux target op and let
1374 the concrete linux target define it by overriding the op in
1375 process_stratum_target.
1376 Turn the 'get_next_pcs' linux target op into a method of
1377 linux_process_target.
1378
1379 * linux-low.h (struct linux_target_ops): Remove the ops.
1380 (class linux_process_target) <supports_software_single_step>:
1381 Remove.
1382 <low_get_next_pcs>: Declare.
1383 * linux-low.cc (can_software_single_step): Remove.
1384 (linux_process_target::low_get_next_pcs): Define.
1385 (linux_process_target::supports_software_single_step): Remove.
1386
1387 Update the callers below.
1388
1389 (linux_process_target::handle_extended_wait)
1390 (linux_process_target::wait_1)
1391 (linux_process_target::install_software_single_step_breakpoints)
1392 (linux_process_target::single_step)
1393 (linux_process_target::thread_needs_step_over)
1394 (linux_process_target::proceed_one_lwp)
1395 (linux_process_target::supports_range_stepping)
1396
1397 * linux-x86-low.cc (the_low_target): Remove the op field.
1398 * linux-aarch64-low.cc (the_low_target): Ditto.
1399 * linux-bfin-low.cc (the_low_target): Ditto.
1400 * linux-cris-low.cc (the_low_target): Ditto.
1401 * linux-crisv32-low.cc (the_low_target): Ditto.
1402 * linux-m32r-low.cc (the_low_target): Ditto.
1403 * linux-m68k-low.cc (the_low_target): Ditto.
1404 * linux-mips-low.cc (the_low_target): Ditto.
1405 * linux-nios2-low.cc (the_low_target): Ditto.
1406 * linux-ppc-low.cc (the_low_target): Ditto.
1407 * linux-riscv-low.cc (the_low_target): Ditto.
1408 * linux-s390-low.cc (the_low_target): Ditto.
1409 * linux-sh-low.cc (the_low_target): Ditto.
1410 * linux-sparc-low.cc (the_low_target): Ditto.
1411 * linux-tic6x-low.cc (the_low_target): Ditto.
1412 * linux-tile-low.cc (the_low_target): Ditto.
1413 * linux-xtensa-low.cc (the_low_target): Ditto.
1414 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1415 <supports_software_single_step>: Declare.
1416 (arm_target::supports_software_single_step): Define.
1417 (arm_gdbserver_get_next_pcs): Turn into...
1418 (arm_target::low_get_next_pcs): ...this.
1419 (the_low_target): Remove the op field.
1420
1421 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1422
1423 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1424 the concrete linux target define it by overriding the op
1425 in process_stratum_target.
1426
1427 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1428 Remove.
1429 * linux-low.h (struct linux_target_ops): Remove the op.
1430 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1431 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1432 Declare.
1433 (x86_sw_breakpoint_from_kind): Turn into...
1434 (x86_target::sw_breakpoint_from_kind): ...this.
1435 (the_low_target): Remove the op field.
1436 * linux-aarch64-low.cc (class aarch64_target)
1437 <sw_breakpoint_from_kind>: Declare.
1438 (aarch64_sw_breakpoint_from_kind): Turn into...
1439 (aarch64_target::sw_breakpoint_from_kind): ...this.
1440 (the_low_target): Remove the op field.
1441 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1442 Declare.
1443 (arm_target::sw_breakpoint_from_kind): Define.
1444 (the_low_target): Remove the op field.
1445 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1446 Declare.
1447 (bfin_sw_breakpoint_from_kind): Turn into...
1448 (bfin_target::sw_breakpoint_from_kind): ...this.
1449 (the_low_target): Remove the op field.
1450 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1451 Declare.
1452 (cris_sw_breakpoint_from_kind): Turn into...
1453 (cris_target::sw_breakpoint_from_kind): ...this.
1454 (the_low_target): Remove the op field.
1455 * linux-crisv32-low.cc (class crisv32_target)
1456 <sw_breakpoint_from_kind>: Declare.
1457 (cris_sw_breakpoint_from_kind): Turn into...
1458 (crisv32_target::sw_breakpoint_from_kind): ...this.
1459 (the_low_target): Remove the op field.
1460 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1461 Declare.
1462 (ia64_target::sw_breakpoint_from_kind): Define.
1463 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1464 Declare.
1465 (m32r_sw_breakpoint_from_kind): Turn into...
1466 (m32r_target::sw_breakpoint_from_kind): ...this.
1467 (the_low_target): Remove the op field.
1468 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1469 Declare.
1470 (m68k_sw_breakpoint_from_kind): Turn into...
1471 (m68k_target::sw_breakpoint_from_kind): ...this.
1472 (the_low_target): Remove the op field.
1473 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1474 Declare.
1475 (mips_sw_breakpoint_from_kind): Turn into...
1476 (mips_target::sw_breakpoint_from_kind): ...this.
1477 (the_low_target): Remove the op field.
1478 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1479 Declare.
1480 (nios2_sw_breakpoint_from_kind): Turn into...
1481 (nios2_target::sw_breakpoint_from_kind): ...this.
1482 (the_low_target): Remove the op field.
1483 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1484 Declare.
1485 (ppc_sw_breakpoint_from_kind): Turn into...
1486 (ppc_target::sw_breakpoint_from_kind): ...this.
1487 (the_low_target): Remove the op field.
1488 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1489 Declare.
1490 (riscv_sw_breakpoint_from_kind): Turn into...
1491 (riscv_target::sw_breakpoint_from_kind): ...this.
1492 (the_low_target): Remove the op field.
1493 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1494 Declare.
1495 (s390_sw_breakpoint_from_kind): Turn into...
1496 (s390_target::sw_breakpoint_from_kind): ...this.
1497 (the_low_target): Remove the op field.
1498 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1499 Declare.
1500 (sh_sw_breakpoint_from_kind): Turn into...
1501 (sh_target::sw_breakpoint_from_kind): ...this.
1502 (the_low_target): Remove the op field.
1503 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1504 Declare.
1505 (sparc_sw_breakpoint_from_kind): Turn into...
1506 (sparc_target::sw_breakpoint_from_kind): ...this.
1507 (the_low_target): Remove the op field.
1508 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1509 Declare.
1510 (tic6x_sw_breakpoint_from_kind): Turn into...
1511 (tic6x_target::sw_breakpoint_from_kind): ...this.
1512 (the_low_target): Remove the op field.
1513 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1514 Declare.
1515 (tile_sw_breakpoint_from_kind): Turn into...
1516 (tile_target::sw_breakpoint_from_kind): ...this.
1517 (the_low_target): Remove the op field.
1518 * linux-xtensa-low.cc (class xtensa_target)
1519 <sw_breakpoint_from_kind>: Declare.
1520 (xtensa_sw_breakpoint_from_kind): Turn into...
1521 (xtensa_target::sw_breakpoint_from_kind): ...this.
1522 (the_low_target): Remove the op field.
1523
1524 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1525
1526 Remove the 'breakpoint_kind_from_pc' and
1527 'breakpoint_kind_from_current_state' linux target ops, and let the
1528 concrete linux target define them by overriding the ops of
1529 process_stratum_target.
1530
1531 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1532 Remove.
1533 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1534 * linux-low.h (struct linux_target_ops): Remove ops.
1535 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1536 <breakpoint_kind_from_current_state>: Remove.
1537 * linux-x86-low.cc (the_low_target): Remove the op fields.
1538 * linux-bfin-low.cc (the_low_target): Ditto.
1539 * linux-cris-low.cc (the_low_target): Ditto.
1540 * linux-crisv32-low.cc (the_low_target): Ditto.
1541 * linux-m32r-low.cc (the_low_target): Ditto.
1542 * linux-m68k-low.cc (the_low_target): Ditto.
1543 * linux-mips-low.cc (the_low_target): Ditto.
1544 * linux-nios2-low.cc (the_low_target): Ditto.
1545 * linux-ppc-low.cc (the_low_target): Ditto.
1546 * linux-s390-low.cc (the_low_target): Ditto.
1547 * linux-sh-low.cc (the_low_target): Ditto.
1548 * linux-sparc-low.cc (the_low_target): Ditto.
1549 * linux-tic6x-low.cc (the_low_target): Ditto.
1550 * linux-tile-low.cc (the_low_target): Ditto.
1551 * linux-xtensa-low.cc (the_low_target): Ditto.
1552 * linux-aarch64-low.cc (class aarch64_target)
1553 <breakpoint_kind_from_pc>
1554 <breakpoint_kind_from_current_state>: Declare.
1555 (aarch64_breakpoint_kind_from_pc): Turn into...
1556 (aarch64_target::breakpoint_kind_from_pc): ...this.
1557 (aarch64_breakpoint_kind_from_current_state): Turn into...
1558 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1559 (the_low_target): Remove the op fields.
1560 * linux-arm-low.cc (class arm_target):
1561 <breakpoint_kind_from_pc>
1562 <breakpoint_kind_from_current_state>: Declare.
1563 (arm_target::breakpoint_kind_from_pc): Define.
1564 (arm_target::breakpoint_kind_from_current_state): Define.
1565 (the_low_target): Remove the op fields.
1566 * linux-riscv-low.cc (class riscv_target):
1567 <breakpoint_kind_from_pc>: Declare.
1568 (riscv_breakpoint_kind_from_pc): Turn into...
1569 (riscv_target::breakpoint_kind_from_pc): ...this.
1570 (the_low_target): Remove the op fields.
1571
1572 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1573
1574 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1575 of linux_process_target.
1576
1577 * linux-low.h (struct linux_target_ops): Remove the ops.
1578 (class linux_process_target) <low_supports_breakpoints>
1579 <low_get_pc>
1580 <low_set_pc>: Declare.
1581 * linux-low.cc (supports_breakpoints): Turn into...
1582 (linux_process_target::low_supports_breakpoints): ...this.
1583 (linux_process_target::low_get_pc): Define.
1584 (linux_process_target::low_set_pc): Define.
1585
1586 Update the callers below.
1587
1588 (linux_process_target::get_pc)
1589 (linux_process_target::save_stop_reason)
1590 (linux_process_target::maybe_move_out_of_jump_pad)
1591 (linux_process_target::wait_1)
1592 (linux_process_target::resume_one_lwp_throw)
1593 (linux_process_target::resume)
1594 (linux_process_target::proceed_all_lwps)
1595 (linux_process_target::read_pc)
1596 (linux_process_target::write_pc)
1597
1598 * linux-x86-low.cc (class linux_process_target)
1599 <low_supports_breakpoints>
1600 <low_get_pc>
1601 <low_set_pc>: Declare.
1602 (x86_target::low_supports_breakpoints): Define.
1603 (x86_get_pc): Turn into...
1604 (x86_target::low_get_pc): ...this.
1605 (x86_set_pc): Turn into...
1606 (x86_target::low_set_pc): ...this.
1607 (the_low_target): Remove the op fields.
1608 * linux-arm-low.cc (class arm_target)
1609 <low_supports_breakpoints>
1610 <low_get_pc>
1611 <low_set_pc>: Declare.
1612 (arm_target::low_supports_breakpoints)
1613 (arm_target::low_get_pc)
1614 (arm_target::low_set_pc): Define.
1615 (the_low_target): Remove the op fields.
1616 * linux-bfin-low.cc (class bfin_target)
1617 <low_supports_breakpoints>
1618 <low_get_pc>
1619 <low_set_pc>: Declare.
1620 (bfin_target::low_supports_breakpoints)
1621 (bfin_target::low_get_pc)
1622 (bfin_target::low_set_pc): Define.
1623 (the_low_target): Remove the op fields.
1624 * linux-cris-low.cc (class cris_target)
1625 <low_supports_breakpoints>
1626 <low_get_pc>
1627 <low_set_pc>: Declare.
1628 (cris_target::low_supports_breakpoints)
1629 (cris_target::low_get_pc)
1630 (cris_target::low_set_pc): Define.
1631 (the_low_target): Remove the op fields.
1632 * linux-crisv32-low.cc (class crisv32_target)
1633 <low_supports_breakpoints>
1634 <low_get_pc>
1635 <low_set_pc>: Declare.
1636 (crisv32_target::low_supports_breakpoints)
1637 (crisv32_target::low_get_pc)
1638 (crisv32_target::low_set_pc): Define.
1639 (the_low_target): Remove the op fields.
1640 * linux-m32r-low.cc (class m32r_target)
1641 <low_supports_breakpoints>
1642 <low_get_pc>
1643 <low_set_pc>: Declare.
1644 (m32r_target::low_supports_breakpoints)
1645 (m32r_target::low_get_pc)
1646 (m32r_target::low_set_pc): Define.
1647 (the_low_target): Remove the op fields.
1648 * linux-m68k-low.cc (class m68k_target)
1649 <low_supports_breakpoints>
1650 <low_get_pc>
1651 <low_set_pc>: Declare.
1652 (m68k_target::low_supports_breakpoints)
1653 (m68k_target::low_get_pc)
1654 (m68k_target::low_set_pc): Define.
1655 (the_low_target): Remove the op fields.
1656 * linux-nios2-low.cc (class nios2_target)
1657 <low_supports_breakpoints>
1658 <low_get_pc>
1659 <low_set_pc>: Declare.
1660 (nios2_target::low_supports_breakpoints)
1661 (nios2_target::low_get_pc)
1662 (nios2_target::low_set_pc): Define.
1663 (the_low_target): Remove the op fields.
1664 * linux-sh-low.cc (class sh_target)
1665 <low_supports_breakpoints>
1666 <low_get_pc>
1667 <low_set_pc>: Declare.
1668 (sh_target::low_supports_breakpoints)
1669 (sh_target::low_get_pc)
1670 (sh_target::low_set_pc): Define.
1671 (the_low_target): Remove the op fields.
1672 * linux-xtensa-low.cc (class xtensa_target)
1673 <low_supports_breakpoints>
1674 <low_get_pc>
1675 <low_set_pc>: Declare.
1676 (xtensa_target::low_supports_breakpoints)
1677 (xtensa_target::low_get_pc)
1678 (xtensa_target::low_set_pc): Define.
1679 (the_low_target): Remove the op fields.
1680 * linux-sparc-low.cc (class sparc_target)
1681 <low_supports_breakpoints>
1682 <low_get_pc>: Declare.
1683 (sparc_target::low_supports_breakpoints)
1684 (sparc_target::low_get_pc): Define.
1685 (the_low_target): Remove the op fields.
1686 * linux-tile-low.cc (class tile_target)
1687 <low_supports_breakpoints>
1688 <low_get_pc>
1689 <low_set_pc>: Declare.
1690 (tile_target::low_supports_breakpoints)
1691 (tile_target::low_get_pc)
1692 (tile_target::low_set_pc): Define.
1693 (the_low_target): Remove the op fields.
1694 * linux-aarch64-low.cc (class aarch64_target)
1695 <low_supports_breakpoints>
1696 <low_get_pc>
1697 <low_set_pc>: Declare.
1698 (aarch64_target::low_supports_breakpoints): Define.
1699 (aarch64_get_pc): Turn into...
1700 (aarch64_target::low_get_pc): ...this.
1701 (aarch64_set_pc): Turn into...
1702 (aarch64_target::low_set_pc): ...this.
1703 (the_low_target): Remove the op fields.
1704 * linux-mips-low.cc (class mips_target)
1705 <low_supports_breakpoints>
1706 <low_get_pc>
1707 <low_set_pc>: Declare.
1708 (mips_target::low_supports_breakpoints): Define.
1709 (mips_get_pc): Turn into...
1710 (mips_target::low_get_pc): ...this.
1711 (mips_set_pc): Turn into...
1712 (mips_target::low_set_pc): ...this.
1713 (the_low_target): Remove the op fields.
1714 * linux-ppc-low.cc (class ppc_target)
1715 <low_supports_breakpoints>
1716 <low_get_pc>
1717 <low_set_pc>: Declare.
1718 (ppc_target::low_supports_breakpoints): Define.
1719 (ppc_get_pc): Turn into...
1720 (ppc_target::low_get_pc): ...this.
1721 (ppc_set_pc): Turn into...
1722 (ppc_target::low_set_pc): ...this.
1723 (the_low_target): Remove the op fields.
1724 * linux-riscv-low.cc (class riscv_target)
1725 <low_supports_breakpoints>
1726 <low_get_pc>
1727 <low_set_pc>: Declare.
1728 (riscv_target::low_supports_breakpoints): Define.
1729 (riscv_get_pc): Turn into...
1730 (riscv_target::low_get_pc): ...this.
1731 (riscv_set_pc): Turn into...
1732 (riscv_target::low_set_pc): ...this.
1733 (the_low_target): Remove the op fields.
1734 * linux-s390-low.cc (class s390_target)
1735 <low_supports_breakpoints>
1736 <low_get_pc>
1737 <low_set_pc>: Declare.
1738 (s390_target::low_supports_breakpoints): Define.
1739 (s390_get_pc): Turn into...
1740 (s390_target::low_get_pc): ...this.
1741 (s390_set_pc): Turn into...
1742 (s390_target::low_set_pc): ...this.
1743 (the_low_target): Remove the op fields.
1744 * linux-tic6x-low.cc (class tic6x_target)
1745 <low_supports_breakpoints>
1746 <low_get_pc>
1747 <low_set_pc>: Declare.
1748 (tic6x_target::low_supports_breakpoints): Define.
1749 (tic6x_get_pc): Turn into...
1750 (tic6x_target::low_get_pc): ...this.
1751 (tic6x_set_pc): Turn into...
1752 (tic6x_target::low_set_pc): ...this.
1753 (the_low_target): Remove the op fields.
1754
1755 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1756
1757 Turn some more static methods in linux-low into private methods
1758 of linux_process_target.
1759
1760 * linux-low.cc (get_pc): Turn into...
1761 (linux_process_target::get_pc): ...this.
1762 (save_stop_reason): Turn into...
1763 (linux_process_target::save_stop_reason): ...this.
1764 (thread_still_has_status_pending_p): Turn into...
1765 (linux_process_target::thread_still_has_status_pending): ...this.
1766 (status_pending_p_callback): Turn into...
1767 (linux_process_target::status_pending_p_callback): ...this.
1768 (resume_stopped_resumed_lwps): Turn into...
1769 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1770 (install_software_single_step_breakpoints): Turn into...
1771 (linux_process_target::install_software_single_step_breakpoints):
1772 ...this.
1773 (single_step): Turn into...
1774 (linux_process_target::single_step): ...this.
1775 (linux_resume_one_lwp_throw): Turn into...
1776 (linux_process_target::resume_one_lwp_throw): ...this.
1777 (linux_resume_one_lwp): Turn into...
1778 (linux_process_target::resume_one_lwp): ...this.
1779 (resume_status_pending_p): Turn into...
1780 (linux_process_target::resume_status_pending): ...this.
1781 (need_step_over_p): Turn into...
1782 (linux_process_target::thread_needs_step_over): ...this.
1783 (linux_resume_one_thread): Turn into...
1784 (linux_process_target::resume_one_thread): ...this.
1785 (proceed_one_lwp): Turn into...
1786 (linux_process_target::proceed_one_lwp): ...this.
1787 (unsuspend_and_proceed_one_lwp): Turn into...
1788 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1789
1790 Update the calls/references to the above functions below.
1791
1792 (linux_process_target::handle_extended_wait)
1793 (linux_process_target::filter_event)
1794 (linux_process_target::wait_for_event_filtered)
1795 (linux_process_target::wait_1)
1796 (linux_process_target::move_out_of_jump_pad)
1797 (linux_process_target::start_step_over)
1798 (linux_process_target::resume)
1799 (linux_process_target::proceed_all_lwps)
1800 (regsets_store_inferior_registers)
1801 (linux_process_target::store_register)
1802
1803 * linux-low.h (class linux_process_target)
1804 <get_pc>
1805 <save_stop_reason>
1806 <thread_still_has_status_pending>
1807 <status_pending_p_callback>
1808 <resume_stopped_resumed_lwps>
1809 <install_software_single_step_breakpoints>
1810 <single_step>
1811 <resume_one_lwp_throw>
1812 <resume_one_lwp>
1813 <resume_status_pending>
1814 <thread_needs_step_over>
1815 <resume_one_thread>
1816 <proceed_one_lwp>
1817 <unsuspend_and_proceed_one_lwp>: Declare.
1818
1819 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1820
1821 Turn the 'fetch_register' linux target op into a method of
1822 linux_process_target.
1823
1824 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1825 (class linux_process_target) <low_fetch_register>: Declare.
1826 * linux-x86-low.cc (the_low_target)
1827 * linux-aarch64-low.cc (the_low_target)
1828 * linux-arm-low.cc (the_low_target)
1829 * linux-bfin-low.cc (the_low_target)
1830 * linux-cris-low.cc (the_low_target)
1831 * linux-crisv32-low.cc (the_low_target)
1832 * linux-m32r-low.cc (the_low_target)
1833 * linux-m68k-low.cc (the_low_target)
1834 * linux-nios2-low.cc (the_low_target)
1835 * linux-ppc-low.cc (the_low_target)
1836 * linux-s390-low.cc (the_low_target)
1837 * linux-sh-low.cc (the_low_target)
1838 * linux-sparc-low.cc (the_low_target)
1839 * linux-tic6x-low.cc (the_low_target)
1840 * linux-tile-low.cc (the_low_target)
1841 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1842 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1843 Declare.
1844 (ia64_fetch_register): Turn into...
1845 (ia64_target::low_fetch_register): ...this.
1846 (the_low_target): Remove the op field.
1847 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1848 Declare.
1849 (mips_fetch_register): Turn into...
1850 (mips_target::low_fetch_register): ...this.
1851 (the_low_target): Remove the op field.
1852 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1853 Declare.
1854 (riscv_fetch_register): Turn into...
1855 (riscv_target::low_fetch_register): ...this.
1856 (the_low_target): Remove the op field.
1857
1858 Update the callers below.
1859
1860 * linux-low.cc (linux_process_target::fetch_registers)
1861 (linux_process_target::low_fetch_register)
1862
1863 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1864
1865 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1866 linux target ops into methods of linux_process_target.
1867
1868 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1869 (class linux_process_target) <fetch_register>
1870 <store_register>
1871 <usr_fetch_inferior_registers>
1872 <usr_store_inferior_registers>
1873 <low_cannot_fetch_register>
1874 <low_cannot_fetch_register> Declare.
1875 * linux-low.cc (fetch_register): Turn into...
1876 (linux_process_target::fetch_register): ...this.
1877 (store_register): Turn into ...
1878 (linux_process_target::store_register): ...this.
1879 (usr_fetch_inferior_registers): Turn into...
1880 (linux_process_target::usr_fetch_inferior_registers): ...this.
1881 (usr_store_inferior_registers): Turn into...
1882 (linux_process_target::usr_store_inferior_registers): ...this.
1883 * linux-x86-low.cc (class x86_target)
1884 <low_cannot_fetch_register>
1885 <low_cannot_store_register>: Declare.
1886 (x86_cannot_store_register): Turn into...
1887 (x86_target::low_cannot_store_register): ...this.
1888 (x86_cannot_fetch_register): Turn into...
1889 (x86_target::low_cannot_fetch_register): ...this.
1890 (the_low_target): Remove the target op fields.
1891 * linux-aarch64-low.cc (class aarch64_target)
1892 <low_cannot_fetch_register>
1893 <low_cannot_store_register>: Declare.
1894 (aarch64_target::low_cannot_fetch_register)
1895 (aarch64_target::low_cannot_store_register): Define.
1896 (the_low_target): Remove the op fields.
1897 * linux-arm-low.cc (class arm_target)
1898 <low_cannot_fetch_register>
1899 <low_cannot_store_register>: Declare.
1900 (arm_cannot_fetch_register): Turn into...
1901 (arm_target::low_cannot_fetch_register): ...this.
1902 (arm_cannot_store_register): Turn into...
1903 (arm_target::low_cannot_store_register): ...this.
1904 (the_low_target): Remove the op fields.
1905 * linux-bfin-low.cc (class bfin_target)
1906 <low_cannot_fetch_register>
1907 <low_cannot_store_register>: Declare.
1908 (bfin_cannot_fetch_register): Turn into...
1909 (bfin_target::low_cannot_fetch_register): ...this.
1910 (bfin_cannot_store_register): Turn into...
1911 (bfin_target::low_cannot_store_register): ...this.
1912 (the_low_target): Remove the op fields.
1913 * linux-cris-low.cc (class cris_target)
1914 <low_cannot_fetch_register>
1915 <low_cannot_store_register>: Declare.
1916 (cris_cannot_fetch_register): Turn into...
1917 (cris_target::low_cannot_fetch_register): ...this.
1918 (cris_cannot_store_register): Turn into...
1919 (cris_target::low_cannot_store_register): ...this.
1920 (the_low_target): Remove the op fields.
1921 * linux-crisv32-low.cc (class crisv32_target)
1922 <low_cannot_fetch_register>
1923 <low_cannot_store_register>: Declare.
1924 (crisv32_target::low_cannot_fetch_register)
1925 (crisv32_target::low_cannot_store_register): Define.
1926 (the_low_target): Remove the op fields.
1927 * linux-ia64-low.cc (class ia64_target)
1928 <low_cannot_fetch_register>
1929 <low_cannot_store_register>: Declare.
1930 (ia64_cannot_fetch_register): Turn into...
1931 (ia64_target::low_cannot_fetch_register): ...this.
1932 (ia64_cannot_store_register): Turn into...
1933 (ia64_target::low_cannot_store_register): ...this.
1934 (the_low_target): Remove the op fields.
1935 * linux-m32r-low.cc (class m32r_target)
1936 <low_cannot_fetch_register>
1937 <low_cannot_store_register>: Declare.
1938 (m32r_cannot_fetch_register): Turn into...
1939 (m32r_target::low_cannot_fetch_register): ...this.
1940 (m32r_cannot_store_register): Turn into...
1941 (m32r_target::low_cannot_store_register): ...this.
1942 (the_low_target): Remove the op fields.
1943 * linux-m68k-low.cc (class m68k_target)
1944 <low_cannot_fetch_register>
1945 <low_cannot_store_register>: Declare.
1946 (m68k_cannot_fetch_register): Turn into...
1947 (m68k_target::low_cannot_fetch_register): ...this.
1948 (m68k_cannot_store_register): Turn into...
1949 (m68k_target::low_cannot_store_register): ...this.
1950 (the_low_target): Remove the op fields.
1951 * linux-mips-low.cc (class mips_target)
1952 <low_cannot_fetch_register>
1953 <low_cannot_store_register>: Declare.
1954 (mips_cannot_fetch_register): Turn into...
1955 (mips_target::low_cannot_fetch_register): ...this.
1956 (mips_cannot_store_register): Turn into...
1957 (mips_target::low_cannot_store_register): ...this.
1958 (get_usrregs_info): Inline at the call sites in
1959 low_cannot_fetch_register and low_cannot_store_register,
1960 and remove.
1961 (the_low_target): Remove the op fields.
1962 * linux-nios2-low.cc (class nios2_target)
1963 <low_cannot_fetch_register>
1964 <low_cannot_store_register>: Declare.
1965 (nios2_cannot_fetch_register): Turn into...
1966 (nios2_target::low_cannot_fetch_register): ...this.
1967 (nios2_cannot_store_register): Turn into...
1968 (nios2_target::low_cannot_store_register): ...this.
1969 (the_low_target): Remove the op fields.
1970 * linux-ppc-low.cc (class ppc_target)
1971 <low_cannot_fetch_register>
1972 <low_cannot_store_register>: Declare.
1973 (ppc_cannot_fetch_register): Turn into...
1974 (ppc_target::low_cannot_fetch_register): ...this.
1975 (ppc_cannot_store_register): Turn into...
1976 (ppc_target::low_cannot_store_register): ...this.
1977 (the_low_target): Remove the op fields.
1978 * linux-riscv-low.cc (class riscv_target)
1979 <low_cannot_fetch_register>
1980 <low_cannot_store_register>: Declare.
1981 (riscv_target::low_cannot_fetch_register)
1982 (riscv_target::low_cannot_store_register): Define.
1983 (the_low_target): Remove the op fields.
1984 * linux-s390-low.cc (class s390_target)
1985 <low_cannot_fetch_register>
1986 <low_cannot_store_register>: Declare.
1987 (s390_cannot_fetch_register): Turn into...
1988 (s390_target::low_cannot_fetch_register): ...this.
1989 (s390_cannot_store_register): Turn into...
1990 (s390_target::low_cannot_store_register): ...this.
1991 (the_low_target): Remove the op fields.
1992 * linux-sh-low.cc (class sh_target)
1993 <low_cannot_fetch_register>
1994 <low_cannot_store_register>: Declare.
1995 (sh_cannot_fetch_register): Turn into...
1996 (sh_target::low_cannot_fetch_register): ...this.
1997 (sh_cannot_store_register): Turn into...
1998 (sh_target::low_cannot_store_register): ...this.
1999 (the_low_target): Remove the op fields.
2000 * linux-sparc-low.cc (class sparc_target)
2001 <low_cannot_fetch_register>
2002 <low_cannot_store_register>: Declare.
2003 (sparc_cannot_fetch_register): Turn into...
2004 (sparc_target::low_cannot_fetch_register): ...this.
2005 (sparc_cannot_store_register): Turn into...
2006 (sparc_target::low_cannot_store_register): ...this.
2007 (the_low_target): Remove the op fields.
2008 * linux-tic6x-low.cc (class tic6x_target)
2009 <low_cannot_fetch_register>
2010 <low_cannot_store_register>: Declare.
2011 (tic6x_cannot_fetch_register): Turn into...
2012 (tic6x_target::low_cannot_fetch_register): ...this.
2013 (tic6x_cannot_store_register): Turn into...
2014 (tic6x_target::low_cannot_store_register): ...this.
2015 (the_low_target): Remove the op fields.
2016 * linux-tile-low.cc (class tile_target)
2017 <low_cannot_fetch_register>
2018 <low_cannot_store_register>: Declare.
2019 (tile_cannot_fetch_register): Turn into...
2020 (tile_target::low_cannot_fetch_register): ...this.
2021 (tile_cannot_store_register): Turn into...
2022 (tile_target::low_cannot_store_register): ...this.
2023 (the_low_target): Remove the op fields.
2024 * linux-xtensa-low.cc (class xtensa_target)
2025 <low_cannot_fetch_register>
2026 <low_cannot_store_register>: Declare.
2027 (xtensa_target::low_cannot_fetch_register)
2028 (xtensa_target::low_cannot_store_register): Define.
2029 (the_low_target): Remove the op fields.
2030
2031 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2032
2033 Turn the 'regs_info' linux target op into a method of
2034 linux_process_target.
2035
2036 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2037 (class linux_process_target) <get_regs_info>: Define.
2038
2039 Update the callers below.
2040
2041 * linux-low.cc (linux_process_target::fetch_registers)
2042 (linux_process_target::store_registers)
2043 * proc-service.cc (gregset_info)
2044
2045 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2046 (x86_linux_regs_info): Turn into ...
2047 (x86_target::get_regs_info): ...this.
2048 (the_low_target): Remove the op field.
2049 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2050 Declare.
2051 (aarch64_regs_info): Turn into ...
2052 (aarch64_target::get_regs_info): ...this.
2053 (the_low_target): Remove the op field.
2054 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2055 (arm_regs_info): Turn into ...
2056 (arm_target::get_regs_info): ...this.
2057 (the_low_target): Remove the op field.
2058 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2059 (bfin_regs_info): Turn into ...
2060 (bfin_target::get_regs_info): ...this.
2061 (the_low_target): Remove the op field.
2062 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2063 (cris_regs_info): Turn into ...
2064 (cris_target::get_regs_info): ...this.
2065 (the_low_target): Remove the op field.
2066 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2067 Declare.
2068 (crisv32_regs_info): Turn into ...
2069 (crisv32_target::get_regs_info): ...this.
2070 (the_low_target): Remove the op field.
2071 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2072 (ia64_regs_info): Turn into ...
2073 (ia64_target::get_regs_info): ...this.
2074 (the_low_target): Remove the op field.
2075 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2076 (m32r_regs_info): Turn into ...
2077 (m32r_target::get_regs_info): ...this.
2078 (the_low_target): Remove the op field.
2079 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2080 (m68k_regs_info): Turn into ...
2081 (m68k_target::get_regs_info): ...this.
2082 (the_low_target): Remove the op field.
2083 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2084 (mips_regs_info): Turn into ...
2085 (mips_target::get_regs_info): ...this.
2086 (the_low_target): Remove the op field.
2087 (get_usrregs_info): Update the call to the op.
2088 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2089 (nios2_regs_info): Turn into ...
2090 (nios2_target::get_regs_info): ...this.
2091 (the_low_target): Remove the op field.
2092 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2093 (ppc_regs_info): Turn into ...
2094 (ppc_target::get_regs_info): ...this.
2095 (the_low_target): Remove the op field.
2096 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2097 (riscv_regs_info): Turn into ...
2098 (riscv_target::get_regs_info): ...this.
2099 (the_low_target): Remove the op field.
2100 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2101 (s390_regs_info): Turn into ...
2102 (s390_target::get_regs_info): ...this.
2103 (the_low_target): Remove the op field.
2104 (s390_collect_ptrace_register)
2105 (s390_supply_ptrace_register)
2106 (s390_fill_gregset): Update the call to the op.
2107 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2108 (sh_regs_info): Turn into ...
2109 (sh_target::get_regs_info): ...this.
2110 (the_low_target): Remove the op field.
2111 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2112 (sparc_regs_info): Turn into ...
2113 (sparc_target::get_regs_info): ...this.
2114 (the_low_target): Remove the op field.
2115 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2116 (tic6x_regs_info): Turn into ...
2117 (tic6x_target::get_regs_info): ...this.
2118 (the_low_target): Remove the op field.
2119 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2120 (tile_regs_info): Turn into ...
2121 (tile_target::get_regs_info): ...this.
2122 (the_low_target): Remove the op field.
2123 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2124 Declare.
2125 (xtensa_regs_info): Turn into ...
2126 (xtensa_target::get_regs_info): ...this.
2127 (the_low_target): Remove the op field.
2128
2129 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2130
2131 Turn the 'arch_setup' linux target op into a method of
2132 linux_process_target.
2133
2134 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2135 (class linux_process_target) <arch_setup_thread>
2136 <low_arch_setup>: New declarations.
2137 * linux-low.cc (linux_arch_setup): Delete.
2138 (linux_arch_setup_thread): Turn into...
2139 (linux_process_target::arch_setup_thread): ... this.
2140
2141 Update the callers below.
2142
2143 (linux_process_target::handle_extended_wait)
2144 (linux_process_target::post_create_inferior)
2145 (linux_process_target::filter_event)
2146
2147 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2148 declaration.
2149 (x86_linux_update_xmltarget): Turn into...
2150 (x86_target::update_xmltarget): ...this.
2151 (x86_linux_process_qsupported): Update the call to
2152 x86_linux_update_xmltarget.
2153 (x86_arch_setup): Turn into ...
2154 (x86_target::low_arch_setup): ...this.
2155 (the_low_target): Remove the op field.
2156 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2157 declaration.
2158 (aarch64_arch_setup): Turn into ...
2159 (aarch64_target::low_arch_setup): ...this.
2160 (the_low_target): Remove the op field.
2161 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2162 declaration.
2163 (arm_arch_setup): Turn into ...
2164 (arm_target::low_arch_setup): ...this.
2165 (the_low_target): Remove the op field.
2166 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2167 declaration.
2168 (bfin_arch_setup): Turn into ...
2169 (bfin_target::low_arch_setup): ...this.
2170 (the_low_target): Remove the op field.
2171 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2172 declaration.
2173 (cris_arch_setup): Turn into ...
2174 (cris_target::low_arch_setup): ...this.
2175 (the_low_target): Remove the op field.
2176 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2177 declaration.
2178 (crisv32_arch_setup): Turn into ...
2179 (crisv32_target::low_arch_setup): ...this.
2180 (the_low_target): Remove the op field.
2181 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2182 declaration.
2183 (ia64_arch_setup): Turn into ...
2184 (ia64_target::low_arch_setup): ...this.
2185 (the_low_target): Remove the op field.
2186 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2187 declaration.
2188 (m32r_arch_setup): Turn into ...
2189 (m32r_target::low_arch_setup): ...this.
2190 (the_low_target): Remove the op field.
2191 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2192 declaration.
2193 (m68k_arch_setup): Turn into ...
2194 (m68k_target::low_arch_setup): ...this.
2195 (the_low_target): Remove the op field.
2196 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2197 declaration.
2198 (mips_arch_setup): Turn into ...
2199 (mips_target::low_arch_setup): ...this.
2200 (the_low_target): Remove the op field.
2201 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2202 declaration.
2203 (nios2_arch_setup): Turn into ...
2204 (nios2_target::low_arch_setup): ...this.
2205 (the_low_target): Remove the op field.
2206 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2207 declaration.
2208 (ppc_arch_setup): Turn into ...
2209 (ppc_target::low_arch_setup): ...this.
2210 (the_low_target): Remove the op field.
2211 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2212 declaration.
2213 (riscv_arch_setup): Turn into ...
2214 (riscv_target::low_arch_setup): ...this.
2215 (the_low_target): Remove the op field.
2216 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2217 declaration.
2218 (s390_arch_setup): Turn into ...
2219 (s390_target::low_arch_setup): ...this.
2220 (the_low_target): Remove the op field.
2221 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2222 declaration.
2223 (sh_arch_setup): Turn into ...
2224 (sh_target::low_arch_setup): ...this.
2225 (the_low_target): Remove the op field.
2226 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2227 declaration.
2228 (sparc_arch_setup): Turn into ...
2229 (sparc_target::low_arch_setup): ...this.
2230 (the_low_target): Remove the op field.
2231 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2232 declaration.
2233 (tic6x_arch_setup): Turn into ...
2234 (tic6x_target::low_arch_setup): ...this.
2235 (the_low_target): Remove the op field.
2236 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2237 declaration.
2238 (tile_arch_setup): Turn into ...
2239 (tile_target::low_arch_setup): ...this.
2240 (the_low_target): Remove the op field.
2241 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2242 declaration.
2243 (xtensa_arch_setup): Turn into ...
2244 (xtensa_target::low_arch_setup): ...this.
2245 (the_low_target): Remove the op field.
2246
2247 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2248
2249 * linux-low.h (the_linux_target): New extern declaration.
2250 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2251 'the_target'.
2252 (the_linux_target): Remove.
2253 * linux-x86-low.cc (class x86_target): New class.
2254 (the_x86_target): New static object.
2255 (the_linux_target): Define as pointer to the_x86_target.
2256 * linux-aarch64-low.cc (class aarch64_target): New class.
2257 (the_aarch64_target): New static object.
2258 (the_linux_target): Define as pointer to the_aarch64_target.
2259 * linux-arm-low.cc (class arm_target): New class.
2260 (the_arm_target): New static object.
2261 (the_linux_target): Define as pointer to the_arm_target.
2262 * linux-bfin-low.cc (class bfin_target): New class.
2263 (the_bfin_target): New static object.
2264 (the_linux_target): Define as pointer to the_bfin_target.
2265 * linux-cris-low.cc (class cris_target): New class.
2266 (the_cris_target): New static object.
2267 (the_linux_target): Define as pointer to the_cris_target.
2268 * linux-crisv32-low.cc (class crisv32_target): New class.
2269 (the_crisv32_target): New static object.
2270 (the_linux_target): Define as pointer to the_crisv32_target.
2271 * linux-ia64-low.cc (class ia64_target): New class.
2272 (the_ia64_target): New static object.
2273 (the_linux_target): Define as pointer to the_ia64_target.
2274 * linux-m32r-low.cc (class m32r_target): New class.
2275 (the_m32r_target): New static object.
2276 (the_linux_target): Define as pointer to the_m32r_target.
2277 * linux-m68k-low.cc (class m68k_target): New class.
2278 (the_m68k_target): New static object.
2279 (the_linux_target): Define as pointer to the_m68k_target.
2280 * linux-mips-low.cc (class mips_target): New class.
2281 (the_mips_target): New static object.
2282 (the_linux_target): Define as pointer to the_mips_target.
2283 * linux-nios2-low.cc (class nios2_target): New class.
2284 (the_nios2_target): New static object.
2285 (the_linux_target): Define as pointer to the_nios2_target.
2286 * linux-ppc-low.cc (class ppc_target): New class.
2287 (the_ppc_target): New static object.
2288 (the_linux_target): Define as pointer to the_ppc_target.
2289 * linux-riscv-low.cc (class riscv_target): New class.
2290 (the_riscv_target): New static object.
2291 (the_linux_target): Define as pointer to the_riscv_target.
2292 * linux-s390-low.cc (class s390_target): New class.
2293 (the_s390_target): New static object.
2294 (the_linux_target): Define as pointer to the_s390_target.
2295 * linux-sh-low.cc (class sh_target): New class.
2296 (the_sh_target): New static object.
2297 (the_linux_target): Define as pointer to the_sh_target.
2298 * linux-sparc-low.cc (class sparc_target): New class.
2299 (the_sparc_target): New static object.
2300 (the_linux_target): Define as pointer to the_sparc_target.
2301 * linux-tic6x-low.cc (class tic6x_target): New class.
2302 (the_tic6x_target): New static object.
2303 (the_linux_target): Define as pointer to the_tic6x_target.
2304 * linux-tile-low.cc (class tile_target): New class.
2305 (the_tile_target): New static object.
2306 (the_linux_target): Define as pointer to the_tile_target.
2307 * linux-xtensa-low.cc (class xtensa_target): New class.
2308 (the_xtensa_target): New static object.
2309 (the_linux_target): Define as pointer to the_xtensa_target.
2310
2311 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2312
2313 Turn some static functions in linux-low.cc into private methods of
2314 linux_process_target.
2315
2316 * linux-low.cc (handle_extended_wait): Turn into ...
2317 (linux_process_target::handle_extended_wait): ...this. Call
2318 'mourn' on 'this' object instead of 'the_target'.
2319 (maybe_move_out_of_jump_pad): Turn into...
2320 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2321 (linux_low_filter_event): Turn into...
2322 (linux_process_target::filter_event): ...this.
2323 (linux_wait_for_event_filtered): Turn into...
2324 (linux_process_target::wait_for_event_filtered): ...this.
2325 (linux_wait_for_event): Turn into...
2326 (linux_process_target::wait_for_event): ...this.
2327 (linux_wait_1): Turn into...
2328 (linux_process_target::wait_1): ...this.
2329 (wait_for_sigstop): Turn into...
2330 (linux_process_target::wait_for_sigstop): ...this.
2331 (move_out_of_jump_pad_callback): Turn into...
2332 (linux_process_target::move_out_of_jump_pad): ...this.
2333 (stop_all_lwps): Turn into...
2334 (linux_process_target::stop_all_lwps): ...this.
2335 (start_step_over): Turn into...
2336 (linux_process_target::start_step_over): ...this.
2337 (complete_ongoing_step_over): Turn into...
2338 (linux_process_target::complete_ongoing_step_over): ...this.
2339 (proceed_all_lwps): Turn into...
2340 (linux_process_target::proceed_all_lwps): ...this.
2341 (unstop_all_lwps): Turn into...
2342 (linux_process_target::unstop_all_lwps): ...this.
2343
2344 * linux-low.h (class linux_process_target)
2345 <handle_extended_wait>
2346 <maybe_move_out_of_jump_pad>
2347 filter_event>
2348 <wait_for_event_filtered>
2349 <wait_for_event>
2350 <wait_1>
2351 <wait_for_sigstop>
2352 <move_out_of_jump_pad>
2353 <stop_all_lwps>
2354 <start_step_over>
2355 <complete_ongoing_step_over>
2356 <proceed_all_lwps>
2357 <unstop_all_lwps>: Declare.
2358
2359 Update the callers below.
2360
2361 * linux-low.cc (linux_process_target::attach): Update.
2362 (linux_process_target::stabilize_threads): Ditto.
2363 (linux_process_target::wait): Ditto.
2364
2365 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2366
2367 * linux-low.h (struct linux_target_ops): Update the comment for
2368 'cannot_store_register' to return 0 or 1.
2369 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2370 of 2.
2371
2372 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2373
2374 * config.in: Re-generate.
2375 * configure: Re-generate.
2376
2377 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2378
2379 * regcache.cc (find_register_by_number): Update.
2380 * tdesc.cc (init_target_desc): Likewise.
2381 * tdesc.h (target_desc::reg_defs): Likewise.
2382
2383 2020-03-12 Tom Tromey <tom@tromey.com>
2384
2385 * configure: Rebuild.
2386 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2387 (WIN32APILIBS): New subst.
2388 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2389 gdbsupport files.
2390 (gdbsupport/%.o): Remove target.
2391 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2392 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2393 (WIN32APILIBS): New variable.
2394 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2395 (gdbreplay$(EXEEXT)): Likewise.
2396
2397 2020-03-12 Tom Tromey <tom@tromey.com>
2398
2399 * config.in, configure: Rebuild.
2400 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2401 * acinclude.m4: Include gettext-sister.m4.
2402 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2403 variables.
2404 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2405 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2406
2407 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2408
2409 * acinclude.m4: Update path to selftest.m4.
2410
2411 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2412
2413 * configure.ac: Don't source bfd/development.sh, move
2414 GDB_AC_COMMON higher.
2415 * configure: Re-generate.
2416
2417 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2418
2419 * configure: Re-generate.
2420
2421 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2422
2423 * configure: Re-generate.
2424
2425 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2426
2427 * .dir-locals.el: New file.
2428
2429 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2430
2431 * .gitattributes: New file.
2432
2433 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2434
2435 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2436 reply into an S reply.
2437 * server.cc (disable_packet_T): New global.
2438 (captured_main): Set new global when appropriate.
2439 * server.h (disable_packet_T): Declare.
2440
2441 2020-02-21 Tom Tromey <tom@tromey.com>
2442
2443 * Makefile.in (mostlyclean): New target.
2444
2445 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2446
2447 * target.h (struct process_stratum_target): Remove.
2448 (class process_target): Rename to ...
2449 (class process_stratum_target): ... this.
2450 * linux-low.h (class linux_process_target): Derive from
2451 'process_stratum_target'.
2452 * linux-low.cc (linux_target_ops): Remove.
2453 (initialize_low): Set the_target to the singleton instance of
2454 linux_process_target.
2455 * lynx-low.h (class lynx_process_target): Derive from
2456 'process_stratum_target'.
2457 * lynx-low.cc (lynx_target_ops): Remove.
2458 (initialize_low): Set the_target to the singleton instance of
2459 lynx_process_target.
2460 * nto-low.h (class nto_process_target): Derive from
2461 'process_stratum_target'.
2462 * nto-low.cc (nto_target_ops): Remove.
2463 (initialize_low): Set the_target to the singleton instance of
2464 nto_process_target.
2465 * win32-low.h (class win32_process_target): Derive from
2466 'process_stratum_target'.
2467 * win32-low.cc (win32_target_ops): Remove.
2468 (initialize_low): Set the_target to the singleton instance of
2469 win32_process_target.
2470
2471 Replace 'the_target->pt' with 'the_target' in the uses below.
2472
2473 * hostio.cc (hostio_error)
2474 (handle_setfs)
2475 (handle_open)
2476 (handle_unlink)
2477 (handle_readlink)
2478 * linux-aarch32-low.cc (arm_breakpoint_at)
2479 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2480 * linux-arm-low.cc (arm_sigreturn_next_pc)
2481 (arm_get_hwcap)
2482 (arm_get_syscall_trapinfo)
2483 * linux-cris-low.cc (cris_breakpoint_at)
2484 * linux-crisv32-low.cc (cris_breakpoint_at)
2485 * linux-low.cc (handle_extended_wait)
2486 (linux_wait_1)
2487 (linux_read_memory)
2488 (linux_process_target::breakpoint_kind_from_pc)
2489 (linux_get_auxv)
2490 * linux-m32r-low.cc (m32r_breakpoint_at)
2491 * linux-mips-low.cc (mips_breakpoint_at)
2492 * linux-nios2-low.cc (nios2_breakpoint_at)
2493 * linux-ppc-low.cc (ppc_breakpoint_at)
2494 * linux-s390-low.cc (s390_get_hwcap)
2495 * linux-sh-low.cc (sh_breakpoint_at)
2496 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2497 (sparc_store_gregset_from_stack)
2498 (sparc_breakpoint_at)
2499 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2500 * linux-tile-low.cc (tile_breakpoint_at)
2501 * linux-x86-low.cc (x86_breakpoint_at)
2502 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2503 * mem-break.cc (bp_size)
2504 (bp_opcode)
2505 (insert_memory_breakpoint)
2506 (set_raw_breakpoint_at)
2507 (delete_raw_breakpoint)
2508 (z_type_supported)
2509 (uninsert_raw_breakpoint)
2510 (reinsert_raw_breakpoint)
2511 (validate_inserted_breakpoint)
2512 * regcache.cc (regcache_read_pc)
2513 (regcache_write_pc)
2514 * remote-utils.cc (putpkt_binary_1)
2515 (input_interrupt)
2516 (getpkt)
2517 (prepare_resume_reply)
2518 * server.cc (handle_general_set)
2519 (handle_detach)
2520 (handle_qxfer_auxv)
2521 (handle_qxfer_exec_file)
2522 (handle_qxfer_libraries_svr4)
2523 (handle_qxfer_osdata)
2524 (handle_qxfer_siginfo)
2525 (handle_qxfer_fdpic)
2526 (handle_query)
2527 (resume)
2528 (handle_v_requests)
2529 (queue_stop_reply_callback)
2530 (captured_main)
2531 * target.cc (prepare_to_access_memory)
2532 (done_accessing_memory)
2533 (read_inferior_memory)
2534 (target_write_memory)
2535 (target_stop_and_wait)
2536 (target_wait)
2537 (target_mourn_inferior)
2538 (target_continue_no_signal)
2539 (target_continue)
2540 (target_supports_multi_process)
2541 (kill_inferior)
2542 * target.h
2543 (target_create_inferior)
2544 (target_post_create_inferior)
2545 (myattach)
2546 (target_supports_fork_events)
2547 (target_supports_vfork_events)
2548 (target_supports_exec_events)
2549 (target_handle_new_gdb_connection)
2550 (detach_inferior)
2551 (mythread_alive)
2552 (fetch_inferior_registers)
2553 (store_inferior_registers)
2554 (join_inferior)
2555 (target_supports_non_stop)
2556 (target_async)
2557 (target_process_qsupported)
2558 (target_supports_catch_syscall)
2559 (target_get_ipa_tdesc_idx)
2560 (target_supports_tracepoints)
2561 (target_supports_fast_tracepoints)
2562 (target_get_min_fast_tracepoint_insn_len)
2563 (target_thread_stopped)
2564 (target_pause_all)
2565 (target_unpause_all)
2566 (target_stabilize_threads)
2567 (target_install_fast_tracepoint_jump_pad)
2568 (target_emit_ops)
2569 (target_supports_disable_randomization)
2570 (target_supports_agent)
2571 (target_enable_btrace)
2572 (target_disable_btrace)
2573 (target_read_btrace)
2574 (target_read_btrace_conf)
2575 (target_supports_range_stepping)
2576 (target_supports_stopped_by_sw_breakpoint)
2577 (target_stopped_by_sw_breakpoint)
2578 (target_supports_stopped_by_hw_breakpoint)
2579 (target_supports_hardware_single_step)
2580 (target_stopped_by_hw_breakpoint)
2581 (target_breakpoint_kind_from_pc)
2582 (target_breakpoint_kind_from_current_state)
2583 (target_supports_software_single_step)
2584 (target_core_of_thread)
2585 (target_thread_name)
2586 (target_thread_handle)
2587 * win32-low.cc (do_initial_child_stuff)
2588
2589 Rename target op default definitions listed below.
2590
2591 * target.cc (process_target::post_create_inferior): Rename as ...
2592 (process_stratum_target::post_create_inferior): ... this.
2593 (process_target::prepare_to_access_memory): Rename as ...
2594 (process_stratum_target::prepare_to_access_memory): ... this.
2595 (process_target::done_accessing_memory): Rename as ...
2596 (process_stratum_target::done_accessing_memory): ... this.
2597 (process_target::look_up_symbols): Rename as ...
2598 (process_stratum_target::look_up_symbols): ... this.
2599 (process_target::supports_read_auxv): Rename as ...
2600 (process_stratum_target::supports_read_auxv): ... this.
2601 (process_target::read_auxv): Rename as ...
2602 (process_stratum_target::read_auxv): ... this.
2603 (process_target::supports_z_point_type): Rename as ...
2604 (process_stratum_target::supports_z_point_type): ... this.
2605 (process_target::insert_point): Rename as ...
2606 (process_stratum_target::insert_point): ... this.
2607 (process_target::remove_point): Rename as ...
2608 (process_stratum_target::remove_point): ... this.
2609 (process_target::stopped_by_sw_breakpoint): Rename as ...
2610 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2611 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2612 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2613 (process_target::stopped_by_hw_breakpoint): Rename as ...
2614 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2615 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2616 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2617 (process_target::supports_hardware_single_step): Rename as ...
2618 (process_stratum_target::supports_hardware_single_step): ... this.
2619 (process_target::stopped_by_watchpoint): Rename as ...
2620 (process_stratum_target::stopped_by_watchpoint): ... this.
2621 (process_target::stopped_data_address): Rename as ...
2622 (process_stratum_target::stopped_data_address): ... this.
2623 (process_target::supports_read_offsets): Rename as ...
2624 (process_stratum_target::supports_read_offsets): ... this.
2625 (process_target::read_offsets): Rename as ...
2626 (process_stratum_target::read_offsets): ... this.
2627 (process_target::supports_get_tls_address): Rename as ...
2628 (process_stratum_target::supports_get_tls_address): ... this.
2629 (process_target::get_tls_address): Rename as ...
2630 (process_stratum_target::get_tls_address): ... this.
2631 (process_target::hostio_last_error): Rename as ...
2632 (process_stratum_target::hostio_last_error): ... this.
2633 (process_target::supports_qxfer_osdata): Rename as ...
2634 (process_stratum_target::supports_qxfer_osdata): ... this.
2635 (process_target::qxfer_osdata): Rename as ...
2636 (process_stratum_target::qxfer_osdata): ... this.
2637 (process_target::supports_qxfer_siginfo): Rename as ...
2638 (process_stratum_target::supports_qxfer_siginfo): ... this.
2639 (process_target::qxfer_siginfo): Rename as ...
2640 (process_stratum_target::qxfer_siginfo): ... this.
2641 (process_target::supports_non_stop): Rename as ...
2642 (process_stratum_target::supports_non_stop): ... this.
2643 (process_target::async): Rename as ...
2644 (process_stratum_target::async): ... this.
2645 (process_target::start_non_stop): Rename as ...
2646 (process_stratum_target::start_non_stop): ... this.
2647 (process_target::supports_multi_process): Rename as ...
2648 (process_stratum_target::supports_multi_process): ... this.
2649 (process_target::supports_fork_events): Rename as ...
2650 (process_stratum_target::supports_fork_events): ... this.
2651 (process_target::supports_vfork_events): Rename as ...
2652 (process_stratum_target::supports_vfork_events): ... this.
2653 (process_target::supports_exec_events): Rename as ...
2654 (process_stratum_target::supports_exec_events): ... this.
2655 (process_target::handle_new_gdb_connection): Rename as ...
2656 (process_stratum_target::handle_new_gdb_connection): ... this.
2657 (process_target::handle_monitor_command): Rename as ...
2658 (process_stratum_target::handle_monitor_command): ... this.
2659 (process_target::core_of_thread): Rename as ...
2660 (process_stratum_target::core_of_thread): ... this.
2661 (process_target::supports_read_loadmap): Rename as ...
2662 (process_stratum_target::supports_read_loadmap): ... this.
2663 (process_target::read_loadmap): Rename as ...
2664 (process_stratum_target::read_loadmap): ... this.
2665 (process_target::process_qsupported): Rename as ...
2666 (process_stratum_target::process_qsupported): ... this.
2667 (process_target::supports_tracepoints): Rename as ...
2668 (process_stratum_target::supports_tracepoints): ... this.
2669 (process_target::read_pc): Rename as ...
2670 (process_stratum_target::read_pc): ... this.
2671 (process_target::write_pc): Rename as ...
2672 (process_stratum_target::write_pc): ... this.
2673 (process_target::supports_thread_stopped): Rename as ...
2674 (process_stratum_target::supports_thread_stopped): ... this.
2675 (process_target::thread_stopped): Rename as ...
2676 (process_stratum_target::thread_stopped): ... this.
2677 (process_target::supports_get_tib_address): Rename as ...
2678 (process_stratum_target::supports_get_tib_address): ... this.
2679 (process_target::get_tib_address): Rename as ...
2680 (process_stratum_target::get_tib_address): ... this.
2681 (process_target::pause_all): Rename as ...
2682 (process_stratum_target::pause_all): ... this.
2683 (process_target::unpause_all): Rename as ...
2684 (process_stratum_target::unpause_all): ... this.
2685 (process_target::stabilize_threads): Rename as ...
2686 (process_stratum_target::stabilize_threads): ... this.
2687 (process_target::supports_fast_tracepoints): Rename as ...
2688 (process_stratum_target::supports_fast_tracepoints): ... this.
2689 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2690 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2691 (process_target::emit_ops): Rename as ...
2692 (process_stratum_target::emit_ops): ... this.
2693 (process_target::supports_disable_randomization): Rename as ...
2694 (process_stratum_target::supports_disable_randomization): ... this.
2695 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2696 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2697 (process_target::qxfer_libraries_svr4): Rename as ...
2698 (process_stratum_target::qxfer_libraries_svr4): ... this.
2699 (process_target::supports_agent): Rename as ...
2700 (process_stratum_target::supports_agent): ... this.
2701 (process_target::enable_btrace): Rename as ...
2702 (process_stratum_target::enable_btrace): ... this.
2703 (process_target::disable_btrace): Rename as ...
2704 (process_stratum_target::disable_btrace): ... this.
2705 (process_target::read_btrace): Rename as ...
2706 (process_stratum_target::read_btrace): ... this.
2707 (process_target::read_btrace_conf): Rename as ...
2708 (process_stratum_target::read_btrace_conf): ... this.
2709 (process_target::supports_range_stepping): Rename as ...
2710 (process_stratum_target::supports_range_stepping): ... this.
2711 (process_target::supports_pid_to_exec_file): Rename as ...
2712 (process_stratum_target::supports_pid_to_exec_file): ... this.
2713 (process_target::pid_to_exec_file): Rename as ...
2714 (process_stratum_target::pid_to_exec_file): ... this.
2715 (process_target::supports_multifs): Rename as ...
2716 (process_stratum_target::supports_multifs): ... this.
2717 (process_target::multifs_open): Rename as ...
2718 (process_stratum_target::multifs_open): ... this.
2719 (process_target::multifs_unlink): Rename as ...
2720 (process_stratum_target::multifs_unlink): ... this.
2721 (process_target::multifs_readlink): Rename as ...
2722 (process_stratum_target::multifs_readlink): ... this.
2723 (process_target::breakpoint_kind_from_pc): Rename as ...
2724 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2725 (process_target::breakpoint_kind_from_current_state): Rename as ...
2726 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2727 (process_target::thread_name): Rename as ...
2728 (process_stratum_target::thread_name): ... this.
2729 (process_target::thread_handle): Rename as ...
2730 (process_stratum_target::thread_handle): ... this.
2731 (process_target::supports_software_single_step): Rename as ...
2732 (process_stratum_target::supports_software_single_step): ... this.
2733 (process_target::supports_catch_syscall): Rename as ...
2734 (process_stratum_target::supports_catch_syscall): ... this.
2735 (process_target::get_ipa_tdesc_idx): Rename as ...
2736 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2737
2738 2020-02-20 Pedro Alves <palves@redhat.com>
2739
2740 * target.cc (set_target_ops): Simply copy the given target pointer
2741 instead of creating a copy of the pointed object.
2742
2743 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2744
2745 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2746 of process_target.
2747
2748 * target.h (struct process_stratum_target): Remove the target op.
2749 (class process_target): Add the target op.
2750 (target_get_ipa_tdesc_idx): Update the macro.
2751 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2752
2753 Update the derived classes and callers below.
2754
2755 * linux-low.cc (linux_target_ops): Update.
2756 (linux_get_ipa_tdesc_idx): Turn into ...
2757 (linux_process_target::get_ipa_tdesc_idx): ... this.
2758 * linux-low.h (class linux_process_target): Update.
2759 * lynx-low.cc (lynx_target_ops): Update.
2760 * nto-low.cc (nto_target_ops): Update.
2761 * win32-low.cc (win32_target_ops): Update.
2762
2763 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2764
2765 Turn process_stratum_target's supports_catch_syscall op into a
2766 method of process_target.
2767
2768 * target.h (struct process_stratum_target): Remove the target op.
2769 (class process_target): Add the target op.
2770 (target_supports_catch_syscall): Update the macro.
2771 * target.cc (process_target::supports_catch_syscall): Define.
2772
2773 Update the derived classes and callers below.
2774
2775 * linux-low.cc (linux_target_ops): Update.
2776 (linux_supports_catch_syscall): Turn into ...
2777 (linux_process_target::supports_catch_syscall): ... this.
2778 * linux-low.h (class linux_process_target): Update.
2779 * lynx-low.cc (lynx_target_ops): Update.
2780 * nto-low.cc (nto_target_ops): Update.
2781 * win32-low.cc (win32_target_ops): Update.
2782
2783 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2784
2785 Turn process_stratum_target's supports_software_single_step op
2786 into a method of process_target.
2787
2788 * target.h (struct process_stratum_target): Remove the target op.
2789 (class process_target): Add the target op.
2790 (target_supports_software_single_step): Update the macro.
2791 * target.cc (process_target::supports_software_single_step): Define.
2792
2793 Update the derived classes and callers below.
2794
2795 * linux-low.cc (linux_target_ops): Update.
2796 (linux_supports_software_single_step): Turn into ...
2797 (linux_process_target::supports_software_single_step): ... this.
2798 * linux-low.h (class linux_process_target): Update.
2799 * lynx-low.cc (lynx_target_ops): Update.
2800 * nto-low.cc (nto_target_ops): Update.
2801 * win32-low.cc (win32_target_ops): Update.
2802
2803 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2804
2805 Turn process_stratum_target's thread_name and thread_handle ops
2806 into methods of process_target.
2807
2808 * target.h (struct process_stratum_target): Remove the target ops.
2809 (class process_target): Add the target ops.
2810 (target_thread_name): Update the macro.
2811 (target_thread_handle): Update the macro.
2812 * target.cc (process_target::thread_name): Define.
2813 (process_target::thread_handle): Define.
2814
2815 Update the derived classes and callers below.
2816
2817 * linux-low.cc (linux_target_ops): Update.
2818 (linux_process_target::thread_name): Define.
2819 (linux_process_target::thread_handle): Define.
2820 * linux-low.h (class linux_process_target): Update.
2821 * lynx-low.cc (lynx_target_ops): Update.
2822 * nto-low.cc (nto_target_ops): Update.
2823 * win32-low.cc (win32_target_ops): Update.
2824
2825 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2826
2827 Turn process_stratum_target's breakpoint_kind_from_pc,
2828 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2829 ops into methods of process_target.
2830
2831 * target.h (struct process_stratum_target): Remove the target op.
2832 (class process_target): Add the target op.
2833 (target_breakpoint_kind_from_pc): Update the macro.
2834 (target_breakpoint_kind_from_current_state): Update the macro.
2835 (default_breakpoint_kind_from_pc): Remove declaration.
2836 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2837 (process_target::breakpoint_kind_from_pc): ... this.
2838 (process_target::breakpoint_kind_from_current_state): Define.
2839
2840 Update the derived classes and callers below.
2841
2842 * mem-break.cc (bp_size): Update.
2843 (bp_opcode): Update.
2844 * linux-low.cc (linux_target_ops): Update.
2845 (linux_wait_1): Update.
2846 (linux_breakpoint_kind_from_pc): Turn into ...
2847 (linux_process_target::breakpoint_kind_from_pc): ... this.
2848 (linux_sw_breakpoint_from_kind): Turn into ...
2849 (linux_process_target::sw_breakpoint_from_kind): ... this.
2850 (linux_breakpoint_kind_from_current_state): Turn into ...
2851 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2852 * linux-low.h (class linux_process_target): Update.
2853 * lynx-low.cc (lynx_target_ops): Update.
2854 (lynx_process_target::sw_breakpoint_from_kind): Define.
2855 * lynx-low.h (class lynx_process_target): Update.
2856 * nto-low.cc (nto_target_ops): Update.
2857 (nto_sw_breakpoint_from_kind): Turn into ...
2858 (nto_process_target::sw_breakpoint_from_kind): ... this.
2859 * nto-low.h (class nto_process_target): Update.
2860 * win32-low.cc (win32_target_ops): Update.
2861 (win32_sw_breakpoint_from_kind): Turn into ...
2862 (win32_process_target::sw_breakpoint_from_kind): ... this.
2863 * win32-low.h (class win32_process_target): Update.
2864
2865 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2866
2867 Turn process_stratum_target's multifs_open, multifs_readlink,
2868 multifs_unlink ops into methods of process_target.
2869
2870 * target.h (struct process_stratum_target): Remove the target ops.
2871 (class process_target): Add the target ops. Also add
2872 'supports_multifs'.
2873 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2874 "sys/stat.h".
2875 (process_target::supports_multifs): Define.
2876 (process_target::multifs_open): Define.
2877 (process_target::multifs_readlink): Define.
2878 (process_target::multifs_unlink): Define.
2879
2880 Update the derived classes and callers below.
2881
2882 * hostio.cc (handle_setfs): Update.
2883 (handle_open): Update.
2884 (handle_unlink): Update.
2885 (handle_readlink): Update.
2886 * linux-low.cc (linux_target_ops): Update.
2887 (linux_process_target::supports_multifs): Define.
2888 (linux_process_target::multifs_open): Define.
2889 (linux_process_target::multifs_readlink): Define.
2890 (linux_process_target::multifs_unlink): Define.
2891 * linux-low.h (class linux_process_target): Update.
2892 * lynx-low.cc (lynx_target_ops): Update.
2893 * nto-low.cc (nto_target_ops): Update.
2894 * win32-low.cc (win32_target_ops): Update.
2895
2896 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2897
2898 Turn process_stratum_target's pid_to_exec_file op into a method
2899 of process_target.
2900
2901 * target.h (struct process_stratum_target): Remove the target op.
2902 (class process_target): Add the target op. Also add
2903 'supports_pid_to_exec_file'.
2904 * target.cc (process_target::pid_to_exec_file): Define.
2905 (process_target::supports_pid_to_exec_file): Define.
2906
2907 Update the derived classes and callers below.
2908
2909 * server.cc (handle_qxfer_exec_file): Update.
2910 (handle_query): Update.
2911 * linux-low.cc (linux_target_ops): Update.
2912 (linux_process_target::supports_pid_to_exec_file): Define.
2913 (linux_process_target::pid_to_exec_file): Define.
2914 * linux-low.h (class linux_process_target): Update.
2915 * lynx-low.cc (lynx_target_ops): Update.
2916 * nto-low.cc (nto_target_ops): Update.
2917 * win32-low.cc (win32_target_ops): Update.
2918
2919 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2920
2921 Turn process_stratum_target's supports_range_stepping op into a
2922 method of process_target.
2923
2924 * target.h (struct process_stratum_target): Remove the target op.
2925 (class process_target): Add the target op.
2926 (target_supports_range_stepping): Update the macro.
2927 * target.cc (process_target::supports_range_stepping): Define.
2928
2929 Update the derived classes and callers below.
2930
2931 * linux-low.cc (linux_target_ops): Update.
2932 (linux_supports_range_stepping): Turn into ...
2933 (linux_process_target::supports_range_stepping): ... this.
2934 * linux-low.h (class linux_process_target): Update.
2935 * lynx-low.cc (lynx_target_ops): Update.
2936 * nto-low.cc (nto_target_ops): Update.
2937 * win32-low.cc (win32_target_ops): Update.
2938
2939 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2940
2941 Turn process_stratum_target's btrace-related ops (enable_btrace,
2942 disable_btrace, read_btrace, read_btrace_conf) into methods of
2943 process_target.
2944
2945 * target.h (struct process_stratum_target): Remove the target ops.
2946 (class process_target): Add the target ops.
2947 (target_enable_btrace): Update.
2948 (target_disable_btrace): Update.
2949 (target_read_btrace): Update.
2950 (target_read_btrace_conf): Update.
2951 * target.cc (process_target::enable_btrace): Define.
2952 (process_target::disable_btrace): Define.
2953 (process_target::read_btrace): Define.
2954 (process_target::read_btrace_conf): Define.
2955
2956 Update the derived classes and callers below.
2957
2958 * linux-low.cc (linux_target_ops): Update.
2959 (linux_process_target:enable_btrace): Define as a wrapper around
2960 linux_enable_btrace.
2961 (linux_low_disable_btrace): Turn into ...
2962 (linux_process_target::disable_btrace): ... this.
2963 (linux_low_read_btrace): Turn into ...
2964 (linux_process_target::read_btrace): ... this.
2965 (linux_low_btrace_conf): Turn into ...
2966 (linux_process_target::read_btrace_conf): ... this.
2967 * linux-low.h (class linux_process_target): Update.
2968 * lynx-low.cc (lynx_target_ops): Update.
2969 * nto-low.cc (nto_target_ops): Update.
2970 * win32-low.cc (win32_target_ops): Update.
2971
2972 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2973
2974 Turn process_stratum_target's supports_agent op into a method of
2975 process_target.
2976
2977 * target.h (struct process_stratum_target): Remove the target op.
2978 (class process_target): Add the target op.
2979 (target_supports_agent): Update the macro.
2980 * target.cc (process_target::supports_agent): Define.
2981
2982 Update the derived classes and callers below.
2983
2984 * linux-low.cc (linux_target_ops): Update.
2985 (linux_supports_agent): Turn into ...
2986 (linux_process_target::supports_agent): ... this.
2987 * linux-low.h (class linux_process_target): Update.
2988 * lynx-low.cc (lynx_target_ops): Update.
2989 * nto-low.cc (nto_target_ops): Update.
2990 * win32-low.cc (win32_target_ops): Update.
2991
2992 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2993
2994 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2995 method of process_target.
2996
2997 * target.h (struct process_stratum_target): Remove the target op.
2998 (class process_target): Add the target op. Also add
2999 'supports_qxfer_libraries_svr4'.
3000 * target.cc (process_target::qxfer_libraries_svr4): Define.
3001 (process_target::supports_qxfer_libraries_svr4): Define.
3002
3003 Update the derived classes and callers below.
3004
3005 * server.cc (handle_qxfer_libraries_svr4): Update.
3006 (handle_query): Update.
3007 * linux-low.cc (linux_target_ops): Update.
3008 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3009 (linux_qxfer_libraries_svr4): Turn into ...
3010 (linux_process_target::qxfer_libraries_svr4): ... this.
3011 * linux-low.h (class linux_process_target): Update.
3012 * lynx-low.cc (lynx_target_ops): Update.
3013 * nto-low.cc (nto_target_ops): Update.
3014 * win32-low.cc (win32_target_ops): Update.
3015
3016 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3017
3018 Turn process_stratum_target's supports_disable_randomization op
3019 into a method of process_target.
3020
3021 * target.h (struct process_stratum_target): Remove the target op.
3022 (class process_target): Add the target op.
3023 (target_supports_disable_randomization): Update the macro.
3024 * target.cc (process_target::supports_disable_randomization): Define.
3025
3026 Update the derived classes and callers below.
3027
3028 * linux-low.cc (linux_target_ops): Update.
3029 (linux_supports_disable_randomization): Turn into ...
3030 (linux_process_target::supports_disable_randomization): ... this.
3031 * linux-low.h (class linux_process_target): Update.
3032 * lynx-low.cc (lynx_target_ops): Update.
3033 * nto-low.cc (nto_target_ops): Update.
3034 * win32-low.cc (win32_target_ops): Update.
3035
3036 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3037
3038 Turn process_stratum_target's emit_ops op into a method of
3039 process_target.
3040
3041 * target.h (struct process_stratum_target): Remove the target op.
3042 (class process_target): Add the target op.
3043 (target_emit_ops): Update the macro.
3044 * target.cc (process_target::emit_ops): Define.
3045
3046 Update the derived classes and callers below.
3047
3048 * linux-low.cc (linux_target_ops): Update.
3049 (linux_emit_ops): Turn into ...
3050 (linux_process_target::emit_ops): ... this.
3051 * linux-low.h (class linux_process_target): Update.
3052 * lynx-low.cc (lynx_target_ops): Update.
3053 * nto-low.cc (nto_target_ops): Update.
3054 * win32-low.cc (win32_target_ops): Update.
3055
3056 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3057
3058 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3059 and get_min_fast_tracepoint_insn_len ops into methods of
3060 process_target.
3061
3062 * target.h (struct process_stratum_target): Remove the target ops.
3063 (class process_target): Add the target ops. Also add
3064 'supports_fast_tracepoints'.
3065 (target_supports_fast_tracepoints): Update the macro.
3066 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3067 (install_fast_tracepoint_jump_pad): Update and rename the macro
3068 to ...
3069 (target_install_fast_tracepoint_jump_pad): ... this.
3070 * target.cc (process_target::supports_fast_tracepoints): Define.
3071 (process_target::install_fast_tracepoint_jump_pad): Define.
3072 (process_target::get_min_fast_tracepoint_insn_len): Define.
3073
3074 Update the derived classes and callers below.
3075
3076 * tracepoint.cc (install_fast_tracepoint): Update.
3077 * linux-low.cc (linux_target_ops): Update.
3078 (linux_process_target::supports_fast_tracepoints): Define.
3079 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3080 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3081 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3082 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3083 * linux-low.h (class linux_process_target): Update.
3084 * lynx-low.cc (lynx_target_ops): Update.
3085 * nto-low.cc (nto_target_ops): Update.
3086 * win32-low.cc (win32_target_ops): Update.
3087
3088 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3089
3090 Turn process_stratum_target's stabilize_threads op into a
3091 method of process_target.
3092
3093 * target.h (struct process_stratum_target): Remove the target op.
3094 (class process_target): Add the target op.
3095 (target_stabilize_threads): Update the macro.
3096 * target.cc (process_target::stabilize_threads): Define.
3097
3098 Update the derived classes and callers below.
3099
3100 * server.cc (handle_status): Update.
3101 * tracepoint.cc (cmd_qtdp): Update.
3102 (cmd_qtstart): Update.
3103 * linux-low.cc (linux_target_ops): Update.
3104 (linux_stabilize_threads): Turn into ...
3105 (linux_process_target::stabilize_threads): ... this.
3106 (linux_wait_1): Update.
3107 * linux-low.h (class linux_process_target): Update.
3108 * lynx-low.cc (lynx_target_ops): Update.
3109 * nto-low.cc (nto_target_ops): Update.
3110 * win32-low.cc (win32_target_ops): Update.
3111
3112 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3113
3114 Turn process_stratum_target's pause_all and unpause_all ops
3115 into methods of process_target.
3116
3117 * target.h (struct process_stratum_target): Remove the target ops.
3118 (class process_target): Add the target ops.
3119 (pause_all): Update the macro and rename to...
3120 (target_pause_all): ... this.
3121 (unpause_all): Update the macro and rename to...
3122 (target_unpause_all): ... this.
3123 * target.cc (process_target::pause_all): Define.
3124 (process_target::unpause_all): Define.
3125
3126 Update the derived classes and callers below.
3127
3128 * server.cc (handle_status): Update.
3129 * tracepoint.cc (clear_installed_tracepoints): Update.
3130 (cmd_qtdp): Update.
3131 (cmd_qtstart): Update.
3132 (stop_tracing): Update.
3133 (cmd_qtstatus): Update.
3134 (upload_fast_traceframes): Update.
3135 (run_inferior_command): Update.
3136 * linux-low.cc (linux_target_ops): Update.
3137 (linux_pause_all): Turn into ...
3138 (linux_process_target::pause_all): ... this.
3139 (linux_unpause_all): Turn into ...
3140 (linux_process_target::unpause_all): ... this.
3141 (linux_process_target::prepare_to_access_memory): Update.
3142 (linux_process_target::done_accessing_memory): Update.
3143 * linux-low.h (class linux_process_target): Update.
3144 * lynx-low.cc (lynx_target_ops): Update.
3145 * nto-low.cc (nto_target_ops): Update.
3146 * win32-low.cc (win32_target_ops): Update.
3147
3148 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3149
3150 Turn process_stratum_target's get_tib_address op into a method of
3151 process_target.
3152
3153 * target.h (struct process_stratum_target): Remove the target op.
3154 (class process_target): Add the target op. Also add
3155 'supports_get_tib_address'.
3156 * target.cc (process_target::get_tib_address): Define.
3157 (process_target::supports_get_tib_address): Define.
3158
3159 Update the derived classes and callers below.
3160
3161 * server.cc (handle_query): Update.
3162 * linux-low.cc (win32_target_ops): Update.
3163 * lynx-low.cc (lynx_target_ops): Update.
3164 * nto-low.cc (nto_target_ops): Update.
3165 * win32-low.cc (win32_target_ops): Update.
3166 (win32_process_target::supports_get_tib_address): Define.
3167 (win32_get_tib_address): Turn into ...
3168 (win32_process_target::get_tib_address): ... this.
3169 * win32-low.h (class win32_process_target): Update.
3170
3171 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3172
3173 Turn process_stratum_target's thread_stopped op into a method of
3174 process_target.
3175
3176 * target.h (struct process_stratum_target): Remove the target op.
3177 (class process_target): Add the target op. Also add
3178 'supports_thread_stopped'.
3179 (target_thread_stopped): Update the macro.
3180 * target.cc (process_target::thread_stopped): Define.
3181 (process_target::supports_thread_stopped): Define.
3182 (prepare_to_access_memory): Update.
3183
3184 Update the derived classes and callers below.
3185
3186 * server.cc (queue_stop_reply_callback): Update.
3187 * linux-low.cc (linux_target_ops): Update.
3188 (linux_process_target::supports_thread_stopped): Define.
3189 (linux_thread_stopped): Turn into ...
3190 (linux_process_target::thread_stopped): ... this.
3191 * linux-low.h (class linux_process_target): Update.
3192 * lynx-low.cc (lynx_target_ops): Update.
3193 * nto-low.cc (nto_target_ops): Update.
3194 * win32-low.cc (win32_target_ops): Update.
3195
3196 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3197
3198 Turn process_stratum_target's read_pc and write_pc ops into
3199 methods of process_target.
3200
3201 * target.h (struct process_stratum_target): Remove the target ops.
3202 (class process_target): Add the target ops.
3203 * target.cc (process_target::read_pc): Define.
3204 (process_target::write_pc): Define.
3205
3206 Update the derived classes and callers below.
3207
3208 * regcache.cc (regcache_read_pc): Update.
3209 (regcache_write_pc): Update.
3210 * linux-low.cc (linux_target_ops): Update.
3211 (linux_read_pc): Turn into ...
3212 (linux_process_target::read_pc): ... this.
3213 (linux_write_pc): Turn into ...
3214 (linux_process_target::write_pc): ... this.
3215 * linux-low.h (class linux_process_target): Update.
3216 * lynx-low.cc (lynx_target_ops): Update.
3217 * nto-low.cc (nto_target_ops): Update.
3218 * win32-low.cc (win32_target_ops): Update.
3219
3220 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3221
3222 Turn process_stratum_target's supports_tracepoints op into a
3223 method of process_target.
3224
3225 * target.h (struct process_stratum_target): Remove the target op.
3226 (class process_target): Add the target op.
3227 (target_supports_tracepoints): Update the macro.
3228 * target.cc (process_target::supports_tracepoints): Define.
3229
3230 Update the derived classes and callers below.
3231
3232 * linux-low.cc (linux_target_ops): Update.
3233 (linux_supports_tracepoints): Turn into ...
3234 (linux_process_target::supports_tracepoints): ... this.
3235 * linux-low.h (class linux_process_target): Update.
3236 * lynx-low.cc (lynx_target_ops): Update.
3237 * nto-low.cc (nto_target_ops): Update.
3238 * win32-low.cc (win32_target_ops): Update.
3239
3240 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3241
3242 Turn process_stratum_target's process_qsupported op into a method
3243 of process_target.
3244
3245 * target.h (struct process_stratum_target): Remove the target op.
3246 (class process_target): Add the target op.
3247 (target_process_qsupported): Update the macro.
3248 * target.cc (process_target::process_qsupported): Define.
3249
3250 Update the derived classes and callers below.
3251
3252 * linux-low.cc (linux_target_ops): Update.
3253 (linux_process_qsupported): Turn into ...
3254 (linux_process_target::process_qsupported): ... this.
3255 * linux-low.h (class linux_process_target): Update.
3256 * lynx-low.cc (lynx_target_ops): Update.
3257 * nto-low.cc (nto_target_ops): Update.
3258 * win32-low.cc (win32_target_ops): Update.
3259
3260 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3261
3262 Turn process_stratum_target's read_loadmap op into a method of
3263 process_target.
3264
3265 * target.h (struct process_stratum_target): Remove the target op.
3266 (class process_target): Add the target op. Also add
3267 'supports_read_loadmap'.
3268 * target.cc (process_target::read_loadmap): Define.
3269 (process_target::supports_read_loadmap): Define.
3270
3271 Update the derived classes and callers below.
3272
3273 * server.cc (handle_qxfer_fdpic): Update.
3274 (handle_query): Update.
3275 * linux-low.cc (linux_target_ops): Update.
3276 (linux_process_target::supports_read_loadmap): Define.
3277 (linux_read_loadmap): Turn into ...
3278 (linux_process_target::read_loadmap): ... this.
3279 * linux-low.h (class linux_process_target): Update.
3280 * lynx-low.cc (lynx_target_ops): Update.
3281 * nto-low.cc (nto_target_ops): Update.
3282 * win32-low.cc (win32_target_ops): Update.
3283
3284 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3285
3286 Turn process_stratum_target's core_of_thread op into a method of
3287 process_target.
3288
3289 * target.h (struct process_stratum_target): Remove the target op.
3290 (class process_target): Add the target op.
3291 (target_core_of_thread): Update the macro.
3292 * target.cc (process_target::core_of_thread): Define.
3293
3294 Update the derived classes and callers below.
3295
3296 * linux-low.cc (linux_target_ops): Update.
3297 (linux_process_target::core_of_thread): Define.
3298 * linux-low.h (class linux_process_target): Update.
3299 * lynx-low.cc (lynx_target_ops): Update.
3300 * nto-low.cc (nto_target_ops): Update.
3301 * win32-low.cc (win32_target_ops): Update.
3302
3303 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3304
3305 Turn process_stratum_target's handle_monitor_command op into a
3306 method of process_target.
3307
3308 * target.h (struct process_stratum_target): Remove the target op.
3309 (class process_target): Add the target op.
3310 (target_handle_monitor_command): Update the macro.
3311 * target.cc (process_target::handle_monitor_command): Define.
3312
3313 Update the derived classes and callers below.
3314
3315 * server.cc (handle_query): Update.
3316 * linux-low.cc (linux_target_ops): Update.
3317 (linux_process_target::handle_monitor_command): Define.
3318 * linux-low.h (class linux_process_target): Update.
3319 * lynx-low.cc (lynx_target_ops): Update.
3320 * nto-low.cc (nto_target_ops): Update.
3321 * win32-low.cc (win32_target_ops): Update.
3322
3323 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3324
3325 Turn process_stratum_target's handle_new_gdb_connection op into a
3326 method of process_target.
3327
3328 * target.h (struct process_stratum_target): Remove the target op.
3329 (class process_target): Add the target op.
3330 (target_handle_new_gdb_connection): Update the macro.
3331 * target.cc (process_target::handle_new_gdb_connection): Define.
3332
3333 Update the derived classes and callers below.
3334
3335 * linux-low.cc (linux_target_ops): Update.
3336 (linux_handle_new_gdb_connection): Turn into ...
3337 (linux_process_target::handle_new_gdb_connection): ... this.
3338 * linux-low.h (class linux_process_target): Update.
3339 * lynx-low.cc (lynx_target_ops): Update.
3340 * nto-low.cc (nto_target_ops): Update.
3341 * win32-low.cc (win32_target_ops): Update.
3342
3343 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3344
3345 Turn process_stratum_target's supports_fork_events,
3346 supports_vfork_events, and supports_exec_events ops into methods
3347 of process_target.
3348
3349 * target.h (struct process_stratum_target): Remove the target ops.
3350 (class process_target): Add the target ops.
3351 (target_supports_fork_events): Update the macro.
3352 (target_supports_vfork_events): Update the macro.
3353 (target_supports_exec_events): Update the macro.
3354 * target.cc (process_target::supports_fork_events): Define.
3355 (process_target::supports_vfork_events): Define.
3356 (process_target::supports_exec_events): Define.
3357
3358 Update the derived classes and callers below.
3359
3360 * linux-low.cc (linux_target_ops): Update.
3361 (linux_supports_fork_events): Turn into ...
3362 (linux_process_target::supports_fork_events): ... this.
3363 (linux_supports_vfork_events): Turn into ...
3364 (linux_process_target::supports_vfork_events): ... this.
3365 (linux_supports_exec_events): Turn into ...
3366 (linux_process_target::supports_exec_events): ... this.
3367 * linux-low.h (class linux_process_target): Update.
3368 * lynx-low.cc (lynx_target_ops): Update.
3369 * nto-low.cc (nto_target_ops): Update.
3370 * win32-low.cc (win32_target_ops): Update.
3371
3372 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3373
3374 Turn process_stratum_target's supports_multi_process op into a
3375 method of process_target.
3376
3377 * target.h (struct process_stratum_target): Remove the target op.
3378 (class process_target): Add the target op.
3379 * target.cc (process_target::supports_multi_process): Define.
3380 (target_supports_multi_process): Update.
3381
3382 Update the derived classes and callers below.
3383
3384 * linux-low.cc (linux_target_ops): Update.
3385 (linux_supports_multi_process): Turn into ...
3386 (linux_process_target::supports_multi_process): ... this.
3387 * linux-low.h (class linux_process_target): Update.
3388 * lynx-low.cc (lynx_target_ops): Update.
3389 * nto-low.cc (nto_target_ops): Update.
3390 * win32-low.cc (win32_target_ops): Update.
3391
3392 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3393
3394 Turn process_stratum_target's supports_non_stop, async, and
3395 start_non_stop ops into methods of process_target.
3396
3397 * target.h (struct process_stratum_target): Remove the target ops.
3398 (class process_target): Add the target ops.
3399 (target_supports_non_stop): Update the macro.
3400 (target_async): Update the macro.
3401 (start_non_stop): Remove declaration.
3402 * target.cc (process_target::supports_non_stop): Define.
3403 (process_target::async): Define.
3404 (process_target::start_non_stop): Define.
3405 (start_non_stop): Remove.
3406
3407 Update the derived classes and callers below.
3408
3409 * server.cc (handle_qxfer_siginfo): Update.
3410 (handle_query): Update.
3411 * linux-low.cc (linux_target_ops): Update.
3412 (linux_supports_non_stop): Turn into ...
3413 (linux_process_target::supports_non_stop): ... this.
3414 (linux_async): Turn into ...
3415 (linux_process_target::async): ... this.
3416 (linux_start_non_stop): Turn into ...
3417 (linux_process_target::start_non_stop): ... this.
3418 * linux-low.h (class linux_process_target): Update.
3419 * lynx-low.cc (lynx_target_ops): Update.
3420 * nto-low.cc (nto_target_ops): Update.
3421 (nto_supports_non_stop): Remove; rely on the default behavior
3422 instead.
3423 * win32-low.cc (win32_target_ops): Update.
3424
3425 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3426
3427 Turn process_stratum_target's qxfer_siginfo op into a method of
3428 process_target.
3429
3430 * target.h (struct process_stratum_target): Remove the target op.
3431 (class process_target): Add the target op. Also add
3432 'supports_qxfer_siginfo'.
3433 * target.cc (process_target::qxfer_siginfo): Define.
3434 (process_target::supports_qxfer_siginfo): Define.
3435
3436 Update the derived classes and callers below.
3437
3438 * server.cc (handle_qxfer_siginfo): Update.
3439 (handle_query): Update.
3440 * linux-low.cc (linux_target_ops): Update.
3441 (linux_process_target::supports_qxfer_siginfo): Define.
3442 (linux_xfer_siginfo): Turn into ...
3443 (linux_process_target::qxfer_siginfo): ... this.
3444 * linux-low.h (class linux_process_target): Update.
3445 * lynx-low.cc (lynx_target_ops): Update.
3446 * nto-low.cc (nto_target_ops): Update.
3447 * win32-low.cc (win32_target_ops): Update.
3448
3449 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3450
3451 Turn process_stratum_target's qxfer_osdata op into a method of
3452 process_target.
3453
3454 * target.h (struct process_stratum_target): Remove the target op.
3455 (class process_target): Add the target op. Also add
3456 'supports_qxfer_osdata'.
3457 * target.cc (process_target::qxfer_osdata): Define.
3458 (process_target::supports_qxfer_osdata): Define.
3459
3460 Update the derived classes and callers below.
3461
3462 * server.cc (handle_qxfer_osdata): Update.
3463 (handle_query): Update.
3464 * linux-low.cc (linux_target_ops): Update.
3465 (linux_process_target::supports_qxfer_osdata): Define.
3466 (linux_qxfer_osdata): Turn into ...
3467 (linux_process_target::qxfer_osdata): ... this.
3468 * linux-low.h (class linux_process_target): Update.
3469 * lynx-low.cc (lynx_target_ops): Update.
3470 * nto-low.cc (nto_target_ops): Update.
3471 * win32-low.cc (win32_target_ops): Update.
3472
3473 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3474
3475 Turn process_stratum_target's hostio_last_error op into a
3476 method of process_target.
3477
3478 * target.h (struct process_stratum_target): Remove the target op.
3479 (class process_target): Add the target op.
3480 * target.cc: Add "hostio.h" to includes.
3481 (process_target::hostio_last_error): Define.
3482
3483 Update the derived classes and callers below.
3484
3485 * hostio.cc (hostio_error): Update.
3486 * linux-low.cc: Remove "hostio.h" from includes.
3487 (linux_target_ops): Update.
3488 * lynx-low.cc (lynx_target_ops): Update.
3489 * nto-low.cc (nto_target_ops): Update.
3490 * win32-low.h (class win32_process_target): Update.
3491 * win32-low.cc (win32_target_ops): Update.
3492 (wince_hostio_last_error): Turn into ...
3493 (win32_process_target::hostio_last_error): ... this.
3494
3495 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3496
3497 Turn process_stratum_target's get_tls_address op into a method of
3498 process_target.
3499
3500 * target.h (struct process_stratum_target): Remove the target op.
3501 (class process_target): Add the target op. Also add
3502 'supports_get_tls_address'.
3503 * target.cc (process_target::get_tls_address): Define.
3504 (process_target::supports_get_tls_address): Define.
3505
3506 Update the derived classes and callers below.
3507
3508 * server.cc (handle_query): Update.
3509 * linux-low.cc (linux_target_ops): Update.
3510 (linux_process_target::supports_get_tls_address): Define.
3511 (linux_process_target::get_tls_address): Define.
3512 * linux-low.h (class linux_process_target): Update.
3513 * lynx-low.cc (lynx_target_ops): Update.
3514 * nto-low.cc (nto_target_ops): Update.
3515 * win32-low.cc (win32_target_ops): Update.
3516
3517 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3518
3519 Turn process_stratum_target's read_offsets op into a method of
3520 process_target.
3521
3522 * target.h (struct process_stratum_target): Remove the target op.
3523 (class process_target): Add the target op. Also add
3524 'supports_read_offsets'.
3525 * target.cc (process_target::read_offsets): Define.
3526 (process_target::supports_read_offsets): Define.
3527
3528 Update the derived classes and callers below.
3529
3530 * server.cc (handle_query): Update.
3531 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3532 (linux_target_ops): Update.
3533 (linux_process_target::supports_read_offsets): Define.
3534 (linux_read_offsets): Turn into ...
3535 (linux_process_target::read_offsets): ... this.
3536 * linux-low.h (class linux_process_target): Update.
3537 * lynx-low.cc (lynx_target_ops): Update.
3538 * nto-low.cc (nto_target_ops): Update.
3539 * win32-low.cc (win32_target_ops): Update.
3540
3541 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3542
3543 Turn process_stratum_target's stopped_by_watchpoint and
3544 stopped_data_address ops into methods of process_target.
3545
3546 * target.h (struct process_stratum_target): Remove the target ops.
3547 (class process_target): Add the target ops.
3548 * target.cc (process_target::stopped_by_watchpoint): Define.
3549 (process_target::stopped_data_address): Define.
3550
3551 Update the derived classes and callers below.
3552
3553 * remote-utils.cc (prepare_resume_reply): Update.
3554 * linux-low.cc (linux_target_ops): Update.
3555 (linux_stopped_by_watchpoint): Turn into ...
3556 (linux_process_target::stopped_by_watchpoint): ... this.
3557 (linux_stopped_data_address): Turn into ...
3558 (linux_process_target::stopped_data_address): ... this.
3559 * linux-low.h (class linux_process_target): Update.
3560 * lynx-low.cc (lynx_target_ops): Update.
3561 * nto-low.cc (nto_target_ops): Update.
3562 (nto_stopped_by_watchpoint): Turn into ...
3563 (nto_process_target::stopped_by_watchpoint): ... this.
3564 (nto_stopped_data_address): Turn into ...
3565 (nto_process_target::stopped_data_address): ... this.
3566 * nto-low.h (class nto_process_target): Update.
3567 * win32-low.cc (win32_target_ops): Update.
3568 (win32_stopped_by_watchpoint): Turn into ...
3569 (win32_process_target::stopped_by_watchpoint): ... this.
3570 (win32_stopped_data_address): Turn into ...
3571 (win32_process_target::stopped_data_address): ... this.
3572 * win32-low.h (class win32_process_target): Update.
3573
3574 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3575
3576 Turn process_stratum_target's supports_hardware_single_step op into
3577 a method of process_target.
3578
3579 * target.h (struct process_stratum_target): Remove the target op.
3580 (class process_target): Add the target op.
3581 (target_supports_hardware_single_step): Update the macro.
3582 (target_can_do_hardware_single_step): Remove declaration.
3583 * target.cc (process_target::supports_hardware_single_step): Define.
3584 (target_can_do_hardware_single_step): Remove.
3585
3586 Update the derived classes and callers below.
3587
3588 * linux-low.h (class linux_process_target): Update.
3589 * linux-low.cc (linux_target_ops): Update.
3590 (linux_supports_hardware_single_step): Turn into ...
3591 (linux_process_target::supports_hardware_single_step): ... this.
3592 * lynx-low.h (class lynx_process_target): Update.
3593 * lynx-low.cc (lynx_target_ops): Update.
3594 (lynx_process_target::supports_hardware_single_step): Define.
3595 * nto-low.h (class nto_process_target): Update.
3596 * nto-low.cc (nto_target_ops): Update.
3597 (nto_process_target::supports_hardware_single_step): Define.
3598 * win32-low.h (class win32_process_target): Update.
3599 * win32-low.cc (win32_target_ops): Update.
3600 (win32_process_target::supports_hardware_single_step): Define.
3601
3602 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3603
3604 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3605 ops into methods of process_target.
3606
3607 * target.h (struct process_stratum_target): Remove the target ops.
3608 (class process_target): Add the target ops.
3609 (target_stopped_by_hw_breakpoint): Update the macro.
3610 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3611 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3612 (process_target::supports_stopped_by_hw_breakpoint): Define.
3613
3614 Update the derived classes and callers below.
3615
3616 * linux-low.cc (linux_target_ops): Update.
3617 (linux_stopped_by_hw_breakpoint): Turn into ...
3618 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3619 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3620 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3621 * linux-low.h (class linux_process_target): Update.
3622 * lynx-low.cc (lynx_target_ops): Update.
3623 * nto-low.cc (nto_target_ops): Update.
3624 * win32-low.cc (win32_target_ops): Update.
3625
3626 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3627
3628 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3629 ops into methods of process_target.
3630
3631 * target.h (struct process_stratum_target): Remove the target ops.
3632 (class process_target): Add the target ops.
3633 (target_stopped_by_sw_breakpoint): Update the macro.
3634 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3635 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3636 (process_target::supports_stopped_by_sw_breakpoint): Define.
3637
3638 Update the derived classes and callers below.
3639
3640 * linux-low.cc (linux_target_ops): Update.
3641 (linux_stopped_by_sw_breakpoint): Turn into ...
3642 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3643 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3644 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3645 * linux-low.h (class linux_process_target): Update.
3646 * lynx-low.cc (lynx_target_ops): Update.
3647 * nto-low.cc (nto_target_ops): Update.
3648 * win32-low.cc (win32_target_ops): Update.
3649
3650 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3651
3652 Turn process_stratum_target's insert_point and remove_point ops
3653 into methods of process_target.
3654
3655 * target.h (struct process_stratum_target): Remove the target ops.
3656 (class process_target): Add the target ops.
3657 * target.cc (process_target::insert_point): Define.
3658 (process_target::remove_point): Define.
3659
3660 Update the derived classes and callers below.
3661
3662 * mem-break.cc (set_raw_breakpoint_at): Update.
3663 (delete_raw_breakpoint): Update.
3664 (uninsert_raw_breakpoint): Update.
3665 (reinsert_raw_breakpoint): Update.
3666 * linux-low.cc (linux_target_ops): Update.
3667 (linux_insert_point): Turn into ...
3668 (linux_process_target::insert_point): ... this.
3669 (linux_remove_point): Turn into ...
3670 (linux_process_target::remove_point): ... this.
3671 * linux-low.h (class linux_process_target): Update.
3672 * lynx-low.cc (lynx_target_ops): Update.
3673 * nto-low.cc (nto_target_ops): Update.
3674 (nto_insert_point): Turn into ...
3675 (nto_process_target::insert_point): ... this.
3676 (nto_remove_point): Turn into ...
3677 (nto_process_target::remove_point): ... this.
3678 * nto-low.h (class nto_process_target): Update.
3679 * win32-low.cc (win32_target_ops): Update.
3680 (win32_insert_point): Turn into ...
3681 (win32_process_target::insert_point): ... this.
3682 (win32_remove_point): Turn into ...
3683 (win32_process_target::remove_point): ... this.
3684 * win32-low.h (class win32_process_target): Update.
3685
3686 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3687
3688 Turn process_stratum_target's supports_z_point_type op into a
3689 method of process_target.
3690
3691 * target.h (struct process_stratum_target): Remove the target op.
3692 (class process_target): Add the target op.
3693 * target.cc (process_target::supports_z_point_type): Define.
3694
3695 Update the derived classes and callers below.
3696
3697 * mem-break.cc (z_type_supported): Update.
3698 * linux-low.cc (linux_target_ops): Update.
3699 (linux_supports_z_point_type): Turn into ...
3700 (linux_process_target::supports_z_point_type): ... this.
3701 * linux-low.h (class linux_process_target): Update.
3702 * lynx-low.cc (lynx_target_ops): Update.
3703 * nto-low.cc (nto_target_ops): Update.
3704 (nto_supports_z_point_type): Turn into ...
3705 (nto_process_target::supports_z_point_type): ... this.
3706 * nto-low.h (class nto_process_target): Update.
3707 * win32-low.cc (win32_target_ops): Update.
3708 (win32_supports_z_point_type): Turn into ...
3709 (win32_process_target::supports_z_point_type): ... this.
3710 * win32-low.h (class win32_process_target): Update.
3711
3712 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3713
3714 Turn process_stratum_target's read_auxv op into a method of
3715 process_target.
3716
3717 * target.h (class process_stratum_target): Remove the target op.
3718 (struct process_target): Add the target op. Also add
3719 'supports_read_auxv'.
3720 * target.cc (process_target::read_auxv): Define.
3721 (process_target::supports_read_auxv): Define.
3722
3723 Update the derived classes and callers below.
3724
3725 * server.cc (handle_qxfer_auxv): Update.
3726 (handle_query): Update.
3727 * linux-low.cc (linux_target_ops): Update.
3728 (linux_process_target::supports_read_auxv): Define.
3729 (linux_read_auxv): Turn into ...
3730 (linux_process_target::read_auxv): ... this.
3731 * linux-low.h (class linux_process_target): Update.
3732 * lynx-low.cc (lynx_target_ops): Update.
3733 * nto-low.cc (nto_target_ops): Update.
3734 (nto_process_target::supports_read_auxv): Define.
3735 (nto_read_auxv): Turn into ...
3736 (nto_process_target::read_auxv): ... this.
3737 * nto-low.h (class nto_process_target): Update.
3738 * win32-low.cc (win32_target_ops): Update.
3739
3740 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3741
3742 Turn process_stratum_target's request_interrupt op into a method of
3743 process_target.
3744
3745 * target.h (struct process_stratum_target): Remove the target op.
3746 (class process_target): Add the target op.
3747
3748 Update the derived classes and callers below.
3749
3750 * remote-utils.cc (putpkt_binary_1): Update.
3751 (input_interrupt): Update.
3752 (getpkt): Update.
3753 * server.cc (handle_v_requests): Update.
3754 * linux-low.cc (linux_target_ops): Update.
3755 (linux_request_interrupt): Turn into ...
3756 (linux_process_target::request_interrupt): ... this.
3757 * linux-low.h (class linux_process_target): Update.
3758 * lynx-low.cc (lynx_target_ops): Update.
3759 (lynx_request_interrupt): Turn into ...
3760 (lynx_process_target::request_interrupt): ... this.
3761 * lynx-low.h (class lynx_process_target): Update.
3762 * nto-low.cc (nto_target_ops): Update.
3763 (nto_request_interrupt): Turn into ...
3764 (nto_process_target::request_interrupt): ... this.
3765 * nto-low.h (class nto_process_target): Update.
3766 * win32-low.cc (win32_target_ops): Update.
3767 (win32_request_interrupt): Turn into ...
3768 (win32_process_target::request_interrupt): ... this.
3769 * win32-low.h (class win32_process_target): Update.
3770
3771 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3772
3773 Turn process_stratum_target's look_up_symbols op into a method of
3774 process_target.
3775
3776 * target.h (struct process_stratum_target): Remove the target op.
3777 (class process_target): Add the target op.
3778 * target.cc (process_target::look_up_symbols): Define.
3779
3780 Update the derived classes and callers below.
3781
3782 * server.cc (handle_query): Update.
3783 * linux-low.cc (linux_target_ops): Update.
3784 (linux_look_up_symbols): Turn into ...
3785 (linux_process_target::look_up_symbols): ... this.
3786 * linux-low.h (class linux_process_target): Update.
3787 * lynx-low.cc (lynx_target_ops): Update.
3788 * nto-low.cc (nto_target_ops): Update.
3789 * win32-low.cc (win32_target_ops): Update.
3790
3791 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3792
3793 Turn process_stratum_target's read_memory and write_memory
3794 ops into methods of process_target.
3795
3796 * target.h (struct process_stratum_target): Remove the target ops.
3797 (class process_target): Add the target ops.
3798
3799 Update the derived classes and callers below.
3800
3801 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3802 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3803 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3804 (arm_get_syscall_trapinfo): Update.
3805 * linux-cris-low.cc (cris_breakpoint_at): Update.
3806 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3807 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3808 * linux-mips-low.cc (mips_breakpoint_at): Update.
3809 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3810 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3811 * linux-sh-low.cc (sh_breakpoint_at): Update.
3812 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3813 (sparc_store_gregset_from_stack): Update.
3814 (sparc_breakpoint_at): Update.
3815 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3816 * linux-tile-low.cc (tile_breakpoint_at): Update.
3817 * linux-x86-low.cc (x86_breakpoint_at): Update.
3818 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3819 * mem-brea.cc (insert_memory_breakpoint): Update.
3820 (validate_inserted_breakpoint): Update.
3821 * target.cc (read_inferior_memory): Update.
3822 (target_write_memory): Update.
3823 * linux-low.cc (linux_target_ops): Update.
3824 (linux_read_memory): Make a wrapper around the read_memory target
3825 op call.
3826 (linux_process_target::read_memory): Rename from linux_read_memory.
3827 (linux_write_memory): Turn into ...
3828 (linux_process_target::write_memory): ... this.
3829 * linux-low.h (class linux_process_target): Update.
3830 * lynx-low.cc (lynx_target_ops): Update.
3831 (lynx_read_memory): Turn into ...
3832 (lynx_process_target::read_memory): ... this.
3833 (lynx_write_memory): Turn into ...
3834 (lynx_process_target::write_memory): ... this.
3835 * lynx-low.h (class lynx_process_target): Update.
3836 * nto-low.cc (nto_target_ops): Update.
3837 (nto_read_memory): Turn into ...
3838 (nto_process_target::read_memory): ... this.
3839 (nto_write_memory): Turn into ...
3840 (nto_process_target::write_memory): ... this.
3841 * nto-low.h (class nto_process_target): Update.
3842 * win32-low.cc (win32_target_ops): Update.
3843 (win32_read_inferior_memory): Turn into ...
3844 (win32_process_target::read_memory): ... this.
3845 (win32_write_inferior_memory): Turn into ...
3846 (win32_process_target::write_memory): ... this.
3847 * win32-low.h (class win32_process_target): Update.
3848
3849 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3850
3851 Turn process_stratum_target's prepare_to_access_memory and
3852 done_accessing_memory ops into methods of process_target.
3853
3854 * target.h (struct process_stratum_target): Remove the target ops.
3855 (class process_target): Add the target ops.
3856 * target.cc (process_target::prepare_to_access_memory): Define.
3857 (process_target::done_accessing_memory): Define.
3858 (prepare_to_access_memory): Update.
3859 (done_accessing_memory): Update.
3860
3861 Update the derived classes and callers below.
3862
3863 * linux-low.cc (linux_target_ops): Update.
3864 (linux_prepare_to_access_memory): Turn into ...
3865 (linux_process_target::prepare_to_access_memory): ... this.
3866 (linux_done_accessing_memory): Turn into ...
3867 (linux_process_target::done_accessing_memory): ... this.
3868 * linux-low.h (class linux_process_target): Update.
3869 * lynx-low.cc (lynx_target_ops): Update.
3870 * nto-low.cc (nto_target_ops): Update.
3871 * win32-low.cc (win32_target_ops): Update.
3872
3873 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3874
3875 Turn process_stratum_target's fetch_registers and store_registers
3876 ops into methods of process_target.
3877
3878 * target.h (struct process_stratum_target): Remove the target ops.
3879 (class process_target): Add the target ops.
3880 (fetch_inferior_registers): Update the macro.
3881 (store_inferior_registers): Update the macro.
3882
3883 Update the derived classes and callers below.
3884
3885 * linux-low.cc (linux_target_ops): Update.
3886 (linux_fetch_registers): Turn into ...
3887 (linux_process_target::fetch_registers): ... this.
3888 (linux_store_registers): Turn into ...
3889 (linux_process_target::store_registers): ... this.
3890 * linux-low.h (class linux_process_target): Update.
3891 * lynx-low.cc (lynx_target_ops): Update.
3892 (lynx_fetch_registers): Turn into ...
3893 (lynx_process_target::fetch_registers): ... this.
3894 (lynx_store_registers): Turn into ...
3895 (lynx_process_target::store_registers): ... this.
3896 * lynx-low.h (class lynx_process_target): Update.
3897 * nto-low.cc (nto_target_ops): Update.
3898 (nto_fetch_registers): Turn into ...
3899 (nto_process_target::fetch_registers): ... this.
3900 (nto_store_registers): Turn into ...
3901 (nto_process_target::store_registers): ... this.
3902 * nto-low.h (class nto_process_target): Update.
3903 * win32-low.cc (win32_target_ops): Update.
3904 (win32_fetch_inferior_registers): Turn into ...
3905 (win32_process_target::fetch_registers): ... this.
3906 (win32_store_inferior_registers): Turn into ...
3907 (win32_process_target::store_registers): ... this.
3908 * win32-low.h (class win32_process_target): Update.
3909
3910 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3911
3912 Turn process_stratum_target's wait op into a method of
3913 process_target.
3914
3915 * target.h (struct process_stratum_target): Remove the target op.
3916 (class process_target): Add the target op.
3917
3918 Update the derived classes and callers below.
3919
3920 * target.cc (target_wait): Update.
3921 * linux-low.cc (linux_target_ops): Update.
3922 (linux_wait): Turn into ...
3923 (linux_process_target::wait): ... this.
3924 * linux-low.h (class linux_process_target): Update.
3925 * lynx-low.cc (lynx_target_ops): Update.
3926 (lynx_wait): Turn into ...
3927 (lynx_process_target::wait): ... this.
3928 * lynx-low.h (class lynx_process_target): Update.
3929 * nto-low.cc (nto_target_ops): Update.
3930 (nto_wait): Turn into ...
3931 (nto_process_target::wait): ... this.
3932 * nto-low.h (class nto_process_target): Update.
3933 * win32-low.cc (win32_target_ops): Update.
3934 (win32_wait): Turn into ...
3935 (win32_process_target::wait): ... this.
3936 (do_initial_child_stuff): Update.
3937 * win32-low.h (class win32_process_target): Update.
3938
3939 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3940
3941 Turn process_stratum_target's resume op into a method of
3942 process_target.
3943
3944 * target.h (struct process_stratum_target): Remove the target op.
3945 (class process_target): Add the target op.
3946
3947 Update the derived classes and callers below.
3948
3949 * server.cc (resume): Update.
3950 * target.cc (target_stop_and_wait): Update.
3951 (target_continue_no_signal): Update.
3952 (target_continue): Update.
3953 * linux-low.cc (linux_target_ops): Update.
3954 (linux_resume): Turn into ...
3955 (linux_process_target::resume): ... this.
3956 * linux-low.h (class linux_process_target): Update.
3957 * lynx-low.cc (lynx_target_ops): Update.
3958 (lynx_resume): Turn into ...
3959 (lynx_process_target::resume): ... this.
3960 * lynx-low.h (class lynx_process_target): Update.
3961 * nto-low.cc (nto_target_ops): Update.
3962 (nto_resume): Turn into ...
3963 (nto_process_target::resume): ... this.
3964 * nto-low.h (class nto_process_target): Update.
3965 * win32-low.cc (win32_target_ops): Update.
3966 (win32_resume): Turn into ...
3967 (win32_process_target::resume): ... this.
3968 (win32_process_target::detach): Update.
3969 (do_initial_child_stuff): Update.
3970 * win32-low.h (class win32_process_target): Update.
3971
3972 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3973
3974 Turn process_stratum_target's thread_alive op into a method of
3975 process_target.
3976
3977 * target.h (struct process_stratum_target): Remove the target op.
3978 (class process_target): Add the target op.
3979 (mythread_alive): Update the macro.
3980
3981 Update the derived classes and callers below.
3982
3983 * linux-low.cc (linux_target_ops): Update.
3984 (linux_thread_alive): Turn into ...
3985 (linux_process_target::thread_alive): ... this.
3986 (wait_for_sigstop): Update.
3987 * linux-low.h (class linux_process_target): Update.
3988 * lynx-low.cc (lynx_target_ops): Update.
3989 (lynx_thread_alive): Turn into ...
3990 (lynx_process_target::thread_alive): ... this.
3991 * lynx-low.h (class lynx_process_target): Update.
3992 * nto-low.cc (nto_target_ops): Update.
3993 (nto_thread_alive): Turn into ...
3994 (nto_process_target::thread_alive): ... this.
3995 * nto-low.h (class nto_process_target): Update.
3996 * win32-low.cc (win32_target_ops): Update.
3997 (win32_thread_alive): Turn into ...
3998 (win32_process_target::thread_alive): ... this.
3999 * win32-low.h (class win32_process_target): Update.
4000
4001 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4002
4003 Turn process_stratum_target's join op into a method of
4004 process_target.
4005
4006 * target.h (struct process_stratum_target): Remove the target op.
4007 (class process_target): Add the target op.
4008 (join_inferior): Update the macro.
4009
4010 Update the derived classes and callers below.
4011
4012 * linux-low.cc (linux_target_ops): Update.
4013 (linux_join): Turn into ...
4014 (linux_process_target::join): ... this.
4015 * linux-low.h (class linux_process_target): Update.
4016 * lynx-low.cc (lynx_target_ops): Update.
4017 (lynx_join): Turn into ...
4018 (lynx_process_target::join): ... this.
4019 * lynx-low.h (class lynx_process_target): Update.
4020 * nto-low.cc (nto_target_ops): Update.
4021 (nto_process_target::join): Define.
4022 * nto-low.h (class nto_process_target): Update.
4023 * win32-low.cc (win32_target_ops): Update.
4024 (win32_join): Turn into ...
4025 (win32_process_target::join): ... this.
4026 * win32-low.h (class win32_process_target): Update.
4027
4028 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4029
4030 Turn process_stratum_target's mourn op into a method of
4031 process_target.
4032
4033 * target.h (struct process_stratum_target): Remove the target op.
4034 (class process_target): Add the target op.
4035
4036 Update the derived classes and callers below.
4037
4038 * target.cc (target_mourn_inferior): Update.
4039 * linux-low.cc (linux_target_ops): Update.
4040 (linux_mourn): Turn into ...
4041 (linux_process_target::mourn): ... this.
4042 (handle_extended_wait): Update.
4043 (linux_process_target::kill): Update.
4044 (linux_process_target::detach): Update.
4045 * linux-low.h (class linux_process_target): Update.
4046 * lynx-low.cc (lynx_target_ops): Update.
4047 (lynx_mourn): Turn into ...
4048 (lynx_process_target::mourn): ... this.
4049 * lynx-low.h (class lynx_process_target): Update.
4050 * nto-low.cc (nto_target_ops): Update.
4051 (nto_mourn): Turn into ...
4052 (nto_process_target::mourn): ... this.
4053 * nto-low.h (class nto_process_target): Update.
4054 * win32-low.cc (win32_target_ops): Update.
4055 (win32_mourn): Turn into ...
4056 (win32_process_target::mourn): ... this.
4057 * win32-low.h (class win32_process_target): Update.
4058
4059 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4060
4061 Turn process_stratum_target's detach op into a method of
4062 process_target.
4063
4064 * target.h (struct process_stratum_target): Remove the target op.
4065 (class process_target): Add the target op.
4066 (detach_inferior): Update the macro.
4067
4068 Update the derived classes and callers below.
4069
4070 * linux-low.cc (linux_target_ops): Update.
4071 (linux_detach): Turn into ...
4072 (linux_process_target::detach): ... this.
4073 * linux-low.h (class linux_process_target): Update.
4074 * lynx-low.cc (lynx_target_ops): Update.
4075 (lynx_detach): Turn into ...
4076 (lynx_process_target::detach): ... this.
4077 * lynx-low.h (class lynx_process_target): Update.
4078 * nto-low.cc (nto_target_ops): Update.
4079 (nto_detach): Turn into ...
4080 (nto_process_target::detach): ... this.
4081 * nto-low.h (class nto_process_target): Update.
4082 * win32-low.cc (win32_target_ops): Update.
4083 (win32_detach): Turn into ...
4084 (win32_process_target::detach): ... this.
4085 * win32-low.h (class win32_process_target): Update.
4086
4087 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4088
4089 Turn process_stratum_target's kill op into a method of
4090 process_target.
4091
4092 * target.h (struct process_stratum_target): Remove the target op.
4093 (class process_target): Add the target op.
4094
4095 Update the derived classes and callers below.
4096
4097 * target.cc (kill_inferior): Update.
4098 * linux-low.cc (linux_target_ops): Update.
4099 (linux_kill): Turn into ...
4100 (linux_process_target::kill): ... this.
4101 * linux-low.h (class linux_process_target): Update.
4102 * lynx-low.cc (lynx_target_ops): Update.
4103 (lynx_kill): Turn into ...
4104 (lynx_process_target::kill): ... this.
4105 * lynx-low.h (class lynx_process_target): Update.
4106 * nto-low.cc (nto_target_ops): Update.
4107 (nto_kill): Turn into ...
4108 (nto_process_target::kill): ... this.
4109 * nto-low.h (class nto_process_target): Update.
4110 * win32-low.cc (win32_target_ops): Update.
4111 (win32_kill): Turn into ...
4112 (win32_process_target::kill): ... this.
4113 * win32-low.h (class win32_process_target): Update.
4114
4115 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4116
4117 Turn process_stratum_target's attach op into a method of
4118 process_target.
4119
4120 * target.h (struct process_stratum_target): Remove the target op.
4121 (class process_target): Add the target op.
4122 (myattach): Update the macro.
4123
4124 Update the derived classes and callers below.
4125
4126 * linux-low.cc (linux_target_ops): Update.
4127 (linux_attach): Turn into ...
4128 (linux_process_target::attach): ... this.
4129 * linux-low.h (class linux_process_target): Update.
4130 * lynx-low.cc (lynx_target_ops): Update.
4131 (lynx_attach): Turn into ...
4132 (lynx_process_target::attach): ... this.
4133 * lynx-low.h (class lynx_process_target): Update.
4134 * nto-low.cc (nto_target_ops): Update.
4135 (nto_attach): Turn into ...
4136 (nto_process_target::attach): ... this.
4137 * nto-low.h (class nto_process_target): Update.
4138 * win32-low.cc (win32_target_ops): Update.
4139 (win32_attach): Turn into ...
4140 (win32_process_target::attach): ... this.
4141 * win32-low.h (class win32_process_target): Update.
4142
4143 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4144
4145 Turn process_stratum_target's post_create_inferior op into a method
4146 of process_target.
4147
4148 * target.h (struct process_stratum_target): Remove the target op.
4149 (class process_target): Add the target op.
4150 (target_post_create_inferior): Update the macro.
4151 * target.cc (process_target::post_create_inferior): Define.
4152
4153 Update the derived classes and callers below.
4154
4155 * linux-low.cc (linux_target_ops): Update.
4156 (linux_post_create_inferior): Turn into ...
4157 (linux_process_target::post_create_inferior): ... this.
4158 * linux-low.h (class linux_process_target): Update.
4159 * lynx-low.cc (lynx_target_ops): Update.
4160 * nto-low.cc (nto_target_ops): Update.
4161 * win32-low.cc (win32_target_ops): Update.
4162
4163 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4164
4165 Turn process_stratum_target's create_inferior op into a method of
4166 process_target.
4167
4168 * target.h (struct process_stratum_target): Remove the target op.
4169 (class process_target): Add the target op.
4170 (create_inferior): Rename the macro to ...
4171 (target_create_inferior): ... this.
4172
4173 Update the derived classes and callers below.
4174
4175 * server.cc (handle_v_run): Update.
4176 (captured_main): Update.
4177 (process_serial_event): Update.
4178 * linux-low.cc (linux_target_ops): Update.
4179 (linux_create_inferior): Turn into ...
4180 (linux_process_target::create_inferior): ... this.
4181 * linux-low.h (class linux_process_target): Update.
4182 * lynx-low.cc (lynx_target_ops): Update.
4183 (lynx_create_inferior): Turn into ...
4184 (lynx_process_target::create_inferior): ... this.
4185 * lynx-low.h (class lynx_process_target): Update.
4186 * nto-low.cc (nto_target_ops): Update.
4187 (nto_create_inferior): Turn into ...
4188 (nto_process_target::create_inferior): ... this.
4189 * nto-low.h (class nto_process_target): Update.
4190 * win32-low.cc (win32_target_ops): Update.
4191 (win32_create_inferior): Turn into ...
4192 (win32_process_target::create_inferior): ... this.
4193 * win32-low.h (class win32_process_target): Update.
4194
4195 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4196
4197 * target.h (class process_target): New class definition.
4198 (struct process_stratum_target) <pt>: New field with type
4199 'process_target*'.
4200 * linux-low.h (class linux_process_target): Define as a derived
4201 class of 'process_target'.
4202 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4203 as the 'pt' field.
4204 * lynx-low.h (class lynx_process_target): Define as a derived
4205 class of 'process_target'.
4206 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4207 as the 'pt' field.
4208 * nto-low.h (class nto_process_target): Define as a derived
4209 class of 'process_target'.
4210 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4211 as the 'pt' field.
4212 * win32-low.h (class win32_process_target): Define as a derived
4213 class of 'process_target'.
4214 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4215 as the 'pt' field.
4216
4217 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4218
4219 * configure: Regenerate.
4220
4221 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4222 Andrew Burgess <andrew.burgess@embecosm.com>
4223
4224 * linux-riscv-low.cc: New file.
4225 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4226 and nat/riscv-linux-tdesc.c.
4227 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4228 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4229 Define.
4230
4231 2020-02-14 Tom Tromey <tom@tromey.com>
4232
4233 * acinclude.m4: Don't include acx_configure_dir.m4.
4234 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4235 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4236 (all, install-only, uninstall, clean-info, clean)
4237 (maintainer-clean): Don't recurse.
4238 (subdir_do, all-lib): Remove.
4239 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4240 (GNULIB_H): Remove.
4241 (generated_files): Update.
4242 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4243 * configure: Rebuild.
4244 * configure.ac: Don't configure gnulib or libiberty.
4245 (GNULIB): Update.
4246
4247 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4248
4249 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4250 preparing the command line for CreateProcess.
4251 (win32_create_inferior): Reflect the program name in debugging
4252 output that shows the process and its command line.
4253
4254 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4255
4256 * Makefile.in: Rename source files from .c to .cc.
4257 * %.c: Rename to %.cc.
4258 * configure.ac: Rename server.c to server.cc.
4259 * configure: Re-generate.
4260
4261 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4262
4263 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4264
4265 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4266
4267 * win32-low.c (win32_create_inferior): Set signal_pid.
4268
4269 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4270 Pedro Alves <palves@redhat.com>
4271
4272 Skip building gdbserver in a cross-configuration.
4273 * configure.srv: Set $gdbserver_host depending on whether $target
4274 is $host. Use $gdbserver_host instead of $host.
4275
4276 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4277
4278 * configure: Re-generate.
4279
4280 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4281
4282 * configure: Re-generate.
4283
4284 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4285
4286 * acinclude.m4: Update warning.m4 path.
4287
4288 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4289
4290 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4291 (handle_exception): Set siginfo_er.
4292 (win32_xfer_siginfo): New function.
4293
4294 2020-02-07 Tom Tromey <tom@tromey.com>
4295 Pedro Alves <palves@redhat.com>
4296
4297 * README: Update build documentation.
4298 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4299 host, not target.
4300 * configure.ac: Update paths.
4301 * configure: Rebuild.
4302 * acinclude.m4: Update paths.
4303 * Makefile.in: Update include paths.
4304 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4305 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4306 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4307 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4308 (%-generated.c): Update paths.
4309 * Move entire directory from ../gdb/gdbserver.
4310
4311 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4312
4313 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4314
4315 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4316
4317 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4318 assignment instead of srv_linux_obj.
4319
4320 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4321
4322 * server.c (handle_qxfer_libraries): Write segment-address with
4323 paddress.
4324
4325 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4326
4327 * Makefile.in (install-strip): New target.
4328 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4329 * aclocal.m4: Regenerate.
4330 * configure: Regenerate.
4331 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4332
4333 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4334
4335 * Makefile.in (SFILES): Adjust paths to point to real files.
4336 (OBS): Move waitstatus.o to target/waitstatus.o.
4337 (TAGS): Transform paths appropriately.
4338 (%.o): Rename to...
4339 (nat/%.o): ... this pattern rule.
4340 (%.o): Rename to...
4341 (target/%.o): ... this pattern rule.
4342 * configure.srv: Adjust paths throughout to include nat/ prefix
4343 with the revant files.
4344 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4345 * configure: Regenerate.
4346
4347 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4348
4349 * Makefile.in (TAGS): Remove config files from the recipe.
4350
4351 2020-01-14 Tom Tromey <tom@tromey.com>
4352
4353 * configure: Rebuild.
4354 * configure.ac: Remove any checks that were added to common.m4.
4355 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4356 lib-link.m4.
4357
4358 2020-01-14 Tom Tromey <tom@tromey.com>
4359
4360 * server.h: Include config.h.
4361 * gdbreplay.c: Include config.h.
4362 * configure: Rebuild.
4363 * configure.ac: Don't source common.host.
4364 * acinclude.m4: Update path.
4365 * Makefile.in (INCSUPPORT): New variable.
4366 (INCLUDE_CFLAGS): Add INCSUPPORT.
4367 (SFILES): Update paths.
4368 (version-generated.c): Update path to create-version.sh.
4369 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4370
4371 2020-01-14 Tom Tromey <tom@tromey.com>
4372
4373 * configure.ac (LIBS): Use WIN32APILIBS.
4374 (USE_WIN32API): Don't define.
4375 * configure: Rebuild.
4376
4377 2020-01-14 Tom Tromey <tom@tromey.com>
4378
4379 * configure: Rebuild.
4380
4381 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4382
4383 * Makefile.in (%-generated.c): Remove rule for files from
4384 regformats/i386.
4385
4386 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4387
4388 * configure: Re-generate.
4389
4390 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4391
4392 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4393 Define to static.
4394 * tracepoint.c (stop_tracing, flush_trace_buffer,
4395 about_to_request_buffer_space, get_trace_state_variable_value,
4396 set_trace_state_variable_value, gdb_collect): Add declaration.
4397
4398 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4399
4400 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4401 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4402 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4403 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4404 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4405 static.
4406
4407 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4408
4409 * inferiors.c: Include gdbsupport/common-inferior.h.
4410
4411 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4412
4413 * hostio-errno.c: Include hostio.h.
4414
4415 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4416
4417 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4418 prerequisite.
4419
4420 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4421
4422 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4423 * linux-arm-tdesc.h: Include arch/arm.h.
4424
4425 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4426
4427 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4428
4429 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4430
4431 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4432 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4433
4434 2020-01-10 Pedro Alves <palves@redhat.com>
4435
4436 * fork-child.c (post_fork_inferior): Pass target down to
4437 startup_inferior.
4438 * inferiors.c (switch_to_thread): Add process_stratum_target
4439 parameter.
4440 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4441 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4442 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4443 * remote-utils.c (prepare_resume_reply): Pass the target to
4444 switch_to_thread.
4445 * target.c (the_target): Now a process_stratum_target.
4446 (done_accessing_memory): Pass the target to switch_to_thread.
4447 (set_target_ops): Ajust to use process_stratum_target.
4448 * target.h (struct target_ops): Rename to ...
4449 (struct process_stratum_target): ... this.
4450 (the_target, set_target_ops): Adjust.
4451 (prepare_to_access_memory): Adjust comment.
4452 * win32-low.c (child_xfer_memory): Adjust to use
4453 process_stratum_target.
4454 (win32_target_ops): Now a process_stratum_target.
4455
4456 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4457 Pedro Alves <palves@redhat.com>
4458
4459 * win32-low.c (get_child_debug_event): Extract the fatal exception
4460 from the exit status and convert to the equivalent Posix signal
4461 number.
4462 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4463 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4464
4465 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4466
4467 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4468
4469 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4470
4471 * server.c (gdbserver_version): Change copyright year to 2020.
4472 * gdbreplay.c (gdbreplay_version): Likewise.
4473
4474 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4475
4476 * configure: Regenerate.
4477 * configure.ac: Quote variable arguments of test.
4478
4479 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4480
4481 * Makefile.in: Fix build with GNU Make 3.81
4482
4483 2019-12-16 Tom Tromey <tromey@adacore.com>
4484
4485 * server.c (get_exec_file): Constify result.
4486
4487 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4488
4489 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4490 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4491 * config.in: Regenerate.
4492 * configure: Regenerate.
4493 * configure.ac: Don't check for strerror.
4494 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4495 Call safe_strerror instead of strerror.
4496 * server.h (strerror): Remove this now-unnecessary declaration.
4497 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4498 strerror.
4499 (gdb_agent_helper_thread): Likewise.
4500 * utils.c (perror_with_name): Likewise.
4501
4502 2019-11-26 Tom Tromey <tom@tromey.com>
4503
4504 * configure, config.in: Rebuild.
4505
4506 2019-11-26 Tom Tromey <tom@tromey.com>
4507
4508 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4509 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4510 gdb_sigmask.
4511 * configure, config.in: Rebuild.
4512
4513 2019-11-26 Tom Tromey <tom@tromey.com>
4514
4515 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4516 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4517 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4518 * acinclude.m4: Include ax_pthread.m4.
4519 * config.in, configure: Rebuild.
4520
4521 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4522
4523 * debug.c (debug_set_output): Call safe_strerror instead of
4524 strerror.
4525 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4526 (linux_kill_one_lwp): Likewise.
4527 (linux_detach_one_lwp): Likewise.
4528 (linux_wait_for_event_filtered): Likewise.
4529 (store_register): Likewise.
4530 * lynx-low.c (lynx_attach): Likewise.
4531 * mem-break.c (insert_memory_breakpoint): Likewise.
4532 (remove_memory_breakpoint): Likewise.
4533 (delete_fast_tracepoint_jump): Likewise.
4534 (set_fast_tracepoint_jump): Likewise.
4535 (uninsert_fast_tracepoint_jumps_at): Likewise.
4536 (reinsert_fast_tracepoint_jumps_at): Likewise.
4537 * nto-low.c (nto_xfer_memory): Likewise.
4538 (nto_resume): Likewise.
4539
4540 2019-11-20 Luis Machado <luis.machado@linaro.org>
4541
4542 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4543 instead of register count.
4544 * tdesc.c (tdesc_contains_feature): New function.
4545 * tdesc.h (tdesc_contains_feature): New prototype.
4546
4547 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4548
4549 * Makefile.in: Add safe-strerror.c.
4550 * configure: Regenerate.
4551 * configure.ac: Don't source common.host.
4552
4553 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4554
4555 * config.in: Regenerate.
4556 * configure: Regenerate.
4557
4558 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4559
4560 * ax.c (ax_printf): Handle size_t_arg.
4561
4562 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4563
4564 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4565 * mi/mi-main.c (output_cores): Likewise.
4566 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4567 (linux_xfer_osdata_modules): Likewise.
4568 * remote.c (register_remote_support_xml): Likewise.
4569 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4570 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4571
4572 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4573
4574 * configure: Regenerate.
4575 * configure.ac: Remove check for strerror_r.
4576
4577 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4578
4579 * config.in: Regenerate.
4580 * configure: Regenerate.
4581 * configure.ac: Also check for strerror_r.
4582
4583 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4584
4585 * ax.h (debug_agent): Remove duplicate declaration.
4586
4587 2019-10-26 Tom de Vries <tdevries@suse.de>
4588
4589 * linux-aarch64-low.c: Fix typos in comments.
4590 * linux-arm-low.c: Same.
4591 * linux-low.c: Same.
4592 * linux-ppc-low.c: Same.
4593 * proc-service.c: Same.
4594 * regcache.h: Same.
4595 * server.c: Same.
4596 * tracepoint.c: Same.
4597 * win32-low.c: Same.
4598
4599 2019-10-25 Tom Tromey <tromey@adacore.com>
4600
4601 * utils.c (xstrdup): Remove.
4602
4603 2019-10-23 Tom Tromey <tom@tromey.com>
4604
4605 * configure, config.in: Rebuild.
4606
4607 2019-10-23 Tom Tromey <tom@tromey.com>
4608
4609 * configure: Rebuild.
4610 * acinclude.m4: Use m4_include, not sinclude.
4611
4612 2019-10-17 Tom Tromey <tromey@adacore.com>
4613
4614 * configure: Rebuild.
4615 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4616 in AC_CONFIG_FILES invocation.
4617 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4618 invocation.
4619
4620 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4621
4622 * server.c: Include xml-builtin.h.
4623 (get_xml_features): Don't declare xml_builtins here.
4624
4625 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4626
4627 * Makefile.in: Remove references to vec-ipa.o.
4628
4629 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4630
4631 * Makefile.in: Remove references to vec.c.
4632
4633 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4634
4635 * server.c (server_waiting): Change to bool.
4636 (extended_protocol): Likewise.
4637 (response_needed): Likewise.
4638 (exit_requested): Likewise.
4639 (run_once): Likewise.
4640 (report_no_resumed): Likewise.
4641 (non_stop): Likewise.
4642 (disable_packet_vCont): Likewise.
4643 (disable_packet_Tthread): Likewise.
4644 (disable_packet_qC): Likewise.
4645 (disable_packet_qfThreadInfo): Likewise.
4646 (handle_general_set): Update.
4647 (handle_detach): Update.
4648 (handle_monitor_command): Update.
4649 (handle_query): Update.
4650 (captured_main): Update.
4651 (process_serial_event): Update.
4652 * server.h (server_waiting): Change to bool.
4653 (disable_packet_vCont): Likewise.
4654 (disable_packet_Tthread): Likewise.
4655 (disable_packet_qC): Likewise.
4656 (disable_packet_qfThreadInfo): Likewise.
4657 (run_once): Likewise.
4658 (non_stop): Likewise.
4659 * target.c (target_stop_and_wait): Update.
4660
4661 2019-10-02 Tom Tromey <tromey@adacore.com>
4662
4663 * Makefile.in (SFILES): Add common-inferior.c.
4664 (OBS): Add common-inferior.o.
4665 * server.c (startup_with_shell): Don't define.
4666
4667 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4668
4669 * linux-low.c (linux_low_read_btrace): Update for change to
4670 std::vector.
4671
4672 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4673
4674 * debug.c (debug_threads): Remove comment in favor of the header.
4675 * debug.h (using_threads): Add declaration.
4676 (debug_threads): Add comment.
4677 * linux-aarch64-low.c: Include debug.h and remove declaration of
4678 debug_threads.
4679 * nto-low.c: Likewise.
4680 * remote-utils.c: Likewise.
4681 * thread-db.c: Likewise.
4682
4683 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4684
4685 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4686 and powerpc-cell64l-ipa.o.
4687 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4688 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4689 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4690 (spu*-*-*): Remove.
4691
4692 * spu-low.c: Remove file.
4693
4694 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4695 (parse_spufs_run): Remove.
4696 (ppc_get_pc): Remove Cell/B.E. support.
4697 (ppc_set_pc): Likewise.
4698 (ppc_breakpoint_at): Likewise.
4699 (ppc_arch_setup): Likewise.
4700 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4701 tdesc_powerpc_cell32l.
4702 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4703 or init_registers_powerpc_cell32l.
4704 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4705 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4706 or init_registers_powerpc_cell32l.
4707 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4708 (init_registers_powerpc_cell32l): Remove prototype.
4709 (init_registers_powerpc_cell64l): Likewise.
4710
4711 * target.h (struct target_ops): Remove qxfer_spu member.
4712 * server.c (handle_qxfer_spu): Remove.
4713 (qxfer_packets): Remove entry for "spu".
4714 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4715 * linux-low.c (SPUFS_MAGIC): Remove.
4716 (spu_enumerate_spu_ids): Remove.
4717 (linux_qxfer_spu): Remove.
4718 (linux_target_ops): Remove qxfer_spu member.
4719 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4720 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4721 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4722
4723 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4724
4725 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4726 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4727 * config.in: Regenerate.
4728 * configure: Regenerate.
4729
4730 2019-08-15 Tom Tromey <tromey@adacore.com>
4731
4732 * target.c (target_write_memory): Use gdb::byte_vector.
4733
4734 2019-08-15 Tom Tromey <tromey@adacore.com>
4735
4736 * tracepoint.c (write_inferior_data_pointer)
4737 (write_inferior_integer, write_inferior_int8)
4738 (write_inferior_uinteger, m_tracepoint_action_download)
4739 (r_tracepoint_action_download, x_tracepoint_action_download)
4740 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4741 (download_agent_expr, download_tracepoint_1)
4742 (download_trace_state_variables, upload_fast_traceframes): Update.
4743 * server.c (gdb_write_memory): Update.
4744 * remote-utils.c (relocate_instruction): Update.
4745 * proc-service.c (ps_pdwrite): Update.
4746 * mem-break.c (remove_memory_breakpoint)
4747 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4748 (uninsert_fast_tracepoint_jumps_at)
4749 (reinsert_fast_tracepoint_jumps_at): Update.
4750 * linux-x86-low.c (append_insns)
4751 (i386_install_fast_tracepoint_jump_pad)
4752 (amd64_write_goto_address, i386_write_goto_address): Update.
4753 * linux-s390-low.c (append_insns, s390_write_goto_address):
4754 Update.
4755 * linux-ppc-low.c (ppc_relocate_instruction)
4756 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4757 (ppc_write_goto_address): Update.
4758 * linux-aarch64-low.c (append_insns): Update.
4759 * target.h (struct target_ops): Update.
4760 (write_inferior_memory): Don't declare.
4761 * target.c (target_write_memory): Rename from
4762 write_inferior_memory. Remove old target_write_memory.
4763
4764 2019-08-15 Tom Tromey <tromey@adacore.com>
4765
4766 * target.c (write_inferior_memory): Use std::vector.
4767
4768 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4769
4770 PR build/24886
4771 * configure.ac: Drop enable-libmcheck support.
4772 * configure, config.in: Rebuild.
4773 * acinclude.m4: Don't include it.
4774
4775 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4776
4777 * configure.srv: Remove Arm xml files.
4778
4779 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4780
4781 * configure.srv: Add new files. Remove xml generated files.
4782 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4783 registers.
4784 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4785 * linux-aarch32-tdesc.c: New file.
4786 * linux-aarch32-tdesc.h: New file.
4787 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4788 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4789 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4790 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4791 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4792 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4793 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4794 (arm_read_description): Call arm_linux_read_description.
4795 (initialize_low_arch): Don't init registers.
4796 * linux-arm-tdesc.c: New file.
4797 * linux-arm-tdesc.h: New file.
4798
4799 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4800
4801 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4802 Move counter inside for.
4803 (arm_read_description): Check ptrace earlier.
4804 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4805
4806 2019-07-09 Tom Tromey <tom@tromey.com>
4807
4808 * configure: Rebuild.
4809 * configure.ac: Change common to gdbsupport.
4810 * acinclude.m4: Change common to gdbsupport.
4811 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4812 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4813 common to gdbsupport.
4814 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4815 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4816 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4817 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4818 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4819 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4820 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4821 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4822 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4823 common to gdbsupport.
4824
4825 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4826
4827 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4828 defines.
4829 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4830
4831 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4832
4833 * configure.srv: Remove legacy xml.
4834 * linux-aarch64-low.c (initialize_low_arch): Remove
4835 initialize_low_tdesc call.
4836 * linux-aarch64-tdesc-selftest.c: Remove file.
4837 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4838 * linux-x86-low.c (initialize_low_arch): Remove
4839 initialize_low_tdesc call.
4840 * linux-x86-tdesc-selftest.c: Remove file.
4841 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4842
4843 2019-06-20 Tom de Vries <tdevries@suse.de>
4844
4845 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4846 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4847
4848 2019-06-19 Tom de Vries <tdevries@suse.de>
4849
4850 * debug.h (debug_write): Change return type to ssize_t.
4851 * debug.c (debug_write): Same.
4852
4853 2019-06-14 Tom Tromey <tom@tromey.com>
4854
4855 * configure.ac: Use new path to gnulib.
4856 * configure: Rebuild.
4857 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4858 to gnulib.
4859
4860 2019-06-11 Tom Tromey <tom@tromey.com>
4861
4862 * Makefile.in (SFILES): Add alloc.c.
4863 (OBS): Add alloc.o.
4864 (IPA_OBJS): Add alloc-ipa.o.
4865 (alloc-ipa.o): New target.
4866 (%.o: ../%.c): New pattern rule.
4867
4868 2019-06-10 Tom Tromey <tromey@adacore.com>
4869
4870 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4871 end warning with a newline.
4872 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4873 newline.
4874 * thread-db.c (attach_thread): Don't end warning with a newline.
4875 (thread_db_notice_clone): Likewise.
4876 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4877 newline.
4878 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4879 end warning with a newline.
4880
4881 2019-06-04 Pedro Alves <palves@redhat.com>
4882
4883 * server.c (captured_main): Use make_unique_xstrdup.
4884
4885 2019-06-02 Tom Tromey <tom@tromey.com>
4886
4887 * gdbreplay.c (fromhex): Remove.
4888 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4889
4890 2019-05-29 Tom Tromey <tromey@adacore.com>
4891
4892 * configure: Rebuild.
4893
4894 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4895
4896 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4897 sign extension code on 32-bit builds.
4898
4899 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4900
4901 * remote-utils.c:
4902 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4903
4904 2019-04-19 Tom Tromey <tom@tromey.com>
4905
4906 * server.c (struct vstop_notif): Derive from notif_event.
4907 <base>: Remove.
4908 (queue_stop_reply): Update.
4909 (remove_all_on_match_ptid): Change type. Rewrite.
4910 (discard_queued_stop_replies): Rewrite.
4911 (in_queued_stop_replies_ptid): Change type.
4912 (in_queued_stop_replies): Rewrite.
4913 (notif_stop): Update.
4914 (queue_stop_reply_callback): Update.
4915 (captured_main): Don't call initialize_notif.
4916 (push_stop_notification): Update.
4917 * notif.c (notif_write_event, handle_notif_ack)
4918 (notif_event_enque, notif_push): Update.
4919 (notif_event_xfree, initialize_notif): Remove.
4920 * notif.h (struct notif_event): Include <list>, not
4921 "common/queue.h".
4922 (struct notif_server) <queue>: Now a std::list.
4923 (notif_event_p): Remove typedef.
4924 (initialize_notif): Don't declare.
4925 (struct notif_event): Add virtual destructor.
4926
4927 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4928
4929 * ax.c (ax_vdebug): Call debug_printf.
4930 * debug.c (debug_write): New function.
4931 * debug.h (debug_write): New declaration.
4932 * linux-low.c (sigchld_handler): Call debug_write.
4933
4934 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4935
4936 * debug.c (debug_set_output): New function.
4937 (debug_vprintf): Send output to debug_file.
4938 (debug_flush): Likewise.
4939 * debug.h (debug_set_output): New declaration.
4940 * server.c (handle_monitor_command): Add debug-file option.
4941 (captured_main): Likewise.
4942
4943 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4944
4945 * debug.c (remote_debug): Add definition.
4946 * debug.h (remote_debug): Add declaration.
4947 * hostio.c (remote_debug): Remove declaration.
4948 * remote-utils.c (struct ui_file): Likewise.
4949 (remote_debug): Likewise.
4950 * remote-utils.h (remote_debug): Likewise,
4951 * server.c (remote_debug): Remove definition.
4952
4953 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4954
4955 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4956 when using a 64-bit gdbserver.
4957
4958 2019-04-09 Tom Tromey <tromey@adacore.com>
4959
4960 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4961
4962 2019-04-08 Tom Tromey <tom@tromey.com>
4963
4964 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4965 throw.
4966 (linux_resume_one_lwp): Likewise.
4967
4968 2019-04-08 Tom Tromey <tom@tromey.com>
4969
4970 * gdbreplay.c: Update.
4971 * linux-low.c: Update.
4972 * server.c: Update.
4973
4974 2019-04-08 Tom Tromey <tom@tromey.com>
4975
4976 * server.c: Use C++ exception handling.
4977 * linux-low.c: Use C++ exception handling.
4978 * gdbreplay.c: Use C++ exception handling.
4979
4980 2019-04-08 Tom Tromey <tom@tromey.com>
4981
4982 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4983 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4984 (captured_main, main): Update.
4985 * gdbreplay.c (main): Update.
4986
4987 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4988
4989 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4990 value in argument pointer, return 1 if the entry is found and 0
4991 otherwise. Move comment.
4992 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4993 * linux-low.h (linux_get_auxv): Declare.
4994 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4995
4996 2019-04-05 Tom Tromey <tromey@adacore.com>
4997
4998 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4999 variables.
5000
5001 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5002
5003 * linux-low.c (AT_HWCAP2): Add define if not already included.
5004
5005 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5006
5007 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5008 (aarch64_arch_setup): Call linux_get_hwcap.
5009 * linux-arm-low.c (arm_get_hwcap): Remove function.
5010 (arm_read_description): Call linux_get_hwcap.
5011 * linux-low.c (linux_get_auxv): New function.
5012 (linux_get_hwcap): Likewise.
5013 (linux_get_hwcap2): Likewise.
5014 * linux-low.h (linux_get_hwcap): New declaration.
5015 (linux_get_hwcap2): Likewise.
5016 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5017 (ppc_arch_setup): Call linux_get_hwcap.
5018 * linux-s390-low.c (s390_get_hwcap): Remove function.
5019 (s390_arch_setup): Call linux_get_hwcap.
5020
5021 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5022 Jiong Wang <jiong.wang@arm.com>
5023
5024 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5025 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5026 to fail.
5027 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5028
5029 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5030 Jiong Wang <jiong.wang@arm.com>
5031
5032 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5033 (aarch64_get_hwcap): New function.
5034 (aarch64_arch_setup): Read APIA hwcap.
5035
5036 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5037 Jiong Wang <jiong.wang@arm.com>
5038
5039 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5040 (initialize_low_tracepoint): Likewise.
5041 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5042 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5043 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5044 (aarch64_linux_read_description): Likewise.
5045 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5046
5047 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5048
5049 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5050 i386_create_target_description for 'segments' parameter.
5051 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5052 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5053 * win32-i386-low.c (i386_arch_setup): Likewise.
5054
5055 2019-03-12 Tom Tromey <tromey@adacore.com>
5056
5057 * linux-low.c (iterate_over_lwps): Update.
5058
5059 2019-03-06 Tom Tromey <tom@tromey.com>
5060
5061 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5062 (captured_main): Use SCOPE_EXIT.
5063
5064 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5065
5066 * configure.srv: Use '$enable_unittest' instead of '$development'
5067 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5068 case.
5069
5070 2019-02-27 Tom Tromey <tromey@adacore.com>
5071
5072 * gdbreplay.c (logchar): Handle \r\n.
5073
5074 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5075
5076 * linux-low.c (linux_attach): Add process before lwp.
5077 * server.c (attach_inferior): Check if already attached.
5078
5079 2019-02-07 Tom Tromey <tom@tromey.com>
5080
5081 * x86-tdesc.h: Rename include guard.
5082 * x86-low.h: Add include guard.
5083 * wincecompat.h: Rename include guard.
5084 * win32-low.h: Add include guard.
5085 * utils.h: Rename include guard.
5086 * tracepoint.h: Rename include guard.
5087 * tdesc.h: Rename include guard.
5088 * target.h: Rename include guard.
5089 * server.h: Rename include guard.
5090 * remote-utils.h: Rename include guard.
5091 * regcache.h: Rename include guard.
5092 * nto-low.h: Rename include guard.
5093 * notif.h: Add include guard.
5094 * mem-break.h: Rename include guard.
5095 * lynx-low.h: Add include guard.
5096 * linux-x86-tdesc.h: Add include guard.
5097 * linux-s390-tdesc.h: Add include guard.
5098 * linux-ppc-tdesc-init.h: Add include guard.
5099 * linux-low.h: Add include guard.
5100 * linux-aarch64-tdesc.h: Add include guard.
5101 * linux-aarch32-low.h: Add include guard.
5102 * inferiors.h: Rename include guard.
5103 * i387-fp.h: Rename include guard.
5104 * hostio.h: Rename include guard.
5105 * gdbthread.h: Rename include guard.
5106 * gdb_proc_service.h: Rename include guard.
5107 * event-loop.h: Rename include guard.
5108 * dll.h: Rename include guard.
5109 * debug.h: Rename include guard.
5110 * ax.h: Rename include guard.
5111
5112 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5113
5114 PR gdb/23985
5115 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5116 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5117
5118 2019-01-25 Tom Tromey <tom@tromey.com>
5119
5120 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5121
5122 2019-01-25 Tom Tromey <tom@tromey.com>
5123
5124 * win32-low.c: Fix common/ includes.
5125 * win32-i386-low.c: Fix common/ includes.
5126 * tracepoint.c: Fix common/ includes.
5127 * thread-db.c: Fix common/ includes.
5128 * target.h: Fix common/ includes.
5129 * symbol.c: Fix common/ includes.
5130 * spu-low.c: Fix common/ includes.
5131 * server.h: Fix common/ includes.
5132 * server.c: Fix common/ includes.
5133 * remote-utils.c: Fix common/ includes.
5134 * regcache.h: Fix common/ includes.
5135 * regcache.c: Fix common/ includes.
5136 * nto-x86-low.c: Fix common/ includes.
5137 * notif.h: Fix common/ includes.
5138 * mem-break.h: Fix common/ includes.
5139 * lynx-low.c: Fix common/ includes.
5140 * lynx-i386-low.c: Fix common/ includes.
5141 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5142 * linux-x86-low.c: Fix common/ includes.
5143 * linux-low.c: Fix common/ includes.
5144 * inferiors.h: Fix common/ includes.
5145 * i387-fp.c: Fix common/ includes.
5146 * hostio.c: Fix common/ includes.
5147 * hostio-errno.c: Fix common/ includes.
5148 * gdbthread.h: Fix common/ includes.
5149 * gdbreplay.c: Fix common/ includes.
5150 * fork-child.c: Fix common/ includes.
5151 * event-loop.c: Fix common/ includes.
5152 * ax.c:
5153 (enum gdb_agent_op): Fix common/ includes.
5154
5155 2019-01-21 Tom Tromey <tom@tromey.com>
5156
5157 * tracepoint.c: Fix includes.
5158 * remote-utils.c: Fix includes.
5159 * linux-x86-low.c: Fix includes.
5160
5161 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5162
5163 * gdbreplay.c (gdbreplay_version): Update copyright year in
5164 version message.
5165 * server.c (gdbserver_version): Likewise.
5166
5167 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5168
5169 * linux-low.c (add_lwp): Switch ordering.
5170
5171 2018-11-29 Tom Tromey <tom@tromey.com>
5172
5173 * win32-low.c (win32_join): Take pid, not process.
5174 * target.h (struct target_ops) <join>: Change argument type.
5175 (join_inferior): Change argument name.
5176 * spu-low.c (spu_join): Take pid, not process.
5177 * server.c (handle_detach): Preserve pid before destroying
5178 process.
5179 * lynx-low.c (lynx_join): Take pid, not process.
5180 * linux-low.c (linux_join): Take pid, not process.
5181
5182 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5183
5184 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5185 (aarch64_cannot_fetch_register): Likewise.
5186 (struct linux_target_ops): Update references.
5187
5188 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5189
5190 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5191
5192 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5193
5194 * configure.srv (ipa_ppc_linux_regobj): Add
5195 powerpc-isa207-htm-vsx32l-ipa.o and
5196 powerpc-isa207-htm-vsx64l-ipa.o.
5197 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5198 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5199 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5200 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5201 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5202 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5203 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5204 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5205 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5206 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5207 (init_registers_powerpc_isa207_htm_vsx32l)
5208 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5209 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5210 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5211 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5212 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5213 (ppc_store_tm_ctarregset): New functions.
5214 (ppc_regsets): Add entries for HTM regsets.
5215 (ppc_arch_setup): Set htm in features struct when needed. Set
5216 sizes for the HTM regsets.
5217 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5218 (initialize_low_arch): Call
5219 init_registers_powerpc_isa207_htm_vsx32l and
5220 init_registers_powerpc_isa207_htm_vsx64l.
5221 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5222 PPC_TDESC_ISA207_HTM_VSX.
5223 (initialize_low_tracepoint): Call
5224 init_registers_powerpc_isa207_htm_vsx32l and
5225 init_registers_powerpc_isa207_htm_vsx64l.
5226
5227 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5228
5229 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5230 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5231 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5232 (ppc_store_pmuregset): New functions.
5233 (ppc_regsets): Add entries for ebb and pmu regsets.
5234 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5235 pmu regsets are available. Set sizes for these regsets.
5236
5237 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5238
5239 * configure.srv (ipa_ppc_linux_regobj): Add
5240 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5241 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5242 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5243 rs6000/powerpc-isa207-vsx32l.xml, and
5244 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5245 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5246 <PPC_TDESC_ISA207_VSX>: New enum value.
5247 (init_registers_powerpc_isa207_vsx32l): Declare.
5248 (init_registers_powerpc_isa207_vsx64l): Declare.
5249 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5250 (ppc_store_tarregset): New function.
5251 (ppc_regsets): Add entry for the TAR regset.
5252 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5253 size for the TAR regsets.
5254 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5255 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5256 and init_registers_powerpc_isa207_vsx64l.
5257 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5258 (initialize_low_tracepoint): Call
5259 init_registers_powerpc_isa207_vsx32l and
5260 init_registers_powerpc_isa207_vsx64l.
5261
5262 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5263 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5264
5265 * configure.srv (ipa_ppc_linux_regobj): Add
5266 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5267 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5268 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5269 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5270 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5271 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5272 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5273 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5274 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5275 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5276 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5277 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5278 (ppc_hwcap): Add comment.
5279 (ppc_hwcap2): New global.
5280 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5281 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5282 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5283 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5284 when needed. Set sizes for the the DSCR and PPR regsets.
5285 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5286 (initialize_low_arch): Call
5287 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5288 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5289 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5290 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5291 (initialize_low_tracepoint): Call
5292 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5293 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5294
5295 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5296
5297 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5298
5299 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5300 Simon Marchi <simark@simark.ca>
5301
5302 * acinclude.m4: Include "../selftest.m4".
5303 * configure: Regenerate.
5304 * configure.ac: Use "GDB_AC_SELFTEST".
5305 * configure.srv: Use "$enable_unittests" instead of
5306 "$development" when checking whether unit tests have been
5307 enabled.
5308 * server.c (captured_main): Update message informing that
5309 selftests have been disabled.
5310
5311 2018-10-04 Tom Tromey <tom@tromey.com>
5312
5313 * configure: Rebuild.
5314
5315 2018-10-04 Tom Tromey <tom@tromey.com>
5316
5317 * server.c (handle_status): Rename inner "thread".
5318 (process_serial_event): Declare "res" in 'm' case.
5319 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5320 (iterate_over_lwps): Rename inner "thread".
5321 (linux_qxfer_libraries_svr4): Rename inner "len".
5322 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5323
5324 2018-10-01 Gary Benson <gbenson@redhat.com>
5325
5326 * gdb_proc_service.h: Moved common code to
5327 common/gdb_proc_service.h.
5328
5329 2018-10-01 Gary Benson <gbenson@redhat.com>
5330
5331 * gdb_proc_service.h: Synchronize comments and whitespace with
5332 GDB's version of this file.
5333
5334 2018-09-25 Tom Tromey <tom@tromey.com>
5335
5336 * configure: Rebuild.
5337 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5338
5339 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5340
5341 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5342 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5343 ($(IPA_LIB)): Sort IPA_OBJS.
5344
5345 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5346
5347 * Makefile.in: Remove references to $(ADD_DEPS).
5348
5349 2018-09-16 Tom Tromey <tom@tromey.com>
5350
5351 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5352 variables.
5353 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5354 variables.
5355
5356 2018-09-05 Tom Tromey <tom@tromey.com>
5357
5358 * configure: Rebuild.
5359
5360 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5361
5362 PR build/23399
5363 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5364
5365 2018-08-27 Tom Tromey <tom@tromey.com>
5366
5367 PR build/23087:
5368 * configure: Rebuild.
5369
5370 2018-08-27 Tom Tromey <tom@tromey.com>
5371
5372 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5373 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5374 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5375 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5376 (s390x_emit_stack_adjust): Add casts to unsigned char.
5377
5378 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5379
5380 PR gdb/23374
5381 PR gdb/23375
5382 * server.h (struct client_state) <disable_randomization>:
5383 Initialize to 1.
5384
5385 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5386
5387 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5388 variable.
5389 (mips_supply_ptrace_register): Likewise.
5390
5391 2018-07-22 Tom Tromey <tom@tromey.com>
5392
5393 * configure: Rebuild.
5394
5395 2018-07-22 Tom Tromey <tom@tromey.com>
5396
5397 * win32-low.c (win32_create_inferior): Remove unused variables.
5398 * gdbreplay.c (remote_open): Remove unused variable.
5399 * remote-utils.c (remote_prepare): Remove unused variable.
5400 * x86-tdesc.h (X86_TDESC_H): Define.
5401 (amd64_expedite_regs): Define conditionally.
5402 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5403 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5404 * remote-utils.c (readchar): Remove unused variable.
5405
5406 2018-07-13 Pedro Alves <palves@redhat.com>
5407
5408 * linux-low.c (linux_kill): Change parameter to process_info
5409 pointer instead of pid. Adjust.
5410 * lynx-low.c (lynx_kill): Likewise.
5411 * nto-low.c (nto_kill): Likewise.
5412 * spu-low.c (spu_kill): Likewise.
5413 * win32-low.c (win32_kill): Likewise.
5414 * server.c (handle_v_kill, kill_inferior_callback)
5415 (detach_or_kill_for_exit): Adjust.
5416 * target.c (kill_inferior): Change parameter to process_info
5417 pointer instead of pid. Adjust.
5418 * target.h (struct target_ops) <kill>: Change parameter to
5419 process_info pointer instead of pid. Adjust all implementations
5420 and callers.
5421 (kill_inferior): Likewise.
5422
5423 2018-07-13 Pedro Alves <palves@redhat.com>
5424
5425 * linux-low.c (linux_detach, linux_join): Change parameter to
5426 process_info pointer instead of pid. Adjust.
5427 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5428 * nto-low.c (nto_detach): Likewise.
5429 * spu-low.c (spu_detach, spu_join): Likewise.
5430 * win32-low.c (win32_detach, win32_join): Likewise.
5431 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5432 * target.h (struct target_ops) <detach, join>: Change parameter to
5433 process_info pointer instead of pid. Adjust all implementations
5434 and callers.
5435 (detach_inferior, join_inferior): Rename 'pid' parameter to
5436 'proc'.
5437
5438 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5439 Jan Kratochvil <jan.kratochvil@redhat.com>
5440 Paul Fertser <fercerpav@gmail.com>
5441 Tsutomu Seki <sekiriki@gmail.com>
5442
5443 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5444 (OBS): Add 'common/netstuff.o'.
5445 (GDBREPLAY_OBS): Likewise.
5446 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5447 (remote_open): Implement support for IPv6
5448 connections.
5449 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5450 and 'wspiapi.h'.
5451 (handle_accept_event): Accept connections from IPv6 sources.
5452 (remote_prepare): Handle IPv6-style hostnames; implement
5453 support for IPv6 connections.
5454 (remote_open): Implement support for printing connections from
5455 IPv6 sources.
5456
5457 2018-07-11 Pedro Alves <palves@redhat.com>
5458
5459 PR gdb/23377
5460 * mem-break.c (any_persistent_commands): Add process_info
5461 parameter and use it instead of relying on the current process.
5462 Change return type to bool.
5463 * mem-break.h (any_persistent_commands): Add process_info
5464 parameter and change return type to bool.
5465 * server.c (handle_detach): Remove require_running_or_return call.
5466 Look up the process_info for the process we're about to detach.
5467 If not found, return back error to GDB. Adjust
5468 any_persistent_commands call to pass down a process pointer.
5469
5470 2018-07-11 Pedro Alves <palves@redhat.com>
5471
5472 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5473 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5474 instead of collect_register_by_name.
5475 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5476 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5477
5478 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5479 Pedro Alves <palves@redhat.com>
5480
5481 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5482
5483 2018-07-03 Tom Tromey <tom@tromey.com>
5484
5485 * linux-low.c: Update.
5486 * lynx-low.c: Update.
5487 * mem-break.c: Update.
5488 * nto-low.c: Update.
5489 * remote-utils.c: Update.
5490 * server.c: Update.
5491 * spu-low.c: Update.
5492 * target.c: Update.
5493 * win32-low.c: Update.
5494
5495 2018-07-03 Tom Tromey <tom@tromey.com>
5496
5497 * server.c: Update.
5498
5499 2018-07-03 Tom Tromey <tom@tromey.com>
5500
5501 * linux-low.c: Update.
5502
5503 2018-07-03 Tom Tromey <tom@tromey.com>
5504
5505 * target.c: Update.
5506
5507 2018-07-03 Tom Tromey <tom@tromey.com>
5508
5509 * linux-low.c: Update.
5510 * linux-mips-low.c: Update.
5511 * lynx-low.c: Update.
5512 * nto-low.c: Update.
5513 * remote-utils.c: Update.
5514 * server.c: Update.
5515 * spu-low.c: Update.
5516 * target.c: Update.
5517 * thread-db.c: Update.
5518
5519 2018-07-03 Tom Tromey <tom@tromey.com>
5520
5521 * linux-low.c: Update.
5522 * linux-mips-low.c: Update.
5523 * lynx-low.c: Update.
5524 * mem-break.c: Update.
5525 * nto-low.c: Update.
5526 * remote-utils.c: Update.
5527 * server.c: Update.
5528 * spu-low.c: Update.
5529 * target.c: Update.
5530 * tracepoint.c: Update.
5531
5532 2018-07-03 Tom Tromey <tom@tromey.com>
5533
5534 * linux-low.c: Update.
5535 * linux-ppc-low.c: Update.
5536 * linux-x86-low.c: Update.
5537 * proc-service.c: Update.
5538 * server.c: Update.
5539 * spu-low.c: Update.
5540 * thread-db.c: Update.
5541 * win32-low.c: Update.
5542
5543 2018-07-03 Tom Tromey <tom@tromey.com>
5544
5545 * linux-low.c: Update.
5546 * lynx-low.c: Update.
5547 * nto-low.c: Update.
5548 * remote-utils.c: Update.
5549 * spu-low.c: Update.
5550 * thread-db.c: Update.
5551 * win32-low.c: Update.
5552
5553 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5554
5555 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5556 parameter in call to 'amd64_create_target_description'.
5557
5558 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5559
5560 * x86-tdesc.h: Remove executable permission flag.
5561
5562 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5563
5564 * configure.ac: Remove AC_PREREQ, add missing quoting.
5565 * configure: Re-generate.
5566 * config.in: Re-generate.
5567 * aclocal.m4: Re-generate.
5568
5569 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5570
5571 * tracepoint.h (current_traceframe): Remove declaration.
5572
5573 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5574
5575 * linux-aarch64-low.c (is_sve_tdesc): New function.
5576 (aarch64_sve_regs_copy_to_regcache): Likewise.
5577 (aarch64_sve_regs_copy_from_regcache): Likewise.
5578 (aarch64_regs_info): Add SVE checks.
5579 (initialize_low_arch): Initialize SVE.
5580
5581 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5582
5583 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5584
5585 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5586
5587 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5588 (initialize_low_tracepoint): Likewise
5589 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5590 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5591 param.
5592 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5593 checks.
5594 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5595
5596 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5597
5598 * server.h (PBUFSIZ): Increase size
5599
5600 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5601
5602 * regcache.c (regcache::raw_compare): New function.
5603 * regcache.h (regcache::raw_compare): New declaration.
5604
5605 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5606
5607 * regcache.c (new_register_cache): Use new.
5608 (free_register_cache): Use delete.
5609 (register_data): Use const.
5610 (supply_register): Move body inside regcache.
5611 (regcache::raw_supply): New override function.
5612 (collect_register): Move body inside regcache.
5613 (regcache::raw_collect): New override function.
5614 (regcache::get_register_status): New override function.
5615 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5616
5617 2018-06-09 Tom Tromey <tom@tromey.com>
5618
5619 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5620 declare queue.
5621 (event_queue): Use std::queue.
5622 (gdb_event_xfree): Remove.
5623 (initialize_event_loop, process_event, wait_for_event): Update.
5624
5625 2018-06-08 Stan Cox <scox@redhat.com>
5626
5627 * win32-low.c (win32_create_inferior): last_ptid and last_status
5628 moved to client_state.
5629
5630 2018-06-08 Pedro Alves <palves@redhat.com>
5631
5632 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5633 common/common-exceptions.o, common/common-utils.o,
5634 common/errors.o, common/print-utils.o and utils.o.
5635 * gdbreplay.c: Include "common-defs.h" instead of the two
5636 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5637 string.h or alloca.h.
5638 (perror_with_name): Delete.
5639 (remote_open): Use xstrdup instead of strdup.
5640 (main): Rename to ...
5641 (captured_main): ... this.
5642 (main): New.
5643
5644 2018-06-08 Tom Tromey <tom@tromey.com>
5645
5646 * linux-low.c (linux_low_read_btrace): Update.
5647
5648 2018-06-04 Stan Cox <scox@redhat.com>
5649
5650 * server.h (struct client_state): New.
5651 * server.c (cont_thread, general_thread, multi_process)
5652 (report_fork_events, report_vfork_events, report_exec_events)
5653 (report_thread_events, swbreak_feature, hwbreak_feature)
5654 (vCont_supported, disable_randomization, pass_signals)
5655 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5656 Moved to client_state.
5657 * remote-utils.c (remote_debug, noack_mode)
5658 (transport_is_reliable): Moved to client_state.
5659 * tracepoint.c (current_traceframe): Moved to client_state.
5660
5661 Update all callers.
5662 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5663 linux-low.c, remote-utils.h, target.c: Use client_state.
5664
5665 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5666
5667 * configure.srv: Add new c/h file.
5668
5669 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5670
5671 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5672 null VQ.
5673
5674 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5675
5676 * gdb.arch/mips-fpregset-core.exp: New test.
5677 * gdb.arch/mips-fpregset-core.c: New test source.
5678
5679 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5680
5681 PR server/23198
5682 * hostio.c (require_int): Do not report overflow for integers
5683 between 0xfffffff and 0x7fffffff.
5684
5685 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5686
5687 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5688 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5689 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5690 functions.
5691 (the_low_target): Wire them.
5692
5693 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5694
5695 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5696 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5697 mode. Call collect_register_by_name with vscr using
5698 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5699 (ppc_store_vrregset): Add and set vscr_offset variable as in
5700 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5701 vscr_offset.
5702
5703 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5704
5705 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5706 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5707 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5708
5709 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5710
5711 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5712 (ppc_store_vsxregset): Likewise.
5713 (ppc_fill_vrregset): Likewise.
5714 (ppc_store_vrregset): Likewise.
5715 (ppc_fill_evrregset): Likewise.
5716 (ppc_store_evrregset): Likewise.
5717 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5718 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5719 needed.
5720
5721 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5722
5723 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5724 wordsize of the inferior. Call ppc_linux_target_wordsize.
5725
5726 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5727
5728 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5729 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5730 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5731 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5732 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5733 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5734 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5735 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5736 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5737 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5738 (tdesc_powerpc_e500l): Remove.
5739 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5740 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5741 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5742 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5743 linux-ppc-tdesc.h.
5744 (ppc_arch_setup): Remove target description matching code. Fill a
5745 ppc_linux_features struct and call ppc_linux_match_description
5746 with it.
5747
5748 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5749
5750 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5751 width of the requested register exceeds the width of the
5752 `ptrace' data type.
5753 (mips_cannot_store_register): Likewise.
5754
5755 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5756
5757 * linux-mips-low.c (mips_fetch_register): New function. Update
5758 preceding comment.
5759 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5760 (the_low_target): Wire `mips_fetch_register'.
5761
5762 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5763
5764 * lynx-i386-low.c (LYNXOS_178): New macro.
5765 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5766 the layout on LynxOS-178.
5767 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5768 handle floating point registers that are not supported by
5769 LynxOS-178.
5770
5771 2018-05-10 Tom Tromey <tom@tromey.com>
5772
5773 * configure: Rebuild.
5774
5775 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5776
5777 PR server/23158:
5778 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5779 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5780 Use it to set the expedite_regs field in the given tdesc.
5781 * x86-tdesc.h: New file.
5782 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5783 Adjust following the addition of the new expedite_regs parameter
5784 to init_target_desc.
5785 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5786 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5787 (i386_linux_read_description, amd64_linux_read_description):
5788 Adjust following the addition of the new expedite_regs parameter
5789 to init_target_desc.
5790 * lynx-i386-low.c: #include "x86-tdesc.h".
5791 (lynx_i386_arch_setup): Adjust following the addition of the new
5792 expedite_regs parameter to init_target_desc.
5793 * nto-x86-low.c: #include "x86-tdesc.h".
5794 (nto_x86_arch_setup): Adjust following the addition of the new
5795 expedite_regs parameter to init_target_desc.
5796 * win32-i386-low.c: #include "x86-tdesc.h".
5797 (i386_arch_setup): Adjust following the addition of the new
5798 expedite_regs parameter to init_target_desc.
5799
5800 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5801
5802 PR server/23158:
5803 * win32-low.c (win32_create_inferior): Add call to my_wait
5804 setting last_status global.
5805
5806 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5807
5808 PR server/23158:
5809 * win32-low.c (create_process): Only call gdb_tilde_expand if
5810 inferior_cwd is not NULL.
5811
5812 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5813
5814 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5815 registers to the cache if their values have changed.
5816 (i387_xsave_to_cache): Provide default values for x87 control
5817 registers when these features are available, but disabled.
5818 * regcache.c (supply_register_by_name_zeroed): New function.
5819 * regcache.h (supply_register_by_name_zeroed): Declare new
5820 function.
5821
5822 2018-05-07 Tom Tromey <tom@tromey.com>
5823
5824 * configure: Rebuild.
5825
5826 2018-05-04 Tom Tromey <tom@tromey.com>
5827
5828 * configure: Rebuild.
5829
5830 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5831 Pedro Alves <palves@redhat.com>
5832
5833 * linux-aarch64-low.c (aarch64_stopped_data_address):
5834 Likewise.
5835
5836 2018-04-27 Tom Tromey <tom@tromey.com>
5837
5838 * configure: Rebuild.
5839
5840 2018-04-23 Tom Tromey <tom@tromey.com>
5841
5842 * configure: Rebuild.
5843
5844 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5845
5846 * Makefile.in (depcomp): Add "..".
5847 (all_deps_files): New and use it.
5848
5849 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5850
5851 * configure.srv (aarch64*-*-linux*): Don't include xml.
5852 (i[34567]86-*-cygwin*): Likewise.
5853 (i[34567]86-*-linux*): Likewise.
5854 (i[34567]86-*-lynxos*): Likewise.
5855 (i[34567]86-*-mingw32ce*): Likewise.
5856 (i[34567]86-*-mingw*): Likewise.
5857 (i[34567]86-*-nto*): Likewise.
5858 (tic6x-*-uclinux): Likewise.
5859 (x86_64-*-linux*): Likewise.
5860 (x86_64-*-mingw*): Likewise.
5861 (x86_64-*-cygwin*): Likewise.
5862
5863 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5864
5865 * tdesc.c: Remove xml parameter.
5866
5867 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5868
5869 * server.c (get_features_xml): Remove cast.
5870 * tdesc.c (void target_desc::accept): Fill in function.
5871 (tdesc_get_features_xml): Remove old xml creation.
5872 (print_xml_feature::visit_pre): Add xml vistor.
5873 * tdesc.h (struct target_desc): Make xmltarget mutable.
5874 (tdesc_get_features_xml): Remove declaration.
5875
5876 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5877
5878 * tdesc.c (tdesc_architecture_name): Add new function.
5879 (tdesc_osabi_name): Likewise.
5880 (tdesc_get_features_xml): Use new functions.
5881
5882 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5883
5884 * tdesc.c (tdesc_create_flags): Remove.
5885 (tdesc_add_flag): Likewise.
5886 (tdesc_named_type): Likewise.
5887 (tdesc_create_union): Likewise.
5888 (tdesc_create_struct): Likewise.
5889 (tdesc_create_vector): Likewise.
5890 (tdesc_add_bitfield): Likewise.
5891 (tdesc_add_field): Likewise.
5892 (tdesc_set_struct_size): Likewise.
5893
5894 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5895
5896 * tdesc.c (~target_desc): Remove implictly deleted items.
5897 (init_target_desc): Iterate all features.
5898 (tdesc_get_features_xml): Use vector.
5899 (tdesc_create_feature): Create feature.
5900 * tdesc.h (tdesc_feature) Remove
5901 (target_desc): Add features.
5902
5903 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5904
5905 * Makefile.in: Add common/tdesc.c
5906 * tdesc.c (init_target_desc): init all reg_defs from register
5907 vector.
5908 (tdesc_create_reg): Create tdesc_reg.
5909 * tdesc.h (tdesc_feature): Add register vector.
5910
5911 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5912
5913 * tdesc.h (struct target_desc) <features>: Change type to
5914 std::vector<std::string>.
5915 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5916 changes.
5917 (tdesc_get_features_xml): Likewise.
5918 (tdesc_create_feature): Likewise.
5919
5920 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5921
5922 * regcache.c (find_register_by_number): Return a ref.
5923 (find_regno): Use references.
5924 (register_size): Likewise.
5925 (register_data): Likewise.
5926 * tdesc.c (target_desc::~target_desc): Remove free calls.
5927 (target_desc::operator==): Use std::vector compare.
5928 (init_target_desc): Use reference.
5929 (tdesc_create_reg): Use reg constructors.
5930 * tdesc.h (struct target_desc): Replace pointer with object.
5931
5932 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5933
5934 * regcache.c (find_register_by_number): Make static.
5935 (find_regno): Use find_register_by_number
5936 * regcache.h (struct reg): Remove declaration.
5937
5938 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5939
5940 * tdesc.c (target_desc::~target_desc): Move to here.
5941 (target_desc::operator==): Likewise.
5942 * tdesc.h (target_desc::~target_desc): Move from here.
5943 (target_desc::operator==): Likewise.
5944
5945 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5946
5947 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5948
5949 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5950
5951 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5952 S390_TDESC_GS.
5953 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5954 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5955 and init_registers_s390_gs_linux64.
5956
5957 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5958
5959 * linux-s390-low.c (s390_fill_gs): Remove function.
5960 (s390_fill_gsbc): Remove function.
5961 (s390_regsets): Set fill functions for the guarded storage regsets
5962 to NULL.
5963
5964 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5965
5966 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5967 the word size. Add comment.
5968 (s390_get_wordsize): New function.
5969 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5970 pswm with it. Instead, use s390_get_wordsize to determine the
5971 word size first and derive the correct tdesc from that directly.
5972
5973 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5974
5975 * Makefile.in: Include silent-rules.mk.
5976 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5977 (COMPILE): Add ECHO_CXX.
5978 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5979 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5980 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5981 (version-generated.c): Add ECHO_GEN.
5982 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5983 (IPAGENT_COMPILE): Add ECHO_CXX.
5984 (%-generated.c): Add ECHO_REGDAT.
5985
5986 2018-03-14 Tom Tromey <tom@tromey.com>
5987
5988 PR cli/14977:
5989 * ax.c (ax_printf): Special case for NULL.
5990
5991 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5992
5993 * linux-low.c (linux_qxfer_libraries_svr4): Use
5994 xml_escape_text_append.
5995
5996 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5997
5998 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5999
6000 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6001
6002 * server.c (handle_general_set): Remove unnecessary xstrdup.
6003
6004 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6005
6006 * server.c (parse_debug_format_options): Adjust to
6007 delim_string_to_char_ptr_vec changes.
6008 * thread-db.c (thread_db_load_search): Adjust to
6009 dirnames_to_char_ptr_vec changes.
6010
6011 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6012
6013 * target.h (target_enable_btrace, target_disable_btrace)
6014 (target_read_btrace, target_read_btrace_conf): Turn macro into
6015 inline function. Throw error if target method is not defined.
6016 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6017 check for btrace target method. Be prepared to handle exceptions
6018 from btrace target methods.
6019
6020 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6021
6022 * server.c (captured_main): Change order of error message printed
6023 when the current working directory cannot be found.
6024
6025 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6026
6027 * server.c: Include "filenames.h" and "pathstuff.h".
6028 (program_name): Delete variable.
6029 (program_path): New anonymous class.
6030 (get_exec_wrapper): Use "program_path" instead of
6031 "program_name".
6032 (handle_v_run): Likewise.
6033 (captured_main): Likewise.
6034 (process_serial_event): Likewise.
6035
6036 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6037
6038 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6039 (OBJS): Add "pathstuff.o".
6040 * server.c (current_directory): New global variable.
6041 (captured_main): Initialize "current_directory".
6042
6043 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6044
6045 * tdesc.c: Use common/tdesc.h.
6046 * tdesc.h: Likewise.
6047
6048 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6049 Simon Marchi <simon.marchi@ericsson.com>
6050
6051 * Makefile.in: Switch order of make rules.
6052
6053 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6054
6055 * Makefile.in: Add common directory in build.
6056 * configure.ac: Add common reference.
6057 * configure: Regenerate.
6058
6059 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6060
6061 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6062 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6063 * spu-low.c (spu_target_ops): Likewise.
6064 * win32-low.c (win32_target_ops): Likewise.
6065 * server.c (supported_btrace_packets): Report packets unconditionally.
6066 * target.h (target_ops) <supports_btrace>: Remove.
6067 (target_supports_btrace): Remove.
6068
6069 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6070
6071 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6072 (handle_btrace_disable): Change return type to void. Use exceptions
6073 to report errors.
6074 (handle_btrace_general_set): Catch exception and copy message to
6075 return message.
6076
6077 2018-02-08 Tom Tromey <tom@tromey.com>
6078
6079 * linux-low.c (install_software_single_step_breakpoints): Use
6080 make_scoped_restore.
6081 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6082 (do_restore_current_thread_cleanup): Remove.
6083 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6084 declare.
6085
6086 2018-02-08 Tom Tromey <tom@tromey.com>
6087
6088 * mem-break.c (set_raw_breakpoint_at): Use
6089 gdb::unique_xmalloc_ptr.
6090
6091 2018-01-30 Pedro Alves <palves@redhat.com>
6092
6093 PR gdb/13211
6094 * target.c (target_terminal::terminal_state): Rename to ...
6095 (target_terminal::m_terminal_state): ... this.
6096
6097 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6098
6099 * linux-low.c (handle_extended_wait): Surround call to
6100 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6101
6102 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6103
6104 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6105 linux_ptrace_attach_fail_reason_string now returning an
6106 std::string.
6107 (linux_attach): Likewise.
6108 * thread-db.c (attach_thread): Likewise.
6109
6110 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6111
6112 PR gdb/21559
6113 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6114 checking for fs_base/gs_base fields in struct user_regs_struct.
6115 * configure: Regenerate.
6116
6117 2018-01-16 Yao Qi <yao.qi@linaro.org>
6118
6119 PR gdb/18749
6120 * linux-low.c (fetch_register): Call supply_register instead of
6121 error.
6122
6123 2018-01-08 Yao Qi <yao.qi@linaro.org>
6124 Simon Marchi <simon.marchi@ericsson.com>
6125
6126 * Makefile.in (OBS): Remove selftest.o.
6127 * configure.ac: Set srv_selftest_objs if $development is true.
6128 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6129 * configure: Re-generated.
6130 * server.c (captured_main): Wrap variable selftest_filter with
6131 GDB_SELF_TEST.
6132
6133 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6134
6135 * server.c (parse_debug_format_options): Return std::string.
6136 (handle_monitor_command, captured_main): Adjust.
6137
6138 2018-01-05 Pedro Alves <palves@redhat.com>
6139
6140 PR gdb/18653
6141 * server.c (captured_main): Pass quiet=false to
6142 save_original_signals_state.
6143
6144 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6145
6146 * gdbreplay.c (gdbreplay_version): Update copyright year in
6147 version message.
6148 * server.c (gdbserver_version): Likewise.
6149
6150 2017-12-08 Tom Tromey <tom@tromey.com>
6151
6152 * ax.c (ax_printf): Update.
6153
6154 2017-12-07 Yao Qi <yao.qi@linaro.org>
6155
6156 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6157 aarch64_linux_read_description.
6158 * linux-amd64-ipa.c (idx2mask): New array.
6159 (get_ipa_tdesc): Move idx2mask out.
6160 (initialize_low_tracepoint): Initialize target descriptions.
6161 * linux-i386-ipa.c (idx2mask): New array.
6162 (get_ipa_tdesc): Move idx2mask out.
6163 (initialize_low_tracepoint): Initialize target descriptions.
6164
6165 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6166
6167 * tdesc.c (struct tdesc_type): Change return type.
6168 (tdesc_add_flag): Change parameter type.
6169 (tdesc_add_bitfield): Likewise.
6170 (tdesc_add_field): Likewise.
6171 (tdesc_set_struct_size): Likewise.
6172
6173 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6174
6175 * regcache.c (registers_to_string): Remove unused variable.
6176
6177 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6178
6179 * inferiors.c (for_each_inferior_with_data): Remove.
6180 * inferiors.h (for_each_inferior_with_data): Remove.
6181 * server.c (handle_qxfer_threads_worker): Change parameter type.
6182 (handle_qxfer_threads_proper): Use for_each_thread.
6183
6184 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6185
6186 * inferiors.c (for_each_inferior): Remove.
6187 (clear_inferiors): Use for_each_thread.
6188 * inferiors.h (for_each_inferior): Remove.
6189 * linux-low.c (linux_wait_for_event_filtered): Use
6190 for_each_thread.
6191 (linux_stabilize_threads): Likewise.
6192 * regcache.c (regcache_release): Likewise.
6193 * server.c (gdb_wants_all_threads_stopped): Likewise.
6194 (clear_pending_status_callback): Remove.
6195 (handle_status): Use for_each_thread.
6196 (captured_main): Likewise.
6197 * win32-low.c (child_init_thread_list): Likewise.
6198 (win32_clear_inferiors): Likewise.
6199 (fake_breakpoint_event): Likewise.
6200
6201 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6202
6203 * inferiors.h (find_inferior): Remove.
6204 * inferiors.c (find_inferior): Remove.
6205
6206 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6207
6208 * linux-low.c (resume_status_pending_p): Update comment.
6209 (need_step_over_p): Update comment.
6210
6211 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6212
6213 * linux-low.c (proceed_one_lwp): Return void, change parameter
6214 type.
6215 (unsuspend_and_proceed_one_lwp): Likewise.
6216 (proceed_all_lwps): Use for_each_thread.
6217 (unstop_all_lwps): Likewise.
6218
6219 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6220
6221 * linux-low.c (linux_resume_one_thread): Return void, take
6222 parameter directly.
6223 (linux_resume): Use for_each_thread.
6224
6225 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6226
6227 * linux-low.c (send_sigstop_callback): Return void, change
6228 parameter type. Rename to...
6229 (send_sigstop): ... this.
6230 (suspend_and_send_sigstop_callback): Return void, change parameter
6231 type. Rename to...
6232 (suspend_and_send_sigstop): ... this.
6233 (stop_all_lwps): Use for_each_thread.
6234
6235 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6236
6237 * linux-low.c (lwp_running): Return bool, remove unused
6238 argument.
6239 (linux_stabilize_threads): Use find_thread.
6240
6241 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6242
6243 * linux-low.c (select_singlestep_lwp_callback): Remove.
6244 (count_events_callback): Remove.
6245 (select_event_lwp_callback): Remove.
6246 (select_event_lwp): Use find_thread/for_each_thread.
6247
6248 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6249
6250 * linux-low.c (not_stopped_callback): Return bool, take filter
6251 argument directly.
6252 (linux_wait_for_event_filtered): Use find_thread.
6253 (linux_wait_1): Likewise.
6254
6255 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6256
6257 * linux-low.c (same_lwp): Remove.
6258 (find_lwp_pid): Use find_thread.
6259
6260 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6261
6262 * linux-low.c (delete_lwp_callback): Remove.
6263 (linux_mourn): Use for_each_thread.
6264
6265 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6266
6267 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6268 args parameter, don't check for pid.
6269 (linux_detach): Use for_each_thread.
6270
6271 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6272
6273 * linux-low.c (struct counter): Remove.
6274 (second_thread_of_pid_p): Remove.
6275 (last_thread_of_process_p): Use find_thread.
6276
6277 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6278
6279 * inferiors.c (find_inferior_in_random): Remove.
6280 * inferiors.h (find_inferior_in_random): Remove.
6281 * linux-low.c (status_pending_p_callback): Return bool, accept
6282 parameter ptid directly.
6283 (linux_wait_for_event_filtered): Use find_thread_in_random.
6284 (linux_wait_1): Likewise.
6285
6286 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6287
6288 * inferiors.c (find_inferior_id): Remove.
6289 (find_thread_ptid): Move implemention from find_inferior_id to
6290 here.
6291 * inferiors.h (find_inferior_id): Remove.
6292 * server.c (handle_status): Use find_thread_ptid.
6293 (process_serial_event): Likewise.
6294 * thread-db.c (find_one_thread): Likewise.
6295 (thread_db_thread_handle): Likewise.
6296 * win32-low.c (thread_rec): Likewise.
6297 (child_delete_thread): Likewise.
6298 (win32_thread_alive): Likewise.
6299 (get_child_debug_event): Likewise.
6300
6301 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6302
6303 * linux-mips-low.c (update_watch_registers_callback): Return
6304 void, remove pid_p parameter, don't check for pid.
6305 (mips_insert_point, mips_remove_point): Use for_each_thread.
6306
6307 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6308
6309 * lynx.low (lynx_delete_thread_callback): Remove.
6310 (lynx_mourn): Use for_each_thread.
6311
6312 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6313
6314 * regcache.c (regcache_invalidate_one): Remove.
6315 (regcache_invalidate_pid): use for_each_thread.
6316
6317 2017-11-26 Tom Tromey <tom@tromey.com>
6318
6319 * linux-low.c (linux_create_inferior): Update.
6320
6321 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6322
6323 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6324
6325 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6326
6327 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6328 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6329 * linux-aarch64-tdesc-selftest.c: New file.
6330 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6331
6332 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6333
6334 * configure.srv: Add new file.
6335 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6336 * linux-aarch64-tdesc-selftest.c: New file.
6337 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6338
6339 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6340
6341 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6342 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6343 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6344
6345 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6346
6347 * configure.srv: Add new files.
6348 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6349 aarch64_linux_read_description.
6350 * linux-aarch64-low.c (aarch64_linux_read_description):
6351 Merge with aarch64_arch_setup.
6352 (aarch64_arch_setup): Call aarch64_linux_read_description.
6353 * linux-aarch64-tdesc.c: New file.
6354 * linux-aarch64-tdesc.h: New file.
6355
6356 2017-11-24 Yao Qi <yao.qi@linaro.org>
6357
6358 * configure.srv: Set $srv_regobj for tic6x-linux.
6359 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6360 (tic6x_read_description): Move some code to tic6x_arch_setup.
6361 (tic6x_tdesc_test): New function.
6362 (initialize_low_arch): Call selftests::register_test.
6363
6364 2017-11-22 Yao Qi <yao.qi@linaro.org>
6365
6366 * remote-utils.c (prepare_resume_reply): Use memcpy.
6367
6368 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6369
6370 * linux-low.c (kill_one_lwp_callback): Return void, take
6371 argument directly, don't filter on pid.
6372 (linux_kill): Use for_each_thread.
6373
6374 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6375
6376 * linux-low.c (need_step_over_p): Return bool, remove dummy
6377 argument.
6378 (linux_resume, proceed_all_lwps): Use find_thread.
6379
6380 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6381
6382 * linux-low.c (resume_status_pending_p): Return bool, remove
6383 flag_p argument.
6384 (linux_resume): Use find_thread.
6385
6386 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6387
6388 * linux-low.c (struct thread_resume_array): Remove.
6389 (linux_set_resume_request): Return void, take arguments
6390 directly.
6391 (linux_resume): Use for_each_thread.
6392
6393 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6394
6395 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6396 return bool, remove data argument.
6397 (linux_stabilize_threads): Use find_thread.
6398
6399 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6400
6401 * linux-low.c (unsuspend_one_lwp): Remove.
6402 (unsuspend_all_lwps): Use for_each_thread, inline code from
6403 unsuspend_one_lwp.
6404
6405 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6406
6407 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6408 * linux-low.c (struct iterate_over_lwps_args): Remove.
6409 (iterate_over_lwps_filter): Remove.
6410 (iterate_over_lwps): Use find_thread.
6411
6412 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6413
6414 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6415 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6416 code from reset_lwp_ptrace_options_callback.
6417
6418 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6419
6420 * linux-arm-low.c (struct update_registers_data): Remove.
6421 (update_registers_callback): Return void, take arguments
6422 directly, don't check thread's pid.
6423 (arm_insert_point, arm_remove_point): Use for_each_thread.
6424
6425 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6426
6427 * win32-low.c (continue_one_thread): Return void, take argument
6428 directly.
6429 (child_continue): Use for_each_thread.
6430
6431 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6432
6433 * win32-i386-low.c (update_debug_registers_callback): Rename
6434 to ...
6435 (update_debug_registers): ... this, return void, remove pid_p arg.
6436 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6437
6438 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6439
6440 * inferiors.h (struct process_info): Add constructor, initialize
6441 fields..
6442 <syscalls_to_catch>: Change type to std::vector<int>.
6443 * inferiors.c (add_process): Allocate process_info with new.
6444 (remove_process): Free process_info with delete.
6445 * linux-low.c (handle_extended_wait): Adjust.
6446 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6447 * server.c (handle_general_set): Adjust.
6448
6449 2017-11-16 Pedro Alves <palves@redhat.com>
6450
6451 * remote-utils.c (remote_close): Block SIGIO signals instead of
6452 uninstalling the SIGIO handler.
6453
6454 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6455
6456 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6457
6458 2017-11-16 Yao Qi <yao.qi@linaro.org>
6459
6460 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6461 (tic6x_store_gregset): Likewise.
6462 (tic6x_usrregs_info): Move it up.
6463
6464 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6465
6466 * Makefile.in: Update arch rules.
6467 * configure.srv: Explicitly mark arch/ files.
6468
6469 2017-11-13 Andreas Schwab <schwab@suse.de>
6470
6471 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6472 function.
6473 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6474
6475 2017-11-06 Pedro Alves <palves@redhat.com>
6476
6477 * config.in, configure: Regenerate.
6478
6479 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6480
6481 * target.c (struct thread_search): Remove.
6482 (thread_search_callback): Remove.
6483 (prepare_to_access_memory): Use for_each_thread instead of
6484 find_inferior. Inline code from thread_search_callback.
6485
6486 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6487
6488 * server.c (struct visit_actioned_threads_data): Remove.
6489 (visit_actioned_threads): Change prototype to take arguments
6490 directly.
6491 (resume): Use find_thread instead of find_inferior.
6492
6493 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6494
6495 * server.c (queue_stop_reply_callback): Change prototype, return
6496 void.
6497 (find_status_pending_thread_callback): Remove.
6498 (handle_status): Replace find_inferior with find_thread and
6499 for_each_thread.
6500
6501 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6502
6503 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6504 with REGNO.
6505 (aarch64_store_gregset): Likewise.
6506 (aarch64_fill_fpregset): Likewise.
6507 (aarch64_store_fpregset): Likewise.
6508
6509 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6510
6511 * gdbthread.h (find_thread, for_each_thread): New functions.
6512 * inferiors.c (thread_of_pid): Remove.
6513 (find_any_thread_of_pid): Use find_thread.
6514 * linux-low.c (num_lwps): Use for_each_thread.
6515
6516 2017-10-17 Yao Qi <yao.qi@linaro.org>
6517
6518 * Makefile.in: Remove one rule.
6519 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6520
6521 2017-10-17 Yao Qi <yao.qi@linaro.org>
6522
6523 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6524 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6525
6526 2017-10-17 Yao Qi <yao.qi@linaro.org>
6527
6528 * configure.srv: Rename arm.o with arch/arm.o.
6529
6530 2017-10-17 Yao Qi <yao.qi@linaro.org>
6531
6532 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6533 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6534 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6535 (arch-i386.o, arch-amd64.o): Remove rules.
6536 (arch/%.o): New rule.
6537 Update POSTCOMPILE and COMPILE.pre.
6538 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6539 * configure: Re-generated.
6540 * configure.srv: Replace arch-i386.o with arch/i386.o.
6541 Replace arch-amd64.o with arch/amd64.o.
6542
6543 2017-10-16 Yao Qi <yao.qi@linaro.org>
6544
6545 * configure: Regenerated.
6546
6547 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6548
6549 * inferiors.h: (struct inferior_list): Remove.
6550 (struct inferior_list_entry); Remove.
6551 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6552 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6553 get_first_inferior): Remove.
6554 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6555 find_inferior_id, find_inferior_in_random): Change signature.
6556 * inferiors.c (all_threads): Change type to
6557 std::list<thread_info *>.
6558 (get_thread): Remove macro.
6559 (find_inferior, find_inferior_id): Change signature, implement
6560 using find_thread.
6561 (find_inferior_in_random): Change signature, implement using
6562 find_thread_in_random.
6563 (for_each_inferior, for_each_inferior_with_data): Change
6564 signature, implement using for_each_thread.
6565 (add_inferior_to_list, remove_inferior): Remove.
6566 (add_thread, get_first_thread, thread_of_pid,
6567 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6568 (get_first_inferior, one_inferior_p, clear_inferior_list):
6569 Remove.
6570 (clear_inferiors, get_thread_process): Update.
6571 * gdbthread.h: Include <list>.
6572 (struct thread_info) <entry>: Remove field.
6573 <id>: New field.
6574 (all_threads): Change type to std::list<thread_info *>.
6575 (get_first_inferior): Add doc.
6576 (find_thread, for_each_thread, find_thread_in_random): New
6577 functions.
6578 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6579 * linux-arm-low.c (update_registers_callback): Update.
6580 * linux-low.c (second_thread_of_pid_p): Update.
6581 (kill_one_lwp_callback, linux_detach_lwp_callback,
6582 delete_lwp_callback, status_pending_p_callback, same_lwp,
6583 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6584 iterate_over_lwps, not_stopped_callback,
6585 resume_stopped_resumed_lwps, count_events_callback,
6586 select_singlestep_lwp_callback, select_event_lwp_callback,
6587 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6588 suspend_and_send_sigstop_callback, wait_for_sigstop,
6589 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6590 lwp_running, linux_set_resume_request, resume_status_pending_p,
6591 need_step_over_p, start_step_over, linux_resume_one_thread,
6592 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6593 reset_lwp_ptrace_options_callback): Update.
6594 * linux-mips-low.c (update_watch_registers_callback): Update.
6595 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6596 Update.
6597 (free_register_cache_thread_one): Remove.
6598 (regcache_release): Update.
6599 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6600 handle_qxfer_threads_worker): Update.
6601 (handle_query): Update, use list iterator.
6602 (visit_actioned_threads, handle_pending_status,
6603 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6604 clear_pending_status_callback, set_pending_status_callback,
6605 find_status_pending_thread_callback, handle_status,
6606 process_serial_event): Update.
6607 * target.c (thread_search_callback): Update.
6608 * thread-db.c (thread_db_get_tls_address): Update.
6609 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6610 Update.
6611 * win32-i386-low.c (update_debug_registers_callback): Update.
6612 * win32-low.c (delete_thread_info, child_delete_thread,
6613 continue_one_thread, suspend_one_thread,
6614 get_child_debug_event): Adjust.
6615
6616 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6617
6618 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6619 * inferiors.h: Include <list>.
6620 (struct process_info) <entry>: Remove field.
6621 <pid>: New field.
6622 (pid_of): Change macro to function.
6623 (ptid_of, lwpid_of): Remove macro.
6624 (all_processes): Change type to std::list<process_info *>.
6625 (ALL_PROCESSES): Remove macro.
6626 (for_each_process, find_process): New function.
6627 * inferiors.c (all_processes): Change type to
6628 std::list<process_info *>.
6629 (find_thread_process): Adjust.
6630 (add_process): Likewise.
6631 (remove_process): Likewise.
6632 (find_process_pid): Likewise.
6633 (get_first_process): Likewise.
6634 (started_inferior_callback): Remove.
6635 (have_started_inferiors_p): Adjust.
6636 (attached_inferior_callback): Remove.
6637 (have_attached_inferiors_p): Adjust.
6638 * linux-low.c (check_zombie_leaders): Likewise.
6639 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6640 (x86_linux_update_xmltarget): Adjust.
6641 * server.c (handle_query): Likewise.
6642 (gdb_reattached_process): Remove.
6643 (handle_status): Adjust.
6644 (kill_inferior_callback): Likewise.
6645 (detach_or_kill_inferior): Remove.
6646 (print_started_pid): Likewise.
6647 (print_attached_pid): Likewise.
6648 (detach_or_kill_for_exit): Update.
6649 (process_serial_event): Likewise.
6650 * linux-arm-low.c (arm_new_fork): Likewise.
6651
6652 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6653
6654 * dll.h: Include <list>.
6655 (struct dll_info): Add constructor.
6656 <entry>: Remove field.
6657 (all_dlls): Change type to std::list<dll_info>.
6658 * dll.c: Include <algorithm>.
6659 (get_dll): Remove macro.
6660 (all_dlls): Change type to std::list<dll_info *>.
6661 (free_one_dll): Remove.
6662 (match_dll): Likewise.
6663 (loaded_dll): Adjust.
6664 (unloaded_dll): Adjust to all_dlls type change, use
6665 std::find_if. Inline code from match_dll.
6666 (clear_dlls): Adjust to all_dlls type change.
6667 * server.c (emit_dll_description): Remove.
6668 (handle_qxfer_libraries): Adjust to all_dlls type change,
6669 integrate emit_dll_description's functionality.
6670
6671 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6672
6673 * linux-low.h (struct linux_target_ops) <delete_process>: New
6674 field.
6675 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6676 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6677 (struct linux_target_ops): Add delete_process callback.
6678 * linux-arm-low.c (arm_delete_process): New.
6679 (struct linux_target_ops): Add delete_process callback.
6680 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6681 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6682 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6683 * linux-mips-low.c (mips_linux_delete_process): New.
6684 (struct linux_target_ops): Add delete_process callback.
6685 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6686 * linux-s390-low.c (struct linux_target_ops): Likewise.
6687 * linux-sh-low.c (struct linux_target_ops): Likewise.
6688 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6689 * linux-tile-low.c (struct linux_target_ops): Likewise.
6690 * linux-x86-low.c (x86_linux_delete_process): New.
6691 (struct linux_target_ops): Add delete_process callback.
6692 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6693
6694 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6695
6696 * linux-aarch64-low.c (the_low_target): Add thread delete
6697 callback.
6698 * linux-arm-low.c (arm_delete_thread): New function.
6699 (the_low_target): Add thread delete callback.
6700 * linux-bfin-low.c (the_low_target): Likewise.
6701 * linux-crisv32-low.c (the_low_target): Likewise.
6702 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6703 set.
6704 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6705 field.
6706 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6707 * linux-mips-low.c (mips_linux_delete_thread): New function.
6708 (the_low_target): Add thread delete callback.
6709 * linux-ppc-low.c (the_low_target): Likewise.
6710 * linux-s390-low.c (the_low_target): Likewise.
6711 * linux-sh-low.c (the_low_target): Likewise.
6712 * linux-tic6x-low.c (the_low_target): Likewise.
6713 * linux-tile-low.c (the_low_target): Likewise.
6714 * linux-x86-low.c (the_low_target): Likewise.
6715 * linux-xtensa-low.c (the_low_target): Likewise.
6716
6717 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6718
6719 * win32-low.c: Include "common-inferior.h".
6720
6721 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6722
6723 * inferiors.c (set_inferior_cwd): New function.
6724 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6725 (handle_query): Inform that QSetWorkingDir is supported.
6726 * win32-low.c (create_process): Pass the inferior's cwd to
6727 CreateProcess.
6728
6729 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6730
6731 * inferiors.c (current_inferior_cwd): New global variable.
6732 (get_inferior_cwd): New function.
6733 * inferiors.h (struct process_info) <cwd>: New field.
6734
6735 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6736
6737 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6738 (OBS): Add gdb_tilde_expand.o.
6739
6740 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6741
6742 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6743 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6744
6745 2017-09-29 Pedro Alves <palves@redhat.com>
6746
6747 * ax.c (gdb_parse_agent_expr): Constify.
6748 * ax.h (gdb_parse_agent_expr): Constify.
6749 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6750 Constify.
6751 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6752 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6753 * remote-utils.h (read_ptid): Constify.
6754 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6755 (process_point_options, process_serial_event): Constify.
6756 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6757 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6758 (cmd_qtbuffer): Constify.
6759
6760 2017-09-29 Pedro Alves <palves@redhat.com>
6761
6762 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6763 fails.
6764
6765 2017-09-29 Pedro Alves <palves@redhat.com>
6766
6767 * linux-low.c (handle_extended_wait): Pass parent thread instead
6768 of process to thread_db_notice_clone.
6769 * linux-low.h (thread_db_notice_clone): Replace parent process
6770 parameter with parent thread parameter.
6771 * thread-db.c (find_one_thread): Add comment.
6772 (thread_db_notice_clone): Replace parent process parameter with
6773 parent thread parameter. Temporarily switch to the parent thread.
6774
6775 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6776
6777 * gdbthread.h: Include "common-gdbthread.h".
6778 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6779 "if" when validating the ptid.
6780 * remote-utils.c: Include "gdbthread.h".
6781 (prepare_resume_reply): Use "switch_to_thread".
6782 * target.c (done_accessing_memory): Likewise.
6783
6784 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6785
6786 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6787 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6788 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6789 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6790 s390x-gs-linux64-ipa.o to ipa_obj.
6791 * linux-s390-low.c (HWCAP_S390_GS): New define.
6792 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6793 New functions.
6794 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6795 (s390_arch_setup): Check for guarded-storage support and choose
6796 appropriate tdesc.
6797 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6798 init_registers_s390x_gs_linux64.
6799 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6800 enum value.
6801 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6802 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6803
6804 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6805
6806 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6807
6808 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6809
6810 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6811 (thread_db_thread_handle): Declare.
6812 * linux-low.c (linux_target_ops): Initialize thread_handle.
6813 * server.c (handle_qxfer_threads_worker): Add support for
6814 "handle" attribute.
6815 * target.h (struct target_ops): Add new function pointer,
6816 thread_handle.
6817 (target_thread_handle): Define.
6818 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6819 field in lwp.
6820 (thread_db_thread_handle): New function.
6821
6822 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6823
6824 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6825 * linux-low.h (thread_db_notice_clone): Declare.
6826 * thread-db.c (thread_db_notice_clone): New function.
6827
6828 2017-09-21 Pedro Alves <palves@redhat.com>
6829
6830 * server.c (gdb_read_memory, handle_status, process_serial_event)
6831 (handle_serial_event, handle_target_event): Adjust to
6832 set_desired_thread prototype change.
6833 * target.c (set_desired_thread): Remove 'use_general' parameter
6834 and adjust.
6835 * target.h (set_desired_thread): Remove 'use_general' parameter.
6836
6837 2017-09-20 Tom Tromey <tom@tromey.com>
6838
6839 * target.c (target_terminal::terminal_state): Define.
6840 (target_terminal::init): Rename from target_terminal_init.
6841 (target_terminal::inferior): Rename from
6842 target_terminal_inferior.
6843 (target_terminal::ours): Rename from target_terminal_ours.
6844 (target_terminal::ours_for_output, target_terminal::info): New.
6845
6846 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6847
6848 * server.c (accumulate_file_name_length): Remove.
6849 (emit_dll_description): Adjust to std::string change.
6850 (handle_qxfer_libraries): Use std::string to hold document.
6851
6852 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6853
6854 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6855 return type of xml_escape_text.
6856 * server.c (emit_dll_description): Likewise.
6857
6858 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6859
6860 * server.c (captured_main): Accept argument for --selftest.
6861 Update run_tests call.
6862 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6863 when registering selftests.
6864
6865 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6866
6867 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6868 instead of "VEC" for "target_desc.reg_defs".
6869 (regcache_cpy): Likewise.
6870 (registers_to_string): Likewise.
6871 (registers_from_string): Likewise.
6872 (find_regno): Likewise.
6873 (supply_regblock): Likewise.
6874 (regcache_raw_read_unsigned): Likewise.
6875 * tdesc.c (init_target_desc): Likewise.
6876 (tdesc_create_reg): Likewise.
6877 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6878 (struct target_desc) <reg_defs>: Convert to "std::vector".
6879 (target_desc): Do not initialize "reg_defs".
6880 (~target_desc): Update code to use "std::vector" instead of "VEC"
6881 for "target_desc.reg_defs".
6882 (operator==): Likewise.
6883
6884 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6885
6886 * inferiors.h (thread_to_gdb_id): Remove.
6887 * inferiors.c (thread_to_gdb_id): Remove.
6888 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6889 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6890 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6891 Likewise.
6892 * nto-low.c (nto_fetch_registers, nto_store_registers,
6893 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6894
6895 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6896
6897 * inferiors.h (gdb_id_to_thread_id): Remove.
6898 * inferiors.c (gdb_id_to_thread_id): Remove.
6899 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6900 removal. Move pid declaration closer to where it's used.
6901
6902 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6903
6904 * server.c (handle_detach): New function.
6905 (process_serial_event): Move code out, call handle_detach.
6906
6907 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6908
6909 * server.c (require_running): Rename to ...
6910 (require_running_or_return): ... this ...
6911 (require_running_or_break): ... and this.
6912 (handle_query, process_serial_event): Adjust.
6913
6914 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6915
6916 * linux-low.c (linux_set_resume_request): Remove unused
6917 variables.
6918
6919 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6920
6921 * server.c (first_thread_of): Remove.
6922 (process_serial_event): Replace usage of first_thread_of with
6923 find_any_thread_of_pid.
6924 * tracepoint.c (same_process_p): Remove.
6925 (gdb_agent_about_to_close): Replace usage of same_process_p with
6926 find_any_thread_of_pid.
6927 * linux-x86-low.c (same_process_callback): Remove.
6928 (x86_arch_setup_process_callback): Replace usage of
6929 same_process_callback with find_any_thread_of_pid.
6930 * thread-db.c (any_thread_of): Remove.
6931 (switch_to_process): Replace usage of any_thread_of with
6932 find_any_thread_of_pid.
6933 * inferiors.c (thread_pid_matches_callback): Remove.
6934 (find_thread_process): Adjust to use find_any_thread_of_pid.
6935
6936 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6937
6938 * regcache.c (get_thread_regcache): Guard calls to "memset"
6939 with "!VEC_empty".
6940
6941 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6942
6943 * linux-low.c (handle_extended_wait): Use
6944 "allocate_target_description" instead of "XNEW".
6945 * linux-x86-low.c (initialize_low_arch): Likewise.
6946
6947 2017-09-05 Yao Qi <yao.qi@linaro.org>
6948
6949 * configure.srv (srv_i386_regobj): Remove.
6950 (srv_amd64_regobj): Remove.
6951 (srv_regobj): Set it to "" for x86 non-linux targets.
6952 * linux-x86-tdesc.c (i386_linux_read_description):
6953 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6954 (init_registers_i386): Remove the declaration.
6955 (tdesc_i386): Remove the declaration.
6956 (lynx_i386_arch_setup): Call i386_create_target_description.
6957 * nto-x86-low.c: Likewise.
6958 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6959 [!__x86_64__]: include arch/i386.h.
6960 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6961
6962 2017-09-05 Yao Qi <yao.qi@linaro.org>
6963
6964 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6965 i386/amd64-XXX-linux from it.
6966
6967 2017-09-05 Yao Qi <yao.qi@linaro.org>
6968
6969 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6970 false.
6971 (ipa_amd64_linux_regobj): Remove.
6972 (ipa_x32_linux_regobj): Remove.
6973
6974 2017-09-05 Yao Qi <yao.qi@linaro.org>
6975
6976 * Makefile.in (arch-amd64.o): New rule.
6977 * configure.srv: Append arch-amd64.o.
6978 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6979 (get_ipa_tdesc): Call amd64_linux_read_description.
6980 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6981 and init_registers_amd64_XXX.
6982 * linux-x86-low.c (x86_linux_read_description): Call
6983 amd64_linux_read_description.
6984 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6985 (initialize_low_arch): Don't call init_registers_x32_XXX and
6986 init_registers_amd64_XXX.
6987 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6988 and tdesc_amd64_XXX.
6989 [__x86_64__] (amd64_tdesc_test): New function.
6990 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6991 and init_registers_amd64_XXX.
6992 * linux-x86-tdesc.c: Include arch/amd64.h.
6993 (xcr0_to_tdesc_idx): New function.
6994 (i386_linux_read_description): New function.
6995 (amd64_get_ipa_tdesc_idx): New function.
6996 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6997 (amd64_get_ipa_tdesc): Declare.
6998
6999 2017-09-05 Yao Qi <yao.qi@linaro.org>
7000
7001 * configure.srv (srv_i386_linux_xmlfiles): Remove
7002 i386/i386-XXX-linux.xml from it.
7003
7004 2017-09-05 Yao Qi <yao.qi@linaro.org>
7005
7006 * configure.srv: Set srv_i386_linux_regobj empty if $development
7007 is false.
7008 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7009 initialize_low_tdesc.
7010 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7011 with #if initialize_low_tdesc.
7012 * linux-x86-tdesc-selftest.c: New file.
7013 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7014
7015 2017-09-05 Yao Qi <yao.qi@linaro.org>
7016
7017 * Makefile.in (arch-i386.o): New rule.
7018 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7019 (x86_64-*-linux*): Likewise.
7020 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7021 include arch/i386.h.
7022 (i386_linux_read_description): Remove code and call
7023 i386_create_target_description.
7024 * tdesc.c (allocate_target_description): New function.
7025 * tdesc.h (set_tdesc_architecture): Remove declaration.
7026 (set_tdesc_osabi): Likewise.
7027
7028 2017-09-05 Yao Qi <yao.qi@linaro.org>
7029
7030 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7031 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7032 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7033 .xmltarget.
7034 * server.c (get_features_xml): Call tdesc_get_features_xml.
7035 * tdesc.c (set_tdesc_architecture): New function.
7036 (set_tdesc_osabi): New function.
7037 (tdesc_get_features_xml): New function.
7038 (tdesc_create_feature): Add an argument.
7039 * tdesc.h (struct target_desc) <features>: New field.
7040 <arch, osabi>: New field.
7041 (~target_desc): xfree features, arch, and osabi.
7042 (target_desc::oerator==): Don't compare .xmltarget.
7043 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7044 (set_tdesc_osabi): Likewise.
7045 (tdesc_get_features_xml): Likewise.
7046
7047 2017-09-05 Yao Qi <yao.qi@linaro.org>
7048
7049 * linux-x86-tdesc.c: Include selftest.h.
7050 (i386_tdesc_test): New function.
7051 (initialize_low_tdesc): Call selftests::register_test.
7052 * tdesc.h: Include regdef.h.
7053 (target_desc): Override operator == and !=.
7054
7055 2017-09-05 Yao Qi <yao.qi@linaro.org>
7056
7057 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7058 (ipa_obj): Likewise.
7059 * linux-i386-ipa.c: Include common/x86-xstate.h
7060 (get_ipa_tdesc): Call i386_linux_read_description.
7061 (initialize_low_tracepoint): Don't call init_registers_XXX
7062 functions, call initialize_low_tdesc instead.
7063 * linux-x86-low.c (x86_linux_read_description): Call
7064 i386_linux_read_description.
7065 (initialize_low_arch): Don't call init_registers_i386_XXX
7066 functions, call initialize_low_tdesc.
7067 * linux-x86-tdesc.c: New file.
7068 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7069 (i386_get_ipa_tdesc_idx): Declare.
7070 (i386_get_ipa_tdesc): Declare.
7071 (initialize_low_tdesc): Declare.
7072
7073 2017-09-05 Yao Qi <yao.qi@linaro.org>
7074
7075 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7076 instead of 0.
7077
7078 2017-09-05 Yao Qi <yao.qi@linaro.org>
7079
7080 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7081 * regcache.c (get_thread_regcache): Use VEC_length.
7082 (init_register_cache): Likewise.
7083 (regcache_cpy): Likewise.
7084 (registers_to_string): Iterate reg_defs via VEC_iterate.
7085 (find_regno): Likewise.
7086 (find_register_by_number): Use VEC_index.
7087 (register_size): Call find_register_by_number.
7088 (register_data): Call find_register_by_number.
7089 (supply_regblock): Use VEC_length.
7090 (regcache_raw_read_unsigned): Likewise.
7091 * tdesc.c (init_target_desc): Iterate reg_defs via
7092 VEC_iterate.
7093 (default_description): Update initializer.
7094 (copy_target_description): Don't update field num_registers.
7095 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7096 <num_registers>: Remove.
7097
7098 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7099
7100 * Makefile.in (.SECONDARY): Define target.
7101
7102 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7103
7104 * linux-low.c (linux_wait_1): Adjust.
7105 * server.c (queue_stop_reply_callback): Adjust.
7106
7107 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7108
7109 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7110 QEnvironmentUnset and QEnvironmentReset packets.
7111 (handle_query): Inform remote that QEnvironmentHexEncoded,
7112 QEnvironmentUnset and QEnvironmentReset are supported.
7113
7114 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7115
7116 * inferiors.h (inferior_target_data): Rename to ...
7117 (thread_target_data): ... this.
7118 (inferior_regcache_data): Rename to ...
7119 (thread_regcache_data): ... this.
7120 (set_inferior_regcache_data): Rename to ...
7121 (set_thread_regcache_data): ... this.
7122 * inferiors.c (inferior_target_data): Rename to ...
7123 (thread_target_data): ... this.
7124 (inferior_regcache_data): Rename to ...
7125 (thread_regcache_data): ... this.
7126 (set_inferior_regcache_data): Rename to ...
7127 (set_thread_regcache_data): ... this.
7128 (free_one_thread): Update.
7129 * linux-low.h (get_thread_lwp): Update.
7130 * regcache.c (get_thread_regcache): Update.
7131 (regcache_invalidate_thread): Update.
7132 (free_register_cache_thread): Update.
7133 * win32-i386-low.c (update_debug_registers_callback): Update.
7134 (win32_get_current_dr): Update.
7135 * win32-low.c (thread_rec): Update.
7136 (delete_thread_info): Update.
7137 (continue_one_thread): Update.
7138 (suspend_one_thread): Update.
7139
7140 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7141
7142 * inferiors.c (set_inferior_target_data): Remove.
7143 * inferiors.h (set_inferior_target_data): Remove.
7144
7145 2017-08-18 Yao Qi <yao.qi@linaro.org>
7146
7147 * Makefile.in (OBS): Add selftest.o.
7148 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7149 * configure, config.in: Re-generated.
7150 * server.c: Include common/sefltest.h.
7151 (captured_main): Handle option --selftest.
7152
7153 2017-08-09 Yao Qi <yao.qi@linaro.org>
7154
7155 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7156 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7157 i386-avx-mpx.o and i386-mmx.o.
7158 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7159 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7160 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7161 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7162 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7163 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7164 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7165 i386/amd64-avx-mpx.xml.
7166
7167 2017-08-09 Yao Qi <yao.qi@linaro.org>
7168
7169 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7170 and x32-avx-avx512.o.
7171 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7172 i386/x32-avx-avx512.xml.
7173
7174 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7175
7176 * tracepoint.h (enum class fast_tpoint_collect_result): New
7177 enumeration.
7178 (fast_tracepoint_collecting): Change return type to
7179 fast_tpoint_collect_result.
7180 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7181 * linux-low.h: Include tracepoint.h.
7182 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7183 fast_tpoint_collect_result.
7184 * linux-low.c (handle_tracepoints): Adjust.
7185 (linux_fast_tracepoint_collecting): Change return type to
7186 fast_tpoint_collect_result.
7187 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7188 linux_wait_1, stuck_in_jump_pad_callback,
7189 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7190 proceed_one_lwp): Adjust to type change.
7191
7192 2017-07-10 Yao Qi <yao.qi@linaro.org>
7193
7194 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7195
7196 2017-06-29 Yao Qi <yao.qi@linaro.org>
7197
7198 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7199 Remove.
7200 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7201
7202 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7203
7204 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7205
7206 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7207
7208 * linux-low.c (linux_create_inferior): Adjust code to access the
7209 environment information via 'gdb_environ' class.
7210 * lynx-low.c (lynx_create_inferior): Likewise.
7211 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7212 (get_environ): Return a pointer to 'our_environ'.
7213 (captured_main): Initialize 'our_environ'.
7214 * server.h (get_environ): Adjust prototype.
7215 * spu-low.c (spu_create_inferior): Adjust code to access the
7216 environment information via 'gdb_environ' class.
7217
7218 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7219
7220 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7221 usage of "register" keyword.
7222
7223 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7224
7225 * configure: Re-generate.
7226
7227 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7228
7229 * configure: Re-generate.
7230
7231 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7232
7233 * Makefile.in (COMPILE.pre): Add "-x c++".
7234
7235 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7236
7237 * fork-child.c: Conditionally include <signal.h>.
7238
7239 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7240
7241 * server.c (handle_general_set): Handle new packet
7242 "QStartupWithShell".
7243 (handle_query): Add "QStartupWithShell" to the list of supported
7244 packets.
7245 (gdbserver_usage): Add help text explaining the
7246 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7247 options.
7248 (captured_main): Recognize and act upon the presence of the new
7249 CLI options.
7250
7251 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7252 Pedro Alves <palves@redhat.com>
7253
7254 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7255 * configure: Regenerate.
7256 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7257 "fork-inferior.o".
7258 (i[34567]86-*-lynxos*): Likewise.
7259 (spu*-*-*): Likewise.
7260 * fork-child.c: New file.
7261 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7262 and "environ.h".
7263 (linux_ptrace_fun): New function.
7264 (linux_create_inferior): Adjust function prototype to reflect
7265 change on "target.h". Adjust function code to use
7266 "fork_inferior".
7267 (linux_request_interrupt): Delete "signal_pid".
7268 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7269 (lynx_ptrace_fun): New function.
7270 (lynx_create_inferior): Adjust function prototype to reflect
7271 change on "target.h". Adjust function code to use
7272 "fork_inferior".
7273 * nto-low.c (nto_create_inferior): Adjust function prototype and
7274 code to reflect change on "target.h". Update comments.
7275 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7276 "common-terminal.h" and "environ.h".
7277 (terminal_fd): Moved to fork-child.c.
7278 (old_foreground_pgrp): Likewise.
7279 (restore_old_foreground_pgrp): Likewise.
7280 (last_status): Make it global.
7281 (last_ptid): Likewise.
7282 (our_environ): New variable.
7283 (startup_with_shell): Likewise.
7284 (program_name): Likewise.
7285 (program_argv): Rename to...
7286 (program_args): ...this.
7287 (wrapper_argv): New variable.
7288 (start_inferior): Delete function.
7289 (get_exec_wrapper): New function.
7290 (get_exec_file): Likewise.
7291 (get_environ): Likewise.
7292 (prefork_hook): Likewise.
7293 (post_fork_inferior): Likewise.
7294 (postfork_hook): Likewise.
7295 (postfork_child_hook): Likewise.
7296 (handle_v_run): Update code to deal with arguments coming from the
7297 remote host. Update calls from "start_inferior" to
7298 "create_inferior".
7299 (captured_main): Likewise. Initialize environment variable. Call
7300 "have_job_control".
7301 * server.h (post_fork_inferior): New prototype.
7302 (get_environ): Likewise.
7303 (last_status): Declare.
7304 (last_ptid): Likewise.
7305 (signal_pid): Likewise.
7306 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7307 (spu_ptrace_fun): New function.
7308 (spu_create_inferior): Adjust function prototype to reflect change
7309 on "target.h". Adjust function code to use "fork_inferior".
7310 * target.c (target_terminal_init): New function.
7311 (target_terminal_inferior): Likewise.
7312 (target_terminal_ours): Likewise.
7313 * target.h: Include <vector>.
7314 (struct target_ops) <create_inferior>: Update prototype.
7315 (create_inferior): Update macro.
7316 * utils.c (gdb_flush_out_err): New function.
7317 * win32-low.c (win32_create_inferior): Adjust function prototype
7318 and code to reflect change on "target.h".
7319
7320 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7321
7322 * inferiors.c (switch_to_thread): New function.
7323
7324 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7325
7326 * Makefile.in (SFILE): Add "common/job-control.c".
7327 (OBS): Add "job-control.o".
7328
7329 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7330
7331 * Makefile: Remove "@host_makefile_frag@".
7332
7333 2017-05-05 Pedro Alves <palves@redhat.com>
7334
7335 * configure: Regenerate.
7336
7337 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7338
7339 * configure: Regenerate.
7340
7341 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7342
7343 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7344 software_single_step change of return type to
7345 std::vector<CORE_ADDR>.
7346 * linux-low.c (install_software_single_step_breakpoints):
7347 Likewise.
7348 * linux-low.h (install_software_single_step_breakpoints):
7349 Likewise.
7350
7351 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7352
7353 * remote-utils.c: Include "gdb_termios.h" instead of
7354 "terminal.h".
7355 * terminal.h: Delete file.
7356
7357 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7358
7359 * server.c: Include <vector>.
7360 <program_argv, wrapper_argv>: Convert to std::vector.
7361 (start_inferior): Rewrite function to use C++.
7362 (handle_v_run): Likewise. Update code that calculates the argv
7363 based on the vRun packet; use C++.
7364 (captured_main): Likewise.
7365
7366 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7367
7368 * server.c (handle_v_cont): Initialize thread_resume::thread
7369 with null_ptid.
7370
7371 2017-04-05 Pedro Alves <palves@redhat.com>
7372
7373 * configure: Regenerate.
7374
7375 2017-04-05 Pedro Alves <palves@redhat.com>
7376
7377 * gdbreplay.c (sync_error): Constify.
7378 * linux-x86-low.c (push_opcode): Constify.
7379
7380 2017-04-05 Pedro Alves <palves@redhat.com>
7381
7382 * win32-low.c (get_child_debug_event)
7383 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7384 Report TARGET_WAITKIND_SPURIOUS instead.
7385
7386 2017-04-05 Pedro Alves <palves@redhat.com>
7387
7388 * remote-utils.c (remote_prepare, remote_open): Constify.
7389 * remote-utils.h (remote_prepare, remote_open): Constify.
7390 * server.c (captured_main): Constify 'port' handling.
7391
7392 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7393
7394 * Makefile.in (clean): Clear .deps.
7395
7396 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7397
7398 * .gitignore: Remove generated files, replace with wildcard.
7399 * (clean): Replace removal of generated files with wildcard.
7400 (version.c): Replace with...
7401 (version-generated.c): ...this.
7402 (xml-builtin.c): Replace with...
7403 (xml-builtin-generated.c): ...this.
7404 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7405 (%.c: *regformats*): Replace with...
7406 (%-generated.c: *regformats*): ...this.
7407
7408 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7409
7410 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7411 (xtensa_fill_gregset): Call collect_register_by_name for
7412 threadptr register.
7413 (xtensa_store_gregset): Call supply_register_by_name for
7414 threadptr register.
7415
7416 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7417
7418 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7419 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7420 (xtensa_store_gregset): Call supply_register for all registers in
7421 a0_regnum..a0_regnum + C0_NREGS range.
7422
7423 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7424
7425 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7426 (ax-ipa.o: ax.c): Remove.
7427 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7428 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7429 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7430 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7431 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7432
7433 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7434
7435 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7436 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7437 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7438 (errors-ipa.o: ../common/errors.c): Remove.
7439 (format-ipa.o: ../common/format.c): Remove.
7440 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7441
7442 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7443
7444 * Makefile.in (%-ipa.o: %.c): New rule.
7445 (tracepoint-ipa.o: tracepoint.c): Remove.
7446 (utils-ipa.o: utils.c): Remove.
7447 (remote-utils-ipa.o: remote-utils.c): Remove.
7448 (regcache-ipa.o: regcache.c): Remove.
7449 (i386-linux-ipa.o: i386-linux.c): Remove.
7450 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7451 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7452 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7453 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7454 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7455 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7456 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7457 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7458 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7459 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7460 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7461 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7462 (aarch64-ipa.o: aarch64.c): Remove.
7463 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7464 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7465 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7466 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7467 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7468 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7469 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7470 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7471 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7472 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7473 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7474 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7475 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7476 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7477 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7478 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7479 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7480 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7481 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7482 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7483 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7484 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7485 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7486 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7487 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7488 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7489 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7490 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7491 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7492 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7493 (tdesc-ipa.o: tdesc.c): Remove.
7494 (x32-linux-ipa.o: x32-linux.c): Remove.
7495 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7496 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7497
7498 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7499
7500 * Makefile.in (%.o: ../arch/%.c): New rule.
7501 (arm.o: ../arch/arm.c): Remove.
7502 (arm-linux.o: ../arch/arm-linux.c): Remove.
7503 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7504 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7505
7506 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7507
7508 * Makefile.in (%.o: ../nat/%.c): New rule.
7509 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7510 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7511 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7512 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7513 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7514 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7515 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7516 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7517 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7518 (linux-personality.o: ../nat/linux-personality.c): Remove.
7519 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7520 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7521 (x86-linux.o: ../nat/x86-linux.c): Remove.
7522 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7523 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7524
7525 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7526
7527 * Makefile.in (%.o: ../common/%.c): New rule.
7528 (signals.o: ../common/signals.c): Remove.
7529 (print-utils.o: ../common/print-utils.c): Remove.
7530 (rsp-low.o: ../common/rsp-low.c): Remove.
7531 (common-utils.o: ../common/common-utils.c): Remove.
7532 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7533 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7534 (vec.o: ../common/vec.c): Remove.
7535 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7536 (xml-utils.o: ../common/xml-utils.c): Remove.
7537 (ptid.o: ../common/ptid.c): Remove.
7538 (buffer.o: ../common/buffer.c): Remove.
7539 (format.o: ../common/format.c): Remove.
7540 (filestuff.o: ../common/filestuff.c): Remove.
7541 (agent.o: ../common/agent.c): Remove.
7542 (errors.o: ../common/errors.c): Remove.
7543 (environ.o: ../common/environ.c): Remove.
7544 (common-debug.o: ../common/common-debug.c): Remove.
7545 (cleanups.o: ../common/cleanups.c): Remove.
7546 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7547 (fileio.o: ../common/fileio.c): Remove.
7548 (common-regcache.o: ../common/common-regcache.c): Remove.
7549 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7550 (new-op.o: ../common/new-op.c): Remove.
7551 (btrace-common.o: ../common/btrace-common.c): Remove.
7552
7553 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7554
7555 * Makefile.in (%.o: ../target/%.c): New rule.
7556 (waitstatus.o: ../target/waitstatus.c): Remove.
7557
7558 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7559
7560 * Makefile.in
7561 (%.c: ../regformats/%.dat,
7562 (%.c: ../regformats/arm/%.dat,
7563 (%.c: ../regformats/i386/%.dat,
7564 (%.c: ../regformats/rs6000/%.dat): New rules.
7565 (aarch64.c): Remove.
7566 (reg-arm.c): Remove.
7567 (arm-with-iwmmxt.c): Remove.
7568 (arm-with-vfpv2.c): Remove.
7569 (arm-with-vfpv3.c): Remove.
7570 (arm-with-neon.c): Remove.
7571 (reg-bfin.c): Remove.
7572 (reg-cris.c): Remove.
7573 (reg-crisv32.c): Remove.
7574 (i386.c): Remove.
7575 (i386-linux.c): Remove.
7576 (i386-avx.c): Remove.
7577 (i386-avx-linux.c): Remove.
7578 (i386-avx-avx512.c): Remove.
7579 (i386-avx-avx512-linux.c): Remove.
7580 (i386-mpx.c): Remove.
7581 (i386-mpx-linux.c): Remove.
7582 (i386-avx-mpx-avx512-pku.c): Remove.
7583 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7584 (i386-avx-mpx.c): Remove.
7585 (i386-avx-mpx-linux.c): Remove.
7586 (i386-mmx.c): Remove.
7587 (i386-mmx-linux.c): Remove.
7588 (reg-ia64.c): Remove.
7589 (reg-m32r.c): Remove.
7590 (reg-m68k.c): Remove.
7591 (reg-cf.c): Remove.
7592 (mips-linux.c): Remove.
7593 (mips-dsp-linux.c): Remove.
7594 (mips64-linux.c): Remove.
7595 (mips64-dsp-linux.c): Remove.
7596 (nios2-linux.c): Remove.
7597 (powerpc-32.c): Remove.
7598 (powerpc-32l.c): Remove.
7599 (powerpc-altivec32l.c): Remove.
7600 (powerpc-cell32l.c): Remove.
7601 (powerpc-vsx32l.c): Remove.
7602 (powerpc-isa205-32l.c): Remove.
7603 (powerpc-isa205-altivec32l.c): Remove.
7604 (powerpc-isa205-vsx32l.c): Remove.
7605 (powerpc-e500l.c): Remove.
7606 (powerpc-64l.c): Remove.
7607 (powerpc-altivec64l.c): Remove.
7608 (powerpc-cell64l.c): Remove.
7609 (powerpc-vsx64l.c): Remove.
7610 (powerpc-isa205-64l.c): Remove.
7611 (powerpc-isa205-altivec64l.c): Remove.
7612 (powerpc-isa205-vsx64l.c): Remove.
7613 (s390-linux32.c): Remove.
7614 (s390-linux32v1.c): Remove.
7615 (s390-linux32v2.c): Remove.
7616 (s390-linux64.c): Remove.
7617 (s390-linux64v1.c): Remove.
7618 (s390-linux64v2.c): Remove.
7619 (s390-te-linux64.c): Remove.
7620 (s390-vx-linux64.c): Remove.
7621 (s390-tevx-linux64.c): Remove.
7622 (s390x-linux64.c): Remove.
7623 (s390x-linux64v1.c): Remove.
7624 (s390x-linux64v2.c): Remove.
7625 (s390x-te-linux64.c): Remove.
7626 (s390x-vx-linux64.c): Remove.
7627 (s390x-tevx-linux64.c): Remove.
7628 (tic6x-c64xp-linux.c): Remove.
7629 (tic6x-c64x-linux.c): Remove.
7630 (tic6x-c62x-linux.c): Remove.
7631 (reg-sh.c): Remove.
7632 (reg-sparc64.c): Remove.
7633 (reg-spu.c): Remove.
7634 (amd64.c): Remove.
7635 (amd64-linux.c): Remove.
7636 (amd64-avx.c): Remove.
7637 (amd64-avx-linux.c): Remove.
7638 (amd64-avx-avx512.c): Remove.
7639 (amd64-avx-avx512-linux.c): Remove.
7640 (amd64-mpx.c): Remove.
7641 (amd64-mpx-linux.c): Remove.
7642 (amd64-avx-mpx-avx512-pku.c): Remove.
7643 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7644 (amd64-avx-mpx.c): Remove.
7645 (amd64-avx-mpx-linux.c): Remove.
7646 (x32.c): Remove.
7647 (x32-linux.c): Remove.
7648 (x32-avx.c): Remove.
7649 (x32-avx-linux.c): Remove.
7650 (x32-avx-avx512.c): Remove.
7651 (x32-avx-avx512-linux.c): Remove.
7652 (reg-xtensa.c): Remove.
7653 (reg-tilegx.c): Remove.
7654 (reg-tilegx32.c): Remove.
7655
7656 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7657
7658 * Makefile.in (SFILES): Add "common/environ.c".
7659 (OBJS): Add "common/environ.h".
7660
7661 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7662
7663 * configure.ac: Check if the fs_base and gs_base members of
7664 `struct user_regs_struct' exist.
7665 * config.in: Regenerated.
7666 * configure: Likewise.
7667
7668 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7669
7670 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7671 target_read_memory.
7672 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7673 (get_next_pcs_syscall_next_pc): Likewise.
7674
7675 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7676
7677 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7678 * nto-x86-low.c: Likewise.
7679
7680 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7681
7682 * Makefile.in: Include disable-implicit-rules.mk.
7683
7684 2016-11-23 Pedro Alves <palves@redhat.com>
7685
7686 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7687 (debug_vprintf): Use std::chrono::steady_clock instead of
7688 gettimeofday. Use '.' instead of ':'.
7689 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7690 (get_timestamp): Use std::chrono::steady_clock instead of
7691 gettimeofday.
7692
7693 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7694
7695 * Makefile.in: Fix whitespace formatting.
7696
7697 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7698
7699 * Makefile.in (SFILES, OBS): Flatten list and order
7700 alphabetically.
7701
7702 2016-11-23 Pedro Alves <palves@redhat.com>
7703
7704 * event-loop.c (handle_file_event): Use warning.
7705 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7706 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7707 Use warning.
7708
7709 2016-11-23 Pedro Alves <palves@redhat.com>
7710
7711 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7712 output.
7713 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7714 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7715 debug_printf and debug_flush for debug output.
7716 * server.c (handle_general_set): Likewise.
7717 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7718 output.
7719
7720 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7721
7722 * Makefile.in (.c.o): Replace rule with ...
7723 (%.o: %.c): ... this one.
7724
7725 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7726
7727 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7728 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7729 make.
7730 * configure.ac: Remove checks for the make program.
7731 * configure: Re-generate.
7732
7733 2016-10-28 Pedro Alves <palves@redhat.com>
7734
7735 * Makefile.in (CXX_DIALECT): Get from configure.
7736 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7737 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7738 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7739 * config.in: Regenerate.
7740 * configure: Regenerate.
7741
7742 2016-10-27 Yao Qi <yao.qi@linaro.org>
7743
7744 * linux-low.c (linux_supports_range_stepping): Return true if
7745 can_software_single_step return true.
7746
7747 2016-10-27 Yao Qi <yao.qi@linaro.org>
7748
7749 * inferiors.c (find_inferior_in_random): New function.
7750 * inferiors.h (find_inferior_in_random): Declare.
7751 * linux-low.c (linux_wait_for_event_filtered): Call
7752 find_inferior_in_random instead of find_inferior.
7753
7754 2016-10-27 Yao Qi <yao.qi@linaro.org>
7755
7756 * linux-low.c (linux_wait_1): If single-step breakpoints are
7757 inserted, remove them.
7758
7759 2016-10-26 Pedro Alves <palves@redhat.com>
7760
7761 * linux-low.c (handle_extended_wait): Link parent/child fork
7762 threads.
7763 (linux_wait_1): Unlink them.
7764 (linux_set_resume_request): Ignore resume requests for
7765 already-resumed and unhandled fork child threads.
7766 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7767 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7768 New functions.
7769 (handle_v_requests) <vCont>: Don't call require_running.
7770 * server.h (in_queued_stop_replies): New declaration.
7771
7772 2016-10-24 Yao Qi <yao.qi@linaro.org>
7773
7774 PR server/20733
7775 * linux-aarch64-low.c (append_insns): Cast the return value to
7776 'uint32_t *'.
7777
7778 2016-10-10 Yao Qi <yao.qi@linaro.org>
7779
7780 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7781
7782 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7783
7784 * target.c (target_supports_multi_process): New function, moved
7785 from...
7786 * target.h (target_supports_multi_process): ... here. Remove
7787 macro.
7788
7789 2016-10-05 Tom Tromey <tom@tromey.com>
7790
7791 PR remote/20655:
7792 * tracepoint.c (handle_tracepoint_bkpts): Check
7793 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7794
7795 2016-10-05 Yao Qi <yao.qi@linaro.org>
7796
7797 * configure.srv: Update the path of arm-*.xml files.
7798
7799 2016-10-05 Terry Guo <terry.guo@arm.com>
7800 Yao Qi <yao.qi@linaro.org>
7801
7802 * Makefile.in: Adjust the path of rules.
7803 * configure.srv: Update the path of xml files.
7804 * regformats/arm-with-iwmmxt.dat: Regenerated.
7805 * regformats/arm-with-neon.dat: Likewise.
7806 * regformats/arm-with-vfpv2.dat: Likewise.
7807 * regformats/arm-with-vfpv3.dat Likewise.
7808
7809 2016-09-30 Yao Qi <yao.qi@linaro.org>
7810
7811 PR gdbserver/20627
7812 * target.c (target_stop_and_wait): Don't call
7813 target_continue_no_signal, use resume_stop instead.
7814
7815 2016-09-26 Yao Qi <yao.qi@linaro.org>
7816
7817 * linux-low.c (linux_wait_1): Call debug_exit.
7818
7819 2016-09-23 Pedro Alves <palves@redhat.com>
7820
7821 * Makefile.in (SFILES): Add common/new-op.c.
7822 (OBS): Add common/new-op.o.
7823 (new-op.o): New rule.
7824
7825 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7826
7827 * .gitinore: Ignore more files.
7828
7829 2016-09-21 Yao Qi <yao.qi@linaro.org>
7830
7831 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7832 23.
7833
7834 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7835
7836 * server.c (start_inferior): Call target_mourn_inferior instead of
7837 mourn_inferior; pass ptid_t argument to it.
7838 (resume): Likewise.
7839 (handle_target_event): Likewise.
7840 * target.c (target_mourn_inferior): New function.
7841 * target.h (mourn_inferior): Delete macro.
7842
7843 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7844
7845 * linux-low.c (lwp_is_stepping): New function.
7846
7847 2016-09-06 Carl Love <cel@us.ibm.com>
7848
7849 * server.c (start_inferior): Fixed comment, requested comment change
7850 didn't get updated correctly. Removed reference to ptrace () call as
7851 it is only true on Linux systems.
7852
7853 2016-09-06 Carl Love <cel@us.ibm.com>
7854
7855 * server.c (start_inferior): Do not call
7856 function target_post_create_inferior () if the
7857 inferior process has already exited.
7858
7859 2016-09-05 Pedro Alves <palves@redhat.com>
7860
7861 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7862 (COMPILE.pre, CC_LD): Use CXX directly.
7863 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7864 * acinclude.m4: Don't include build-with-cxx.m4.
7865 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7866 * configure: Regenerate.
7867
7868 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7869
7870 PR gdb/19495
7871 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7872 call writing data to own_buf.
7873
7874 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7875
7876 * target.c (mywait): Call target_wait instead of
7877 the_target->wait.
7878 (target_wait): New function.
7879
7880 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7881
7882 * server.c (start_inferior): New variable 'ptid'. Replace calls
7883 to the_target->resume by target_continue{,_no_signal}, depending
7884 on the case.
7885 * target.c (target_stop_and_wait): Call target_continue_no_signal
7886 instead of the_target->resume.
7887 (target_continue): New function.
7888
7889 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7890
7891 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7892
7893 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7894
7895 PR server/20491
7896 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7897 ps_prochandle.
7898 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7899 * linux-arm-low.c (ps_get_thread_area): Likewise.
7900 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7901 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7902 * linux-mips-low.c (ps_get_thread_area): Likewise.
7903 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7904 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7905 * linux-x86-low.c (ps_get_thread_area): Likewise.
7906 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7907
7908 2016-08-19 Pedro Alves <palves@redhat.com>
7909
7910 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7911
7912 2016-08-19 Pedro Alves <palves@redhat.com>
7913
7914 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7915 comment. Use memcpy instead of casting through unsigned long.
7916
7917 2016-08-19 Pedro Alves <palves@redhat.com>
7918
7919 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7920 allocating around 0x80000000.
7921
7922 2016-08-19 Pedro Alves <palves@redhat.com>
7923
7924 PR gdb/20415
7925 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7926 (x32-avx512-linux-ipa.o): New rules.
7927 * configure.ac (x86_64-*-linux*): New x32 check.
7928 * configure.srv (ipa_x32_linux_regobj): New.
7929 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7930 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7931 descriptions.
7932 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7933 descriptions.
7934 * configure: Regenerate.
7935
7936 2016-08-09 Pedro Alves <palves@redhat.com>
7937
7938 PR gdb/18653
7939 * Makefile.in (OBS): Add signals-state-save-restore.o.
7940 (signals-state-save-restore.o): New rule.
7941 * config.in: Regenerate.
7942 * configure: Regenerate.
7943 * linux-low.c: Include "signals-state-save-restore.h".
7944 (linux_create_inferior): Call
7945 restore_original_signals_state.
7946 * server.c: Include "dispositions-save-restore.h".
7947 (captured_main): Call save_original_signals_state.
7948
7949 2016-08-05 Pedro Alves <palves@redhat.com>
7950
7951 * configure: Regenerate.
7952
7953 2016-08-04 Yao Qi <yao.qi@linaro.org>
7954
7955 * linux-low.c (regsets_fetch_inferior_registers): Check
7956 errno is ESRCH or not.
7957
7958 2016-08-02 Yao Qi <yao.qi@linaro.org>
7959
7960 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7961 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7962 (thread_db_load_search): Update.
7963 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7964 td_ta_set_event and td_ta_event_getmsg.
7965
7966 2016-07-26 Pedro Alves <palves@redhat.com>
7967
7968 PR server/20414
7969 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7970 of unsigned long for 64-bit registers and use uint32_t instead of
7971 unsigned int for 32-bit registers.
7972
7973 2016-07-26 Pedro Alves <palves@redhat.com>
7974
7975 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7976 to 'ptrace'.
7977
7978 2016-07-21 Tom Tromey <tom@tromey.com>
7979
7980 * configure: Rebuild.
7981
7982 2016-07-21 Yao Qi <yao.qi@linaro.org>
7983
7984 * mem-break.c (find_gdb_breakpoint): Cast bp to
7985 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7986
7987 2016-07-21 Yao Qi <yao.qi@linaro.org>
7988
7989 * server.c (handle_v_requests): Support s and S actions
7990 if target_supports_software_single_step return true.
7991
7992 2016-07-21 Yao Qi <yao.qi@linaro.org>
7993
7994 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7995 is resume_step, call maybe_hw_step.
7996 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7997 and unstop them.
7998 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7999 breakpoints or not.
8000 (proceed_one_lwp): If resume request is resume_step, install
8001 reinsert breakpoints and call maybe_hw_step.
8002
8003 2016-07-21 Yao Qi <yao.qi@linaro.org>
8004
8005 * linux-low.c (proceed_one_lwp): Declare.
8006 (linux_resume_one_thread): Remove local variable 'step'.
8007 Lift code enqueue signal. Call proceed_one_lwp instead of
8008 linux_resume_one_lwp.
8009
8010 2016-07-21 Yao Qi <yao.qi@linaro.org>
8011
8012 * linux-low.c (linux_resume_one_thread): Call
8013 enqueue_pending_signal.
8014
8015 2016-07-21 Yao Qi <yao.qi@linaro.org>
8016
8017 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8018 * inferiors.c (do_restore_current_thread_cleanup): New function.
8019 (make_cleanup_restore_current_thread): Likewise.
8020 * linux-low.c (install_software_single_step_breakpoints): Call
8021 make_cleanup_restore_current_thread. Switch current_thread to
8022 thread.
8023
8024 2016-07-21 Yao Qi <yao.qi@linaro.org>
8025
8026 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8027 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8028 (clone_one_breakpoint): Likewise.
8029 (delete_reinsert_breakpoints): Change parameter to thread.
8030 Callers updated.
8031 (has_reinsert_breakpoints): Likewise.
8032 (uninsert_reinsert_breakpoints): Likewise.
8033 (reinsert_reinsert_breakpoints): Likewise.
8034 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8035 (delete_reinsert_breakpoints): Likewise.
8036 (reinsert_reinsert_breakpoints): Likewise.
8037 (uninsert_reinsert_breakpoints): Likewise.
8038 (has_reinsert_breakpoints): Likewise.
8039
8040 2016-07-21 Yao Qi <yao.qi@linaro.org>
8041
8042 * inferiors.c (get_thread_process): Make parameter const.
8043 * inferiors.h (get_thread_process): Update declaration.
8044 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8045 Add new parameters child_thread and parent_thread. Callers
8046 updated.
8047 * mem-break.h (clone_all_breakpoints): Update declaration.
8048
8049 2016-07-21 Yao Qi <yao.qi@linaro.org>
8050
8051 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8052 <command_list, handler>: Remove.
8053 (struct gdb_breakpoint): New.
8054 (struct other_breakpoint): New.
8055 (struct reinsert_breakpoint): New.
8056 (is_gdb_breakpoint): New function.
8057 (any_persistent_commands): Update command_list if
8058 is_gdb_breakpoint returns true.
8059 (set_breakpoint): Create breakpoints according to their types.
8060 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8061 (set_gdb_breakpoint_1): Likewise.
8062 (set_gdb_breakpoint): Likewise.
8063 (clear_breakpoint_conditions): Change parameter type to
8064 'struct gdb_breakpoint *'.
8065 (clear_breakpoint_commands): Likewise.
8066 (clear_breakpoint_conditions_and_commands): Likewise.
8067 (add_condition_to_breakpoint): Likewise.
8068 (add_breakpoint_condition): Likewise.
8069 (add_commands_to_breakpoint): Likewise.
8070 (check_breakpoints): Check other_breakpoint.
8071 (clone_one_breakpoint): Clone breakpopint according to its type.
8072 * mem-break.h (struct gdb_breakpoint): Declare.
8073 (set_gdb_breakpoint): Update declaration.
8074 (clear_breakpoint_conditions_and_commands): Likewise.
8075 (add_breakpoint_condition): Likewise.
8076 (add_breakpoint_commands): Likewise.
8077 * server.c (process_point_options): Change parameter type to
8078 'struct gdb_breakpoint *'.
8079
8080 2016-07-21 Yao Qi <yao.qi@linaro.org>
8081
8082 * mem-break.c (set_breakpoint_at): Rename it to ...
8083 (set_breakpoint_type_at): ... it.
8084 (set_breakpoint_at): Call set_breakpoint_type_at.
8085 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8086 * mem-break.h (set_breakpoint_at): Update comments.
8087
8088 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8089
8090 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8091 to buf parameter.
8092 (nios2_store_gregset): Likewise.
8093
8094 2016-07-01 Pedro Alves <palves@redhat.com>
8095 Antoine Tremblay <antoine.tremblay@ericsson.com>
8096
8097 * linux-low.c: Change interface to take the target lwp_info
8098 pointer directly and return void. Handle detaching from a zombie
8099 thread.
8100 (linux_detach_lwp_callback): New function.
8101 (linux_detach): Detach from the leader thread after detaching from
8102 the clone threads.
8103
8104 2016-06-28 Yao Qi <yao.qi@linaro.org>
8105
8106 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8107 for variable new_offset.
8108 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8109 (aarch64_ftrace_insn_reloc_cb): Likewise.
8110 (aarch64_ftrace_insn_reloc_tb): Likewise.
8111 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8112 PRIx64 instead of PRIx32.
8113
8114 2016-06-28 Yao Qi <yao.qi@linaro.org>
8115
8116 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8117 (the_low_target): Install arm_get_syscall_trapinfo.
8118
8119 2016-06-28 Yao Qi <yao.qi@linaro.org>
8120
8121 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8122 function.
8123 (the_low_target): Install aarch64_get_syscall_trapinfo.
8124
8125 2016-06-28 Yao Qi <yao.qi@linaro.org>
8126
8127 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8128 Callers updated.
8129 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8130 Remove parameter sysno.
8131 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8132 sysret.
8133
8134 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8135
8136 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8137 (s390_emit_ne_goto): Likewise.
8138 (s390_emit_lt_goto): Likewise.
8139 (s390_emit_le_goto): Likewise.
8140 (s390_emit_gt_goto): Likewise.
8141 (s390_emit_ge_goto): Likewise.
8142 (s390x_emit_eq_goto): Likewise.
8143 (s390x_emit_ne_goto): Likewise.
8144 (s390x_emit_lt_goto): Likewise.
8145 (s390x_emit_le_goto): Likewise.
8146 (s390x_emit_gt_goto): Likewise.
8147 (s390x_emit_ge_goto): Likewise.
8148 (s390_emit_ops_impl): Mark variable static.
8149 (s390x_emit_ops): Likewise.
8150
8151 2016-06-17 Yao Qi <yao.qi@linaro.org>
8152
8153 * linux-low.c (handle_extended_wait): Call
8154 uninsert_reinsert_breakpoints for the parent process. Remove
8155 reinsert breakpoints from the child process. Reinsert them to
8156 the parent process when vfork is done.
8157 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8158 (reinsert_reinsert_breakpoints): New function.
8159 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8160 (reinsert_reinsert_breakpoints): Declare.
8161
8162 2016-06-17 Yao Qi <yao.qi@linaro.org>
8163
8164 * linux-low.c (handle_extended_wait): If the parent is doing
8165 step-over, remove the reinsert breakpoints from the forked child.
8166
8167 2016-06-17 Yao Qi <yao.qi@linaro.org>
8168
8169 * linux-low.c (unsuspend_all_lwps): Declare.
8170 (linux_low_filter_event): If thread exited, call finish_step_over.
8171 If step-over is finished, unsuspend other threads.
8172
8173 2016-06-17 Yao Qi <yao.qi@linaro.org>
8174
8175 * linux-low.c (linux_resume_one_lwp_throw): Assert
8176 has_reinsert_breakpoints returns false.
8177 * mem-break.c (delete_disabled_breakpoints): Assert
8178 bp type isn't reinsert_breakpoint.
8179
8180 2016-06-17 Yao Qi <yao.qi@linaro.org>
8181
8182 * linux-low.c (maybe_hw_step): New function.
8183 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8184 (finish_step_over): Switch current_thread to lwp temporarily,
8185 and assert has_reinsert_breakpoints returns true.
8186 (proceed_one_lwp): Call maybe_hw_step.
8187 * mem-break.c (has_reinsert_breakpoints): New function.
8188 * mem-break.h (has_reinsert_breakpoints): Declare.
8189
8190 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8191
8192 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8193
8194 2016-05-17 Yao Qi <yao.qi@linaro.org>
8195
8196 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8197 instead of find_inferior.
8198
8199 2016-05-05 Yao Qi <yao.qi@linaro.org>
8200
8201 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8202 Initialize res to zero.
8203
8204 2016-05-05 Yao Qi <yao.qi@linaro.org>
8205
8206 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8207 to uint32_t.
8208
8209 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8210
8211 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8212 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8213 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8214
8215 2016-04-28 Par Olsson <par.olsson@windriver.com>
8216 Simon Marchi <simon.marchi@ericsson.com>
8217
8218 * tracepoint.c (write_inferior_int8): New function.
8219 (cmd_qtenable_disable): Write enable flag using
8220 write_inferior_int8.
8221
8222 2016-04-25 Yao Qi <yao.qi@linaro.org>
8223
8224 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8225 (need_step_over_p): Return zero if the LWP has pending signals
8226 can be delivered on software single step target.
8227
8228 2016-04-25 Yao Qi <yao.qi@linaro.org>
8229
8230 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8231 return instead of error.
8232
8233 2016-04-22 Yao Qi <yao.qi@linaro.org>
8234
8235 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8236 to 23.
8237
8238 2016-04-22 Yao Qi <yao.qi@linaro.org>
8239
8240 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8241 signal when stepping over breakpoint with software single
8242 step.
8243
8244 2016-04-21 Pedro Alves <palves@redhat.com>
8245
8246 * linux-s390-low.c (s390_collect_ptrace_register)
8247 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8248 add casts.
8249 (s390_check_regset): Use void * instead of gdb_byte *.
8250
8251 2016-04-20 Pedro Alves <palves@redhat.com>
8252
8253 * configure: Renegerate.
8254
8255 2016-04-20 Yao Qi <yao.qi@linaro.org>
8256
8257 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8258 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8259 number 16.
8260 (arm_store_gregset): Likewise.
8261
8262 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8263
8264 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8265 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8266 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8267 (amd64-avx-mpx-linux.c): New rules.
8268 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8269 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8270 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8271 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8272 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8273 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8274 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8275 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8276 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8277 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8278 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8279 * linux-x86-low.c (x86_linux_read_description): Add case for
8280 X86_XSTATE_AVX_MPX_MASK.
8281 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8282 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8283 init_registers_i386_avx_mpx_linux.
8284 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8285 (initialize_low_tracepoint): Call
8286 init_registers_i386_avx_mpx_linux.
8287 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8288 (initialize_low_tracepoint): Call
8289 init_registers_amd64_avx_mpx_linux.
8290 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8291 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8292 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8293 declarations.
8294
8295 2016-04-18 Pedro Alves <palves@redhat.com>
8296
8297 * configure: Regenerate.
8298
8299 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8300
8301 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8302 (aarch64_emit_sub): Likewise.
8303
8304 2016-04-12 Pedro Alves <palves@redhat.com>
8305
8306 * utils.c (prepare_to_throw_exception): Delete.
8307
8308 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8309
8310 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8311
8312 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8313
8314 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8315
8316 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8317
8318 * linux-aarch64-ipa.c: Add <elf.h> include.
8319 * linux-ppc-ipa.c: Add <elf.h> include.
8320 * linux-s390-ipa.c: Add <elf.h> include.
8321
8322 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8323
8324 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8325 (get_raw_reg_ptr): Likewise.
8326 (get_trace_state_variable_value_ptr): Likewise.
8327 (set_trace_state_variable_value_ptr): Likewise.
8328 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8329 char *.
8330
8331 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8332 Marcin Kościelnicki <koriakin@0x04.net>
8333
8334 PR/17221
8335 * linux-ppc-low.c (emit_insns): New function.
8336 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8337 (ppc_emit_prologue): New function.
8338 (ppc_emit_epilogue): New function.
8339 (ppc_emit_add): New function.
8340 (ppc_emit_sub): New function.
8341 (ppc_emit_mul): New function.
8342 (ppc_emit_lsh): New function.
8343 (ppc_emit_rsh_signed): New function.
8344 (ppc_emit_rsh_unsigned): New function.
8345 (ppc_emit_ext): New function.
8346 (ppc_emit_zero_ext): New function.
8347 (ppc_emit_log_not): New function.
8348 (ppc_emit_bit_and): New function.
8349 (ppc_emit_bit_or): New function.
8350 (ppc_emit_bit_xor): New function.
8351 (ppc_emit_bit_not): New function.
8352 (ppc_emit_equal): New function.
8353 (ppc_emit_less_signed): New function.
8354 (ppc_emit_less_unsigned): New function.
8355 (ppc_emit_ref): New function.
8356 (ppc_emit_const): New function.
8357 (ppc_emit_reg): New function.
8358 (ppc_emit_pop): New function.
8359 (ppc_emit_stack_flush): New function.
8360 (ppc_emit_swap): New function.
8361 (ppc_emit_stack_adjust): New function.
8362 (ppc_emit_call): New function.
8363 (ppc_emit_int_call_1): New function.
8364 (ppc_emit_void_call_2): New function.
8365 (ppc_emit_if_goto): New function.
8366 (ppc_emit_goto): New function.
8367 (ppc_emit_eq_goto): New function.
8368 (ppc_emit_ne_goto): New function.
8369 (ppc_emit_lt_goto): New function.
8370 (ppc_emit_le_goto): New function.
8371 (ppc_emit_gt_goto): New function.
8372 (ppc_emit_ge_goto): New function.
8373 (ppc_write_goto_address): New function.
8374 (ppc_emit_ops_impl): New static variable.
8375 (ppc64v1_emit_prologue): New function.
8376 (ppc64v2_emit_prologue): New function.
8377 (ppc64_emit_epilogue): New function.
8378 (ppc64_emit_add): New function.
8379 (ppc64_emit_sub): New function.
8380 (ppc64_emit_mul): New function.
8381 (ppc64_emit_lsh): New function.
8382 (ppc64_emit_rsh_signed): New function.
8383 (ppc64_emit_rsh_unsigned): New function.
8384 (ppc64_emit_ext): New function.
8385 (ppc64_emit_zero_ext): New function.
8386 (ppc64_emit_log_not): New function.
8387 (ppc64_emit_bit_and): New function.
8388 (ppc64_emit_bit_or): New function.
8389 (ppc64_emit_bit_xor): New function.
8390 (ppc64_emit_bit_not): New function.
8391 (ppc64_emit_equal): New function.
8392 (ppc64_emit_less_signed): New function.
8393 (ppc64_emit_less_unsigned): New function.
8394 (ppc64_emit_ref): New function.
8395 (ppc64_emit_const): New function.
8396 (ppc64v1_emit_reg): New function.
8397 (ppc64v2_emit_reg): New function.
8398 (ppc64_emit_pop): New function.
8399 (ppc64_emit_stack_flush): New function.
8400 (ppc64_emit_swap): New function.
8401 (ppc64v1_emit_call): New function.
8402 (ppc64v2_emit_call): New function.
8403 (ppc64v1_emit_int_call_1): New function.
8404 (ppc64v2_emit_int_call_1): New function.
8405 (ppc64v1_emit_void_call_2): New function.
8406 (ppc64v2_emit_void_call_2): New function.
8407 (ppc64_emit_if_goto): New function.
8408 (ppc64_emit_eq_goto): New function.
8409 (ppc64_emit_ne_goto): New function.
8410 (ppc64_emit_lt_goto): New function.
8411 (ppc64_emit_le_goto): New function.
8412 (ppc64_emit_gt_goto): New function.
8413 (ppc64_emit_ge_goto): New function.
8414 (ppc64v1_emit_ops_impl): New static variable.
8415 (ppc64v2_emit_ops_impl): New static variable.
8416 (ppc_emit_ops): New function.
8417 (linux_low_target): Wire in ppc_emit_ops.
8418
8419 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8420 Marcin Kościelnicki <koriakin@0x04.net>
8421
8422 PR/17221
8423 * Makefile.in: Add powerpc-*-ipa.o
8424 * configure.srv: Add ipa_obj for powerpc*-linux.
8425 * linux-ppc-ipa.c: New file.
8426 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8427 includes.
8428 (PPC_FIELD): New macro.
8429 (PPC_SEXT): New macro.
8430 (PPC_OP6): New macro.
8431 (PPC_BO): New macro.
8432 (PPC_LI): New macro.
8433 (PPC_BD): New macro.
8434 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8435 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8436 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8437 (ppc_get_thread_area): New function.
8438 (is_elfv2_inferior): New function.
8439 (gen_ds_form): New function.
8440 (GEN_STD): New macro.
8441 (GEN_STDU): New macro.
8442 (GEN_LD): New macro.
8443 (GEN_LDU): New macro.
8444 (gen_d_form): New function.
8445 (GEN_ADDI): New macro.
8446 (GEN_ADDIS): New macro.
8447 (GEN_LI): New macro.
8448 (GEN_LIS): New macro.
8449 (GEN_ORI): New macro.
8450 (GEN_ORIS): New macro.
8451 (GEN_LWZ): New macro.
8452 (GEN_STW): New macro.
8453 (GEN_STWU): New macro.
8454 (gen_xfx_form): New function.
8455 (GEN_MFSPR): New macro.
8456 (GEN_MTSPR): New macro.
8457 (GEN_MFCR): New macro.
8458 (GEN_MTCR): New macro.
8459 (GEN_SYNC): New macro.
8460 (GEN_LWSYNC): New macro.
8461 (gen_x_form): New function.
8462 (GEN_OR): New macro.
8463 (GEN_MR): New macro.
8464 (GEN_LWARX): New macro.
8465 (GEN_STWCX): New macro.
8466 (GEN_CMPW): New macro.
8467 (gen_md_form): New function.
8468 (GEN_RLDICL): New macro.
8469 (GEN_RLDICR): New macro.
8470 (gen_i_form): New function.
8471 (GEN_B): New macro.
8472 (GEN_BL): New macro.
8473 (gen_b_form): New function.
8474 (GEN_BNE): New macro.
8475 (GEN_LOAD): New macro.
8476 (GEN_STORE): New macro.
8477 (gen_limm): New function.
8478 (gen_atomic_xchg): New function.
8479 (gen_call): New function.
8480 (ppc_relocate_instruction): New function.
8481 (ppc_install_fast_tracepoint_jump_pad): New function.
8482 (ppc_get_min_fast_tracepoint_insn_len): New function.
8483 (ppc_get_ipa_tdesc_idx): New function.
8484 (the_low_target): Wire in the new functions.
8485 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8486 tdescs.
8487 * linux-ppc-tdesc.h: New file.
8488
8489 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8490
8491 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8492 (alloc_jump_pad_buffer): New function.
8493 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8494 (alloc_jump_pad_buffer): New function.
8495 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8496 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8497 (alloc_jump_pad_buffer): New function.
8498 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8499 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8500 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8501 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8502
8503 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8504
8505 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8506 * linux-amd64-ipa.c: Likewise.
8507 * linux-i386-ipa.c: Likewise.
8508 * linux-s390-ipa.c: Likewise.
8509 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8510 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8511 set_trace_state_variable_value_ptr.
8512 (struct ipa_sym_addresses): Likewise.
8513 (symbol_list): Likewise.
8514 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8515 accessing gdb_collect directly.
8516 (gdb_collect_ptr_type): New typedef.
8517 (get_raw_reg_ptr_type): New typedef.
8518 (get_trace_state_variable_value_ptr_type): New typedef.
8519 (set_trace_state_variable_value_ptr_type): New typedef.
8520 (gdb_collect_ptr): New global.
8521 (get_raw_reg_ptr): New global.
8522 (get_trace_state_variable_value_ptr): New global.
8523 (set_trace_state_variable_value_ptr): New global.
8524 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8525 accessing get_raw_reg directly.
8526 (get_get_tsv_func_addr): Likewise for
8527 get_trace_state_variable_value_ptr.
8528 (get_set_tsv_func_addr): Likewise for
8529 set_trace_state_variable_value_ptr.
8530 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8531
8532 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8533
8534 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8535
8536 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8537
8538 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8539 packets.
8540 (relocate_instruction): Remove own_buf.
8541 * server.c (own_buf): Make global.
8542 (handle_v_requests): Make global.
8543 * server.h (own_buf): New declaration.
8544 (handle_v_requests): New prototype.
8545
8546 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8547
8548 PR 18377
8549 * linux-s390-low.c (add_insns): New function.
8550 (s390_emit_prologue): New function.
8551 (s390_emit_epilogue): New function.
8552 (s390_emit_add): New function.
8553 (s390_emit_sub): New function.
8554 (s390_emit_mul): New function.
8555 (s390_emit_lsh): New function.
8556 (s390_emit_rsh_signed): New function.
8557 (s390_emit_rsh_unsigned): New function.
8558 (s390_emit_ext): New function.
8559 (s390_emit_log_not): New function.
8560 (s390_emit_bit_and): New function.
8561 (s390_emit_bit_or): New function.
8562 (s390_emit_bit_xor): New function.
8563 (s390_emit_bit_not): New function.
8564 (s390_emit_equal): New function.
8565 (s390_emit_less_signed): New function.
8566 (s390_emit_less_unsigned): New function.
8567 (s390_emit_ref): New function.
8568 (s390_emit_if_goto): New function.
8569 (s390_emit_goto): New function.
8570 (s390_write_goto_address): New function.
8571 (s390_emit_litpool): New function.
8572 (s390_emit_const): New function.
8573 (s390_emit_call): New function.
8574 (s390_emit_reg): New function.
8575 (s390_emit_pop): New function.
8576 (s390_emit_stack_flush): New function.
8577 (s390_emit_zero_ext): New function.
8578 (s390_emit_swap): New function.
8579 (s390_emit_stack_adjust): New function.
8580 (s390_emit_set_r2): New function.
8581 (s390_emit_int_call_1): New function.
8582 (s390_emit_void_call_2): New function.
8583 (s390_emit_eq_goto): New function.
8584 (s390_emit_ne_goto): New function.
8585 (s390_emit_lt_goto): New function.
8586 (s390_emit_le_goto): New function.
8587 (s390_emit_gt_goto): New function.
8588 (s390_emit_ge_goto): New function.
8589 (s390x_emit_prologue): New function.
8590 (s390x_emit_epilogue): New function.
8591 (s390x_emit_add): New function.
8592 (s390x_emit_sub): New function.
8593 (s390x_emit_mul): New function.
8594 (s390x_emit_lsh): New function.
8595 (s390x_emit_rsh_signed): New function.
8596 (s390x_emit_rsh_unsigned): New function.
8597 (s390x_emit_ext): New function.
8598 (s390x_emit_log_not): New function.
8599 (s390x_emit_bit_and): New function.
8600 (s390x_emit_bit_or): New function.
8601 (s390x_emit_bit_xor): New function.
8602 (s390x_emit_bit_not): New function.
8603 (s390x_emit_equal): New function.
8604 (s390x_emit_less_signed): New function.
8605 (s390x_emit_less_unsigned): New function.
8606 (s390x_emit_ref): New function.
8607 (s390x_emit_if_goto): New function.
8608 (s390x_emit_const): New function.
8609 (s390x_emit_call): New function.
8610 (s390x_emit_reg): New function.
8611 (s390x_emit_pop): New function.
8612 (s390x_emit_stack_flush): New function.
8613 (s390x_emit_zero_ext): New function.
8614 (s390x_emit_swap): New function.
8615 (s390x_emit_stack_adjust): New function.
8616 (s390x_emit_int_call_1): New function.
8617 (s390x_emit_void_call_2): New function.
8618 (s390x_emit_eq_goto): New function.
8619 (s390x_emit_ne_goto): New function.
8620 (s390x_emit_lt_goto): New function.
8621 (s390x_emit_le_goto): New function.
8622 (s390x_emit_gt_goto): New function.
8623 (s390x_emit_ge_goto): New function.
8624 (s390_emit_ops): New function.
8625 (struct linux_target_ops): Fill in emit_ops hook.
8626
8627 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8628
8629 PR 18377
8630 * Makefile.in: Add s390 IPA files.
8631 * configure.srv: Build IPA for s390.
8632 * linux-s390-ipa.c: New file.
8633 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8634 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8635 (tdesc_s390_linux32): Likewise.
8636 (init_registers_s390_linux32v1): Likewise.
8637 (tdesc_s390_linux32v1): Likewise.
8638 (init_registers_s390_linux32v2): Likewise.
8639 (tdesc_s390_linux32v2): Likewise.
8640 (init_registers_s390_linux64): Likewise.
8641 (tdesc_s390_linux64): Likewise.
8642 (init_registers_s390_linux64v1): Likewise.
8643 (tdesc_s390_linux64v1): Likewise.
8644 (init_registers_s390_linux64v2): Likewise.
8645 (tdesc_s390_linux64v2): Likewise.
8646 (init_registers_s390_te_linux64): Likewise.
8647 (tdesc_s390_te_linux64): Likewise.
8648 (init_registers_s390_vx_linux64): Likewise.
8649 (tdesc_s390_vx_linux64): Likewise.
8650 (init_registers_s390_tevx_linux64): Likewise.
8651 (tdesc_s390_tevx_linux64): Likewise.
8652 (init_registers_s390x_linux64): Likewise.
8653 (tdesc_s390x_linux64): Likewise.
8654 (init_registers_s390x_linux64v1): Likewise.
8655 (tdesc_s390x_linux64v1): Likewise.
8656 (init_registers_s390x_linux64v2): Likewise.
8657 (tdesc_s390x_linux64v2): Likewise.
8658 (init_registers_s390x_te_linux64): Likewise.
8659 (tdesc_s390x_te_linux64): Likewise.
8660 (init_registers_s390x_vx_linux64): Likewise.
8661 (tdesc_s390x_vx_linux64): Likewise.
8662 (init_registers_s390x_tevx_linux64): Likewise.
8663 (tdesc_s390x_tevx_linux64): Likewise.
8664 (have_hwcap_s390_vx): New static variable.
8665 (s390_arch_setup): Fill have_hwcap_s390_vx.
8666 (s390_get_thread_area): New function.
8667 (s390_ft_entry_gpr_esa): New const.
8668 (s390_ft_entry_gpr_zarch): New const.
8669 (s390_ft_entry_misc): New const.
8670 (s390_ft_entry_fr): New const.
8671 (s390_ft_entry_vr): New const.
8672 (s390_ft_main_31): New const.
8673 (s390_ft_main_64): New const.
8674 (s390_ft_exit_fr): New const.
8675 (s390_ft_exit_vr): New const.
8676 (s390_ft_exit_misc): New const.
8677 (s390_ft_exit_gpr_esa): New const.
8678 (s390_ft_exit_gpr_zarch): New const.
8679 (append_insns): New function.
8680 (s390_relocate_instruction): New function.
8681 (s390_install_fast_tracepoint_jump_pad): New function.
8682 (s390_get_min_fast_tracepoint_insn_len): New function.
8683 (s390_get_ipa_tdesc_idx): New function.
8684 (struct linux_target_ops): Wire in the above functions.
8685 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8686 * linux-s390-tdesc.h: New file.
8687
8688 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8689
8690 * linux-s390-low.c (s390_supports_tracepoints): New function.
8691 (struct linux_target_ops): Fill supports_tracepoints hook.
8692
8693 2016-03-18 Yao Qi <yao.qi@linaro.org>
8694
8695 * linux-low.c (lwp_signal_can_be_delivered): New function.
8696 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8697
8698 2016-03-18 Yao Qi <yao.qi@linaro.org>
8699
8700 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8701 0 if signal is enqueued. Remove 'signal' from one debugging
8702 message. Move one debugging message to some lines below.
8703 Remove code setting 'signal' to 0.
8704
8705 2016-03-18 Yao Qi <yao.qi@linaro.org>
8706
8707 * linux-low.c (linux_low_filter_event): Remove redundant
8708 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8709
8710 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8711
8712 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8713 (struct linux_target_ops): Wire in the above.
8714
8715 2016-03-03 Yao Qi <yao.qi@linaro.org>
8716
8717 * linux-low.c: Update comments to start_step_over.
8718
8719 2016-03-03 Yao Qi <yao.qi@linaro.org>
8720
8721 PR server/19736
8722 * linux-low.c (handle_extended_wait): Set child suspended
8723 if event_lwp->bp_reinsert isn't zero.
8724
8725 2016-03-02 Yao Qi <yao.qi@linaro.org>
8726
8727 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8728 enqueue_pending_signal.
8729
8730 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8731
8732 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8733 is actually loaded.
8734
8735 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8736
8737 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8738 (s390_regmap_3264) [!__s390x__]: New global.
8739 (s390_collect_ptrace_register): Skip map entries containing -1.
8740 (s390_supply_ptrace_register): Ditto.
8741 (s390_fill_gprs_high): New function.
8742 (s390_store_gprs_high): New function.
8743 (s390_regsets): Add NT_S390_HIGH_GPRS.
8744 (s390_get_hwcap): Enable on 31-bit.
8745 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8746 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8747 Detect NT_S390_HIGH_GPRS.
8748 (s390_usrregs_info_3264): Enable on 31-bit.
8749 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8750 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8751
8752 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8753
8754 PR gdb/13808
8755 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8756 * configure.srv: Ditto.
8757 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8758 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8759 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8760 (init_registers_amd64_linux): Remove prototype.
8761 (tdesc_amd64_linux): Remove declaration.
8762 (get_ipa_tdesc): New function.
8763 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8764 initialize remaining tdescs.
8765 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8766 (init_registers_i386_linux): Remove prototype.
8767 (tdesc_i386_linux): Remove declaration.
8768 (get_ipa_tdesc): New function.
8769 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8770 initialize remaining tdescs.
8771 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8772 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8773 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8774 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8775 (x86_get_ipa_tdesc_idx): New function.
8776 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8777 * linux-x86-tdesc.h: New file.
8778 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8779 (target_get_ipa_tdesc_idx): New macro.
8780 * tracepoint.c (ipa_tdesc_idx): New macro.
8781 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8782 (symbol_list): Add ipa_tdesc_idx.
8783 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8784 (ipa_tdesc): Remove.
8785 (ipa_tdesc_idx): New variable.
8786 (get_context_regcache): Use get_ipa_tdesc.
8787 (gdb_collect): Ditto.
8788 (gdb_probe): Ditto.
8789 * tracepoint.h (get_ipa_tdesc): New prototype.
8790 (ipa_tdesc): Remove.
8791
8792 2016-02-24 Pedro Alves <palves@redhat.com>
8793
8794 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8795 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8796 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8797 Factor out common code between the USE_SIGTRAP_SIGINFO and
8798 !USE_SIGTRAP_SIGINFO blocks.
8799 (linux_low_filter_event): Call save_stop_reason instead of
8800 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8801 Update comments.
8802 (linux_wait_1): Update comments.
8803
8804 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8805
8806 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8807 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8808 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8809 ppc_insert_point, ppc_remove_point.
8810
8811 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8812
8813 * linux-s390-low.c (s390_supports_z_point_type): New function.
8814 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8815
8816 2016-02-16 Yao Qi <yao.qi@linaro.org>
8817
8818 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8819 PC. Get pc from regcache_read_pc.
8820
8821 2016-02-12 Yao Qi <yao.qi@linaro.org>
8822
8823 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8824 or linux_get_pc_32bit.
8825 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8826
8827 2016-02-12 Yao Qi <yao.qi@linaro.org>
8828
8829 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8830 arm_linux_get_next_pcs_fixup.
8831
8832 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8833
8834 * tracepoint.c (x_tracepoint_action_download): Change
8835 write_inferior_data_ptr to write_inferior_data_pointer.
8836 (cmd_qtstart): Likewise.
8837 (write_inferior_data_ptr): Remove.
8838 (download_agent_expr): Change write_inferior_data_ptr to
8839 write_inferior_data_pointer.
8840 (download_tracepoint_1): Likewise.
8841 (download_tracepoint): Likewise.
8842 (download_trace_state_variables): Likewise.
8843
8844 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8845 Marcin Kościelnicki <koriakin@0x04.net>
8846
8847 * tracepoint.c (struct tracepoint_action_ops): Remove.
8848 (struct tracepoint_action): Remove ops.
8849 (m_tracepoint_action_download, r_tracepoint_action_download)
8850 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8851 size and offset accordingly.
8852 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8853 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8854 (tracepoint_action_send, tracepoint_action_download): New functions.
8855 Helpers for trace action handlers.
8856 (add_tracepoint_action): Remove setup actions ops.
8857 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8858
8859 2016-02-10 Yao Qi <yao.qi@linaro.org>
8860
8861 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8862
8863 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8864
8865 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8866 to AC_OUTPUT.
8867 * configure: Regenerate.
8868
8869 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8870
8871 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8872 void * to gdb_byte *.
8873 * linux-low.c (siginfo_fixup): Likewise.
8874 (linux_xfer_siginfo): Likewise.
8875 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8876 Likewise.
8877 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8878
8879 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8880
8881 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8882 to srv_tgtobj.
8883 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8884 to srv_tgtobj.
8885 * linux-x86-low.c [__x86_64__]: Include
8886 "nat/amd64-linux-siginfo.h".
8887 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8888 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8889 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8890 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8891 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8892 (cpt_si_fd, si_timerid, si_overrun): Move from
8893 nat/amd64-linux-siginfo.c.
8894 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8895
8896 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8897
8898 * server.c (skip_to_semicolon): Remove.
8899 (process_point_options): Use strchrnul instead of
8900 skip_to_semicolon.
8901
8902 2016-01-26 Yao Qi <yao.qi@linaro.org>
8903
8904 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8905 * linux-low.c (install_software_single_step_breakpoints): Don't
8906 call regcache_read_pc.
8907 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8908 argument pc.
8909
8910 2016-01-26 Yao Qi <yao.qi@linaro.org>
8911
8912 * linux-low.c (install_software_single_step_breakpoints): Call
8913 regcache_read_pc instead of get_pc.
8914
8915 2016-01-26 Yao Qi <yao.qi@linaro.org>
8916
8917 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8918 (unblock_async_io): Rename to ...
8919 (block_unblock_async_io): ... it. New function.
8920 (enable_async_io): Don't install SIGIO handler. Unblock it
8921 instead.
8922 (disable_async_io): Don't ignore SIGIO. Block it instead.
8923 (initialize_async_io): Install SIGIO handler. Don't call
8924 unblock_async_io.
8925
8926 2016-01-26 Yao Qi <yao.qi@linaro.org>
8927
8928 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8929 first character is '\003', call *the_target->request_interrupt.
8930
8931 2016-01-25 Yao Qi <yao.qi@linaro.org>
8932
8933 * remote-utils.c (new_thread_notify): Remove.
8934 (dead_thread_notify): Likewise.
8935 * remote-utils.h (new_thread_notify): Remove declaration.
8936 (dead_thread_notify): Likewise.
8937
8938 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8939
8940 * gdb.trace/pending.exp: Fix expected message on continue.
8941
8942 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8943
8944 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8945 it works properly on big-endian machines where sizeof (CORE_ADDR)
8946 != sizeof (void *).
8947
8948 2016-01-21 Pedro Alves <palves@redhat.com>
8949
8950 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8951 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8952 * configure: Regenerate.
8953
8954 2016-01-21 Yao Qi <yao.qi@linaro.org>
8955
8956 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8957 is_thumb and set it according to CPSR saved on the stack.
8958 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8959 arm_sigreturn_next_pc.
8960
8961 2016-01-18 Yao Qi <yao.qi@linaro.org>
8962
8963 * linux-low.c (linux_set_pc_64bit): New function.
8964 (linux_get_pc_64bit): New function.
8965 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8966 Declare.
8967 * linux-sparc-low.c (debug_threads): Remove declaration.
8968 (sparc_get_pc): Remove.
8969 (the_low_target): Use linux_get_pc_64bit instead of
8970 sparc_get_pc.
8971 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8972 (the_low_target): Use linux_get_pc_64bit and
8973 linux_set_pc_64bit.
8974
8975 2016-01-18 Yao Qi <yao.qi@linaro.org>
8976
8977 * linux-arm-low.c (debug_threads): Remove declaration.
8978 (arm_get_pc, arm_set_pc): Remove.
8979 (the_low_target): Use linux_get_pc_32bit and
8980 linux_set_pc_32bit.
8981 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8982 (the_low_target): Use linux_get_pc_32bit and
8983 linux_set_pc_32bit.
8984 * linux-cris-low.c (debug_threads): Remove declaration.
8985 (cris_get_pc, cris_set_pc,): Remove.
8986 (the_low_target): Use linux_get_pc_32bit and
8987 linux_set_pc_32bit.
8988 * linux-crisv32-low.c (debug_threads): Remove declaration.
8989 (cris_get_pc, cris_set_pc): Remove.
8990 (the_low_target): Use linux_get_pc_32bit and
8991 linux_set_pc_32bit.
8992 * linux-low.c: Include inttypes.h.
8993 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8994 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8995 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8996 (the_low_target): Use linux_get_pc_32bit and
8997 linux_set_pc_32bit.
8998 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8999 (the_low_target): Use linux_get_pc_32bit and
9000 linux_set_pc_32bit.
9001 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9002 (the_low_target): Use linux_get_pc_32bit and
9003 linux_set_pc_32bit.
9004 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9005 (the_low_target): Use linux_get_pc_32bit and
9006 linux_set_pc_32bit.
9007 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9008 (the_low_target): Use linux_get_pc_32bit and
9009 linux_set_pc_32bit.
9010
9011 2016-01-18 Gary Benson <gbenson@redhat.com>
9012
9013 * configure.ac (AC_FUNC_FORK): New check.
9014 * config.in: Regenerate.
9015 * configure: Likewise.
9016
9017 2016-01-14 Yao Qi <yao.qi@linaro.org>
9018
9019 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9020 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9021 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9022 arm_get_next_pcs_ctor.
9023
9024 2016-01-12 Josh Stone <jistone@redhat.com>
9025 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9026
9027 * inferiors.h: Include "gdb_vecs.h".
9028 (struct process_info): Add syscalls_to_catch.
9029 * inferiors.c (remove_process): Free syscalls_to_catch.
9030 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9031 syscall_return stops.
9032 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9033 * server.c (handle_general_set): Handle QCatchSyscalls.
9034 (handle_query): Report support for QCatchSyscalls.
9035 * target.h (struct target_ops): Add supports_catch_syscall.
9036 (target_supports_catch_syscall): New macro.
9037 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9038 (struct lwp_info): Add syscall_state.
9039 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9040 Maintain syscall_state and syscalls_to_catch across exec.
9041 (get_syscall_trapinfo): New function, proxy to the_low_target.
9042 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9043 (linux_low_filter_event): Toggle syscall_state entry/return for
9044 syscall traps, and set it ignored for all others.
9045 (gdb_catching_syscalls_p): New function.
9046 (gdb_catch_this_syscall_p): New function.
9047 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9048 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9049 (linux_supports_catch_syscall): New function.
9050 (linux_target_ops): Install it.
9051 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9052 (the_low_target): Install it.
9053
9054 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9055
9056 * acinclude.m4: Include new ../warning.m4 file.
9057 * configure: Regenerated.
9058 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9059
9060 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9061
9062 * ax.c (is_goto_target): Mark static.
9063 * linux-low.c (register_addr): Likewise.
9064 (linux_fetch_registers, linux_store_registers): Likewise.
9065 * mem-break.c (any_persistent_commands): Fix old prototype.
9066 (add_commands_to_breakpoint): Mark static.
9067 * regcache.c (find_register_by_name): Delete unused func.
9068 * remote-utils.c (hex_or_minus_one): Mark static.
9069 * server.c (monitor_show_help): Mark static.
9070 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9071 handle_v_requests): Likewise.
9072
9073 2016-01-12 Pedro Alves <palves@redhat.com>
9074
9075 Remove use of the registered trademark symbol throughout.
9076
9077 2016-01-08 Yao Qi <yao.qi@linaro.org>
9078
9079 * remote-utils.c (getpkt): If c is '\003', call target hook
9080 request_interrupt.
9081
9082 2016-01-06 Yao Qi <yao.qi@linaro.org>
9083
9084 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9085 linux-aarch32-low.c.
9086 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9087 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9088 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9089 (thumb2_breakpoint): Declare.
9090 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9091 linux-aarch32-low.h.
9092 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9093 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9094 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9095
9096 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9097
9098 * gdbreplay.c (gdbreplay_version): Change copyright year in
9099 version message.
9100 * server.c (gdbserver_version): Likewise.
9101
9102 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9103
9104 * server.c (crc32_table): Delete.
9105 (crc32): Use libiberty's xcrc32 function.
9106
9107 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9108
9109 * lynx-low.c (lynx_delete_thread_callback): New function.
9110 (lynx_mourn): Properly delete our process and all of its
9111 threads. Remove call to clear_inferiors.
9112
9113 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9114
9115 * target.c (thread_search_callback): Add check that
9116 the thread_stopped target callback is not NULL before
9117 calling it.
9118
9119 2015-12-21 Yao Qi <yao.qi@linaro.org>
9120
9121 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9122 arm breakpoint.
9123
9124 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9125
9126 * server.c (handle_query): Call target_supports_software_single_step.
9127
9128 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9129
9130 * linux-low.c (single_step): New function.
9131 (linux_resume_one_lwp_throw): Call single_step.
9132 (start_step_over): Likewise.
9133
9134 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9135
9136 * Makefile.in (SFILES): Append arch/arm-linux.c,
9137 arch/arm-get-next-pcs.c.
9138 (arm-linux.o): New rule.
9139 (arm-get-next-pcs.o): New rule.
9140 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9141 arm-linux.o.
9142 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9143 to linux-aarch32-low.c.
9144 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9145 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9146 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9147 (thumb2_breakpoint_len): Likewise.
9148 (arm_is_thumb_mode): Make non-static.
9149 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9150 from linux-aarch32-low.c.
9151 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9152 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9153 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9154 (thumb2_breakpoint_len): Likewise.
9155 (arm_is_thumb_mode): New declaration.
9156 * linux-arm-low.c: Include arch/arm-linux.h
9157 aarch/arm-get-next-pcs.h, sys/syscall.h.
9158 (get_next_pcs_ops): New struct.
9159 (get_next_pcs_addr_bits_remove): New function.
9160 (get_next_pcs_is_thumb): New function.
9161 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9162 (arm_sigreturn_next_pc): Likewise.
9163 (get_next_pcs_syscall_next_pc): Likewise.
9164 (arm_gdbserver_get_next_pcs): Likewise.
9165 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9166 Initialize.
9167 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9168 * server.h: Include gdb_vecs.h.
9169
9170 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9171
9172 * Makefile.in (SFILES): Append common/common-regcache.c.
9173 (OBS): Append common-regcache.o.
9174 (common-regcache.o): New rule.
9175 * regcache.c (init_register_cache): Initialize cache to
9176 REG_UNAVAILABLE.
9177 (regcache_raw_read_unsigned): New function.
9178 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9179 register_status enum.
9180
9181 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9182
9183 * linux-aarch64-low.c (the_low_targets): Rename
9184 breakpoint_reinsert_addr to get_next_pcs.
9185 * linux-arm-low.c (the_low_targets): Likewise.
9186 * linux-bfin-low.c (the_low_targets): Likewise.
9187 * linux-cris-low.c (the_low_targets): Likewise.
9188 * linux-crisv32-low.c (the_low_targets): Likewise.
9189 * linux-low.c (can_software_single_step): Likewise.
9190 (install_software_single_step_breakpoints): New function.
9191 (start_step_over): Use install_software_single_step_breakpoints.
9192 * linux-low.h: New CORE_ADDR vector.
9193 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9194 get_next_pcs.
9195 * linux-mips-low.c (the_low_targets): Likewise.
9196 * linux-nios2-low.c (the_low_targets): Likewise.
9197 * linux-sparc-low.c (the_low_targets): Likewise.
9198
9199 2015-12-17 Pedro Alves <palves@redhat.com>
9200
9201 * linux-low.c (linux_kill_one_lwp): Remove references to
9202 LinuxThreads.
9203 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9204 to 'kill'.
9205 (linux_init_signals): Delete.
9206 (initialize_low): Adjust.
9207 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9208
9209 2015-12-16 Pedro Alves <palves@redhat.com>
9210
9211 * configure.ac (compiler warning flags): When testing a
9212 -Wno-foo option, check whether -Wfoo works instead.
9213 * configure: Regenerate.
9214
9215 2015-12-11 Don Breazeal <donb@codesourcery.com>
9216
9217 * server.c (process_serial_event): Don't exit from gdbserver
9218 in remote mode if there are still active inferiors.
9219
9220 2015-12-11 Yao Qi <yao.qi@linaro.org>
9221
9222 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9223 arm_breakpoint_at if the process is 32-bit.
9224
9225 2015-12-11 Yao Qi <yao.qi@linaro.org>
9226
9227 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9228 arm breakpoint.
9229
9230 2015-12-07 Yao Qi <yao.qi@linaro.org>
9231
9232 * configure.srv: Append arm.o to srv_tgtobj for
9233 aarch64*-*-linux* target.
9234 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9235 from linux-arm-low.c.
9236 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9237 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9238 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9239 (thumb2_breakpoint_len): Likewise.
9240 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9241 (arm_breakpoint_kinds): Likewise.
9242 (arm_breakpoint_kind_from_pc): Likewise.
9243 (arm_sw_breakpoint_from_kind): Likewise.
9244 (arm_breakpoint_kind_from_current_state): Likewise.
9245 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9246 (arm_sw_breakpoint_from_kind): Declare.
9247 (arm_breakpoint_kind_from_current_state): Declare.
9248 (arm_breakpoint_at): Declare.
9249 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9250 arm_sw_breakpoint_from_kind if process is 32-bit.
9251 (aarch64_breakpoint_kind_from_pc): New function.
9252 (aarch64_breakpoint_kind_from_current_state): New function.
9253 (the_low_target): Initialize fields breakpoint_kind_from_pc
9254 and breakpoint_kind_from_current_state.
9255 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9256 linux-aarch32-low.c.
9257 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9258 (arm_breakpoint, arm_breakpoint_len): Likewise.
9259 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9260 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9261 (arm_is_thumb_mode): Likewise.
9262 (arm_breakpoint_at): Likewise.
9263 (arm_breakpoint_kind_from_pc): Likewise.
9264 (arm_sw_breakpoint_from_kind): Likewise.
9265 (arm_breakpoint_kind_from_current_state): Likewise.
9266
9267 Revert:
9268 2015-08-04 Yao Qi <yao.qi@linaro.org>
9269
9270 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9271 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9272 * server.c (extended_protocol): Remove "static".
9273 * server.h (extended_protocol): Declare it.
9274
9275 2015-12-04 Josh Stone <jistone@redhat.com>
9276
9277 * target.h (struct target_ops) <arch_setup>: Rename to ...
9278 (struct target_ops) <post_create_inferior>: ... this.
9279 (target_arch_setup): Rename to ...
9280 (target_post_create_inferior): ... this, calling post_create_inferior.
9281 * server.c (start_inferior): Update target_arch_setup calls to
9282 target_post_create_inferior.
9283 * linux-low.c (linux_low_ptrace_options): Forward declare.
9284 (linux_arch_setup): Update its comment for general use.
9285 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9286 (struct linux_target_ops): Use linux_post_create_inferior.
9287 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9288 to post_create_inferior.
9289 * nto-low.c (struct nto_target_ops): Likewise.
9290 * spu-low.c (struct spu_target_ops): Likewise.
9291 * win32-low.c (struct win32_target_ops): Likewise.
9292
9293 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9294
9295 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9296
9297 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9298
9299 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9300 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9301 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9302 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9303 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9304 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9305 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9306 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9307 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9308 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9309 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9310 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9311
9312 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9313
9314 * linux-low.c (linux_look_up_symbols): Don't call
9315 linux_supports_traceclone.
9316 * linux-low.h (thread_db_init): Remove use_events argument.
9317 * thread-db.c (thread_db_use_event): Remove global variable.
9318 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9319 (struct thread_db) <td_create_bp>: Remove field.
9320 (thread_db_create_event): Remove function.
9321 (thread_db_enable_reporting): Likewise.
9322 (find_one_thread): Don't check for thread_db_use_events.
9323 (attach_thread): Likewise.
9324 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9325 (try_thread_db_load_1): Don't check for thread_db_use_events.
9326 (thread_db_init): Remove use_events argument and thread events
9327 handling.
9328 (remove_thread_event_breakpoints): Remove function.
9329 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9330
9331 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9332
9333 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9334 New function.
9335 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9336 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9337 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9338 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9339 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9340 Initialize.
9341 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9342 New function.
9343 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9344 * linux-low.c (can_hardware_single_step): Use
9345 supports_hardware_single_step.
9346 (can_software_single_step): New function.
9347 (start_step_over): Call can_software_single_step.
9348 (linux_supports_hardware_single_step): New function.
9349 (struct target_ops) <supports_software_single_step>: Initialize.
9350 * linux-low.h (struct linux_target_ops)
9351 <supports_hardware_single_step>: Initialize.
9352 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9353 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9354 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9355 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9356 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9357 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9358 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9359 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9360 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9361 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9362 Initialize.
9363 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9364 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9365 Initialize.
9366 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9367 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9368 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9369 New function.
9370 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9371 * target.h (struct target_ops): <supports_software_single_step>:
9372 New field.
9373 (target_supports_software_single_step): New macro.
9374
9375 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9376
9377 * linux-low.c (linux_wait_1): Fix pc advance condition.
9378 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9379 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9380
9381 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9382
9383 * linux-arm-low.c (arm_is_thumb_mode): New function.
9384 (arm_breakpoint_at): Use arm_is_thumb_mode.
9385 (arm_breakpoint_kind_from_current_state): New function.
9386 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9387 Initialize.
9388 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9389 (linux_breakpoint_kind_from_current_state): New function.
9390 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9391 * linux-low.h (struct linux_target_ops)
9392 <breakpoint_kind_from_current_state>: New field.
9393 * target.h (struct target_ops): Likewise.
9394 (target_breakpoint_kind_from_current_state): New macro.
9395
9396 2015-11-30 Pedro Alves <palves@redhat.com>
9397
9398 * linux-low.c (linux_resume): Wake up the event loop before
9399 returning.
9400
9401 2015-11-30 Pedro Alves <palves@redhat.com>
9402
9403 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9404 check.
9405 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9406 to -1.
9407 * target.c (struct thread_search): New structure.
9408 (thread_search_callback): New function.
9409 (prev_general_thread): New global.
9410 (prepare_to_access_memory, done_accessing_memory): New functions.
9411 * target.h (prepare_to_access_memory, done_accessing_memory):
9412 Replace macros with function declarations.
9413
9414 2015-11-30 Pedro Alves <palves@redhat.com>
9415
9416 PR 14618
9417 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9418 report TARGET_WAITKIND_NO_RESUMED.
9419 * remote-utils.c (prepare_resume_reply): Handle
9420 TARGET_WAITKIND_NO_RESUMED.
9421 * server.c (report_no_resumed): New global.
9422 (handle_query) <qSupported>: Handle "no-resumed+". Report
9423 "no-resumed+" support.
9424 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9425 return error if the client doesn't support no-resumed events.
9426 (push_stop_notification): New function.
9427 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9428 events if the client supports them.
9429
9430 2015-11-30 Pedro Alves <palves@redhat.com>
9431
9432 * linux-low.c (thread_still_has_status_pending_p): Don't check
9433 vCont;t here.
9434 (lwp_resumed): New function.
9435 (status_pending_p_callback): Return early if the LWP is not
9436 supposed to be resumed.
9437
9438 2015-11-30 Pedro Alves <palves@redhat.com>
9439
9440 * linux-low.c (handle_extended_wait): Assert that the LWP's
9441 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9442 thread create events, leave the new child's status pending.
9443 (linux_low_filter_event): If GDB wants to hear about thread exit
9444 events, leave the LWP marked dead and don't delete it.
9445 (linux_wait_for_event_filtered): Don't check for thread exit.
9446 (filter_exit_event): New function.
9447 (linux_wait_1): Use it, when returning an exit event.
9448 (linux_resume_one_lwp_throw): Assert that the LWP's
9449 waitstatus is TARGET_WAITKIND_IGNORE.
9450 * remote-utils.c (prepare_resume_reply): Handle
9451 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9452 * server.c (report_thread_events): New global.
9453 (handle_general_set): Handle QThreadEvents.
9454 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9455 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9456 TARGET_WAITKIND_THREAD_EXITED.
9457 * server.h (report_thread_events): Declare.
9458
9459 2015-11-30 Pedro Alves <palves@redhat.com>
9460
9461 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9462 the thread's last_resume_kind was resume_stop.
9463
9464 2015-11-30 Pedro Alves <palves@redhat.com>
9465
9466 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9467 before returning.
9468
9469 2015-11-30 Pedro Alves <palves@redhat.com>
9470
9471 * server.c (handle_v_requests): Handle vCtrlC.
9472
9473 2015-11-30 Pedro Alves <palves@redhat.com>
9474
9475 * gdbthread.h (find_any_thread_of_pid): Declare.
9476 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9477 functions.
9478 * server.c (handle_query): If current_thread is NULL, look for
9479 another thread of the selected process.
9480
9481 2015-11-26 Daniel Colascione <dancol@dancol.org>
9482 Simon Marchi <simon.marchi@ericsson.com>
9483
9484 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9485 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9486 name in reply.
9487 * target.h (struct target_ops) <thread_name>: New field.
9488 (target_thread_name): New macro.
9489
9490 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9491
9492 * regcache.h (regcache_invalidate_pid): Add declaration.
9493 * regcache.c (regcache_invalidate_pid): New function, extracted
9494 from regcache_invalidate.
9495 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9496 Add trivial documentation comment.
9497 * lynx-low.c: Use regcache_invalidate_pid instead of
9498 regcache_invalidate.
9499
9500 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9501
9502 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9503 and Elf64_auxv_t if the target is Android.
9504
9505 2015-11-22 Doug Evans <xdje42@gmail.com>
9506
9507 * target.h: #include <sys/types.h>.
9508
9509 2015-11-19 Pedro Alves <palves@redhat.com>
9510
9511 * linux-low.c (linux_process_qsupported): Change prototype.
9512 Adjust.
9513 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9514 Change prototype.
9515 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9516 and adjust to loop over all features.
9517 * server.c (handle_query) <qSupported>: Adjust to call
9518 target_process_qsupported once, passing it a vector of unprocessed
9519 features.
9520 * target.h (struct target_ops) <process_qsupported>: Change
9521 prototype.
9522 (target_process_qsupported): Adjust.
9523
9524 2015-11-19 Pedro Alves <palves@redhat.com>
9525
9526 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9527 mode.
9528 * configure: Regenerate.
9529
9530 2015-11-19 Pedro Alves <palves@redhat.com>
9531
9532 * configure: Regenerate.
9533
9534 2015-11-19 Yao Qi <yao.qi@linaro.org>
9535
9536 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9537 type to uint32_t.
9538
9539 2015-11-19 Yao Qi <yao.qi@linaro.org>
9540
9541 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9542 (struct aarch64_operand): Move enum out.
9543
9544 2015-11-19 Yao Qi <yao.qi@linaro.org>
9545
9546 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9547 struct user_fpsimd_state *.
9548 (aarch64_store_fpregset): Likewise.
9549
9550 2015-11-19 Yao Qi <yao.qi@linaro.org>
9551
9552 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9553 struct user_pt_regs *.
9554 (aarch64_store_gregset): Likewise.
9555
9556 2015-11-18 Pedro Alves <palves@redhat.com>
9557
9558 * Makefile.in (all_object_files): Add $IPA_OBJS.
9559
9560 2015-11-17 Pedro Alves <palves@redhat.com>
9561
9562 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9563 GDB_SIGNAL_0 and gdb_signal_to_string.
9564
9565 2015-11-17 Pedro Alves <palves@redhat.com>
9566
9567 * win32-low.c (handle_output_debug_string): Remove parameter.
9568 (win32_kill): Remove our_status local and adjust call to
9569 handle_output_debug_string.
9570 (get_child_debug_event): Adjust call to
9571 handle_output_debug_string.
9572
9573 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9574
9575 * linux-mips-low.c (mips_fill_gregset): Add cast.
9576 (mips_store_gregset): Likewise.
9577 (mips_fill_fpregset): Likewise.
9578 (mips_store_fpregset): Likewise.
9579
9580 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9581
9582 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9583 priv.
9584
9585 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9586
9587 * linux-mips-low.c (mips_linux_new_thread): Change type of
9588 watch_type to enum target_hw_bp_type.
9589
9590 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9591
9592 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9593 Change return type to arm_hwbp_type.
9594
9595 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9596
9597 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9598 (arm_store_gregset): Likewise.
9599 * linux-arm-low.c (arm_get_hwcap): Likewise.
9600 (arm_read_description): Likewise.
9601
9602 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9603
9604 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9605
9606 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9607
9608 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9609 (ppc_fill_vsxregset): Likewise.
9610 (ppc_store_vsxregset): Likewise.
9611 (ppc_fill_vrregset): Likewise.
9612 (ppc_store_vrregset): Likewise.
9613 (ppc_fill_evrregset): Likewise.
9614 (ppc_store_evrregset): Likewise.
9615
9616 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9617
9618 * linux-ppc-low.c (ppc_usrregs_info): Remove
9619 forward-declaration.
9620 (ppc_arch_setup): Move lower in file.
9621
9622 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9623
9624 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9625 (ps_pdwrite): Likewise.
9626
9627 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9628
9629 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9630 to after assert checks.
9631
9632 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9633
9634 * proc-service.c (ps_pdread): Add/adjust casts.
9635 (ps_pdwrite): Add/adjust casts.
9636
9637 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9638
9639 * server.c (handle_search_memory_1): Cast return value of
9640 memmem.
9641
9642 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9643
9644 * server.c (write_qxfer_response): Change type of data to
9645 gdb_byte *.
9646
9647 2015-10-29 Pedro Alves <palves@redhat.com>
9648
9649 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9650
9651 2015-10-29 Pedro Alves <palves@redhat.com>
9652
9653 * tracepoint.c (clear_installed_tracepoints): Add casts.
9654
9655 2015-10-29 Pedro Alves <palves@redhat.com>
9656
9657 * server.c (handle_v_cont, process_serial_event): Add enum
9658 gdb_signal casts to signal parsing code.
9659
9660 2015-10-29 Pedro Alves <palves@redhat.com>
9661
9662 * linux-low.h (NULL_REGSET): Define.
9663 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9664 * linux-arm-low.c (arm_regsets): Likewise.
9665 * linux-crisv32-low.c (cris_regsets): Likewise.
9666 * linux-m68k-low.c (m68k_regsets): Likewise.
9667 * linux-mips-low.c (mips_regsets): Likewise.
9668 * linux-nios2-low.c (nios2_regsets): Likewise.
9669 * linux-ppc-low.c (ppc_regsets): Likewise.
9670 * linux-s390-low.c (s390_regsets): Likewise.
9671 * linux-sh-low.c (sh_regsets): Likewise.
9672 * linux-sparc-low.c (sparc_regsets): Likewise.
9673 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9674 * linux-tile-low.c (tile_regsets): Likewise.
9675 * linux-x86-low.c (x86_regsets): Likewise.
9676 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9677
9678 2015-10-29 Pedro Alves <palves@redhat.com>
9679
9680 * linux-low.h (NULL_REGSET): Define.
9681 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9682 * linux-arm-low.c (arm_regsets): Likewise.
9683 * linux-crisv32-low.c (cris_regsets): Likewise.
9684 * linux-m68k-low.c (m68k_regsets): Likewise.
9685 * linux-mips-low.c (mips_regsets): Likewise.
9686 * linux-nios2-low.c (nios2_regsets): Likewise.
9687 * linux-ppc-low.c (ppc_regsets): Likewise.
9688 * linux-s390-low.c (s390_regsets): Likewise.
9689 * linux-sh-low.c (sh_regsets): Likewise.
9690 * linux-sparc-low.c (sparc_regsets): Likewise.
9691 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9692 * linux-tile-low.c (tile_regsets): Likewise.
9693 * linux-x86-low.c (x86_regsets): Likewise.
9694 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9695
9696 2015-10-26 Doug Evans <dje@google.com>
9697
9698 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9699
9700 2015-10-26 Doug Evans <dje@google.com>
9701
9702 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9703
9704 2015-10-26 Doug Evans <dje@google.com>
9705
9706 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9707 for debug_printf.
9708 (attach_thread, find_new_threads_callback): Ditto.
9709
9710 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9711
9712 * mem-break.h (set_breakpoint_data): Remove.
9713
9714 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9715
9716 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9717 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9718 (initialize_low): Remove set_breakpoint_data call.
9719 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9720 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9721 (initialize_low): Remove set_breakpoint_data call.
9722 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9723 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9724 (initialize_low): Remove set_breakpoint_data call.
9725
9726 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9727
9728 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9729 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9730 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9731 * target.h (target_breakpoint_kind_from_pc): New macro.
9732
9733 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9734
9735 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9736 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9737 the default breakpoint kind.
9738
9739 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9740
9741 * linux-arm-low.c (arm_supports_z_point_type): Add software
9742 breakpoint support.
9743
9744 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9745
9746 * linux-arm-low.c: Refactor breakpoint definitions.
9747 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9748 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9749
9750 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9751
9752 * Makefile.in: Add arm.c/o.
9753 * configure.srv: Likewise.
9754 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9755 (arm_breakpoint_kind_from_pc): New function.
9756 (arm_sw_breakpoint_from_kind): Return proper kind.
9757 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9758
9759 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9760
9761 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9762 removal.
9763 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9764 (struct raw_breakpoint) <size>: Remove.
9765 (struct raw_breakpoint) <kind>: Add.
9766 (bp_size): New function.
9767 (bp_opcode): Likewise.
9768 (find_raw_breakpoint_at): Adjust for kind.
9769 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9770 (remove_memory_breakpoint): Adjust for kind call bp_size.
9771 (set_raw_breakpoint_at): Adjust for kind.
9772 (set_breakpoint): Likewise.
9773 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9774 (delete_raw_breakpoint): Adjust for kind.
9775 (delete_breakpoint): Likewise.
9776 (find_gdb_breakpoint): Likewise.
9777 (set_gdb_breakpoint_1): Likewise.
9778 (set_gdb_breakpoint): Likewise.
9779 (delete_gdb_breakpoint_1): Likewise.
9780 (delete_gdb_breakpoint): Likewise.
9781 (uninsert_raw_breakpoint): Likewise.
9782 (reinsert_raw_breakpoint): Likewise.
9783 (set_breakpoint_data): Remove.
9784 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9785 (check_mem_read): Adjust for kind call bp_size.
9786 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9787 (clone_one_breakpoint): Adjust for kind.
9788 * mem-break.h (set_gdb_breakpoint): Likewise.
9789 (delete_gdb_breakpoint): Likewise.
9790 * server.c (process_serial_event): Likewise.
9791
9792 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9793
9794 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9795 (struct linux_target_ops) <breakpoint>: Remove.
9796 (struct linux_target_ops) <breakpoint_len>: Remove.
9797 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9798 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9799 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9800 (arm_sw_breakpoint_from_kind): New function.
9801 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9802 (struct linux_target_ops) <breakpoint>: Remove.
9803 (struct linux_target_ops) <breakpoint_len>: Remove.
9804 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9805 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9806 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9807 (struct linux_target_ops) <breakpoint>: Remove.
9808 (struct linux_target_ops) <breakpoint_len>: Remove.
9809 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9810 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9811 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9812 (struct linux_target_ops) <breakpoint>: Remove.
9813 (struct linux_target_ops) <breakpoint_len>: Remove.
9814 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9815 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9816 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9817 and sw_breakpoint_from_kind to increment the pc.
9818 (linux_breakpoint_kind_from_pc): New function.
9819 (linux_sw_breakpoint_from_kind): New function.
9820 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9821 (initialize_low): Call breakpoint_kind_from_pc and
9822 sw_breakpoint_from_kind to replace breakpoint_data/len.
9823 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9824 New field.
9825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9826 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9827 (struct linux_target_ops) <breakpoint>: Remove.
9828 (struct linux_target_ops) <breakpoint_len>: Remove.
9829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9831 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9832 (struct linux_target_ops) <breakpoint>: Remove.
9833 (struct linux_target_ops) <breakpoint_len>: Remove.
9834 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9835 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9836 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9837 (struct linux_target_ops) <breakpoint>: Remove.
9838 (struct linux_target_ops) <breakpoint_len>: Remove.
9839 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9840 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9841 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9842 (struct linux_target_ops) <breakpoint>: Remove.
9843 (struct linux_target_ops) <breakpoint_len>: Remove.
9844 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9845 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9846 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9847 (struct linux_target_ops) <breakpoint>: Remove.
9848 (struct linux_target_ops) <breakpoint_len>: Remove.
9849 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9850 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9851 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9852 (struct linux_target_ops) <breakpoint>: Remove.
9853 (struct linux_target_ops) <breakpoint_len>: Remove.
9854 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9855 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9856 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9857 (struct linux_target_ops) <breakpoint>: Remove.
9858 (struct linux_target_ops) <breakpoint_len>: Remove.
9859 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9860 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9861 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9862 (struct linux_target_ops) <breakpoint>: Remove.
9863 (struct linux_target_ops) <breakpoint_len>: Remove.
9864 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9865 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9866 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9867 (struct linux_target_ops) <breakpoint>: Remove.
9868 (struct linux_target_ops) <breakpoint_len>: Remove.
9869 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9870 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9871 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9872 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9873 (struct linux_target_ops) <breakpoint>: Remove.
9874 (struct linux_target_ops) <breakpoint_len>: Remove.
9875 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9876 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9877 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9878 (struct linux_target_ops) <breakpoint>: Remove.
9879 (struct linux_target_ops) <breakpoint_len>: Remove.
9880 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9881 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9882
9883 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9884
9885 * linux-cris-low.c (cris_get_pc): Remove void arg.
9886
9887 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9888
9889 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9890 variable name.
9891
9892 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9893
9894 * inferiors.c (thread_pid_matches_callback): New function.
9895 (find_thread_process): New function.
9896 (remove_thread): Reset current_thread.
9897 (remove_process): Assert threads have been removed first.
9898
9899 2015-10-15 Yao Qi <yao.qi@linaro.org>
9900
9901 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9902 if it is 3.
9903 (aarch64_remove_point): Likewise.
9904 * regcache.c (regcache_register_size): New function.
9905
9906 2015-10-12 Yao Qi <yao.qi@linaro.org>
9907
9908 * linux-aarch64-low.c: Update all callers as emit_load_store
9909 is renamed to aarch64_emit_load_store.
9910
9911 2015-10-12 Yao Qi <yao.qi@linaro.org>
9912
9913 * linux-aarch64-low.c: Update all callers of function renaming
9914 from emit_insn to aarch64_emit_insn.
9915
9916 2015-10-12 Yao Qi <yao.qi@linaro.org>
9917
9918 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9919 arch/aarch64-insn.h.
9920 (struct aarch64_memory_operand): Likewise.
9921 (ENCODE): Likewise.
9922 (emit_insn): Move to arch/aarch64-insn.c.
9923 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9924 (emit_load_store): Move to arch/aarch64-insn.c.
9925 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9926 (can_encode_int32): Remove.
9927
9928 2015-10-12 Yao Qi <yao.qi@linaro.org>
9929
9930 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9931 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9932 (aarch64_relocate_instruction): Likewise.
9933 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9934 (struct aarch64_insn_visitor): Likewise.
9935
9936 2015-10-12 Yao Qi <yao.qi@linaro.org>
9937
9938 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9939 (struct aarch64_insn_visitor): New.
9940 (struct aarch64_insn_relocation_data): New.
9941 (aarch64_ftrace_insn_reloc_b): New function.
9942 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9943 (aarch64_ftrace_insn_reloc_cb): Likewise.
9944 (aarch64_ftrace_insn_reloc_tb): Likewise.
9945 (aarch64_ftrace_insn_reloc_adr): Likewise.
9946 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9947 (aarch64_ftrace_insn_reloc_others): Likewise.
9948 (visitor): New.
9949 (aarch64_relocate_instruction): Use visitor.
9950
9951 2015-10-12 Yao Qi <yao.qi@linaro.org>
9952
9953 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9954 int. Add argument buf.
9955 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9956 aarch64_relocate_instruction.
9957
9958 2015-10-12 Yao Qi <yao.qi@linaro.org>
9959
9960 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9961 argument insn. Remove local variable insn. Don't call
9962 target_read_uint32.
9963 (aarch64_install_fast_tracepoint_jump_pad): Call
9964 target_read_uint32.
9965
9966 2015-09-30 Yao Qi <yao.qi@linaro.org>
9967
9968 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9969 (emit_load_store_pair): Likewise.
9970
9971 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9972
9973 * dll.c (match_dll): Add cast(s).
9974 (unloaded_dll): Likewise.
9975 * linux-low.c (second_thread_of_pid_p): Likewise.
9976 (delete_lwp_callback): Likewise.
9977 (count_events_callback): Likewise.
9978 (select_event_lwp_callback): Likewise.
9979 (linux_set_resume_request): Likewise.
9980 * server.c (accumulate_file_name_length): Likewise.
9981 (emit_dll_description): Likewise.
9982 (handle_qxfer_threads_worker): Likewise.
9983 (visit_actioned_threads): Likewise.
9984 * thread-db.c (any_thread_of): Likewise.
9985 * tracepoint.c (same_process_p): Likewise.
9986 (match_blocktype): Likewise.
9987 (build_traceframe_info_xml): Likewise.
9988
9989 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9990
9991 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9992 assignment.
9993 (gdb_unparse_agent_expr): Likewise.
9994 * hostio.c (require_data): Likewise.
9995 (handle_pread): Likewise.
9996 * linux-low.c (disable_regset): Likewise.
9997 (fetch_register): Likewise.
9998 (store_register): Likewise.
9999 (get_dynamic): Likewise.
10000 (linux_qxfer_libraries_svr4): Likewise.
10001 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10002 (set_fast_tracepoint_jump): Likewise.
10003 (uninsert_fast_tracepoint_jumps_at): Likewise.
10004 (reinsert_fast_tracepoint_jumps_at): Likewise.
10005 (validate_inserted_breakpoint): Likewise.
10006 (clone_agent_expr): Likewise.
10007 * regcache.c (init_register_cache): Likewise.
10008 * remote-utils.c (putpkt_binary_1): Likewise.
10009 (decode_M_packet): Likewise.
10010 (decode_X_packet): Likewise.
10011 (look_up_one_symbol): Likewise.
10012 (relocate_instruction): Likewise.
10013 (monitor_output): Likewise.
10014 * server.c (handle_search_memory): Likewise.
10015 (handle_qxfer_exec_file): Likewise.
10016 (handle_qxfer_libraries): Likewise.
10017 (handle_qxfer): Likewise.
10018 (handle_query): Likewise.
10019 (handle_v_cont): Likewise.
10020 (handle_v_run): Likewise.
10021 (captured_main): Likewise.
10022 * target.c (write_inferior_memory): Likewise.
10023 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10024 * tracepoint.c (init_trace_buffer): Likewise.
10025 (add_tracepoint_action): Likewise.
10026 (add_traceframe): Likewise.
10027 (add_traceframe_block): Likewise.
10028 (cmd_qtdpsrc): Likewise.
10029 (cmd_qtdv): Likewise.
10030 (cmd_qtstatus): Likewise.
10031 (response_source): Likewise.
10032 (response_tsv): Likewise.
10033 (cmd_qtnotes): Likewise.
10034 (gdb_collect): Likewise.
10035 (initialize_tracepoint): Likewise.
10036
10037 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10038
10039 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10040 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10041 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10042 <NOP>: New.
10043 (enum aarch64_condition_codes): New enum.
10044 (w0): New static global.
10045 (fp): Likewise.
10046 (lr): Likewise.
10047 (struct aarch64_memory_operand) <type>: New
10048 MEMORY_OPERAND_POSTINDEX type.
10049 (postindex_memory_operand): New helper function.
10050 (emit_ret): New function.
10051 (emit_load_store_pair): New function, factored out of emit_stp
10052 with support for MEMORY_OPERAND_POSTINDEX.
10053 (emit_stp): Rewrite using emit_load_store_pair.
10054 (emit_ldp): New function.
10055 (emit_load_store): Likewise.
10056 (emit_ldr): Mention post-index instruction in comment.
10057 (emit_ldrh): New function.
10058 (emit_ldrb): New function.
10059 (emit_ldrsw): Mention post-index instruction in comment.
10060 (emit_str): Likewise.
10061 (emit_subs): New function.
10062 (emit_cmp): Likewise.
10063 (emit_and): Likewise.
10064 (emit_orr): Likewise.
10065 (emit_orn): Likewise.
10066 (emit_eor): Likewise.
10067 (emit_mvn): Likewise.
10068 (emit_lslv): Likewise.
10069 (emit_lsrv): Likewise.
10070 (emit_asrv): Likewise.
10071 (emit_mul): Likewise.
10072 (emit_sbfm): Likewise.
10073 (emit_sbfx): Likewise.
10074 (emit_ubfm): Likewise.
10075 (emit_ubfx): Likewise.
10076 (emit_csinc): Likewise.
10077 (emit_cset): Likewise.
10078 (emit_nop): Likewise.
10079 (emit_ops_insns): New helper function.
10080 (emit_pop): Likewise.
10081 (emit_push): Likewise.
10082 (aarch64_emit_prologue): New function.
10083 (aarch64_emit_epilogue): Likewise.
10084 (aarch64_emit_add): Likewise.
10085 (aarch64_emit_sub): Likewise.
10086 (aarch64_emit_mul): Likewise.
10087 (aarch64_emit_lsh): Likewise.
10088 (aarch64_emit_rsh_signed): Likewise.
10089 (aarch64_emit_rsh_unsigned): Likewise.
10090 (aarch64_emit_ext): Likewise.
10091 (aarch64_emit_log_not): Likewise.
10092 (aarch64_emit_bit_and): Likewise.
10093 (aarch64_emit_bit_or): Likewise.
10094 (aarch64_emit_bit_xor): Likewise.
10095 (aarch64_emit_bit_not): Likewise.
10096 (aarch64_emit_equal): Likewise.
10097 (aarch64_emit_less_signed): Likewise.
10098 (aarch64_emit_less_unsigned): Likewise.
10099 (aarch64_emit_ref): Likewise.
10100 (aarch64_emit_if_goto): Likewise.
10101 (aarch64_emit_goto): Likewise.
10102 (aarch64_write_goto_address): Likewise.
10103 (aarch64_emit_const): Likewise.
10104 (aarch64_emit_call): Likewise.
10105 (aarch64_emit_reg): Likewise.
10106 (aarch64_emit_pop): Likewise.
10107 (aarch64_emit_stack_flush): Likewise.
10108 (aarch64_emit_zero_ext): Likewise.
10109 (aarch64_emit_swap): Likewise.
10110 (aarch64_emit_stack_adjust): Likewise.
10111 (aarch64_emit_int_call_1): Likewise.
10112 (aarch64_emit_void_call_2): Likewise.
10113 (aarch64_emit_eq_goto): Likewise.
10114 (aarch64_emit_ne_goto): Likewise.
10115 (aarch64_emit_lt_goto): Likewise.
10116 (aarch64_emit_le_goto): Likewise.
10117 (aarch64_emit_gt_goto): Likewise.
10118 (aarch64_emit_ge_got): Likewise.
10119 (aarch64_emit_ops_impl): New static global variable.
10120 (aarch64_emit_ops): New target function, return
10121 &aarch64_emit_ops_impl.
10122 (struct linux_target_ops): Install it.
10123
10124 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10125
10126 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10127 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10128 aarch64-ipa.o.
10129 * linux-aarch64-ipa.c: New file.
10130 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10131 and endian.h.
10132 (aarch64_get_thread_area): New target method.
10133 (extract_signed_bitfield): New helper function.
10134 (aarch64_decode_ldr_literal): New function.
10135 (enum aarch64_opcodes): New enum.
10136 (struct aarch64_register): New struct.
10137 (struct aarch64_operand): New struct.
10138 (x0): New static global.
10139 (x1): Likewise.
10140 (x2): Likewise.
10141 (x3): Likewise.
10142 (x4): Likewise.
10143 (w2): Likewise.
10144 (ip0): Likewise.
10145 (sp): Likewise.
10146 (xzr): Likewise.
10147 (aarch64_register): New helper function.
10148 (register_operand): Likewise.
10149 (immediate_operand): Likewise.
10150 (struct aarch64_memory_operand): New struct.
10151 (offset_memory_operand): New helper function.
10152 (preindex_memory_operand): Likewise.
10153 (enum aarch64_system_control_registers): New enum.
10154 (ENCODE): New macro.
10155 (emit_insn): New helper function.
10156 (emit_b): New function.
10157 (emit_bcond): Likewise.
10158 (emit_cb): Likewise.
10159 (emit_tb): Likewise.
10160 (emit_blr): Likewise.
10161 (emit_stp): Likewise.
10162 (emit_ldp_q_offset): Likewise.
10163 (emit_stp_q_offset): Likewise.
10164 (emit_load_store): Likewise.
10165 (emit_ldr): Likewise.
10166 (emit_ldrsw): Likewise.
10167 (emit_str): Likewise.
10168 (emit_ldaxr): Likewise.
10169 (emit_stxr): Likewise.
10170 (emit_stlr): Likewise.
10171 (emit_data_processing_reg): Likewise.
10172 (emit_data_processing): Likewise.
10173 (emit_add): Likewise.
10174 (emit_sub): Likewise.
10175 (emit_mov): Likewise.
10176 (emit_movk): Likewise.
10177 (emit_mov_addr): Likewise.
10178 (emit_mrs): Likewise.
10179 (emit_msr): Likewise.
10180 (emit_sevl): Likewise.
10181 (emit_wfe): Likewise.
10182 (append_insns): Likewise.
10183 (can_encode_int32_in): New helper function.
10184 (aarch64_relocate_instruction): New function.
10185 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10186 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10187 (struct linux_target_ops): Install aarch64_get_thread_area,
10188 aarch64_install_fast_tracepoint_jump_pad and
10189 aarch64_get_min_fast_tracepoint_insn_len.
10190
10191 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10192
10193 * Makefile.in (aarch64-insn.o): New rule.
10194 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10195
10196 2015-09-21 Yao Qi <yao.qi@linaro.org>
10197
10198 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10199
10200 2015-09-21 Yao Qi <yao.qi@linaro.org>
10201
10202 * tracepoint.c (max_jump_pad_size): Remove.
10203
10204 2015-09-18 Yao Qi <yao.qi@linaro.org>
10205
10206 * linux-aarch64-low.c: Don't include sys/uio.h.
10207 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10208
10209 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10210
10211 * tracepoint.c (eval_result_type): Change prototype.
10212 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10213
10214 2015-09-15 Pedro Alves <palves@redhat.com>
10215
10216 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10217 Check whether to report exec events instead of checking whether
10218 multiprocess is enabled.
10219
10220 2015-09-15 Pedro Alves <palves@redhat.com>
10221
10222 PR remote/18965
10223 * remote-utils.c (prepare_resume_reply): Merge
10224 TARGET_WAITKIND_VFORK_DONE switch case with the
10225 TARGET_WAITKIND_FORKED case.
10226
10227 2015-09-15 Yao Qi <yao.qi@linaro.org>
10228
10229 * server.c (handle_query): Check string comparison using
10230 "else if" instead of "if".
10231
10232 2015-09-15 Yao Qi <yao.qi@linaro.org>
10233
10234 * server.c (vCont_supported): New global variable.
10235 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10236 matches. Append ";vContSupported+" to own_buf.
10237 (handle_v_requests): Append ";s;S" to own_buf if target supports
10238 hardware single step or vCont_supported is false.
10239 (capture_main): Set vCont_supported to zero.
10240
10241 2015-09-15 Yao Qi <yao.qi@linaro.org>
10242
10243 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10244 it to ...
10245 (linux_supports_hardware_single_step): ... New function.
10246 (linux_target_ops): Update.
10247 * lynx-low.c (lynx_target_ops): Set field
10248 supports_hardware_single_step to target_can_do_hardware_single_step.
10249 * nto-low.c (nto_target_ops): Likewise.
10250 * spu-low.c (spu_target_ops): Likewise.
10251 * win32-low.c (win32_target_ops): Likewise.
10252 * target.c (target_can_do_hardware_single_step): New function.
10253 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10254 Remove. <supports_hardware_single_step>: New field.
10255 (target_supports_conditional_breakpoints): Remove.
10256 (target_supports_hardware_single_step): New macro.
10257 (target_can_do_hardware_single_step): Declare.
10258 * server.c (handle_query): Use target_supports_hardware_single_step
10259 instead of target_supports_conditional_breakpoints.
10260
10261 2015-09-15 Yao Qi <yao.qi@linaro.org>
10262
10263 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10264 function.
10265 (struct linux_target_ops the_low_target): Install
10266 aarch64_linux_siginfo_fixup.
10267
10268 2015-09-11 Don Breazeal <donb@codesourcery.com>
10269 Luis Machado <lgustavo@codesourcery.com>
10270
10271 * linux-low.c (linux_mourn): Static declaration.
10272 (linux_arch_setup): Move in front of
10273 handle_extended_wait.
10274 (linux_arch_setup_thread): New function.
10275 (handle_extended_wait): Handle exec events. Call
10276 linux_arch_setup_thread. Make event_lwp argument a
10277 pointer-to-a-pointer.
10278 (check_zombie_leaders): Do not check stopped threads.
10279 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10280 (linux_low_filter_event): Add lwp and thread for exec'ing
10281 non-leader thread if leader thread has been deleted.
10282 Refactor code into linux_arch_setup_thread and call it.
10283 Pass child lwp pointer by reference to handle_extended_wait.
10284 (linux_wait_for_event_filtered): Update comment.
10285 (linux_wait_1): Prevent clobbering exec event status.
10286 (linux_supports_exec_events): New function.
10287 (linux_target_ops) <supports_exec_events>: Initialize new member.
10288 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10289 new member.
10290 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10291 * server.c (report_exec_events): New global variable.
10292 (handle_query): Handle qSupported query for exec-events feature.
10293 (captured_main): Initialize report_exec_events.
10294 * server.h (report_exec_events): Declare new global variable.
10295 * target.h (struct target_ops) <supports_exec_events>: New
10296 member.
10297 (target_supports_exec_events): New macro.
10298 * win32-low.c (win32_target_ops) <supports_exec_events>:
10299 Initialize new member.
10300
10301 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10302
10303 * linux-low.c (linux_low_enable_btrace): Remove.
10304 (linux_target_ops): Replace linux_low_enable_btrace with
10305 linux_enable_btrace.
10306
10307 2015-09-03 Yao Qi <yao.qi@linaro.org>
10308
10309 * linux-aarch64-low.c (aarch64_insert_point): Call
10310 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10311 returns true.
10312
10313 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10314
10315 * linux-low.c (check_stopped_by_breakpoint): Use
10316 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10317
10318 2015-08-27 Pedro Alves <palves@redhat.com>
10319
10320 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10321
10322 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10323
10324 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10325 the XNEW-family equivalent.
10326 (compile_bytecodes): Likewise.
10327 * dll.c (loaded_dll): Likewise.
10328 * event-loop.c (append_callback_event): Likewise.
10329 (create_file_handler): Likewise.
10330 (create_file_event): Likewise.
10331 * hostio.c (handle_open): Likewise.
10332 * inferiors.c (add_thread): Likewise.
10333 (add_process): Likewise.
10334 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10335 * linux-arm-low.c (arm_new_process): Likewise.
10336 (arm_new_thread): Likewise.
10337 * linux-low.c (add_to_pid_list): Likewise.
10338 (linux_add_process): Likewise.
10339 (handle_extended_wait): Likewise.
10340 (add_lwp): Likewise.
10341 (enqueue_one_deferred_signal): Likewise.
10342 (enqueue_pending_signal): Likewise.
10343 (linux_resume_one_lwp_throw): Likewise.
10344 (linux_resume_one_thread): Likewise.
10345 (linux_read_memory): Likewise.
10346 (linux_write_memory): Likewise.
10347 * linux-mips-low.c (mips_linux_new_process): Likewise.
10348 (mips_linux_new_thread): Likewise.
10349 (mips_add_watchpoint): Likewise.
10350 * linux-x86-low.c (initialize_low_arch): Likewise.
10351 * lynx-low.c (lynx_add_process): Likewise.
10352 * mem-break.c (set_raw_breakpoint_at): Likewise.
10353 (set_breakpoint): Likewise.
10354 (add_condition_to_breakpoint): Likewise.
10355 (add_commands_to_breakpoint): Likewise.
10356 (clone_agent_expr): Likewise.
10357 (clone_one_breakpoint): Likewise.
10358 * regcache.c (new_register_cache): Likewise.
10359 * remote-utils.c (look_up_one_symbol): Likewise.
10360 * server.c (queue_stop_reply): Likewise.
10361 (start_inferior): Likewise.
10362 (queue_stop_reply_callback): Likewise.
10363 (handle_target_event): Likewise.
10364 * spu-low.c (fetch_ppc_memory): Likewise.
10365 (store_ppc_memory): Likewise.
10366 * target.c (set_target_ops): Likewise.
10367 * thread-db.c (thread_db_load_search): Likewise.
10368 (try_thread_db_load_1): Likewise.
10369 * tracepoint.c (add_tracepoint): Likewise.
10370 (add_tracepoint_action): Likewise.
10371 (create_trace_state_variable): Likewise.
10372 (cmd_qtdpsrc): Likewise.
10373 (cmd_qtro): Likewise.
10374 (add_while_stepping_state): Likewise.
10375 * win32-low.c (child_add_thread): Likewise.
10376 (get_image_name): Likewise.
10377
10378 2015-08-25 Yao Qi <yao.qi@linaro.org>
10379
10380 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10381
10382 2015-08-25 Yao Qi <yao.qi@linaro.org>
10383
10384 * Makefile.in (aarch64-linux.o): New rule.
10385 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10386 srv_tgtobj.
10387 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10388 (aarch64_init_debug_reg_state): Make it extern.
10389 (aarch64_linux_prepare_to_resume): Remove.
10390
10391 2015-08-25 Yao Qi <yao.qi@linaro.org>
10392
10393 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10394 lwp_arch_private_info and ptid_of_lwp.
10395
10396 2015-08-25 Yao Qi <yao.qi@linaro.org>
10397
10398 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10399 Find proc_info by find_process_pid. All callers updated.
10400
10401 2015-08-25 Yao Qi <yao.qi@linaro.org>
10402
10403 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10404 Remove.
10405 (debug_reg_change_callback): Remove.
10406 (aarch64_notify_debug_reg_change): Remove.
10407
10408 2015-08-25 Yao Qi <yao.qi@linaro.org>
10409
10410 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10411 Call current_lwp_ptid.
10412
10413 2015-08-25 Yao Qi <yao.qi@linaro.org>
10414
10415 * linux-aarch64-low.c (debug_reg_change_callback): Use
10416 debug_printf.
10417
10418 2015-08-25 Yao Qi <yao.qi@linaro.org>
10419
10420 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10421
10422 2015-08-25 Yao Qi <yao.qi@linaro.org>
10423
10424 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10425
10426 2015-08-25 Yao Qi <yao.qi@linaro.org>
10427
10428 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10429 the code.
10430
10431 2015-08-25 Yao Qi <yao.qi@linaro.org>
10432
10433 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10434 Remove.
10435 (debug_reg_change_callback): Remove argument entry and add argument
10436 lwp. Remove local variable thread. Don't print thread id in the
10437 debugging output. Don't check whether pid of thread equals to pid.
10438 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10439 iterate_over_lwps instead find_inferior.
10440
10441 2015-08-24 Pedro Alves <palves@redhat.com>
10442
10443 * inferiors.c (get_first_process): New function.
10444 * inferiors.h (get_first_process): New declaration.
10445 * remote-utils.c (read_ptid): Default to the first process in the
10446 list, instead of to the current thread's process.
10447
10448 2015-08-24 Pedro Alves <palves@redhat.com>
10449
10450 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10451 * event-loop.c: Likewise.
10452 * remote-utils.c: Likewise.
10453 * tracepoint.c: Likewise.
10454
10455 2015-08-24 Pedro Alves <palves@redhat.com>
10456
10457 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10458 ptid_get_lwp.
10459
10460 2015-08-21 Pedro Alves <palves@redhat.com>
10461
10462 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10463 instead of literal 1.
10464
10465 2015-08-21 Pedro Alves <palves@redhat.com>
10466
10467 * tdesc.c (default_description): Explicitly zero-initialize.
10468
10469 2015-08-21 Pedro Alves <palves@redhat.com>
10470
10471 PR gdb/18749
10472 * inferiors.c (remove_thread): Discard any pending stop reply for
10473 this thread.
10474 * server.c (remove_all_on_match_pid): Rename to ...
10475 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10476 instead of a pid.
10477 (discard_queued_stop_replies): Change parameter to a ptid. Now
10478 extern.
10479 (handle_v_kill, kill_inferior_callback, captured_main)
10480 (process_serial_event): Adjust.
10481 * server.h (discard_queued_stop_replies): Declare.
10482
10483 2015-08-21 Pedro Alves <palves@redhat.com>
10484
10485 * linux-low.c (wait_for_sigstop): Always switch to no thread
10486 selected if the previously current thread dies.
10487 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10488 process instead of the current thread's.
10489 * remote-utils.c (input_interrupt): Don't check if there's no
10490 current thread.
10491 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10492 current thread to the general thread fails, error out.
10493 (handle_qxfer_auxv, handle_qxfer_libraries)
10494 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10495 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10496 (handle_query): Check if there's a thread selected instead of
10497 checking whether there's any thread in the thread list.
10498 (handle_qxfer_threads, handle_qxfer_btrace)
10499 (handle_qxfer_btrace_conf): Don't error out early if there's no
10500 thread in the thread list.
10501 (handle_v_cont, myresume): Don't set the current thread to the
10502 continue thread.
10503 (process_serial_event) <Hg handling>: Also set thread_id if the
10504 previous general thread is still alive.
10505 (process_serial_event) <g/G handling>: If setting the current
10506 thread to the general thread fails, error out.
10507 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10508 thread's lwp instead of the current thread's.
10509 * target.c (set_desired_thread): If the desired thread was not
10510 found, leave the current thread pointing to NULL. Return an int
10511 (boolean) indicating success.
10512 * target.h (set_desired_thread): Change return type to int.
10513
10514 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10515
10516 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10517 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10518 #includes.
10519 (ps_get_thread_area): New function.
10520
10521 2015-08-19 Gary Benson <gbenson@redhat.com>
10522
10523 * hostio.c (handle_pread): Do not attempt to read more data
10524 than hostio_reply_with_data can fit in a packet.
10525
10526 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10527
10528 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10529
10530 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10531
10532 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10533
10534 2015-08-06 Pedro Alves <palves@redhat.com>
10535
10536 * tracepoint.c (expr_eval_result): Now an int.
10537
10538 2015-08-06 Pedro Alves <palves@redhat.com>
10539
10540 * gdbthread.h (struct regcache): Forward declare.
10541 (struct thread_info) <regcache_data>: Now a struct regcache
10542 pointer.
10543 * inferiors.c (inferior_regcache_data)
10544 (set_inferior_regcache_data): Now work with struct regcache
10545 pointers.
10546 * inferiors.h (struct regcache): Forward declare.
10547 (inferior_regcache_data, set_inferior_regcache_data): Now work
10548 with struct regcache pointers.
10549 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10550 (free_register_cache_thread): Remove struct regcache pointer
10551 casts.
10552
10553 2015-08-06 Pedro Alves <palves@redhat.com>
10554
10555 * server.c (captured_main): On error, print the exception message
10556 to stderr, and if run_once is set, throw a quit.
10557
10558 2015-08-06 Pedro Alves <palves@redhat.com>
10559
10560 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10561 the current thread.
10562
10563 2015-08-06 Pedro Alves <palves@redhat.com>
10564
10565 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10566 reading beyond the passed in buffer length.
10567
10568 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10569
10570 * tracepoint.c (symbol_list) <required>: Remove.
10571
10572 2015-08-06 Pedro Alves <palves@redhat.com>
10573
10574 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10575 count if stopping and suspending threads.
10576 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10577 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10578 (linux_detach): Complete an ongoing step-over.
10579 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10580 throughout.
10581 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10582 (linux_wait_1): If passing a signal to the inferior after
10583 finishing a step-over, unsuspend and re-resume all lwps. If we
10584 see a single-step event but the thread should be continuing, don't
10585 pass the trap to gdb.
10586 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10587 internal_error instead of gdb_assert.
10588 (enqueue_pending_signal): New function.
10589 (check_ptrace_stopped_lwp_gone): Add debug output.
10590 (start_step_over): Use internal_error instead of gdb_assert.
10591 (complete_ongoing_step_over): New function.
10592 (linux_resume_one_thread): Don't resume a suspended thread.
10593 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10594 it stepping.
10595
10596 2015-08-06 Pedro Alves <palves@redhat.com>
10597
10598 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10599 (linux_thread_alive): Use lwp_is_marked_dead.
10600 (extended_event_reported): Delete.
10601 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10602 instead of extended_event_reported.
10603 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10604 as well.
10605 (lwp_is_marked_dead): New function.
10606 (lwp_running): Use lwp_is_marked_dead.
10607 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10608 comment.
10609
10610 2015-08-06 Pedro Alves <palves@redhat.com>
10611
10612 * linux-low.c (linux_wait_1): Move fork event output out of the
10613 !report_to_gdb check. Pass event_child->waitstatus to
10614 target_waitstatus_to_string instead of ourstatus.
10615
10616 2015-08-04 Yao Qi <yao.qi@linaro.org>
10617
10618 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10619 if current_thread is 32 bit.
10620
10621 2015-08-04 Yao Qi <yao.qi@linaro.org>
10622
10623 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10624 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10625 * server.c (extended_protocol): Remove "static".
10626 * server.h (extended_protocol): Declare it.
10627
10628 2015-08-04 Yao Qi <yao.qi@linaro.org>
10629
10630 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10631 both aarch64 and aarch32.
10632 (aarch64_set_pc): Likewise.
10633
10634 2015-08-04 Yao Qi <yao.qi@linaro.org>
10635
10636 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10637 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10638 arm-with-neon.xml to srv_xmlfiles.
10639 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10640 (is_64bit_tdesc): New function.
10641 (aarch64_linux_read_description): New function.
10642 (aarch64_arch_setup): Call aarch64_linux_read_description.
10643 (regs_info): Rename to regs_info_aarch64.
10644 (aarch64_regs_info): Return right regs_info.
10645 (initialize_low_arch): Call initialize_low_arch_aarch32.
10646
10647 2015-08-04 Yao Qi <yao.qi@linaro.org>
10648
10649 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10650 * linux-aarch32-low.c: New file.
10651 * linux-aarch32-low.h: New file.
10652 * linux-arm-low.c (arm_fill_gregset): Move it to
10653 linux-aarch32-low.c.
10654 (arm_store_gregset): Likewise.
10655 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10656 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10657 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10658 (regs_info): Rename to regs_info_arm.
10659 (arm_regs_info): Return regs_info_aarch32 if
10660 have_ptrace_getregset is 1 and target description is
10661 arm_with_neon or arm_with_vfpv3.
10662 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10663 Call initialize_low_arch_aarch32 instead.
10664
10665 2015-08-04 Yao Qi <yao.qi@linaro.org>
10666
10667 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10668 * linux-low.c: ... here.
10669 * linux-low.h (have_ptrace_getregset): Declare it.
10670
10671 2015-08-04 Pedro Alves <palves@redhat.com>
10672
10673 * thread-db.c (struct thread_db): Use new typedefs.
10674 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10675 CHK calls.
10676 (disable_thread_event_reporting): Cast result of dlsym to
10677 destination function pointer type.
10678 (thread_db_mourn): Use td_ta_delete_ftype.
10679
10680 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10681
10682 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10683 arch variant.
10684 (CDX_BREAKPOINT): Define for R2.
10685 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10686 (the_low_target): Add comments.
10687
10688 2015-07-30 Yao Qi <yao.qi@linaro.org>
10689
10690 * linux-arm-low.c (arm_hwcap): Remove it.
10691 (arm_read_description): New local variable arm_hwcap. Don't
10692 set arm_hwcap to zero.
10693
10694 2015-07-30 Yao Qi <yao.qi@linaro.org>
10695
10696 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10697 Use regcache->tdesc instead.
10698 (arm_store_wmmxregset): Likewise.
10699 (arm_fill_vfpregset): Likewise.
10700 (arm_store_vfpregset): Likewise.
10701
10702 2015-07-30 Yao Qi <yao.qi@linaro.org>
10703
10704 * linux-arm-low.c: Include arch/arm.h.
10705 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10706 (arm_store_gregset): Likewise.
10707
10708 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10709
10710 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10711 ptrace's 4th parameter.
10712
10713 2015-07-27 Yao Qi <yao.qi@linaro.org>
10714
10715 * configure.srv (case aarch64*-*-linux*): Don't set
10716 srv_linux_usrregs.
10717
10718 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10719
10720 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10721 sys/ptrace.h.
10722 * linux-arm-low.c: Likewise.
10723 * linux-cris-low.c: Likewise.
10724 * linux-crisv32-low.c: Likewise.
10725 * linux-low.c: Likewise.
10726 * linux-m68k-low.c: Likewise.
10727 * linux-mips-low.c: Likewise.
10728 * linux-nios2-low.c: Likewise.
10729 * linux-s390-low.c: Likewise.
10730 * linux-sparc-low.c: Likewise.
10731 * linux-tic6x-low.c: Likewise.
10732 * linux-tile-low.c: Likewise.
10733 * linux-x86-low.c: Likewise.
10734
10735 2015-07-24 Pedro Alves <palves@redhat.com>
10736
10737 * config.in: Regenerate.
10738 * configure: Regenerate.
10739
10740 2015-07-24 Pedro Alves <palves@redhat.com>
10741
10742 * acinclude.m4: Include ../ptrace.m4.
10743 * configure.ac: Call GDB_AC_PTRACE.
10744 * config.in, configure: Regenerate.
10745
10746 2015-07-24 Yao Qi <yao.qi@linaro.org>
10747
10748 * linux-low.c (linux_create_inferior): Remove setting to
10749 proc->priv->new_inferior.
10750 (linux_attach): Likewise.
10751 (linux_low_filter_event): Likewise.
10752 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10753
10754 2015-07-24 Yao Qi <yao.qi@linaro.org>
10755
10756 * linux-low.c (linux_arch_setup): New function.
10757 (linux_low_filter_event): If proc->tdesc is NULL and
10758 proc->attached is true, call the_low_target.arch_setup.
10759 Otherwise, keep status pending, and return.
10760 (linux_resume_one_lwp_throw): Don't call get_pc if
10761 thread->while_stepping isn't NULL. Don't call
10762 get_thread_regcache if proc->tdesc is NULL.
10763 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10764 (linux_target_ops): Install arch_setup.
10765 * server.c (start_inferior): Call the_target->arch_setup.
10766 * target.h (struct target_ops) <arch_setup>: New field.
10767 (target_arch_setup): New marco.
10768 * lynx-low.c (lynx_target_ops): Update.
10769 * nto-low.c (nto_target_ops): Update.
10770 * spu-low.c (spu_target_ops): Update.
10771 * win32-low.c (win32_target_ops): Update.
10772
10773 2015-07-24 Yao Qi <yao.qi@linaro.org>
10774
10775 * linux-low.c (linux_add_process): Don't set
10776 proc->priv->new_inferior.
10777 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10778 (linux_attach): Likewise.
10779
10780 2015-07-24 Yao Qi <yao.qi@linaro.org>
10781
10782 * server.c (start_inferior): Code refactor.
10783
10784 2015-07-24 Yao Qi <yao.qi@linaro.org>
10785
10786 * server.c (process_serial_event): Set general_thread.
10787
10788 2015-07-21 Yao Qi <yao.qi@linaro.org>
10789
10790 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10791 aarch64_linux_get_debug_reg_capacity.
10792
10793 2015-07-17 Yao Qi <yao.qi@linaro.org>
10794
10795 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10796 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10797 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10798 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10799 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10800 (AARCH64_HWP_ALIGNMENT): Likewise.
10801 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10802 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10803 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10804 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10805 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10806 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10807 (struct aarch64_debug_reg_state): Likewise.
10808 (struct arch_lwp_info): Likewise.
10809 (aarch64_align_watchpoint): Likewise.
10810 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10811 (aarch64_watchpoint_length): Likewise.
10812 (aarch64_point_encode_ctrl_reg): Likewise
10813 (aarch64_point_is_aligned): Likewise.
10814 (aarch64_align_watchpoint): Likewise.
10815 (aarch64_linux_set_debug_regs):
10816 (aarch64_dr_state_insert_one_point): Likewise.
10817 (aarch64_dr_state_remove_one_point): Likewise.
10818 (aarch64_handle_breakpoint): Likewise.
10819 (aarch64_handle_aligned_watchpoint): Likewise.
10820 (aarch64_handle_unaligned_watchpoint): Likewise.
10821 (aarch64_handle_watchpoint): Likewise.
10822
10823 2015-07-17 Yao Qi <yao.qi@linaro.org>
10824
10825 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10826 and don't aarch64_get_debug_reg_state. All callers update.
10827 (aarch64_handle_aligned_watchpoint): Likewise.
10828 (aarch64_handle_unaligned_watchpoint): Likewise.
10829 (aarch64_handle_watchpoint): Likewise.
10830 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10831 (aarch64_remove_point): Likewise.
10832
10833 2015-07-17 Yao Qi <yao.qi@linaro.org>
10834
10835 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10836 debug_printf.
10837 (aarch64_handle_unaligned_watchpoint): Likewise.
10838
10839 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10840
10841 Revert the previous 3 commits:
10842 Move gdb_regex* to common/
10843 Move linux_find_memory_regions_full & co.
10844 gdbserver build-id attribute generator
10845
10846 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10847 Jan Kratochvil <jan.kratochvil@redhat.com>
10848
10849 gdbserver build-id attribute generator.
10850 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10851 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10852 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10853 (find_phdr): New.
10854 (get_dynamic): Use find_pdhr to traverse program headers.
10855 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10856 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10857 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10858 (get_hex_build_id): New.
10859 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10860 to reply XML document.
10861
10862 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10863 Jan Kratochvil <jan.kratochvil@redhat.com>
10864
10865 * target.c: Include target/target-utils.h and fcntl.h.
10866 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10867 (target_fileio_read_stralloc): New functions.
10868
10869 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10870
10871 * Makefile.in (OBS): Add gdb_regex.o.
10872 (gdb_regex.o): New.
10873 * config.in: Rebuilt.
10874 * configure: Rebuilt.
10875
10876 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10877 Jan Kratochvil <jan.kratochvil@redhat.com>
10878
10879 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10880 * Makefile.in (OBS): Add target-utils.o.
10881 (linux-maps.o, target-utils.o): New.
10882 * configure.srv (srv_linux_obj): Add linux-maps.o.
10883
10884 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10885
10886 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10887 function, return 1.
10888 (the_low_target): Install it.
10889
10890 2015-07-14 Pedro Alves <palves@redhat.com>
10891
10892 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10893 Instead, ignore ECHILD, and throw an error for other errnos.
10894
10895 2015-07-10 Pedro Alves <palves@redhat.com>
10896
10897 * event-loop.c (struct callback_event) <data>: Change type to
10898 gdb_client_data instance instead of gdb_client_data pointer.
10899 (append_callback_event): Adjust.
10900
10901 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10902
10903 * linux-aarch64-low.c: Add comments for each linux_target_ops
10904 method. Remove comments already covered in target_ops and
10905 linux_target_ops definitions.
10906 (the_low_target): Add comments for each unimplemented method.
10907
10908 2015-07-09 Yao Qi <yao.qi@linaro.org>
10909
10910 * linux-aarch64-low.c (aarch64_regmap): Remove.
10911 (aarch64_usrregs_info): Remove.
10912 (regs_info): Set field usrregs to NULL.
10913
10914 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10915
10916 * linux-low.c: Include "rsp-low.h"
10917 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10918 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10919 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10920 (handle_btrace_enable_pt): New.
10921 (handle_btrace_general_set): Support "pt".
10922 (handle_btrace_conf_general_set): Support "pt:size".
10923
10924 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10925
10926 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10927 Z_PACKET_SW_BP.
10928
10929 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10930
10931 * linux-aarch64-low.c: Remove comment about endianness.
10932 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10933 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10934 memcmp.
10935
10936 2015-06-24 Gary Benson <gbenson@redhat.com>
10937
10938 * linux-i386-ipa.c (stdint.h): Do not include.
10939 * lynx-i386-low.c (stdint.h): Likewise.
10940 * lynx-ppc-low.c (stdint.h): Likewise.
10941 * mem-break.c (stdint.h): Likewise.
10942 * thread-db.c (stdint.h): Likewise.
10943 * tracepoint.c (stdint.h): Likewise.
10944 * win32-low.c (stdint.h): Likewise.
10945
10946 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10947
10948 * server.c (write_qxfer_response): Update call to
10949 remote_escape_output.
10950
10951 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10952 Jan Kratochvil <jan.kratochvil@redhat.com>
10953
10954 Merge multiple hex conversions.
10955 * gdbreplay.c (tohex): Rename to 'fromhex'.
10956 (logchar): Use fromhex.
10957
10958 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10959
10960 * server.c (handle_qxfer_libraries): Set `version' attribute for
10961 <library-list>.
10962
10963 2015-06-10 Gary Benson <gbenson@redhat.com>
10964
10965 * target.h (struct target_ops) <multifs_open>: New field.
10966 <multifs_unlink>: Likewise.
10967 <multifs_readlink>: Likewise.
10968 * linux-low.c (nat/linux-namespaces.h): New include.
10969 (linux_target_ops): Initialize the_target->multifs_open,
10970 the_target->multifs_unlink and the_target->multifs_readlink.
10971 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10972 * hostio.c (hostio_fs_pid): New static variable.
10973 (hostio_handle_new_gdb_connection): New function.
10974 (handle_setfs): Likewise.
10975 (handle_open): Use the_target->multifs_open as appropriate.
10976 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10977 (handle_readlink): Use the_target->multifs_readlink as
10978 appropriate.
10979 (handle_vFile): Handle vFile:setfs packets.
10980 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10981 after target_handle_new_gdb_connection.
10982
10983 2015-06-10 Gary Benson <gbenson@redhat.com>
10984
10985 * configure.ac (AC_CHECK_FUNCS): Add setns.
10986 * config.in: Regenerate.
10987 * configure: Likewise.
10988 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10989 (linux-namespaces.o): New rule.
10990 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10991
10992 2015-06-09 Gary Benson <gbenson@redhat.com>
10993
10994 * hostio.c (handle_open): Process mode argument with
10995 fileio_to_host_mode.
10996
10997 2015-06-01 Yao Qi <yao.qi@linaro.org>
10998
10999 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11000 * linux-x86-low.c: Likewise.
11001
11002 2015-05-28 Don Breazeal <donb@codesourcery.com>
11003
11004 * linux-low.c (handle_extended_wait): Initialize
11005 thread_info.last_resume_kind for new fork children.
11006
11007 2015-05-15 Pedro Alves <palves@redhat.com>
11008
11009 * target.h (target_handle_new_gdb_connection): Rewrite using if
11010 wrapped in do/while.
11011
11012 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11013
11014 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11015 * configure, config.in: Regenerate.
11016 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11017 Declare typedef.
11018
11019 2015-05-12 Don Breazeal <donb@codesourcery.com>
11020
11021 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11022 PTRACE_EVENT_VFORK_DONE.
11023 (linux_low_ptrace_options, extended_event_reported): Add vfork
11024 events.
11025 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11026 and "vforkdone" for RSP 'T' Stop Reply Packet.
11027 * server.h (report_vfork_events): Declare
11028 global variable.
11029
11030 2015-05-12 Don Breazeal <donb@codesourcery.com>
11031
11032 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11033 (the_low_target) <new_fork>: Initialize new member.
11034 * linux-arm-low.c (arm_new_fork): New function.
11035 (the_low_target) <new_fork>: Initialize new member.
11036 * linux-low.c (handle_extended_wait): Call new target function
11037 new_fork.
11038 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11039 * linux-mips-low.c (mips_add_watchpoint): New function
11040 extracted from mips_insert_point.
11041 (the_low_target) <new_fork>: Initialize new member.
11042 (mips_linux_new_fork): New function.
11043 (mips_insert_point): Call mips_add_watchpoint.
11044 * linux-x86-low.c (x86_linux_new_fork): New function.
11045 (the_low_target) <new_fork>: Initialize new member.
11046
11047 2015-05-12 Don Breazeal <donb@codesourcery.com>
11048
11049 * linux-low.c (handle_extended_wait): Implement return value,
11050 rename argument 'event_child' to 'event_lwp', handle
11051 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11052 (linux_low_ptrace_options): New function.
11053 (linux_low_filter_event): Call linux_low_ptrace_options,
11054 use different argument fo linux_enable_event_reporting,
11055 use return value from handle_extended_wait.
11056 (extended_event_reported): New function.
11057 (linux_wait_1): Call extended_event_reported and set
11058 status to report fork events.
11059 (linux_write_memory): Add pid to debug message.
11060 (reset_lwp_ptrace_options_callback): New function.
11061 (linux_handle_new_gdb_connection): New function.
11062 (linux_target_ops): Initialize new structure member.
11063 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11064 * lynx-low.c: Initialize new structure member.
11065 * remote-utils.c (prepare_resume_reply): Implement stop reason
11066 "fork" for "T" stop message.
11067 * server.c (handle_query): Call handle_new_gdb_connection.
11068 * server.h (report_fork_events): Declare global flag.
11069 * target.h (struct target_ops) <handle_new_gdb_connection>:
11070 New member.
11071 (target_handle_new_gdb_connection): New macro.
11072 * win32-low.c: Initialize new structure member.
11073
11074 2015-05-12 Don Breazeal <donb@codesourcery.com>
11075
11076 * mem-break.c (APPEND_TO_LIST): Define macro.
11077 (clone_agent_expr): New function.
11078 (clone_one_breakpoint): New function.
11079 (clone_all_breakpoints): New function.
11080 * mem-break.h: Declare new functions.
11081
11082 2015-05-12 Don Breazeal <donb@codesourcery.com>
11083
11084 * linux-low.c (linux_supports_fork_events): New function.
11085 (linux_supports_vfork_events): New function.
11086 (linux_target_ops): Initialize new structure members.
11087 (initialize_low): Call linux_check_ptrace_features.
11088 * lynx-low.c (lynx_target_ops): Initialize new structure
11089 members.
11090 * server.c (report_fork_events, report_vfork_events):
11091 New global flags.
11092 (handle_query): Add new features to qSupported packet and
11093 response.
11094 (captured_main): Initialize new global variables.
11095 * target.h (struct target_ops) <supports_fork_events>:
11096 New member.
11097 <supports_vfork_events>: New member.
11098 (target_supports_fork_events): New macro.
11099 (target_supports_vfork_events): New macro.
11100 * win32-low.c (win32_target_ops): Initialize new structure
11101 members.
11102
11103 2015-05-12 Gary Benson <gbenson@redhat.com>
11104
11105 * server.c (handle_qxfer_exec_file): Use current process
11106 if annex is empty.
11107
11108 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11109
11110 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11111 Remove HAVE_PTRACE_GETREGS conditionals.
11112 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11113 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11114
11115 2015-05-08 Yao Qi <yao.qi@linaro.org>
11116
11117 * linux-low.c (linux_supports_conditional_breakpoints): New
11118 function.
11119 (linux_target_ops): Install new target method.
11120 * lynx-low.c (lynx_target_ops): Install NULL hook for
11121 supports_conditional_breakpoints.
11122 * nto-low.c (nto_target_ops): Likewise.
11123 * spu-low.c (spu_target_ops): Likewise.
11124 * win32-low.c (win32_target_ops): Likewise.
11125 * server.c (handle_query): Check
11126 target_supports_conditional_breakpoints.
11127 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11128 New field.
11129 (target_supports_conditional_breakpoints): New macro.
11130
11131 2015-05-06 Pedro Alves <palves@redhat.com>
11132
11133 PR server/18081
11134 * server.c (start_inferior): If the process exits, mourn it.
11135
11136 2015-04-21 Gary Benson <gbenson@redhat.com>
11137
11138 * hostio.c (fileio_open_flags_to_host): Factored out to
11139 fileio_to_host_openflags in common/fileio.c. Single use
11140 updated.
11141
11142 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11143
11144 * linux-xtensa-low.c (xtensa_fill_gregset)
11145 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11146 XCHAL_HAVE_LOOP.
11147
11148 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11149
11150 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11151 (regs_info): Replace usrregs pointer with NULL.
11152
11153 2015-04-17 Gary Benson <gbenson@redhat.com>
11154
11155 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11156 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11157 * server.c (handle_qxfer_exec_file): New function.
11158 (qxfer_packets): Add exec-file entry.
11159 (handle_query): Report qXfer:exec-file:read as supported packet.
11160
11161 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11162
11163 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11164
11165 2015-04-09 Gary Benson <gbenson@redhat.com>
11166
11167 * hostio-errno.c (errno_to_fileio_error): Remove function.
11168 Update caller to use remote_fileio_to_fio_error.
11169
11170 2015-04-09 Yao Qi <yao.qi@linaro.org>
11171
11172 * linux-low.c (linux_insert_point): Call
11173 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11174 (linux_remove_point): Call remove_memory_breakpoint if type is
11175 raw_bkpt_type_sw.
11176 * linux-x86-low.c (x86_insert_point): Don't call
11177 insert_memory_breakpoint.
11178 (x86_remove_point): Don't call remove_memory_breakpoint.
11179
11180 2015-04-01 Pedro Alves <palves@redhat.com>
11181 Cleber Rosa <crosa@redhat.com>
11182
11183 * server.c (gdbserver_usage): Reorganize and extend the usage
11184 message.
11185
11186 2015-03-24 Pedro Alves <palves@redhat.com>
11187
11188 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11189 output. Also dump TRAP_TRACE.
11190 (linux_low_filter_event): In debug output, distinguish a
11191 resume_stop SIGSTOP from a delayed SIGSTOP.
11192
11193 2015-03-24 Gary Benson <gbenson@redhat.com>
11194
11195 * linux-x86-low.c (x86_linux_new_thread): Moved to
11196 nat/x86-linux.c.
11197 (x86_linux_prepare_to_resume): Likewise.
11198
11199 2015-03-24 Gary Benson <gbenson@redhat.com>
11200
11201 * Makefile.in (x86-linux-dregs.o): New rule.
11202 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11203 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11204 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11205 (x86_linux_dr_get): Likewise.
11206 (x86_linux_dr_set): Likewise.
11207 (update_debug_registers_callback): Likewise.
11208 (x86_linux_dr_set_addr): Likewise.
11209 (x86_linux_dr_get_addr): Likewise.
11210 (x86_linux_dr_set_control): Likewise.
11211 (x86_linux_dr_get_control): Likewise.
11212 (x86_linux_dr_get_status): Likewise.
11213 (x86_linux_update_debug_registers): Likewise.
11214
11215 2015-03-24 Gary Benson <gbenson@redhat.com>
11216
11217 * linux-x86-low.c (x86_linux_update_debug_registers):
11218 New function, factored out from...
11219 (x86_linux_prepare_to_resume): ...this.
11220
11221 2015-03-24 Gary Benson <gbenson@redhat.com>
11222
11223 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11224 (x86_linux_dr_set): Likewise.
11225 (update_debug_registers_callback): Likewise.
11226 (x86_linux_dr_set_addr): Likewise.
11227 (x86_linux_dr_get_addr): Likewise.
11228 (x86_linux_dr_set_control): Likewise.
11229 (x86_linux_dr_get_control): Likewise.
11230 (x86_linux_dr_get_status): Likewise.
11231 (x86_linux_prepare_to_resume): Likewise.
11232
11233 2015-03-24 Gary Benson <gbenson@redhat.com>
11234
11235 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11236 Use perror_with_name. Pass string through gettext.
11237 (x86_linux_dr_set): Likewise.
11238
11239 2015-03-24 Gary Benson <gbenson@redhat.com>
11240
11241 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11242 (x86_linux_dr_set_addr): ...this.
11243 (x86_dr_low_get_addr): Rename to...
11244 (x86_linux_dr_get_addr): ...this.
11245 (x86_dr_low_set_control): Rename to...
11246 (x86_linux_dr_set_control): ...this.
11247 (x86_dr_low_get_control): Rename to...
11248 (x86_linux_dr_get_control): ...this.
11249 (x86_dr_low_get_status): Rename to...
11250 (x86_linux_dr_get_status): ...this.
11251 (x86_dr_low): Update with new function names.
11252
11253 2015-03-24 Gary Benson <gbenson@redhat.com>
11254
11255 * Makefile.in (x86-linux.o): New rule.
11256 * configure.srv: Add x86-linux.o to relevant targets.
11257 * linux-low.c (lwp_set_arch_private_info): New function.
11258 (lwp_arch_private_info): Likewise.
11259 * linux-x86-low.c: Include nat/x86-linux.h.
11260 (arch_lwp_info): Removed structure.
11261 (update_debug_registers_callback):
11262 Use lwp_set_debug_registers_changed.
11263 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11264 and lwp_set_debug_registers_changed.
11265 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11266
11267 2015-03-24 Gary Benson <gbenson@redhat.com>
11268
11269 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11270 * linux-arm-low.c (arm_new_thread): Likewise.
11271 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11272 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11273 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11274 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11275
11276 2015-03-24 Gary Benson <gbenson@redhat.com>
11277
11278 * linux-low.c (ptid_of_lwp): New function.
11279 (lwp_is_stopped): Likewise.
11280 (lwp_stop_reason): Likewise.
11281 * linux-x86-low.c (update_debug_registers_callback):
11282 Use lwp_is_stopped.
11283 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11284 lwp_stop_reason.
11285
11286 2015-03-24 Gary Benson <gbenson@redhat.com>
11287
11288 * linux-low.h (linux_stop_lwp): Remove declaration.
11289
11290 2015-03-24 Gary Benson <gbenson@redhat.com>
11291
11292 * linux-low.h: Include nat/linux-nat.h.
11293 * linux-low.c (iterate_over_lwps_args): New structure.
11294 (iterate_over_lwps_filter): New function.
11295 (iterate_over_lwps): Likewise.
11296 * linux-x86-low.c (update_debug_registers_callback):
11297 Update signature to what iterate_over_lwps expects.
11298 Remove PID check that iterate_over_lwps now performs.
11299 (x86_dr_low_set_addr): Use iterate_over_lwps.
11300 (x86_dr_low_set_control): Likewise.
11301
11302 2015-03-24 Gary Benson <gbenson@redhat.com>
11303
11304 * linux-x86-low.c (x86_debug_reg_state): New function.
11305 (x86_linux_prepare_to_resume): Use the above.
11306
11307 2015-03-24 Gary Benson <gbenson@redhat.com>
11308
11309 * linux-low.c (current_lwp_ptid): New function.
11310 * linux-x86-low.c: Include nat/linux-nat.h.
11311 (x86_dr_low_get_addr): Use current_lwp_ptid.
11312 (x86_dr_low_get_control): Likewise.
11313 (x86_dr_low_get_status): Likewise.
11314
11315 2015-03-20 Pedro Alves <palves@redhat.com>
11316
11317 * tracepoint.c (cmd_qtstatus): Make "str" const.
11318
11319 2015-03-20 Pedro Alves <palves@redhat.com>
11320
11321 * server.c (handle_general_set): Make "req_str" const.
11322
11323 2015-03-19 Pedro Alves <palves@redhat.com>
11324
11325 * linux-low.c (linux_resume_one_lwp): Rename to ...
11326 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11327 instead call perror_with_name.
11328 (check_ptrace_stopped_lwp_gone): New function.
11329 (linux_resume_one_lwp): Reimplement as wrapper around
11330 linux_resume_one_lwp_throw that swallows errors if the LWP is
11331 gone.
11332
11333 2015-03-19 Pedro Alves <palves@redhat.com>
11334
11335 * linux-low.c (count_events_callback, select_event_lwp_callback):
11336 No longer check whether the thread has resume_stop as last resume
11337 kind.
11338
11339 2015-03-19 Pedro Alves <palves@redhat.com>
11340
11341 * linux-low.c (count_events_callback, select_event_lwp_callback):
11342 Use the lwp's status_pending_p field, not the thread's.
11343
11344 2015-03-19 Pedro Alves <palves@redhat.com>
11345
11346 * linux-low.c (select_event_lwp_callback): Update comments to
11347 no longer mention SIGTRAP.
11348
11349 2015-03-18 Gary Benson <gbenson@redhat.com>
11350
11351 * server.c (handle_query): Do not report vFile:fstat as supported.
11352
11353 2015-03-11 Gary Benson <gbenson@redhat.com>
11354
11355 * hostio.c (sys/types.h): New include.
11356 (sys/stat.h): Likewise.
11357 (common-remote-fileio.h): Likewise.
11358 (handle_fstat): New function.
11359 (handle_vFile): Handle vFile:fstat packets.
11360
11361 2015-03-11 Gary Benson <gbenson@redhat.com>
11362
11363 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11364 struct stat.st_blocks and struct stat.st_blksize.
11365 * configure: Regenerate.
11366 * config.in: Likewise.
11367 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11368 (OBS): Add common-remote-fileio.o.
11369 (common-remote-fileio.o): New rule.
11370
11371 2015-03-09 Pedro Alves <palves@redhat.com>
11372
11373 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11374 'struct sockaddr' pointer in 'accept' call.
11375
11376 2015-03-09 Pedro Alves <palves@redhat.com>
11377
11378 Revert:
11379 2015-03-07 Pedro Alves <palves@redhat.com>
11380 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11381 or <winsock2.h> here. Instead include "gdb_socket.h".
11382 (remote_open): Use union gdb_sockaddr_u.
11383 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11384 or <winsock2.h> here. Instead include "gdb_socket.h".
11385 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11386 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11387 or <sys/un.h>.
11388 (init_named_socket, gdb_agent_helper_thread): Use union
11389 gdb_sockaddr_u.
11390
11391 2015-03-07 Pedro Alves <palves@redhat.com>
11392
11393 * configure.ac (build_warnings): Move
11394 -Wdeclaration-after-statement to the C-specific set.
11395 * configure: Regenerate.
11396
11397 2015-03-07 Pedro Alves <palves@redhat.com>
11398
11399 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11400 or <winsock2.h> here. Instead include "gdb_socket.h".
11401 (remote_open): Use union gdb_sockaddr_u.
11402 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11403 or <winsock2.h> here. Instead include "gdb_socket.h".
11404 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11405 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11406 or <sys/un.h>.
11407 (init_named_socket, gdb_agent_helper_thread): Use union
11408 gdb_sockaddr_u.
11409
11410 2015-03-07 Pedro Alves <palves@redhat.com>
11411
11412 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11413 instead.
11414
11415 2015-03-06 Yao Qi <yao.qi@linaro.org>
11416
11417 * linux-aarch64-low.c (aarch64_insert_point): Use
11418 show_debug_regs as a boolean.
11419 (aarch64_remove_point): Likewise.
11420
11421 2015-03-05 Pedro Alves <palves@redhat.com>
11422
11423 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11424 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11425 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11426 * nto-low.c (nto_target_ops): Likewise.
11427 * spu-low.c (spu_target_ops): Likewise.
11428 * win32-low.c (win32_target_ops): Likewise.
11429
11430 2015-03-04 Pedro Alves <palves@redhat.com>
11431
11432 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11433 Decide whether a breakpoint triggered based on the SIGTRAP's
11434 siginfo.si_code.
11435 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11436 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11437 (linux_low_filter_event): Check for breakpoints before checking
11438 watchpoints.
11439 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11440 siginfo.si_code.
11441 (linux_stopped_by_sw_breakpoint)
11442 (linux_supports_stopped_by_sw_breakpoint)
11443 (linux_stopped_by_hw_breakpoint)
11444 (linux_supports_stopped_by_hw_breakpoint): New functions.
11445 (linux_target_ops): Install new target methods.
11446
11447 2015-03-04 Pedro Alves <palves@redhat.com>
11448
11449 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11450 * server.c (swbreak_feature, hwbreak_feature): New globals.
11451 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11452 (captured_main): Clear swbreak_feature and hwbreak_feature.
11453 * server.h (swbreak_feature, hwbreak_feature): Declare.
11454 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11455 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11456 supports_stopped_by_hw_breakpoint>: New fields.
11457 (target_supports_stopped_by_sw_breakpoint)
11458 (target_stopped_by_sw_breakpoint)
11459 (target_supports_stopped_by_hw_breakpoint)
11460 (target_stopped_by_hw_breakpoint): Declare.
11461
11462 2015-03-04 Pedro Alves <palves@redhat.com>
11463
11464 enum lwp_stop_reason -> enum target_stop_reason
11465 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11466 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11467 (linux_wait_1, stuck_in_jump_pad_callback)
11468 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11469 (linux_stopped_by_watchpoint):
11470 * linux-low.h (enum lwp_stop_reason): Delete.
11471 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11472 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11473
11474 2015-03-04 Yao Qi <yao.qi@linaro.org>
11475
11476 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11477
11478 2015-03-03 Gary Benson <gbenson@redhat.com>
11479
11480 * hostio.c (handle_vFile): Fix prefix lengths.
11481
11482 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11483
11484 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11485 ptr_bits.
11486
11487 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11488
11489 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11490 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11491 (clean): Add "rm -f" for above C files.
11492 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11493 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11494 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11495 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11496 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11497 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11498 (init_registers_s390x_vx_linux64)
11499 (init_registers_s390x_tevx_linux64)
11500 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11501 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11502 declarations.
11503 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11504 (s390_store_vxrs_high): New functions.
11505 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11506 NT_S390_VXRS_HIGH.
11507 (s390_arch_setup): Add logic for selecting one of the new target
11508 descriptions. Activate the new vector regsets if applicable.
11509 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11510 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11511 and init_registers_s390x_tevx_linux64.
11512
11513 2015-03-01 Pedro Alves <palves@redhat.com>
11514
11515 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11516 parameter.
11517
11518 2015-02-27 Pedro Alves <palves@redhat.com>
11519
11520 * linux-x86-low.c (u_debugreg_offset): New function.
11521 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11522
11523 2015-02-27 Pedro Alves <palves@redhat.com>
11524
11525 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11526 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11527 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11528 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11529 (ps_lsetfpregs, ps_getpid)
11530 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11531 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11532 (ps_lsetxregs, ps_plog): Declare.
11533
11534 2015-02-27 Pedro Alves <palves@redhat.com>
11535
11536 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11537 IP_AGENT_EXPORT_FUNC.
11538 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11539 IP_AGENT_EXPORT_FUNC.
11540 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11541 (IP_AGENT_EXPORT): Delete.
11542 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11543 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11544 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11545 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11546 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11547 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11548 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11549 (traceframe_read_count, traceframe_write_count)
11550 (traceframes_created, trace_state_variables, get_raw_reg)
11551 (get_trace_state_variable_value, set_trace_state_variable_value)
11552 (ust_loaded, helper_thread_id, cmd_buf): Use
11553 IPA_SYM_EXPORTED_NAME.
11554 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11555 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11556 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11557 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11558 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11559 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11560 EXTERN_C_PUSH/EXTERN_C_POP.
11561 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11562 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11563 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11564 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11565 (traceframe_write_count, traceframe_read_count)
11566 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11567 (about_to_request_buffer_space, get_trace_state_variable_value)
11568 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11569 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11570 EXTERN_C_PUSH/EXTERN_C_POP.
11571 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11572 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11573 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11574 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11575 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11576 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11577 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11578 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11579 Define.
11580 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11581 (IP_AGENT_EXPORT_VAR_DECL): Define.
11582 (tracing): Declare.
11583 (gdb_agent_get_raw_reg): Declare.
11584
11585 2015-02-27 Tom Tromey <tromey@redhat.com>
11586 Pedro Alves <palves@redhat.com>
11587
11588 Rename symbols whose names are reserved C++ keywords throughout.
11589
11590 2015-02-27 Pedro Alves <palves@redhat.com>
11591
11592 * Makefile.in (COMPILER): New, get it from autoconf.
11593 (CXX): Get from autoconf instead.
11594 (COMPILE.pre): Use COMPILER.
11595 (CC-LD): Rename to ...
11596 (CC_LD): ... this. Use COMPILER.
11597 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11598 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11599 * acinclude.m4: Include build-with-cxx.m4.
11600 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11601 Disable -Werror by default if building in C++ mode.
11602 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11603 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11604 the C++ compiler. Save/restore CXXFLAGS too.
11605 * configure: Regenerate.
11606
11607 2015-02-27 Pedro Alves <palves@redhat.com>
11608
11609 * acinclude.m4: Include libiberty.m4.
11610 * configure.ac: Call libiberty_INIT.
11611 * config.in, configure: Regenerate.
11612
11613 2015-02-26 Pedro Alves <palves@redhat.com>
11614
11615 * linux-low.c (linux_wait_1): When incrementing the PC past a
11616 program breakpoint always use the_low_target.breakpoint_len as
11617 increment, rather than the maximum between that and
11618 the_low_target.decr_pc_after_break.
11619
11620 2015-02-23 Pedro Alves <palves@redhat.com>
11621
11622 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11623 thread was doing a step-over; always adjust the PC if
11624 we stepped over a permanent breakpoint.
11625 (linux_wait_1): If we stepped over breakpoint that was on top of a
11626 permanent breakpoint, manually advance the PC past it.
11627
11628 2015-02-23 Pedro Alves <palves@redhat.com>
11629
11630 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11631 modes.
11632 (x86_fill_gregset, x86_store_gregset): Use it when handling
11633 $orig_eax.
11634
11635 2015-02-20 Pedro Alves <palves@redhat.com>
11636
11637 * thread-db.c: Include "nat/linux-procfs.h".
11638 (thread_db_init): Skip listing new threads if the kernel supports
11639 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11640
11641 2015-02-20 Pedro Alves <palves@redhat.com>
11642
11643 * linux-low.c (status_pending_p_callback): Use ptid_match.
11644
11645 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11646
11647 PR breakpoints/16812
11648 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11649 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11650 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11651
11652 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11653
11654 PR breakpoints/15956
11655 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11656
11657 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11658
11659 * linux-low.c (linux_low_btrace_conf): Print size.
11660 * server.c (handle_btrace_conf_general_set): New.
11661 (hanle_general_set): Call handle_btrace_conf_general_set.
11662 (handle_query): Report Qbtrace-conf:bts:size as supported.
11663
11664 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11665
11666 * linux-low.c (linux_low_enable_btrace): Update parameters.
11667 (linux_low_btrace_conf): New.
11668 (linux_target_ops)<to_btrace_conf>: Initialize.
11669 * server.c (current_btrace_conf): New.
11670 (handle_btrace_enable): Rename to ...
11671 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11672 to target_enable_btrace. Update comment. Update users.
11673 (handle_qxfer_btrace_conf): New.
11674 (qxfer_packets): Add btrace-conf entry.
11675 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11676 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11677 (target_ops)<read_btrace_conf>: New.
11678 (target_enable_btrace): Update parameters.
11679 (target_read_btrace_conf): New.
11680
11681 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11682
11683 * server.c (handle_btrace_general_set): Remove call to
11684 target_supports_btrace.
11685 (supported_btrace_packets): New.
11686 (handle_query): Call supported_btrace_packets.
11687 * target.h: include btrace-common.h.
11688 (btrace_target_info): Removed.
11689 (supports_btrace, target_supports_btrace): Update parameters.
11690
11691 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11692
11693 * Makefile.in (SFILES): Add common/btrace-common.c.
11694 (OBS): Add common/btrace-common.o.
11695 (btrace-common.o): Add build rules.
11696 * linux-low: Include btrace-common.h.
11697 (linux_low_read_btrace): Use struct btrace_data. Call
11698 btrace_data_init and btrace_data_fini.
11699
11700 2015-02-06 Pedro Alves <palves@redhat.com>
11701
11702 * thread-db.c (find_new_threads_callback): Add debug output.
11703
11704 2015-02-04 Pedro Alves <palves@redhat.com>
11705
11706 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11707 (resume_stopped_resumed_lwps): New function.
11708 (linux_wait_for_event_filtered): Use it.
11709
11710 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11711
11712 * Makefile.in (SFILES): Add linux-personality.c.
11713 (linux-personality.o): New rule.
11714 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11715 list of objects to be built.
11716 * linux-low.c: Include nat/linux-personality.h.
11717 (linux_create_inferior): Remove code to disable address space
11718 randomization (moved to ../nat/linux-personality.c). Create
11719 cleanup to disable address space randomization.
11720
11721 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11722
11723 * Makefile.in (posix-strerror.o): New rule.
11724 (mingw-strerror.o): Likewise.
11725 * configure: Regenerated.
11726 * configure.ac: Source file ../common/common.host. Initialize new
11727 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11728
11729 2015-01-14 Yao Qi <yao@codesourcery.com>
11730
11731 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11732 (ppc-linux.o): New rule.
11733 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11734 * configure.ac: AC_CHECK_FUNCS(getauxval).
11735 * config.in: Re-generated.
11736 * configure: Re-generated.
11737 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11738 ppc64_64bit_inferior_p
11739
11740 2015-01-14 Yao Qi <yao@codesourcery.com>
11741
11742 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11743 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11744 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11745 (PT_ORIG_R3, PT_TRAP): Likewise.
11746 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11747 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11748 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11749
11750 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11751
11752 * i387-fp.c (i387_cache_to_xsave): In look over
11753 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11754 zmmh_low_space field by use of zmmh_high_space.
11755
11756 2015-01-09 Pedro Alves <palves@redhat.com>
11757
11758 * linux-low.c (step_over_bkpt): Move higher up in the file.
11759 (handle_extended_wait): Don't store the stop_pc here.
11760 (get_stop_pc): Adjust comments and rename to ...
11761 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11762 stopped for a software breakpoint or hardware breakpoint.
11763 (thread_still_has_status_pending_p): New function.
11764 (status_pending_p_callback): Use
11765 thread_still_has_status_pending_p. If the event is no longer
11766 interesting, resume the LWP.
11767 (handle_tracepoints): Add assert.
11768 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11769 (wstatus_maybe_breakpoint): New function.
11770 (cancel_breakpoint): Delete function.
11771 (check_stopped_by_watchpoint): New function, factored out from
11772 linux_low_filter_event.
11773 (lp_status_maybe_breakpoint): Delete function.
11774 (linux_low_filter_event): Remove filter_ptid argument.
11775 Leave thread group exits pending here. Store the LWP's stop PC.
11776 Always leave events pending.
11777 (linux_wait_for_event_filtered): Pull all events out of the
11778 kernel, and leave them all pending.
11779 (count_events_callback, select_event_lwp_callback): Consider all
11780 events.
11781 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11782 (select_event_lwp): Only give preference to the stepping LWP in
11783 all-stop mode. Adjust comments.
11784 (ignore_event): New function.
11785 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11786 references to cancel_breakpoints. Adjust to renames. Also give
11787 equal priority to all LWPs that have had events in non-stop mode.
11788 If reporting a software breakpoint event, unadjust the LWP's PC.
11789 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11790 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11791 Adjust.
11792 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11793 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11794 (linux_stopped_by_watchpoint): Adjust.
11795 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11796 * linux-low.h (enum lwp_stop_reason): New.
11797 (struct lwp_info) <stop_pc>: Adjust comment.
11798 <stopped_by_watchpoint>: Delete field.
11799 <stop_reason>: New field.
11800 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11801 * mem-break.c (software_breakpoint_inserted_here)
11802 (hardware_breakpoint_inserted_here): New function.
11803 * mem-break.h (software_breakpoint_inserted_here)
11804 (hardware_breakpoint_inserted_here): Declare.
11805 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11806 (cancel_breakpoints): Delete.
11807 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11808 (upload_fast_traceframes): Remove references to
11809 cancel_breakpoints.
11810
11811 2015-01-09 Pedro Alves <palves@redhat.com>
11812
11813 * thread-db.c (find_new_threads_callback): Ignore thread if the
11814 kernel thread ID is -1.
11815
11816 2015-01-09 Pedro Alves <palves@redhat.com>
11817
11818 * linux-low.c (linux_attach_fail_reason_string): Move to
11819 nat/linux-ptrace.c, and rename.
11820 (linux_attach_lwp): Update comment.
11821 (attach_proc_task_lwp_callback): New function.
11822 (linux_attach): Adjust to rename and use
11823 linux_proc_attach_tgid_threads.
11824 (linux_attach_fail_reason_string): Delete declaration.
11825
11826 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11827
11828 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11829 * server.c (gdbserver_version): Likewise.
11830
11831 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11832
11833 * remote-utils.c: Include ctype.h.
11834 (input_interrupt): Explicitly handle the case when the char
11835 received is the NUL byte. Improve the printing of non-ASCII
11836 characters.
11837
11838 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11839
11840 * linux-low.c (linux_low_filter_event): Update call to
11841 linux_enable_event_reporting following the addition of
11842 a new parameter to that function.
11843
11844 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11845
11846 PR server/17457
11847 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11848 (AARCH64_FPCR_REGNO): Likewise.
11849 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11850 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11851 (aarch64_store_fpregset): Likewise.
11852
11853 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11854
11855 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11856 Remove FIXME comment about assumption about N.
11857
11858 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11859
11860 * configure.ac: If large-file support is disabled in GDBserver,
11861 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11862 * configure: Regenerate.
11863
11864 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11865
11866 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11867 warning upon ENODATA from ptrace.
11868 * linux-s390-low.c (s390_store_tdb): New.
11869 (s390_regsets): Add regset for NT_S390_TDB.
11870
11871 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11872
11873 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11874 without a fill_function.
11875 * linux-s390-low.c (s390_fill_last_break): Remove.
11876 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11877 (s390_arch_setup): Use regset's size instead of fill_function for
11878 loop end condition.
11879
11880 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11881
11882 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11883 the regset's store function when ptrace returned an error.
11884 * regcache.c (get_thread_regcache): Invalidate register cache
11885 before fetching inferior's registers.
11886
11887 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11888
11889 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11890 while-loop as for-loop.
11891 (regsets_store_inferior_registers): Likewise.
11892
11893 2014-11-28 Yao Qi <yao@codesourcery.com>
11894
11895 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11896 * config.in, configure: Re-generate.
11897 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11898 is defined.
11899
11900 2014-11-21 Yao Qi <yao@codesourcery.com>
11901
11902 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11903 (AC_CHECK_HEADERS): Remove malloc.h.
11904 * configure: Re-generated.
11905 * config.in: Re-generated.
11906 * server.h: Don't include alloca.h and malloc.h.
11907 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11908 Don't include malloc.h.
11909
11910 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11911
11912 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11913 corresponding ERRNO check in same block.
11914
11915 2014-11-12 Pedro Alves <palves@redhat.com>
11916
11917 * server.c (cont_thread): Update comment.
11918 (start_inferior, attach_inferior): No longer clear cont_thread.
11919 (handle_v_cont): No longer set cont_thread.
11920 (captured_main): Clear cont_thread each time a GDB connects.
11921
11922 2014-11-12 Pedro Alves <palves@redhat.com>
11923
11924 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11925 thread, and don't resume all threads if the Hc thread has exited.
11926
11927 2014-11-12 Pedro Alves <palves@redhat.com>
11928
11929 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11930 the process group instead of to a specific LWP.
11931
11932 2014-10-15 Pedro Alves <palves@redhat.com>
11933
11934 PR server/17487
11935 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11936 parameter.
11937 (arm_set_thread_context): Delete.
11938 (the_low_target): Adjust.
11939 * win32-i386-low.c (debug_registers_changed)
11940 (debug_registers_used): Delete.
11941 (update_debug_registers_callback): New function.
11942 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11943 needing to update their debug registers.
11944 (win32_get_current_dr): New function.
11945 (x86_dr_low_get_addr, x86_dr_low_get_control)
11946 (x86_dr_low_get_status): Fetch the debug register from the thread
11947 record's context.
11948 (i386_initial_stuff): Adjust.
11949 (i386_get_thread_context): Remove current_event parameter. Don't
11950 clear debug_registers_changed nor copy DR values to
11951 debug_reg_state.
11952 (i386_set_thread_context): Delete.
11953 (i386_prepare_to_resume): New function.
11954 (i386_thread_added): Mark the thread as needing to update irs
11955 debug registers.
11956 (the_low_target): Remove i386_set_thread_context and install
11957 i386_prepare_to_resume.
11958 * win32-low.c (win32_get_thread_context): Adjust.
11959 (win32_set_thread_context): Use SetThreadContext
11960 directly.
11961 (win32_prepare_to_resume): New function.
11962 (win32_require_context): New function, factored out from ...
11963 (thread_rec): ... this.
11964 (continue_one_thread): Call win32_prepare_to_resume on each thread
11965 we're about to continue.
11966 (win32_resume): Call win32_prepare_to_resume on the event thread.
11967 * win32-low.h (struct win32_thread_info)
11968 <debug_registers_changed>: New field.
11969 (struct win32_target_ops): Change prototype of set_thread_context,
11970 delete set_thread_context and add prepare_to_resume.
11971 (win32_require_context): New declaration.
11972
11973 2014-10-08 Gary Benson <gbenson@redhat.com>
11974
11975 * server.h: Do not include common-exceptions.h.
11976
11977 2014-10-08 Gary Benson <gbenson@redhat.com>
11978
11979 * server.h: Do not include cleanups.h.
11980
11981 2014-09-30 James Hogan <james.hogan@imgtec.com>
11982
11983 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11984 mips64-dsp-linux.c.
11985
11986 2014-09-23 Yao Qi <yao@codesourcery.com>
11987
11988 * linux-low.c (lp_status_maybe_breakpoint): New function.
11989 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11990 (count_events_callback): Likewise.
11991 (select_event_lwp_callback): Likewise.
11992 (cancel_breakpoints_callback): Likewise.
11993
11994 2014-09-19 Don Breazeal <donb@codesourcery.com>
11995
11996 * linux-low.c (handle_extended_wait): Call
11997 linux_ptrace_get_extended_event.
11998 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11999 linux_is_extended_waitstatus.
12000
12001 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12002
12003 * Makefile.in (CPPFLAGS): Define.
12004 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12005 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12006
12007 2014-09-16 Gary Benson <gbenson@redhat.com>
12008
12009 * inferiors.h (current_inferior): Renamed as...
12010 (current_thread): New variable. All uses updated.
12011 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12012 (maybe_move_out_of_jump_pad): Likewise.
12013 (cancel_breakpoint): Likewise.
12014 (linux_low_filter_event): Likewise.
12015 (wait_for_sigstop): Likewise.
12016 (linux_resume_one_lwp): Likewise.
12017 (need_step_over_p): Likewise.
12018 (start_step_over): Likewise.
12019 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12020 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12021 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12022 and save_inferior as saved_thread.
12023 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12024 saved_thread.
12025 (regcache_invalidate_thread): Likewise.
12026 * remote-utils.c (prepare_resume_reply): Likewise.
12027 * thread-db.c (thread_db_get_tls_address): Likewise.
12028 (disable_thread_event_reporting): Likewise.
12029 (remove_thread_event_breakpoints): Likewise.
12030 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12031 as saved_thread.
12032 * target.h (set_desired_inferior): Renamed as...
12033 (set_desired_thread): New declaration. All uses updated.
12034 * server.c (myresume): Updated comment to reference thread instead
12035 of inferior.
12036 (handle_serial_event): Likewise.
12037 (handle_target_event): Likewise.
12038
12039 2014-09-12 Tom Tromey <tromey@redhat.com>
12040 Gary Benson <gbenson@redhat.com>
12041
12042 * regcache.h: Include common-regcache.h.
12043 (regcache_read_pc): Don't declare.
12044 * regcache.c (get_thread_regcache_for_ptid): New function.
12045
12046 2014-09-11 Tom Tromey <tromey@redhat.com>
12047 Gary Benson <gbenson@redhat.com>
12048
12049 * symbol.c: New file.
12050 * Makefile.in (SFILES): Add symbol.c.
12051 (OBS): Add symbol.o.
12052
12053 2014-09-11 Gary Benson <gbenson@redhat.com>
12054
12055 * target.c (target_stop_ptid, target_continue_ptid): New
12056 functions.
12057
12058 2014-09-11 Tom Tromey <tromey@redhat.com>
12059 Gary Benson <gbenson@redhat.com>
12060
12061 * target.h: Include target/target.h.
12062 * target.c (target_read_memory, target_read_uint32)
12063 (target_write_memory): New functions.
12064
12065 2014-09-11 Gary Benson <gbenson@redhat.com>
12066
12067 * server.h (debug_hw_points): Don't declare.
12068 * server.c (debug_hw_points): Don't define. Replace all uses
12069 with show_debug_regs.
12070 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12071 all uses with show_debug_regs.
12072
12073 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12074
12075 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12076 endianness into account.
12077 (ppc_supply_ptrace_register): Likewise.
12078
12079 2014-09-03 James Hogan <james.hogan@imgtec.com>
12080
12081 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12082 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12083
12084 2014-09-03 Gary Benson <gbenson@redhat.com>
12085
12086 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12087 ALL_DEBUG_ADDRESS_REGISTERS.
12088
12089 2014-09-02 Gary Benson <gbenson@redhat.com>
12090
12091 * i386-low.h: Renamed as...
12092 * x86-low.h: New file. All type, function and variable name
12093 prefixes changed from "i386_" to "x86_". All references updated.
12094 * i386-low.c: Renamed as...
12095 * x86-low.c: New file. All type, function and variable name
12096 prefixes changed from "i386_" to "x86_". All references updated.
12097
12098 2014-09-02 Gary Benson <gbenson@redhat.com>
12099
12100 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12101 (x86_linux_new_thread): Likewise.
12102
12103 2014-08-29 Gary Benson <gbenson@redhat.com>
12104
12105 * server.h (setjmp.h): Do not include.
12106 (toplevel): Do not declare.
12107 (common-exceptions.h): Include.
12108 (cleanups.h): Likewise.
12109 * server.c (toplevel): Do not define.
12110 (exit_code): New static global.
12111 (detach_or_kill_for_exit_cleanup): New function.
12112 (main): New function. Original main renamed to...
12113 (captured_main): New function.
12114 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12115
12116 2014-08-29 Gary Benson <gbenson@redhat.com>
12117
12118 * Makefile.in (SFILES): Add common/common-exceptions.c.
12119 (OBS): Add common-exceptions.o.
12120 (common-exceptions.o): New rule.
12121 * utils.c (prepare_to_throw_exception): New function.
12122
12123 2014-08-29 Gary Benson <gbenson@redhat.com>
12124
12125 * config.in: Regenerate.
12126 * configure: Likewise.
12127
12128 2014-08-29 Gary Benson <gbenson@redhat.com>
12129
12130 * Makefile.in (SFILES): Add common/cleanups.c.
12131 (OBS): cleanups.o.
12132 (cleanups.o): New rule.
12133
12134 2014-08-29 Gary Benson <gbenson@redhat.com>
12135
12136 * utils.c (internal_vwarning): New function.
12137
12138 2014-08-28 Gary Benson <gbenson@redhat.com>
12139
12140 * utils.h (fatal): Remove declaration.
12141 * utils.c (fatal): Remove function.
12142
12143 2014-08-28 Gary Benson <gbenson@redhat.com>
12144
12145 * tracepoint.c (gdb_agent_init): Replace fatal with
12146 perror_with_name.
12147 (initialize_tracepoint): Likewise.
12148
12149 2014-08-28 Gary Benson <gbenson@redhat.com>
12150
12151 * remote-utils.c (remote_prepare): Replace fatal with error.
12152
12153 2014-08-28 Gary Benson <gbenson@redhat.com>
12154
12155 * linux-low.c (linux_async): Replace fatal with warning.
12156 Tidy up and return.
12157 (linux_start_non_stop): Return -1 if linux_async failed.
12158
12159 2014-08-28 Gary Benson <gbenson@redhat.com>
12160
12161 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12162 gdb_assert.
12163 (i386_dr_low_get_addr): Remove vague comment.
12164 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12165 gdb_assert.
12166
12167 2014-08-28 Gary Benson <gbenson@redhat.com>
12168
12169 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12170 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12171 internal_error.
12172 (linux_resume_one_lwp): Likewise.
12173 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12174 gdb_assert.
12175 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12176 with internal_error.
12177 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12178 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12179 (find_register_by_name): Replace fatal with internal_error.
12180 (find_regno): Likewise.
12181 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12182 * thread-db.c (thread_db_create_event): Likewise.
12183 (thread_db_load_search): Likewise.
12184 (try_thread_db_load_1): Likewise.
12185 * tracepoint.c (get_jump_space_head): Replace fatal with
12186 internal_error.
12187 (claim_trampoline_space): Likewise.
12188 (have_fast_tracepoint_trampoline_buffer): Likewise.
12189 (cmd_qtstart): Likewise.
12190 (stop_tracing): Likewise.
12191 (fast_tracepoint_collecting): Likewise.
12192 (target_malloc): Likewise.
12193 (download_tracepoint): Likewise.
12194 (download_trace_state_variables): Replace check with gdb_assert.
12195 (upload_fast_traceframes): Replace fatal with internal_error.
12196
12197 2014-08-19 Tom Tromey <tromey@redhat.com>
12198 Gary Benson <gbenson@redhat.com>
12199
12200 * Makefile.in (SFILES): Add common/common-debug.c.
12201 (OBS): Add common-debug.o.
12202 (common-debug.o): New rule.
12203 * debug.h (debug_printf): Don't declare.
12204 * debug.c (debug_printf): Renamed and rewritten as...
12205 (debug_vprintf): New function.
12206
12207 2014-08-19 Gary Benson <gbenson@redhat.com>
12208
12209 * utils.h: Do not include print-utils.h.
12210
12211 2014-08-19 Tom Tromey <tromey@redhat.com>
12212 Gary Benson <gbenson@redhat.com>
12213
12214 * server.h: Add static assertion.
12215 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12216
12217 2014-08-19 Tom Tromey <tromey@redhat.com>
12218 Gary Benson <gbenson@redhat.com>
12219
12220 * Makefile.in (SFILES): Add common/errors.c.
12221 (OBS): Add errors.o.
12222 (IPA_OBS): Add errors-ipa.o.
12223 (errors.o): New rule.
12224 (errors-ipa.o): Likewise.
12225 * utils.h (perror_with_name, error, warning): Don't declare.
12226 * utils.c (warning): Renamed and rewritten as...
12227 (vwarning): New function.
12228 (error): Renamed and rewritten as...
12229 (verror): New function.
12230 (internal_error): Renamed and rewritten as...
12231 (internal_verror): New function.
12232
12233 2014-08-07 Gary Benson <gbenson@redhat.com>
12234
12235 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12236 * configure: Regenerate.
12237 * config.in: Likewise.
12238 * server.h: Do not include errno.h.
12239 * event-loop.c: Likewise.
12240 * hostio-errno.c: Likewise.
12241 * linux-low.c: Likewise.
12242 * remote-utils.c: Likewise.
12243 * spu-low.c: Likewise.
12244 * utils.c: Likewise.
12245 * gdbreplay.c: Unconditionally include errno.h.
12246
12247 2014-08-07 Gary Benson <gbenson@redhat.com>
12248
12249 * server.h: Do not include string.h.
12250 * event-loop.c: Likewise.
12251 * linux-low.c: Likewise.
12252 * regcache.c: Likewise.
12253 * remote-utils.c: Likewise.
12254 * spu-low.c: Likewise.
12255 * utils.c: Likewise.
12256
12257 2014-08-07 Gary Benson <gbenson@redhat.com>
12258
12259 * server.h: Do not include gdb_assert.h.
12260
12261 2014-08-07 Gary Benson <gbenson@redhat.com>
12262
12263 * server.h: Do not include common-utils.h.
12264
12265 2014-08-07 Gary Benson <gbenson@redhat.com>
12266
12267 * server.h: Do not include ptid.h.
12268 * notif.h: Likewise.
12269
12270 2014-08-07 Gary Benson <gbenson@redhat.com>
12271
12272 * server.h: Do not include gdb_locale.h.
12273
12274 2014-08-07 Gary Benson <gbenson@redhat.com>
12275
12276 * server.h: Do not include gdb/signals.h.
12277 * win32-low.c: Likewise.
12278
12279 2014-08-07 Gary Benson <gbenson@redhat.com>
12280
12281 * server.h: Do not include pathmax.h.
12282
12283 2014-08-07 Gary Benson <gbenson@redhat.com>
12284
12285 * server.h: Do not include libiberty.h.
12286 * linux-bfin-low.c: Likewise.
12287
12288 2014-08-07 Gary Benson <gbenson@redhat.com>
12289
12290 * server.h: Do not include ansidecl.h.
12291
12292 2014-08-07 Gary Benson <gbenson@redhat.com>
12293
12294 * linux-x86-low.c: Do not include stddef.h.
12295 * lynx-ppc-low.c: Likewise.
12296 * tracepoint.c: Likewise.
12297
12298 2014-08-07 Gary Benson <gbenson@redhat.com>
12299
12300 * server.h: Do not include stdarg.h.
12301 * nto-low.c: Likewise.
12302
12303 2014-08-07 Gary Benson <gbenson@redhat.com>
12304
12305 * server.h: Do not include stdlib.h.
12306 * inferiors.c: Likewise.
12307 * linux-low.c: Likewise.
12308 * regcache.c: Likewise.
12309 * spu-low.c: Likewise.
12310 * tracepoint.c: Likewise.
12311 * utils.c: Likewise.
12312
12313 2014-08-07 Gary Benson <gbenson@redhat.com>
12314
12315 * server.h: Do not include stdio.h.
12316 * linux-low.c: Likewise.
12317 * remote-utils.c: Likewise.
12318 * spu-low.c: Likewise.
12319 * utils.c: Likewise.
12320 * wincecompat.c: Likewise.
12321
12322 2014-08-06 Gary Benson <gbenson@redhat.com>
12323
12324 * regcache.c (init_register_cache): Move conditionals inside if.
12325
12326 2014-08-06 Gary Benson <gbenson@redhat.com>
12327
12328 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12329
12330 2014-07-31 Gary Benson <gbenson@redhat.com>
12331
12332 * ax.h: Do not include server.h.
12333 * gdbthread.h: Likewise.
12334 * lynx-low.h: Likewise.
12335 * notif.h: Likewise.
12336
12337 2014-07-30 Gary Benson <gbenson@redhat.com>
12338
12339 * server.h: Include common-defs.h.
12340 Do not include config.h or build-gnulib-gdbserver/config.h.
12341
12342 2014-07-30 Gary Benson <gbenson@redhat.com>
12343
12344 * hostio-errno.c: Move server.h to top of includes list.
12345 * inferiors.c: Likewise.
12346 * linux-x86-low.c: Likewise.
12347 * notif.c: Include server.h.
12348
12349 2014-07-24 Tom Tromey <tromey@redhat.com>
12350 Gary Benson <gbenson@redhat.com>
12351
12352 * server.h (CORE_ADDR): Now unsigned.
12353
12354 2014-07-16 Pedro Alves <palves@redhat.com>
12355
12356 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12357
12358 2014-07-15 Pedro Alves <palves@redhat.com>
12359
12360 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12361 copy.
12362
12363 2014-07-11 Pedro Alves <palves@redhat.com>
12364
12365 * linux-low.c (kill_wait_lwp): New function, based on
12366 kill_one_lwp_callback, but use my_waitpid directly.
12367 (kill_one_lwp_callback, linux_kill): Use it.
12368
12369 2014-06-23 Pedro Alves <palves@redhat.com>
12370
12371 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12372 before setting DR0..DR3.
12373
12374 2014-06-20 Gary Benson <gbenson@redhat.com>
12375
12376 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12377 * configure: Regenerated.
12378 * config.in: Likewise.
12379
12380 2014-06-20 Gary Benson <gbenson@redhat.com>
12381
12382 * Makefile.in (SFILES): Update locations for files moved
12383 from common to nat.
12384 (object file files): Reordered.
12385
12386 2014-06-20 Gary Benson <gbenson@redhat.com>
12387
12388 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12389 (i386_dr_low_set_addr): Likewise.
12390 (i386_dr_low_get_addr): Likewise.
12391 (i386_dr_low_can_set_control): Likewise.
12392 (i386_dr_low_set_control): Likewise.
12393 (i386_dr_low_get_control): Likewise.
12394 (i386_dr_low_get_status): Likewise.
12395 (i386_get_debug_register_length): Likewise.
12396 * linux-x86-low.c (i386_dr_low_set_addr):
12397 Changed signature. Made static.
12398 (i386_dr_low_get_addr): Likewise.
12399 (i386_dr_low_set_control): Likewise.
12400 (i386_dr_low_get_control): Likewise.
12401 (i386_dr_low_get_status): Likewise.
12402 (i386_dr_low): New global variable.
12403 * win32-i386-low.c (i386_dr_low_set_addr):
12404 Changed signature. Made static.
12405 (i386_dr_low_get_addr): Likewise.
12406 (i386_dr_low_set_control): Likewise.
12407 (i386_dr_low_get_control): Likewise.
12408 (i386_dr_low_get_status): Likewise.
12409 (i386_dr_low): New global variable.
12410
12411 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12412
12413 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12414 * Makefile.in (AR, AR_FLAGS): Define.
12415 * configure: Regenerate.
12416
12417 2014-06-19 Gary Benson <gbenson@redhat.com>
12418
12419 * Makefile.in (i386-dregs.o): New rule.
12420 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12421 * i386-low.c (target.h): Remove include.
12422 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12423 (DR_CONTROL_SHIFT): Likewise.
12424 (DR_CONTROL_SIZE): Likewise.
12425 (DR_RW_EXECUTE): Likewise.
12426 (DR_RW_WRITE): Likewise.
12427 (DR_RW_READ): Likewise.
12428 (DR_RW_IORW): Likewise.
12429 (DR_LEN_1): Likewise.
12430 (DR_LEN_2): Likewise.
12431 (DR_LEN_4): Likewise.
12432 (DR_LEN_8): Likewise.
12433 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12434 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12435 (DR_ENABLE_SIZE): Likewise.
12436 (DR_LOCAL_SLOWDOWN): Likewise.
12437 (DR_GLOBAL_SLOWDOWN): Likewise.
12438 (DR_CONTROL_RESERVED): Likewise.
12439 (I386_DR_CONTROL_MASK): Likewise.
12440 (I386_DR_VACANT): Likewise.
12441 (I386_DR_LOCAL_ENABLE): Likewise.
12442 (I386_DR_GLOBAL_ENABLE): Likewise.
12443 (I386_DR_DISABLE): Likewise.
12444 (I386_DR_SET_RW_LEN): Likewise.
12445 (I386_DR_GET_RW_LEN): Likewise.
12446 (I386_DR_WATCH_HIT): Likewise.
12447 (i386_wp_op_t): Likewise.
12448 (i386_show_dr): Likewise.
12449 (i386_length_and_rw_bits): Likewise.
12450 (i386_insert_aligned_watchpoint): Likewise.
12451 (i386_remove_aligned_watchpoint): Likewise.
12452 (i386_handle_nonaligned_watchpoint): Likewise.
12453 i386_update_inferior_debug_regs(): Likewise.
12454 (i386_dr_insert_watchpoint): Likewise.
12455 (i386_dr_remove_watchpoint): Likewise.
12456 (i386_dr_region_ok_for_watchpoint): Likewise.
12457 (i386_dr_stopped_data_address): Likewise.
12458 (i386_dr_stopped_by_watchpoint): Likewise.
12459
12460 2014-06-19 Gary Benson <gbenson@redhat.com>
12461
12462 * i386-low.c (i386_dr_show): Renamed to
12463 i386_show_dr and made static. All uses updated.
12464 (i386_dr_length_and_rw_bits): Renamed to
12465 i386_length_and_rw_bits and made static.
12466 All uses updated.
12467 (i386_dr_insert_aligned_watchpoint): Renamed to
12468 i386_insert_aligned_watchpoint and made static.
12469 All uses updated.
12470 (i386_dr_remove_aligned_watchpoint): Renamed to
12471 i386_remove_aligned_watchpoint and made static.
12472 All uses updated.
12473 (i386_dr_update_inferior_debug_regs): Renamed to
12474 i386_update_inferior_debug_regs and made static.
12475 All uses updated.
12476
12477 2014-06-18 Gary Benson <gbenson@redhat.com>
12478
12479 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12480 (i386_dr_low_can_set_control): Likewise.
12481 (i386_get_debug_register_length): Likewise.
12482 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12483 (i386_dr_low_can_set_control): Likewise.
12484 (i386_get_debug_register_length): Likewise.
12485
12486 2014-06-17 Gary Benson <gbenson@redhat.com>
12487
12488 * i386-low.h (i386-dregs.h): New include.
12489 (DR_FIRSTADDR): Now in i386-dregs.h.
12490 (DR_LASTADDR): Likewise.
12491 (DR_NADDR): Likewise.
12492 (DR_STATUS): Likewise.
12493 (DR_CONTROL): Likewise.
12494 (i386_debug_reg_state): Likewise.
12495 (i386_dr_insert_watchpoint): Likewise.
12496 (i386_dr_remove_watchpoint): Likewise.
12497 (i386_dr_region_ok_for_watchpoint): Likewise.
12498 (i386_dr_stopped_data_address): Likewise.
12499 (i386_dr_stopped_by_watchpoint): Likewise.
12500 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12501
12502 2014-06-18 Gary Benson <gbenson@redhat.com>
12503
12504 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12505 i386_dr_insert_watchpoint.
12506 (i386_low_remove_watchpoint): Renamed to
12507 i386_dr_remove_watchpoint.
12508 (i386_low_region_ok_for_watchpoint): Renamed to
12509 i386_dr_region_ok_for_watchpoint.
12510 (i386_low_stopped_data_address): Renamed to
12511 i386_dr_stopped_data_address.
12512 (i386_low_stopped_by_watchpoint): Renamed to
12513 i386_dr_stopped_by_watchpoint.
12514 * i386-low.c (i386_show_dr): Renamed to
12515 i386_dr_show and made nonstatic. All uses updated.
12516 (i386_length_and_rw_bits): Renamed to
12517 i386_dr_length_and_rw_bits and made nonstatic.
12518 All uses updated.
12519 (i386_insert_aligned_watchpoint): Renamed to
12520 i386_dr_insert_aligned_watchpoint and made nonstatic.
12521 All uses updated.
12522 (i386_remove_aligned_watchpoint): Renamed to
12523 i386_dr_remove_aligned_watchpoint and made nonstatic.
12524 All uses updated.
12525 (i386_update_inferior_debug_regs): Renamed to
12526 i386_dr_update_inferior_debug_regs and made nonstatic.
12527 All uses updated.
12528 (i386_low_insert_watchpoint): Renamed to
12529 i386_dr_insert_watchpoint. All uses updated.
12530 (i386_low_remove_watchpoint): Renamed to
12531 i386_dr_remove_watchpoint. All uses updated.
12532 (i386_low_region_ok_for_watchpoint): Renamed to
12533 i386_dr_region_ok_for_watchpoint. All uses updated.
12534 (i386_low_stopped_data_address): Renamed to
12535 i386_dr_stopped_data_address. All uses updated.
12536 (i386_low_stopped_by_watchpoint): Renamed to
12537 i386_dr_stopped_by_watchpoint. All uses updated.
12538
12539 2014-06-18 Gary Benson <gbenson@redhat.com>
12540
12541 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12542 (i386_dr_low_can_set_control): Likewise.
12543 (i386_insert_aligned_watchpoint): New check.
12544
12545 2014-06-18 Gary Benson <gbenson@redhat.com>
12546
12547 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12548 Renamed to state.
12549
12550 2014-06-18 Gary Benson <gbenson@redhat.com>
12551
12552 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12553 instead of fatal and error.
12554 (i386_handle_nonaligned_watchpoint): Likewise.
12555
12556 2014-06-18 Gary Benson <gbenson@redhat.com>
12557
12558 * i386-low.c (i386_get_debug_register_length): New macro.
12559 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12560 (i386_show_dr): Use debug_printf instead of fprintf. Use
12561 phex to format values.
12562
12563 2014-06-18 Gary Benson <gbenson@redhat.com>
12564
12565 * i386-low.h: Comment changes.
12566 * i386-low.c: Likewise.
12567
12568 2014-06-18 Gary Benson <gbenson@redhat.com>
12569
12570 * i386-low.c: Whitespace changes.
12571
12572 2014-06-12 Tom Tromey <tromey@redhat.com>
12573
12574 * utils.c (freeargv): Remove.
12575
12576 2014-06-12 Tom Tromey <tromey@redhat.com>
12577
12578 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12579 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12580 (parse_debug_format_options): Likewise.
12581 (gdbserver_usage): Likewise.
12582 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12583 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12584 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12585 against libiberty.
12586 ($(LIBGNU)): Depend on libiberty.
12587 (all-lib): Recurse into all subdirs.
12588 (install-only): Invoke "install" target in subdirs.
12589 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12590 targets.
12591 * configure: Rebuild.
12592 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12593 for vasprintf, vsnprintf, or gettimeofday.
12594 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12595 srv_tgtobj.
12596
12597 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12598
12599 * development.sh: Delete.
12600 * Makefile.in (config.status): Adjust dependency on development.sh.
12601 * configure.ac: Adjust development.sh source call.
12602 * configure: Regenerate.
12603
12604 2014-06-02 Pedro Alves <palves@redhat.com>
12605
12606 * ax.c (gdb_free_agent_expr): New function.
12607 * ax.h (gdb_free_agent_expr): New declaration.
12608 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12609 list.
12610 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12611 static.
12612 (clear_breakpoint_conditions_and_commands): New function.
12613 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12614 (clear_breakpoint_conditions_and_commands): New declaration.
12615
12616 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12617
12618 * linux-aarch64-low.c (asm/ptrace.h): Include.
12619
12620 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12621
12622 Fix TLS access for -static -pthread.
12623 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12624 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12625 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12626
12627 2014-05-20 Pedro Alves <palves@redhat.com>
12628
12629 * linux-aarch64-low.c (aarch64_insert_point)
12630 (aarch64_remove_point): No longer check whether the type is
12631 supported here. Adjust to new interface.
12632 (the_low_target): Install aarch64_supports_z_point_type as
12633 supports_z_point_type method.
12634 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12635 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12636 instead of a Z packet char. Adjust.
12637 (arm_supports_z_point_type): New function.
12638 (arm_insert_point, arm_remove_point): Adjust to new interface.
12639 (the_low_target): Install arm_supports_z_point_type.
12640 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12641 (cris_insert_point, cris_remove_point): Adjust to new interface.
12642 Don't check whether the type is supported here.
12643 (the_low_target): Install cris_supports_z_point_type.
12644 * linux-low.c (linux_supports_z_point_type): New function.
12645 (linux_insert_point, linux_remove_point): Adjust to new interface.
12646 * linux-low.h (struct linux_target_ops) <insert_point,
12647 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12648 raw_breakpoint pointer parameter.
12649 <supports_z_point_type>: New method.
12650 * linux-mips-low.c (mips_supports_z_point_type): New function.
12651 (mips_insert_point, mips_remove_point): Adjust to new interface.
12652 Use mips_supports_z_point_type.
12653 (the_low_target): Install mips_supports_z_point_type.
12654 * linux-ppc-low.c (the_low_target): Install NULL as
12655 supports_z_point_type method.
12656 * linux-s390-low.c (the_low_target): Install NULL as
12657 supports_z_point_type method.
12658 * linux-sparc-low.c (the_low_target): Install NULL as
12659 supports_z_point_type method.
12660 * linux-x86-low.c (x86_supports_z_point_type): New function.
12661 (x86_insert_point): Adjust to new insert_point interface. Use
12662 insert_memory_breakpoint. Adjust to new
12663 i386_low_insert_watchpoint interface.
12664 (x86_remove_point): Adjust to remove_point interface. Use
12665 remove_memory_breakpoint. Adjust to new
12666 i386_low_remove_watchpoint interface.
12667 (the_low_target): Install x86_supports_z_point_type.
12668 * lynx-low.c (lynx_target_ops): Install NULL as
12669 supports_z_point_type callback.
12670 * nto-low.c (nto_supports_z_point_type): New.
12671 (nto_insert_point, nto_remove_point): Adjust to new interface.
12672 (nto_target_ops): Install nto_supports_z_point_type.
12673 * mem-break.c: Adjust intro comment.
12674 (struct raw_breakpoint) <raw_type, size>: New fields.
12675 <inserted>: Update comment.
12676 <shlib_disabled>: Delete field.
12677 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12678 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12679 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12680 (raw_bkpt_type_to_target_hw_bp_type): New function.
12681 (find_enabled_raw_code_breakpoint_at): New function.
12682 (find_raw_breakpoint_at): New type and size parameters. Use them.
12683 (insert_memory_breakpoint): New function, based off
12684 set_raw_breakpoint_at.
12685 (remove_memory_breakpoint): New function.
12686 (set_raw_breakpoint_at): Reimplement.
12687 (set_breakpoint): New, based on set_breakpoint_at.
12688 (set_breakpoint_at): Reimplement.
12689 (delete_raw_breakpoint): Go through the_target->remove_point
12690 instead of assuming memory breakpoints.
12691 (find_gdb_breakpoint_at): Delete.
12692 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12693 (find_gdb_breakpoint): New function.
12694 (set_gdb_breakpoint_at): Delete.
12695 (z_type_supported): New function.
12696 (set_gdb_breakpoint_1): New function, loosely based off
12697 set_gdb_breakpoint_at.
12698 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12699 (delete_gdb_breakpoint_at): Delete.
12700 (delete_gdb_breakpoint_1): New function, loosely based off
12701 delete_gdb_breakpoint_at.
12702 (delete_gdb_breakpoint): New function.
12703 (clear_gdb_breakpoint_conditions): Rename to ...
12704 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12705 breakpoint.
12706 (add_condition_to_breakpoint): Make static.
12707 (add_breakpoint_condition): Take a struct breakpoint pointer
12708 instead of an address. Adjust.
12709 (gdb_condition_true_at_breakpoint): Rename to ...
12710 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12711 z_type parameter.
12712 (gdb_condition_true_at_breakpoint): Reimplement.
12713 (add_breakpoint_commands): Take a struct breakpoint pointer
12714 instead of an address. Adjust.
12715 (gdb_no_commands_at_breakpoint): Rename to ...
12716 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12717 parameter. Return true if no breakpoint was found. Change debug
12718 output.
12719 (gdb_no_commands_at_breakpoint): Reimplement.
12720 (run_breakpoint_commands): Rename to ...
12721 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12722 and change return type to boolean.
12723 (run_breakpoint_commands): New function.
12724 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12725 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12726 breakpoint. Go through the_target->remove_point instead of
12727 assuming memory breakpoint.
12728 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12729 software and hardware breakpoints.
12730 (reinsert_raw_breakpoint): Go through the_target->insert_point
12731 instead of assuming memory breakpoint.
12732 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12733 software and hardware breakpoints.
12734 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12735 Check both software and hardware breakpoints.
12736 (validate_inserted_breakpoint): Assert the breakpoint is a
12737 software breakpoint. Set the inserted flag to -1 instead of
12738 setting shlib_disabled.
12739 (delete_disabled_breakpoints): Adjust.
12740 (validate_breakpoints): Only validate software breakpoints.
12741 Adjust to inserted flag change.
12742 (check_mem_read, check_mem_write): Skip breakpoint types other
12743 than software breakpoints. Adjust to inserted flag change.
12744 * mem-break.h (enum raw_bkpt_type): New enum.
12745 (raw_breakpoint, struct process_info): Forward declare.
12746 (Z_packet_to_target_hw_bp_type): Delete declaration.
12747 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12748 (set_gdb_breakpoint, delete_gdb_breakpoint)
12749 (clear_breakpoint_conditions): New declarations.
12750 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12751 (breakpoint_inserted_here): Update comment.
12752 (add_breakpoint_condition, add_breakpoint_commands): Replace
12753 address parameter with a breakpoint pointer parameter.
12754 (gdb_breakpoint_here): Update comment.
12755 (delete_gdb_breakpoint_at): Delete.
12756 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12757 * server.c (process_point_options): Take a struct breakpoint
12758 pointer instead of an address. Adjust.
12759 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12760 delete_gdb_breakpoint.
12761 * spu-low.c (spu_target_ops): Install NULL as
12762 supports_z_point_type method.
12763 * target.h: Include mem-break.h.
12764 (struct target_ops) <prepare_to_access_memory>: Update comment.
12765 <supports_z_point_type>: New field.
12766 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12767 instead of a char. Also take a raw breakpoint pointer.
12768 * win32-arm-low.c (the_low_target): Install NULL as
12769 supports_z_point_type.
12770 * win32-i386-low.c (i386_supports_z_point_type): New function.
12771 (i386_insert_point, i386_remove_point): Adjust to new interface.
12772 (the_low_target): Install i386_supports_z_point_type.
12773 * win32-low.c (win32_supports_z_point_type): New function.
12774 (win32_insert_point, win32_remove_point): Adjust to new interface.
12775 (win32_target_ops): Install win32_supports_z_point_type.
12776 * win32-low.h (struct win32_target_ops):
12777 <supports_z_point_type>: New method.
12778 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12779 instead of a char. Also take a raw breakpoint pointer.
12780
12781 2014-05-20 Pedro Alves <palves@redhat.com>
12782
12783 * mem-break.h: Include break-common.h.
12784 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12785 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12786 (Z_packet_to_target_hw_bp_type): New declaration.
12787 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12788 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12789 (Z_PACKET_ACCESS_WP): Delete macros.
12790 (Z_packet_to_hw_type): Delete function.
12791 * i386-low.h: Don't include break-common.h here.
12792 (Z_packet_to_hw_type): Delete declaration.
12793 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12794 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12795 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12796 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12797 * linux-aarch64-low.c: Don't include break-common.h here.
12798 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12799 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12800 (Z_packet_to_target_hw_bp_type): Delete function.
12801 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12802 function.
12803 (mips_insert_point, mips_remove_point): Use
12804 Z_packet_to_target_hw_bp_type.
12805
12806 2014-05-20 Pedro Alves <palves@redhat.com>
12807
12808 * linux-aarch64-low.c: Include break-common.h.
12809 (enum target_point_type): Delete.
12810 (Z_packet_to_point_type): Rename to ...
12811 (Z_packet_to_target_hw_bp_type): ... this, and return a
12812 target_hw_bp_type instead.
12813 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12814 instead of an enum target_point_type.
12815 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12816 breakpoint type.
12817 (aarch64_dr_state_insert_one_point)
12818 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12819 (aarch64_handle_aligned_watchpoint)
12820 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12821 Take an enum target_hw_bp_type instead of an enum
12822 target_point_type.
12823 (aarch64_supports_z_point_type): New function.
12824 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12825 use Z_packet_to_target_hw_bp_type.
12826
12827 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12828
12829 * configure.ac: Only use -Werror by default when DEVELOPMENT
12830 is true.
12831 * configure: Regenerate.
12832
12833 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12834
12835 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12836 * linux-x86-low.c (X86_64_USER_REGS): New.
12837 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12838
12839 2014-04-28 Yao Qi <yao@codesourcery.com>
12840
12841 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12842 name.
12843
12844 2014-04-25 Pedro Alves <palves@redhat.com>
12845
12846 PR server/16255
12847 * linux-low.c (linux_attach_fail_reason_string): New function.
12848 (linux_attach_lwp): Delete.
12849 (linux_attach_lwp_1): Rename to ...
12850 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12851 argument. Remove "initial" parameter. Return int instead of
12852 void. Don't error or warn here.
12853 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12854 failure to attach to the tgid. Call warning when failing to
12855 attach to an lwp.
12856 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12857 argument. Remove "initial" parameter. Return int instead of
12858 void. Don't error or warn here.
12859 (linux_attach_fail_reason_string): New declaration.
12860 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12861 interface change. Use linux_attach_fail_reason_string.
12862
12863 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12864 Walfred Tedeschi <walfred.tedeschi@intel.com>
12865
12866 * Makefile.in: Added rules to handle new files
12867 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12868 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12869 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12870 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12871 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12872 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12873 x32-avx512-linux.o.
12874 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12875 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12876 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12877 i386/x32-avx512.xml.
12878 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12879 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12880 i386/x32-avx512-linux.xml.
12881 * i387-fp.c (num_avx512_k_registers): New constant for number
12882 of K registers.
12883 (num_avx512_zmmh_low_registers): New constant for number of
12884 lower ZMM registers (0-15).
12885 (num_avx512_zmmh_high_registers): New constant for number of
12886 higher ZMM registers (16-31).
12887 (num_avx512_ymmh_registers): New contant for number of higher
12888 YMM registers (ymm16-31 added by avx521 on x86_64).
12889 (num_avx512_xmm_registers): New constant for number of higher
12890 XMM registers (xmm16-31 added by AVX512 on x86_64).
12891 (struct i387_xsave): Add space for AVX512 registers.
12892 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12893 Add code to handle AVX512 registers.
12894 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12895 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12896 prototypei from generated file.
12897 (tdesc_amd64_avx512_linux): Likewise.
12898 (init_registers_x32_avx512_linux): Likewise.
12899 (tdesc_x32_avx512_linux): Likewise.
12900 (init_registers_i386_avx512_linux): Likewise.
12901 (tdesc_i386_avx512_linux): Likewise.
12902 (x86_64_regmap): Add AVX512 registers.
12903 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12904 mask.
12905 (initialize_low_arch): Add code to initialize AVX512 registers.
12906
12907 2014-04-23 Pedro Alves <palves@redhat.com>
12908
12909 * mem-break.c (find_gdb_breakpoint_at): Make static.
12910 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12911
12912 2014-04-23 Pedro Alves <palves@redhat.com>
12913
12914 * i386-low.c: Don't include break-common.h here.
12915 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12916 prototype to take target_hw_bp_type as argument instead of a Z
12917 packet char.
12918 * i386-low.h: Include break-common.h here.
12919 (Z_packet_to_hw_type): Declare.
12920 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12921 prototypes.
12922 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12923 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12924 (x86_remove_point): Convert the packet number to a
12925 target_hw_bp_type before calling i386_low_remove_watchpoint.
12926 * win32-i386-low.c (i386_insert_point): Convert the packet number
12927 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12928 (i386_remove_point): Convert the packet number to a
12929 target_hw_bp_type before calling i386_low_remove_watchpoint.
12930
12931 2014-04-23 Pedro Alves <palves@redhat.com>
12932
12933 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12934
12935 2014-04-10 Pedro Alves <palves@redhat.com>
12936
12937 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12938 Check if the condition or command is NULL before checking if the
12939 breakpoint is known. On success, return true.
12940 * mem-break.h (add_breakpoint_condition): Document return.
12941 (add_breakpoint_commands): Add describing comment.
12942 * server.c (skip_to_semicolon): New function.
12943 (process_point_options): Use it.
12944
12945 2014-04-09 Pedro Alves <palves@redhat.com>
12946
12947 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12948 to lwpid_of.
12949
12950 2014-02-27 Pedro Alves <palves@redhat.com>
12951
12952 PR 12702
12953 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12954 macros.
12955 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12956 output.
12957 (last_thread_of_process_p): Take a PID argument instead of a
12958 thread pointer.
12959 (linux_wait_for_lwp): Delete.
12960 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12961 functions.
12962 (linux_low_filter_event): New function, party factored out from
12963 linux_wait_for_event.
12964 (linux_wait_for_event): Rename to ...
12965 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12966 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12967 sigsuspend. Check for zombie leaders.
12968 (linux_wait_for_event): Reimplement as wrapper around
12969 linux_wait_for_event_filtered.
12970 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12971 a normal or signal exit is seen, it's the whole process exiting.
12972 (wait_for_sigstop): No longer a for_each_inferior callback.
12973 Rewrite on top of linux_wait_for_event_filtered.
12974 (stop_all_lwps): Call wait_for_sigstop directly.
12975 * server.c (resume, handle_target_event): Handle
12976 TARGET_WAITKIND_NO_RESUMED.
12977
12978 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12979
12980 * win32-low.c (psapi_get_dll_name,
12981 * win32_CreateToolhelp32Snapshot): Delete.
12982 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12983 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12984 Delete.
12985 (handle_load_dll): Add function description.
12986 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12987
12988 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12989
12990 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12991 Add comment.
12992 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12993 base address when calling win32_add_one_solib.
12994 (handle_load_dll): Delete local variable load_addr.
12995 Remove 0x1000 offset applied to DLL base address when calling
12996 win32_add_one_solib.
12997 (handle_unload_dll): Add comment.
12998
12999 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13000
13001 * win32-low.c (win32_add_all_dlls): Renames
13002 win32_ensure_ntdll_loaded. Rewrite function documentation.
13003 Adjust implementation to always load all DLLs.
13004 Add 0x1000 offset to DLL base address when calling
13005 win32_add_one_solib.
13006 (child_initialization_done): New static global.
13007 (do_initial_child_stuff): Set child_initialization_done to
13008 zero during child initialization, and 1 after. Replace call
13009 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13010 Add comment.
13011 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13012 (handle_unload_dll): Add function documentation.
13013 (get_child_debug_event): Ignore load and unload DLL events
13014 during child initialization.
13015
13016 2014-02-20 Doug Evans <dje@google.com>
13017
13018 Remove global all_lwps.
13019 * inferiors.h (ptid_of): Move here from linux-low.h.
13020 (pid_of, lwpid_of): Ditto.
13021 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13022 parameter is a struct thread_info * now.
13023 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13024 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13025 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13026 directly.
13027 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13028 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13029 * linux-arm-low.c (update_registers_callback): Update, "entry"
13030 parameter is a struct thread_info * now.
13031 Fetch lwpid from current_inferior directly.
13032 (arm_insert_point): Pass &all_threads to find_inferior instead of
13033 &all_lwps.
13034 (arm_remove_point): Ditto.
13035 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13036 (arm_prepare_to_resume): Fetch pid from thread.
13037 (arm_read_description): Fetch lwpid from current_inferior directly.
13038 * linux-low.c (all_lwps): Delete.
13039 (delete_lwp): Delete call to remove_inferior.
13040 (handle_extended_wait): Fetch lwpid from thread.
13041 (add_lwp): Don't set lwp->entry.id. Remove call to
13042 add_inferior_to_list.
13043 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13044 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13045 (kill_one_lwp_callback): Ditto.
13046 (linux_kill): Don't dereference NULL pointer.
13047 Fetch ptid,lwpid from thread.
13048 (get_detach_signal): Fetch ptid from thread.
13049 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13050 Simplify call to regcache_invalidate_thread.
13051 (delete_lwp_callback): Update, "entry" parameter is a
13052 struct thread_info * now. Fetch pid from thread.
13053 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13054 (status_pending_p_callback): Update, "entry" parameter is a
13055 struct thread_info * now. Fetch ptid from thread.
13056 (find_lwp_pid): Update, "entry" parameter is a
13057 struct thread_info * now.
13058 (linux_wait_for_lwp): Fetch pid from thread.
13059 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13060 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13061 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13062 (dequeue_one_deferred_signal): Ditto.
13063 (cancel_breakpoint): Fetch ptid from current_inferior.
13064 (linux_wait_for_event): Pass &all_threads to find_inferior,
13065 not &all_lwps. Fetch ptid, lwpid from thread.
13066 (count_events_callback): Update, "entry" parameter is a
13067 struct thread_info * now.
13068 (select_singlestep_lwp_callback): Ditto.
13069 (select_event_lwp_callback): Ditto.
13070 (cancel_breakpoints_callback): Ditto.
13071 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13072 not &all_lwps.
13073 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13074 (unsuspend_one_lwp): Update, "entry" parameter is a
13075 struct thread_info * now.
13076 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13077 not &all_lwps.
13078 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13079 Fetch lwpid from thread, not lwp.
13080 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13081 Pass &all_threads to find_inferior, not &all_lwps.
13082 (send_sigstop): Fetch lwpid from thread, not lwp.
13083 (send_sigstop_callback): Update, "entry" parameter is a
13084 struct thread_info * now.
13085 (suspend_and_send_sigstop_callback): Ditto.
13086 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13087 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13088 struct thread_info * now.
13089 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13090 from thread, lwp.
13091 (lwp_running): Update, "entry" parameter is a
13092 struct thread_info * now.
13093 (stop_all_lwps): Fetch ptid from thread.
13094 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13095 (linux_resume_one_lwp): Fetch lwpid from thread.
13096 (linux_set_resume_request): Update, "entry" parameter is a
13097 struct thread_info * now. Fetch pid, lwpid from thread.
13098 (resume_status_pending_p): Update, "entry" parameter is a
13099 struct thread_info * now.
13100 (need_step_over_p): Ditto. Fetch lwpid from thread.
13101 (start_step_over): Fetch lwpid from thread.
13102 (linux_resume_one_thread): Update, "entry" parameter is a
13103 struct thread_info * now. Fetch lwpid from thread.
13104 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13105 (proceed_one_lwp): Update, "entry" parameter is a
13106 struct thread_info * now. Fetch lwpid from thread.
13107 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13108 struct thread_info * now.
13109 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13110 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13111 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13112 directly.
13113 (regsets_store_inferior_registers): Ditto.
13114 (fetch_register, store_register): Ditto.
13115 (linux_read_memory, linux_write_memory): Ditto.
13116 (linux_request_interrupt): Ditto.
13117 (linux_read_auxv): Ditto.
13118 (linux_xfer_siginfo): Ditto.
13119 (linux_qxfer_spu): Ditto.
13120 (linux_qxfer_libraries_svr4): Ditto.
13121 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13122 moved to inferiors.h.
13123 (get_lwp): Delete.
13124 (get_thread_lwp): Update.
13125 (struct lwp_info): Delete member "entry". Simplify comment for
13126 member "thread".
13127 (all_lwps): Delete.
13128 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13129 current_inferior directly.
13130 (update_watch_registers_callback): Update, "entry" parameter is a
13131 struct thread_info * now. Fetch pid from thread.
13132 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13133 (mips_insert_point): Fetch lwpid from current_inferior.
13134 Pass &all_threads to find_inferior, not &all_lwps.
13135 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13136 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13137 directly.
13138 (mips_stopped_data_address): Ditto.
13139 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13140 directly.
13141 * linux-tile-low.c (tile_arch_setup): Ditto.
13142 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13143 (update_debug_registers_callback): Update, "entry" parameter is a
13144 struct thread_info * now. Fetch pid from thread.
13145 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13146 Pass &all_threads to find_inferior, not &all_lwps.
13147 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13148 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13149 Pass &all_threads to find_inferior, not &all_lwps.
13150 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13151 (i386_dr_low_get_status): Ditto.
13152 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13153 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13154 (x86_linux_read_description): Ditto.
13155 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13156
13157 2014-02-20 Doug Evans <dje@google.com>
13158
13159 * inferiors.c (get_first_inferior): Fix buglet.
13160
13161 2014-02-19 Doug Evans <dje@google.com>
13162
13163 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13164 * inferiors.c (add_thread): Change result type to struct thread_info *.
13165 All callers updated.
13166 (add_lwp): Call add_thread here instead of in callers.
13167 All callers updated.
13168 * linux-low.h (get_lwp_thread): Rewrite.
13169 (struct lwp_info): New member "thread".
13170
13171 2014-02-19 Doug Evans <dje@google.com>
13172
13173 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13174 All callers updated.
13175
13176 2014-02-19 Doug Evans <dje@google.com>
13177
13178 * inferiors.c (add_thread): Fix whitespace.
13179
13180 2014-02-19 Doug Evans <dje@google.com>
13181
13182 * dll.c (clear_dlls): Replace accessing list implemention details
13183 with API function.
13184 * gdbthread.h (get_first_thread): Declare.
13185 * inferiors.c (for_each_inferior_with_data): New function.
13186 (get_first_thread): New function.
13187 (find_thread_ptid): Simplify.
13188 (get_first_inferior): New function.
13189 (clear_list): Delete.
13190 (one_inferior_p): New function.
13191 (clear_inferior_list): New function.
13192 (clear_inferiors): Update.
13193 * inferiors.h (for_each_inferior_with_data): Declare.
13194 (clear_inferior_list): Declare.
13195 (one_inferior_p): Declare.
13196 (get_first_inferior): Declare.
13197 * linux-low.c (linux_wait_for_event): Replace accessing list
13198 implemention details with API function.
13199 * server.c (target_running): Ditto.
13200 (accumulate_file_name_length): New function.
13201 (emit_dll_description): New function.
13202 (handle_qxfer_libraries): Replace accessing list implemention
13203 details with API function.
13204 (handle_qxfer_threads_worker): New function.
13205 (handle_qxfer_threads_proper): Replace accessing list implemention
13206 details with API function.
13207 (handle_query): Ditto.
13208 (visit_actioned_threads_callback_ftype): New typedef.
13209 (visit_actioned_threads_data): New struct.
13210 (visit_actioned_threads): Rewrite to be find_inferior callback.
13211 (resume): Call find_inferior.
13212 (handle_status): Replace accessing list implemention
13213 details with API function.
13214 (process_serial_event): Replace accessing list implemention details
13215 with API function.
13216 * target.c (set_desired_inferior): Replace accessing list implemention
13217 details with API function.
13218 * tracepoint.c (same_process_p): New function.
13219 (gdb_agent_about_to_close): Replace accessing list implemention
13220 details with API function.
13221 * win32-low.c (child_delete_thread): Replace accessing list
13222 implemention details with API function.
13223 (match_dll_by_basename): New function.
13224 (dll_is_loaded_by_basename): New function.
13225 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13226 details call to dll_is_loaded_by_basename.
13227
13228 2014-02-19 Doug Evans <dje@google.com>
13229
13230 * dll.h (struct dll_info): Add comment.
13231 * gdbthread.h (struct thread_info): Add comment.
13232 (current_ptid): Simplify.
13233 * inferiors.c (add_process): Update.
13234 (remove_process): Update.
13235 * inferiors.h (struct process_info): Rename member "head" to "entry".
13236 * linux-low.c (delete_lwp): Update.
13237 (add_lwp): Update.
13238 (last_thread_of_process_p): Update.
13239 (kill_one_lwp_callback, linux_kill): Update.
13240 (status_pending_p_callback): Update.
13241 (wait_for_sigstop): Update. Simplify read of ptid.
13242 (start_step_over): Update.
13243 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13244 (get_lwp_thread): Update.
13245 (struct lwp_info): Rename member "head" to "entry".
13246 * regcache.h (inferior_list_entry): Delete.
13247 * server.c (kill_inferior_callback): Update.
13248 (detach_or_kill_inferior_callback): Update.
13249 (print_started_pid): Update.
13250 (print_attached_pid): Update.
13251 (process_serial_event): Simplify read of ptid.
13252 * thread-db.c (thread_db_create_event): Update.
13253 (thread_db_get_tls_address): Update.
13254 * win32-low.c (current_inferior_ptid): Simplify.
13255
13256 2014-02-19 Tom Tromey <tromey@redhat.com>
13257
13258 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13259 argument.
13260 (target_supports_btrace): Update.
13261
13262 2014-02-14 Yao Qi <yao@codesourcery.com>
13263
13264 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13265 (rsp-low-ipa.o): New target.
13266
13267 2014-02-12 Tom Tromey <tromey@redhat.com>
13268
13269 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13270 convert_ascii_to_int.
13271 * regcache.c (registers_to_string): Likewise.
13272 * remote-utils.c (decode_M_packet): Likewise.
13273 * server.c (process_serial_event): Likewise.
13274
13275 2014-02-12 Tom Tromey <tromey@redhat.com>
13276
13277 * server.c (handle_query, handle_v_run): Use hex2bin, not
13278 unhexify.
13279 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13280
13281 2014-02-12 Tom Tromey <tromey@redhat.com>
13282
13283 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13284 convert_int_to_ascii.
13285 * regcache.c (registers_to_string, collect_register_as_string):
13286 Likewise.
13287 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13288 Likewise.
13289 * server.c (process_serial_event): Likewise.
13290 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13291 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13292
13293 2014-02-12 Tom Tromey <tromey@redhat.com>
13294
13295 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13296 bin2hex, not hexify.
13297 * tracepoint.c (cmd_qtstatus): Likewise.
13298
13299 2014-02-12 Tom Tromey <tromey@redhat.com>
13300
13301 * remote-utils.c (monitor_output): Pass explicit length to
13302 hexify.
13303
13304 2014-02-12 Tom Tromey <tromey@redhat.com>
13305
13306 * tracepoint.c: Include rsp-low.h.
13307 * server.c: Include rsp-low.h.
13308 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13309 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13310 declare.
13311 * remote-utils.c: Include rsp-low.h.
13312 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13313 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13314 (convert_int_to_ascii, convert_ascii_to_int): Move to
13315 common/rsp-low.c.
13316 * regcache.c: Include rsp-low.h.
13317 * ax.c: Include rsp-low.h.
13318 * Makefile.in (SFILES): Add common/rsp-low.c.
13319 (OBS): Add rsp-low.o.
13320 (rsp-low.o): New target.
13321
13322 2014-02-12 Tom Tromey <tromey@redhat.com>
13323
13324 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13325 Include print-utils.h.
13326 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13327 (plongest, thirty_two, phex_nz): Remove.
13328 * Makefile.in (SFILES): Add common/print-utils.c.
13329 (OBS): Add print-utils.o.
13330 (print-utils-ipa.o): New target.
13331 (print-utils.o): New target.
13332 (IPA_OBJS): Add print-utils-ipa.o.
13333
13334 2014-02-06 Tom Tromey <tromey@redhat.com>
13335
13336 * Makefile.in (SFILES): Fix indentation.
13337
13338 2014-02-05 Doug Evans <dje@google.com>
13339
13340 * linux-low.c (linux_wait_for_event): Improve comment.
13341 (linux_wait_1): Keep current_inferior in sync with event_child.
13342
13343 2014-01-22 Doug Evans <dje@google.com>
13344
13345 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13346
13347 2014-01-22 Doug Evans <dje@google.com>
13348
13349 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13350 * configure: Regenerate.
13351 * config.in: Regenerate.
13352 * Makefile.in (SFILES): Add debug.c.
13353 (OBS): Add debug.o.
13354 * debug.c: New file.
13355 * debug.h: New file.
13356 * linux-aarch64-low.c (*): Update all debugging printfs to use
13357 debug_printf instead of fprintf.
13358 * linux-arm-low.c (*): Ditto.
13359 * linux-cris-low.c (*): Ditto.
13360 * linux-crisv32-low.c (*): Ditto.
13361 * linux-m32r-low.c (*): Ditto.
13362 * linux-sparc-low.c (*): Ditto.
13363 * linux-x86.c (*): Ditto.
13364 * linux-low.c (*): Ditto.
13365 (linux_wait_1): Add calls to debug_enter, debug_exit.
13366 (linux_wait): Remove redundant debugging printf.
13367 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13368 (linux_resume, unstop_all_lwps): Ditto.
13369 * mem-break.c (*): Update all debugging printfs to use
13370 debug_printf instead of fprintf.
13371 * remote-utils.c (*): Ditto.
13372 * thread-db.c (*): Ditto.
13373 * server.c #include <ctype.h>, "gdb_vecs.h".
13374 (debug_threads): Moved to debug.c.
13375 (*): Update all debugging printfs to use debug_printf instead of
13376 fprintf.
13377 (start_inferior): Replace call to fflush with call to debug_flush.
13378 (monitor_show_help): Mention set debug-format.
13379 (parse_debug_format_options): New function.
13380 (handle_monitor_command): Handle "monitor set debug-format".
13381 (gdbserver_usage): Mention --debug-format.
13382 (main): Parse --debug-format.
13383 * server.h (debug_threads): Declaration moved to debug.h.
13384 #include "debug.h".
13385 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13386 trace_debug_1 that uses debug_printf.
13387 (tracepoint_look_up_symbols): Update all debugging printfs to use
13388 debug_printf instead of fprintf.
13389
13390 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13391
13392 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13393 sys/ptrace.h.
13394
13395 2014-01-17 Pedro Alves <palves@redhat.com>
13396
13397 PR build/16445
13398 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13399 defined after including gdb_proc_service.h.
13400
13401 2014-01-16 Doug Evans <dje@google.com>
13402
13403 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13404 (match_dll): Use it.
13405
13406 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13407
13408 * target.h (target_ops) <read_btrace>: Change parameters and
13409 return type to allow error reporting.
13410 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13411 trace reading errors on.
13412 * linux-low.c (linux_low_read_btrace): Pass trace reading
13413 errors on.
13414 (linux_low_disable_btrace): New.
13415
13416 2014-01-15 Doug Evans <dje@google.com>
13417
13418 * inferiors.c (thread_id_to_gdb_id): Delete.
13419 * inferiors.h (thread_id_to_gdb_id): Delete.
13420
13421 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13422
13423 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13424 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13425 versions.
13426
13427 2014-01-08 Pedro Alves <palves@redhat.com>
13428
13429 * server.c (handle_status): Don't discard previous queued stop
13430 replies or thread's pending status here.
13431 (main) <disconnection>: Do it here instead.
13432
13433 2014-01-08 Pedro Alves <palves@redhat.com>
13434
13435 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13436 * server.c (visit_actioned_threads, handle_pending_status): New
13437 function.
13438 (handle_v_cont): Factor out parts to ...
13439 (resume): ... this new function. If in all-stop, and a thread
13440 being resumed has a pending status, report it without actually
13441 resuming.
13442 (myresume): Adjust to use the new 'resume' function.
13443 (clear_pending_status_callback, set_pending_status_callback)
13444 (find_status_pending_thread_callback): New functions.
13445 (handle_status): Handle the case of multiple threads having
13446 interesting statuses to report. Report threads' real last signal
13447 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13448 with an interesting thread to report the status for, instead of
13449 always reporting the status of the first thread.
13450
13451 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13452
13453 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13454 * gdbreplay.c (gdbreplay_version): Likewise.
13455
13456 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13457
13458 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13459 iov.iov_len with the real length in use.
13460
13461 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13462
13463 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13464 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13465 for all targets that use win32-low.c.
13466 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13467 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13468
13469 2013-12-13 Pedro Alves <palves@redhat.com>
13470
13471 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13472 if equal to TARGET_WAITKIND_LOADED.
13473 * win32-low.c (cached_status): New static global.
13474 (win32_wait): Add declaration.
13475 (do_initial_child_stuff): Flush all initial pending debug events
13476 up to the initial breakpoint.
13477 (win32_wait): If CACHED_STATUS was set, return that instead
13478 of doing a real wait. Remove the code resuming the execution
13479 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13480 during the initial phase. Also remove the code changing
13481 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13482 TARGET_WAITKIND_STOPPED.
13483
13484 2013-12-11 Yao Qi <yao@codesourcery.com>
13485
13486 * notif.c (handle_notif_ack): Return 0 if no notification
13487 matches.
13488
13489 2013-11-20 Doug Evans <dje@google.com>
13490
13491 * linux-low.c (linux_set_resume_request): Fix comment.
13492
13493 2013-11-20 Doug Evans <dje@google.com>
13494
13495 * linux-low.c (resume_status_pending_p): Tweak comment.
13496
13497 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13498
13499 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13500 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13501 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13502 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13503 (srv_amd64_regobj): Add amd64-mpx.o.
13504 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13505 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13506 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13507 * i387-fp.c (num_pl_bnd_register) Added constant.
13508 (num_pl_bnd_cfg_registers) Added constant.
13509 (struct i387_xsave) Added reserved area and MPX fields.
13510 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13511 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13512 function.
13513 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13514 (init_registers_amd64_mpx_linux): Declare new function.
13515 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13516 (x86_64_regmap): Add MPX registers.
13517 (x86_linux_read_description): Add MPX case.
13518 (initialize_low_arch): Initialize MPX targets.
13519
13520 2013-11-18 Tom Tromey <tromey@redhat.com>
13521
13522 * configure: Rebuild.
13523 * configure.ac: Don't check for stdlib.h.
13524 * gdbreplay.c: Unconditionally include stdlib.h.
13525
13526 2013-11-18 Tom Tromey <tromey@redhat.com>
13527
13528 * config.in: Rebuild.
13529 * configure: Rebuild.
13530 * configure.ac: Don't use AC_HEADER_DIRENT.
13531
13532 2013-11-18 Tom Tromey <tromey@redhat.com>
13533
13534 * server.h: Don't check HAVE_STRING_H.
13535 * gdbreplay.c: Don't check HAVE_STRING_H.
13536 * configure: Rebuild.
13537
13538 2013-11-18 Tom Tromey <tromey@redhat.com>
13539
13540 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13541 LIBGNU.
13542
13543 2013-11-08 Tom Tromey <tromey@redhat.com>
13544
13545 * configure, config.in: Rebuild.
13546 * configure.ac: Remove unused configury.
13547
13548 2013-11-08 Tom Tromey <tromey@redhat.com>
13549
13550 * acinclude.m4: Include common.m4, codeset.m4.
13551 * configure, config.in: Rebuild.
13552 * configure.ac: Use GDB_AC_COMMON.
13553
13554 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13555
13556 * linux-s390-low.c (HWCAP_S390_TE): New define.
13557 (s390_arch_setup): Consider the TE field in the HWCAP for
13558 determining 'have_regset_tdb'.
13559
13560 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13561
13562 PR gdb/16014
13563 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13564 call to sizeof.
13565
13566 2013-10-02 Pedro Alves <palves@redhat.com>
13567
13568 * server.c (process_serial_event): Don't output "GDBserver
13569 exiting" if GDB is connected through stdio.
13570 * target.c (mywait): Likewise, be silent if GDB is connected
13571 through stdio.
13572
13573 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13574
13575 * lynx-low.c (lynx_add_threads_after_attach): New function.
13576 (lynx_attach): Remove call to add_thread. Add call to
13577 lynx_add_threads_after_attach instead.
13578
13579 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13580
13581 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13582 * config.in, configure: Regenerated.
13583
13584 2013-09-18 Yao Qi <yao@codesourcery.com>
13585
13586 PR server/15959
13587 * server.c (start_inferior): Clear 'resume_info'.
13588
13589 2013-09-16 Jiong Wang <jiwang@tilera.com>
13590
13591 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13592 for each register.
13593
13594 2013-09-16 Jiong Wang <jiwang@tilera.com>
13595
13596 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13597 linux-tile-low.o to srv_tgtobj.
13598
13599 2013-09-16 Will Newton <will.newton@linaro.org>
13600
13601 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13602 out regs.
13603
13604 2013-09-06 Pedro Alves <palves@redhat.com>
13605
13606 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13607 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13608 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13609 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13610 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13611 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13612
13613 2013-09-06 Pedro Alves <palves@redhat.com>
13614
13615 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13616 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13617
13618 2013-09-06 Pedro Alves <palves@redhat.com>
13619
13620 * linux-amd64-ipa.c: Include tracepoint.h.
13621 * linux-i386-ipa.c: Include tracepoint.h.
13622
13623 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13624
13625 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13626 (ps_get_thread_area): New function.
13627
13628 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13629
13630 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13631 (initialize_low_arch): Call init_registers_crisv32 rather than
13632 init_register_crisv32.
13633
13634 2013-09-05 Pedro Alves <palves@redhat.com>
13635
13636 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13637 to ...
13638 * hostio.h: ... this new file.
13639 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13640 win32-low.c: Include hostio.h.
13641
13642 2013-09-05 Pedro Alves <palves@redhat.com>
13643
13644 * server.h (gdb_client_data, handler_func, callback_handler_func)
13645 (delete_file_handler, add_file_handler, append_callback_event)
13646 (delete_callback_event, start_event_loop, initialize_event_loop):
13647 Move to event-loop.h and include it.
13648 * event-loop.h: New file.
13649
13650 2013-09-05 Pedro Alves <palves@redhat.com>
13651
13652 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13653 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13654 (loaded_dll, unloaded_dll): Move to ...
13655 * dll.h: ... this new file.
13656 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13657
13658 2013-09-05 Pedro Alves <palves@redhat.com>
13659
13660 * server.h (current_process, get_thread_process, all_processes)
13661 (add_inferior_to_list, for_each_inferior, current_inferior)
13662 (remove_inferior, add_process, remove_process, find_process_pid)
13663 (have_started_inferiors_p, have_attached_inferiors_p)
13664 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13665 (clear_inferiors, find_inferior, find_inferior_id)
13666 (inferior_target_data, set_inferior_target_data)
13667 (inferior_regcache_data, set_inferior_regcache_data): Move to
13668 inferiors.h, and include it.
13669 * inferiors.h: New file.
13670
13671 2013-09-05 Pedro Alves <palves@redhat.com>
13672
13673 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13674 Move ...
13675 * ax.h: ... here.
13676
13677 2013-09-05 Pedro Alves <palves@redhat.com>
13678
13679 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13680 tracepoint.h.
13681 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13682 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13683 (handle_tracepoint_general_set, handle_tracepoint_query)
13684 (tracepoint_finished_step, tracepoint_was_hit)
13685 (release_while_stepping_state_list, current_traceframe)
13686 (in_readonly_region, traceframe_read_mem)
13687 (fetch_traceframe_registers, traceframe_read_sdata)
13688 (traceframe_read_info, struct fast_tpoint_collect_status)
13689 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13690 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13691 (supply_fast_tracepoint_registers)
13692 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13693 (ipa_tdesc, claim_trampoline_space)
13694 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13695 (agent_mem_read, agent_get_trace_state_variable_value)
13696 (agent_set_trace_state_variable_value, agent_tsv_read)
13697 (agent_mem_read_string, get_raw_reg_func_addr)
13698 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13699 * tracepoint.h: ... this new file.
13700
13701 2013-09-05 Pedro Alves <palves@redhat.com>
13702
13703 * server.h (perror_with_name, error, fatal, warning, paddress)
13704 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13705 include it.
13706 * utils.h: New file.
13707
13708 2013-09-05 Pedro Alves <palves@redhat.com>
13709
13710 * server.h (remote_debug, noack_mode, transport_is_reliable)
13711 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13712 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13713 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13714 (write_enn, initialize_async_io, enable_async_io)
13715 (disable_async_io, check_remote_input_interrupt_request)
13716 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13717 (dead_thread_notify, prepare_resume_reply)
13718 (decode_address_to_semicolon, decode_address, decode_m_packet)
13719 (decode_M_packet, decode_X_packet, decode_xfer_write)
13720 (decode_search_memory_packet, unhexify, hexify)
13721 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13722 (look_up_one_symbol, relocate_instruction)
13723 (monitor_output): Move to remote-utils.h, and include it.
13724 * remote-utils.h: New file.
13725
13726 2013-09-05 Pedro Alves <palves@redhat.com>
13727
13728 * server.h (_): Delete.
13729
13730 2013-09-02 Pedro Alves <palves@redhat.com>
13731
13732 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13733 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13734 allocated.
13735 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13736
13737 2013-09-02 Pierre Muller <muller@sourceware.org>
13738
13739 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13740 or WriteProcessMemory complete successfully and handle
13741 ERROR_PARTIAL_COPY error.
13742
13743 2013-09-02 Pedro Alves <palves@redhat.com>
13744
13745 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13746 error instead of EIO.
13747
13748 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13749
13750 PR server/15604
13751 * linux-low.c: Include filestuff.h.
13752 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13753 * lynx-low.c: Include filestuff.h.
13754 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13755 * server.c: Include filestuff.h.
13756 (main): Call notice_open_fds.
13757 * spu-low.c: Include filestuff.h.
13758 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13759
13760 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13761
13762 * Makefile.in: Explain why ../target and ../nat are not
13763 listed as include file search paths.
13764 (linux-waitpid.o): New object file rule.
13765 * configure.srv (srv_native_linux_obj): New variable.
13766 Replace all occurrences of linux native object files with
13767 $srv_native_linux_obj.
13768 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13769 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13770 (linux_enable_event_reporting): Remove declaration.
13771 (my_waitpid): Moved to common/linux-waitpid.c.
13772 (linux_wait_for_event): Pass ptid when calling
13773 linux_enable_event_reporting.
13774 (linux_supports_tracefork_flag): Remove.
13775 (linux_enable_event_reporting): Likewise.
13776 (linux_tracefork_grandchild): Remove.
13777 (STACK_SIZE): Moved to common/linux-ptrace.c.
13778 (linux_tracefork_child): Remove.
13779 (linux_test_for_tracefork): Remove.
13780 (linux_look_up_symbols): Call linux_supports_traceclone.
13781 (initialize_low): Remove call to linux_test_for_tracefork.
13782 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13783 common/linux-ptrace.h.
13784 (PTRACE_TYPE_ARG4): Likewise.
13785 Include linux-ptrace.h.
13786
13787 2013-08-21 Pedro Alves <palves@redhat.com>
13788
13789 * config.in: Renegerate.
13790
13791 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13792
13793 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13794 (SFILES): Remove $(srcdir)/common/target-common.c and
13795 add $(srcdir)/target/waitstatus.c.
13796 (OBS): Remove target-common.o and add waitstatus.o.
13797 (server_h): Remove $(srcdir)/../common/target-common.h and
13798 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13799 and $(srcdir)/../target/waitstatus.h.
13800 (target-common.o): Remove.
13801 (waitstatus.o): New target object file.
13802 * target.h: Do not include target-common.h and
13803 include target/resume.h, target/wait.h and
13804 target/waitstatus.h.
13805
13806 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13807
13808 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13809 to PTRACE_TYPE_ARG3.
13810 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13811 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13812 PTRACE_TYPE_ARG4.
13813 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13814 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13815
13816 2013-07-27 Jie Zhang <jie@codesourcery.com>
13817 Daniel Jacobowitz <dan@codesourcery.com>
13818 Yao Qi <yao@codesourcery.com>
13819
13820 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13821 (mips-linux-watch.o): New rule.
13822 (mips_linux_watch_h): New variable.
13823 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13824 srv_tgtobj.
13825 * linux-mips-low.c: Include mips-linux-watch.h.
13826 (struct arch_process_info, struct arch_lwp_info): New.
13827 (update_watch_registers_callback): New function.
13828 (mips_linux_new_process, mips_linux_new_thread) New functions.
13829 (mips_linux_prepare_to_resume, mips_insert_point): New
13830 functions.
13831 (mips_remove_point, mips_stopped_by_watchpoint): New
13832 functions.
13833 (rsp_bp_type_to_target_hw_bp_type): New function.
13834 (mips_stopped_data_address): New function.
13835 (the_low_target): Add watchpoint support functions.
13836
13837 2013-07-27 Yao Qi <yao@codesourcery.com>
13838
13839 * i386-low.c: Include break-common.h.
13840 (enum target_hw_bp_type): Remove.
13841
13842 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13843
13844 * Makefile.in (SFILES): /common/target-common.c.
13845 (OBS): Add target-common.o.
13846 (server_h): Add $(srcdir)/../common/target-common.h.
13847 (target-common.o): New target.
13848 * server.c (queue_stop_reply_callback): Free
13849 status string after use.
13850 * target.c (target_waitstatus_to_string): Remove.
13851 * target.h: Include target-common.h.
13852 (resume_kind): Likewise.
13853 (target_waitkind): Likewise.
13854 (target_waitstatus): Likewise.
13855 (TARGET_WNOHANG): Likewise.
13856
13857 2013-07-04 Yao Qi <yao@codesourcery.com>
13858
13859 * Makefile.in (host_alias): Use @host_noncanonical@.
13860 (target_alias): Use @target_noncanonical@.
13861 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13862 ACX_NONCANONICAL_HOST.
13863 * configure: Regenerated.
13864
13865 Revert:
13866 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13867
13868 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13869 * configure: Rebuild.
13870 * Makefile.in (version_host, version_target): Get from configure.
13871 (version.c): Use $(version_host) and $(version_target).
13872
13873 2013-07-03 Pedro Alves <palves@redhat.com>
13874
13875 * Makefile.in (config.status): Depend on development.sh.
13876 * acinclude.m4: Include libmcheck.m4.
13877 * configure: Regenerate.
13878
13879 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13880
13881 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13882 attribute inside the parentheses.
13883 (winapi_DebugSetProcessKillOnExit): Ditto.
13884 (winapi_DebugBreakProcess): Ditto.
13885 (winapi_GenerateConsoleCtrlEvent): Ditto.
13886
13887 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13888
13889 * notif.h (notif_event): Add a dummy member to avoid compiler
13890 errors.
13891
13892 2013-07-01 Pedro Alves <palves@redhat.com>
13893
13894 * hostio.c (HOSTIO_PATH_MAX): Define.
13895 (require_filename, handle_open, handle_unlink, handle_readlink):
13896 Use it.
13897
13898 2013-07-01 Pedro Alves <palves@redhat.com>
13899
13900 * server.h: Include "pathmax.h".
13901 * linux-low.c: Don't include sys/param.h.
13902 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13903 MAXPATHLEN.
13904 * win32-low.c: Don't include sys/param.h.
13905 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13906
13907 2013-07-01 Pedro Alves <palves@redhat.com>
13908
13909 * event-loop.c: Don't check HAVE_UNISTD_H before including
13910 <unistd.h>.
13911 * gdbreplay.c: Likewise.
13912 * remote-utils.c: Likewise.
13913 * server.c: Likewise.
13914 * configure.ac: Don't check for unistd.h.
13915 * configure: Regenerate.
13916
13917 2013-06-28 Tom Tromey <tromey@redhat.com>
13918
13919 * Makefile.in (version.c): Use version.in, not
13920 common/version.in.
13921
13922 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13923
13924 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13925 * configure: Rebuild.
13926 * Makefile.in (version_host, version_target): Get from configure.
13927 (version.c): Use $(version_host) and $(version_target).
13928
13929 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13930
13931 Fix trace-status to output user name without trailing colon.
13932 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13933
13934 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13935
13936 Fix trace-status to output proper start-time and stop-time.
13937 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13938 output start time and stop time in hex as gdb expects.
13939
13940 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13941
13942 * tracepoint.c (build_traceframe_info_xml): Output trace state
13943 variables present in the trace buffer.
13944
13945 2013-06-24 Tom Tromey <tromey@redhat.com>
13946
13947 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13948 create-version.sh.
13949 (version.o): Remove.
13950 * gdbreplay.c: Include version.h.
13951 (version, host_name): Don't declare.
13952 * server.h: Include version.h.
13953 (version, host_name): Don't declare.
13954
13955 2013-06-12 Pedro Alves <palves@redhat.com>
13956
13957 * linux-x86-low.c (linux_is_elf64): Delete global.
13958 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13959 with local linux_pid_exe_is_elf_64_file use.
13960
13961 2013-06-11 Pedro Alves <palves@redhat.com>
13962
13963 * linux-low.c (regset_disabled, disable_regset): New functions.
13964 (regsets_fetch_inferior_registers)
13965 (regsets_store_inferior_registers): Use them.
13966 (initialize_regsets_info); Don't allocate the disabled_regsets
13967 array here.
13968 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13969 comment.
13970
13971 2013-06-11 Pedro Alves <palves@redhat.com>
13972
13973 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13974 xmalloc.
13975
13976 2013-06-11 Pedro Alves <palves@redhat.com>
13977
13978 * linux-x86-low.c (initialize_low_arch): Call
13979 init_registers_x32_avx_linux.
13980
13981 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13982
13983 Fix compatibility with Android Bionic.
13984 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13985 it is not empty.
13986
13987 2013-06-07 Pedro Alves <palves@redhat.com>
13988
13989 PR server/14823
13990 * Makefile.in (OBS): Add tdesc.o.
13991 (IPA_OBJS): Add tdesc-ipa.o.
13992 (tdesc-ipa.o): New rule.
13993 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13994 interface.
13995 * linux-low.c (new_inferior): Delete.
13996 (disabled_regsets, num_regsets): Delete.
13997 (linux_add_process): Adjust to set the new per-process
13998 new_inferior flag.
13999 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14000 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14001 was a stop. When calling arch_setup, switch the current inferior
14002 to the thread that got an event.
14003 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14004 (regsets_fetch_inferior_registers)
14005 (regsets_store_inferior_registers): New regsets_info parameter.
14006 Adjust to use it.
14007 (linux_register_in_regsets): New regs_info parameter. Adjust to
14008 use it.
14009 (register_addr, fetch_register, store_register): New usrregs_info
14010 parameter. Adjust to use it.
14011 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14012 parameter regs_info. Adjust to use it.
14013 (linux_fetch_registers): Get the current inferior's regs_info, and
14014 adjust to use it.
14015 (linux_store_registers): Ditto.
14016 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14017 (initialize_low): Don't initialize the target_regsets here. Call
14018 initialize_low_arch.
14019 * linux-low.h (target_regsets): Delete declaration.
14020 (struct regsets_info): New.
14021 (struct usrregs_info): New.
14022 (struct regs_info): New.
14023 (struct process_info_private) <new_inferior>: New field.
14024 (struct linux_target_ops): Delete the num_regs, regmap, and
14025 regset_bitmap fields. New field regs_info.
14026 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14027 * i387-fp.c (num_xmm_registers): Delete.
14028 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14029 calls to new interface.
14030 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14031 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14032 Infer the number of xmm registers from the regcache's target
14033 description.
14034 * i387-fp.h (num_xmm_registers): Delete.
14035 * inferiors.c (add_thread): Don't install the thread's regcache
14036 here.
14037 * proc-service.c (gregset_info): Fetch the current inferior's
14038 regs_info. Adjust to use it.
14039 * regcache.c: Include tdesc.h.
14040 (register_bytes, reg_defs, num_registers)
14041 (gdbserver_expedite_regs): Delete.
14042 (get_thread_regcache): If the thread doesn't have a regcache yet,
14043 create one, instead of aborting gdbserver.
14044 (regcache_invalidate_one): Rename to ...
14045 (regcache_invalidate_thread): ... this.
14046 (regcache_invalidate_one): New.
14047 (regcache_invalidate): Only invalidate registers of the current
14048 process.
14049 (init_register_cache): Add target_desc parameter, and use it.
14050 (new_register_cache): Ditto. Assert the target description has a
14051 non zero registers_size.
14052 (regcache_cpy): Add assertions. Adjust.
14053 (realloc_register_cache, set_register_cache): Delete.
14054 (registers_to_string, registers_from_string): Adjust.
14055 (find_register_by_name, find_regno, find_register_by_number)
14056 (register_cache_size): Add target_desc parameter, and use it.
14057 (free_register_cache_thread, free_register_cache_thread_one)
14058 (regcache_release, register_cache_size): New.
14059 (register_size): Add target_desc parameter, and use it.
14060 (register_data, supply_register, supply_register_zeroed)
14061 (supply_regblock, supply_register_by_name, collect_register)
14062 (collect_register_as_string, collect_register_by_name): Adjust.
14063 * regcache.h (struct target_desc): Forward declare.
14064 (struct regcache) <tdesc>: New field.
14065 (init_register_cache, new_register_cache): Add target_desc
14066 parameter.
14067 (regcache_invalidate_thread): Declare.
14068 (regcache_invalidate_one): Delete declaration.
14069 (regcache_release): Declare.
14070 (find_register_by_number, register_cache_size, register_size)
14071 (find_regno): Add target_desc parameter.
14072 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14073 declarations.
14074 * remote-utils.c: Include tdesc.h.
14075 (outreg, prepare_resume_reply): Adjust.
14076 * server.c: Include tdesc.h.
14077 (gdbserver_xmltarget): Delete declaration.
14078 (get_features_xml, process_serial_event): Adjust.
14079 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14080 declare.
14081 (struct process_info) <tdesc>: New field.
14082 (ipa_tdesc): Declare.
14083 * tdesc.c: New file.
14084 * tdesc.h: New file.
14085 * tracepoint.c: Include tdesc.h.
14086 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14087 (get_context_regcache): Adjust to pass ipa_tdesc down.
14088 (do_action_at_tracepoint): Adjust to get the register cache size
14089 from the context regcache's description.
14090 (traceframe_walk_blocks): Adjust to get the register cache size
14091 from the current trace frame's description.
14092 (traceframe_get_pc): Adjust to get current trace frame's
14093 description and pass it down.
14094 (gdb_collect): Adjust to get the register cache size from the
14095 IPA's description.
14096 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14097 (gdbserver_xmltarget): Delete.
14098 (initialize_low_tracepoint): Set the ipa's target description.
14099 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14100 (initialize_low_tracepoint): Set the ipa's target description.
14101 * linux-x86-low.c: Include tdesc.h.
14102 [__x86_64__] (is_64bit_tdesc): New.
14103 (ps_get_thread_area, x86_get_thread_area): Use it.
14104 (i386_cannot_store_register): Rename to ...
14105 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14106 (i386_cannot_fetch_register): Rename to ...
14107 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14108 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14109 to new interface.
14110 (target_regsets): Rename to ...
14111 (x86_regsets): ... this.
14112 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14113 interface.
14114 (x86_siginfo_fixup): Use is_64bit_tdesc.
14115 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14116 (tdesc_x32_avx_linux, tdesc_x32_linux)
14117 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14118 Declare.
14119 (x86_linux_update_xmltarget): Delete.
14120 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14121 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14122 (AMD64_LINUX_USER64_CS): New.
14123 (x86_linux_read_description): New, based on
14124 x86_linux_update_xmltarget.
14125 (same_process_callback): New.
14126 (x86_arch_setup_process_callback): New.
14127 (x86_linux_update_xmltarget): New.
14128 (x86_regsets_info): New.
14129 (amd64_linux_regs_info): New.
14130 (i386_linux_usrregs_info): New.
14131 (i386_linux_regs_info): New.
14132 (x86_linux_regs_info): New.
14133 (x86_arch_setup): Reimplement.
14134 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14135 (x86_emit_ops): Ditto.
14136 (the_low_target): Adjust. Install x86_linux_regs_info,
14137 x86_cannot_fetch_register, and x86_cannot_store_register.
14138 (initialize_low_arch): New.
14139 * linux-ia64-low.c (tdesc_ia64): Declare.
14140 (ia64_fetch_register): Adjust.
14141 (ia64_usrregs_info, regs_info): New globals.
14142 (ia64_regs_info): New function.
14143 (the_low_target): Adjust.
14144 (initialize_low_arch): New function.
14145 * linux-sparc-low.c (tdesc_sparc64): Declare.
14146 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14147 Adjust.
14148 (sparc_arch_setup): New function.
14149 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14150 (the_low_target): Adjust.
14151 (initialize_low_arch): New function.
14152 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14153 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14154 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14155 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14156 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14157 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14158 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14159 (tdesc_powerpc_isa205_vsx64l): Declare.
14160 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14161 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14162 (ppc_set_pc, ppc_get_hwcap): Adjust.
14163 (ppc_usrregs_info): Forward declare.
14164 (!__powerpc64__) ppc_regmap_adjusted: New global.
14165 (ppc_arch_setup): Adjust to the current process'es target
14166 description.
14167 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14168 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14169 (ppc_store_evrregset): Adjust.
14170 (target_regsets): Rename to ...
14171 (ppc_regsets): ... this, and make static.
14172 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14173 (ppc_regs_info): New function.
14174 (the_low_target): Adjust.
14175 (initialize_low_arch): New function.
14176 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14177 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14178 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14179 (tdesc_s390x_linux64v2): Declare.
14180 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14181 (s390_fill_gregset, s390_store_last_break): Adjust.
14182 (target_regsets): Rename to ...
14183 (s390_regsets): ... this, and make static.
14184 (s390_get_pc, s390_set_pc): Adjust.
14185 (s390_get_hwcap): New target_desc parameter, and use it.
14186 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14187 (s390_arch_setup): Adjust to set the current process'es target
14188 description. Don't adjust the regmap.
14189 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14190 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14191 (regs_info_3264): New globals.
14192 (s390_regs_info): New function.
14193 (the_low_target): Adjust.
14194 (initialize_low_arch): New function.
14195 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14196 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14197 [__mips64] (init_registers_mips_linux)
14198 (init_registers_mips_dsp_linux): Delete defines.
14199 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14200 (have_dsp): New global.
14201 (mips_read_description): New, based on mips_arch_setup.
14202 (mips_arch_setup): Reimplement.
14203 (get_usrregs_info): New function.
14204 (mips_cannot_fetch_register, mips_cannot_store_register)
14205 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14206 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14207 (target_regsets): Rename to ...
14208 (mips_regsets): ... this, and make static.
14209 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14210 (dsp_regs_info, regs_info): New globals.
14211 (mips_regs_info): New function.
14212 (the_low_target): Adjust.
14213 (initialize_low_arch): New function.
14214 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14215 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14216 Declare.
14217 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14218 (arm_read_description): New, with bits factored from
14219 arm_arch_setup.
14220 (arm_arch_setup): Reimplement.
14221 (target_regsets): Rename to ...
14222 (arm_regsets): ... this, and make static.
14223 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14224 (arm_regs_info): New function.
14225 (the_low_target): Adjust.
14226 (initialize_low_arch): New function.
14227 * linux-m68k-low.c (tdesc_m68k): Declare.
14228 (target_regsets): Rename to ...
14229 (m68k_regsets): ... this, and make static.
14230 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14231 (m68k_regs_info): New function.
14232 (m68k_arch_setup): New function.
14233 (the_low_target): Adjust.
14234 (initialize_low_arch): New function.
14235 * linux-sh-low.c (tdesc_sharch): Declare.
14236 (target_regsets): Rename to ...
14237 (sh_regsets): ... this, and make static.
14238 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14239 (sh_regs_info, sh_arch_setup): New functions.
14240 (the_low_target): Adjust.
14241 (initialize_low_arch): New function.
14242 * linux-bfin-low.c (tdesc_bfin): Declare.
14243 (bfin_arch_setup): New function.
14244 (bfin_usrregs_info, regs_info): New globals.
14245 (bfin_regs_info): New function.
14246 (the_low_target): Adjust.
14247 (initialize_low_arch): New function.
14248 * linux-cris-low.c (tdesc_cris): Declare.
14249 (cris_arch_setup): New function.
14250 (cris_usrregs_info, regs_info): New globals.
14251 (cris_regs_info): New function.
14252 (the_low_target): Adjust.
14253 (initialize_low_arch): New function.
14254 * linux-cris-low.c (tdesc_crisv32): Declare.
14255 (cris_arch_setup): New function.
14256 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14257 (cris_regs_info): New function.
14258 (the_low_target): Adjust.
14259 (initialize_low_arch): New function.
14260 * linux-m32r-low.c (tdesc_m32r): Declare.
14261 (m32r_arch_setup): New function.
14262 (m32r_usrregs_info, regs_info): New globals.
14263 (m32r_regs_info): Adjust.
14264 (initialize_low_arch): New function.
14265 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14266 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14267 (tic6x_usrregs_info): Forward declare.
14268 (tic6x_read_description): New function, based on ...
14269 (tic6x_arch_setup): ... this. Reimplement.
14270 (target_regsets): Rename to ...
14271 (tic6x_regsets): ... this, and make static.
14272 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14273 (tic6x_regs_info): New function.
14274 (the_low_target): Adjust.
14275 (initialize_low_arch): New function.
14276 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14277 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14278 (target_regsets): Rename to ...
14279 (xtensa_regsets): ... this, and make static.
14280 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14281 globals.
14282 (xtensa_arch_setup, xtensa_regs_info): New functions.
14283 (the_low_target): Adjust.
14284 (initialize_low_arch): New function.
14285 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14286 (nios2_arch_setup): Set the current process'es tdesc.
14287 (target_regsets): Rename to ...
14288 (nios2_regsets): ... this.
14289 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14290 (nios2_regs_info): New function.
14291 (the_low_target): Adjust.
14292 (initialize_low_arch): New function.
14293 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14294 (aarch64_arch_setup): Set the current process'es tdesc.
14295 (target_regsets): Rename to ...
14296 (aarch64_regsets): ... this.
14297 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14298 (aarch64_regs_info): New function.
14299 (the_low_target): Adjust.
14300 (initialize_low_arch): New function.
14301 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14302 globals.
14303 (target_regsets): Rename to ...
14304 (tile_regsets): ... this.
14305 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14306 (tile_regs_info): New function.
14307 (tile_arch_setup): Set the current process'es tdesc.
14308 (the_low_target): Adjust.
14309 (initialize_low_arch): New function.
14310 * spu-low.c (tdesc_spu): Declare.
14311 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14312 * win32-arm-low.c (tdesc_arm): Declare.
14313 (arm_arch_setup): New function.
14314 (the_low_target): Install arm_arch_setup instead of
14315 init_registers_arm.
14316 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14317 (init_windows_x86): Rename to ...
14318 (i386_arch_setup): ... this. Set `win32_tdesc'.
14319 (the_low_target): Adjust.
14320 * win32-low.c (win32_tdesc): New global.
14321 (child_add_thread): Don't create the thread cache here.
14322 (do_initial_child_stuff): Set the new process'es tdesc.
14323 * win32-low.h (struct target_desc): Forward declare.
14324 (win32_tdesc): Declare.
14325 * lynx-i386-low.c (tdesc_i386): Declare global.
14326 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14327 * lynx-low.c (lynx_tdesc): New global.
14328 (lynx_add_process): Set the new process'es tdesc.
14329 * lynx-low.h (struct target_desc): Forward declare.
14330 (lynx_tdesc): Declare global.
14331 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14332 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14333 * nto-low.c (nto_tdesc): New global.
14334 (do_attach): Set the new process'es tdesc.
14335 * nto-low.h (struct target_desc): Forward declare.
14336 (nto_tdesc): Declare.
14337 * nto-x86-low.c (tdesc_i386): Declare.
14338 (nto_x86_arch_setup): Set `nto_tdesc'.
14339
14340 2013-06-04 Gary Benson <gbenson@redhat.com>
14341
14342 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14343 to qSupported response when appropriate.
14344 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14345 with nonzero-length annex.
14346 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14347 arguments supplied in annex.
14348
14349 2013-05-31 Doug Evans <dje@google.com>
14350
14351 PR server/15594
14352 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14353 64 bits in 64-cross-32 environment.
14354
14355 2013-05-28 Pedro Alves <palves@redhat.com>
14356
14357 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14358 (aarch64-without-fpu.c): Delete rule.
14359 * configure.srv (aarch64*-*-linux*): Remove references to
14360 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14361 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14362 declaration.
14363
14364 2013-05-24 Pedro Alves <palves@redhat.com>
14365
14366 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14367 instead of strchr/decode_address. Error if the range isn't split
14368 with a ','. Don't assume there's be a ':' in the action.
14369
14370 2013-05-23 Yao Qi <yao@codesourcery.com>
14371 Pedro Alves <palves@redhat.com>
14372
14373 * linux-low.c (lwp_in_step_range): New function.
14374 (linux_wait_1): If the thread was range stepping and stopped
14375 outside the stepping range, report the stop to GDB. Otherwise,
14376 continue stepping. Add range stepping debug output.
14377 (linux_set_resume_request): Copy the step range from the resume
14378 request to the lwp.
14379 (linux_supports_range_stepping): New.
14380 (linux_target_ops) <supports_range_stepping>: Set to
14381 linux_supports_range_stepping.
14382 * linux-low.h (struct linux_target_ops)
14383 <supports_range_stepping>: New field.
14384 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14385 * linux-x86-low.c (x86_supports_range_stepping): New.
14386 (the_low_target) <supports_range_stepping>: Set to
14387 x86_supports_range_stepping.
14388 * server.c (handle_v_cont): Handle 'r' action.
14389 (handle_v_requests): Append ";r" if the target supports range
14390 stepping.
14391 * target.h (struct thread_resume) <step_range_start,
14392 step_range_end>: New fields.
14393 (struct target_ops) <supports_range_stepping>:
14394 New field.
14395 (target_supports_range_stepping): New macro.
14396
14397 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14398
14399 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14400 confusion in comment.
14401
14402 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14403
14404 * lynx-low.c (struct process_info_private): New type.
14405 (lynx_add_process): New function.
14406 (lynx_create_inferior, lynx_attach): Replace calls to
14407 add_process by calls to lynx_add_process.
14408 (lynx_resume): If PTID is null, then try using
14409 current_process()->private->last_wait_event_ptid.
14410 Add comments.
14411 (lynx_clear_inferiors): Delete. The contents of that function
14412 has been inlined in lynx_mourn;
14413 (lynx_wait_1): Save the ptid in the process's private data.
14414 (lynx_mourn): Free the process' private data. Replace call
14415 to lynx_clear_inferiors by call to clear_inferiors.
14416
14417 2013-05-17 Yao Qi <yao@codesourcery.com>
14418
14419 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14420 the right place.
14421
14422 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14423
14424 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14425 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14426 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14427 PT_TEXT_END_ADDR guards. Update comments.
14428 (linux_target_op) <read_offsets>: Conditionally define to
14429 linux_read_offsets if the target is UCLIBC and if it defines
14430 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14431
14432 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14433 Andrew Jenner <andrew@codesourcery.com>
14434
14435 * Makefile.in (SFILES): Add linux-nios2-low.c.
14436 (clean): Add action to delete nios2-linux.c.
14437 (nios2-linux.c): New rule.
14438 * configure.srv: Add nios2*-*-linux*.
14439 * linux-nios2-low.c: New.
14440
14441 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14442
14443 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14444
14445 2013-04-25 Hui Zhu <hui@codesourcery.com>
14446
14447 PR gdb/15186
14448 * ax.c (ax_printf): Add fflush.
14449
14450 2013-04-22 Tom Tromey <tromey@redhat.com>
14451
14452 * Makefile.in (SFILES): Add filestuff.c.
14453 (OBS): Add filestuff.o.
14454 (filestuff.o): New target.
14455 * config.in, configure: Rebuild.
14456 * configure.ac: Check for fdwalk, pipe2.
14457
14458 2013-04-17 Pedro Alves <palves@redhat.com>
14459
14460 * configure.ac (USE_THREAD_DB): Delete variable.
14461 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14462 Don't AC_SUBST USE_THREAD_DB.
14463 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14464 * config.in, configure: Regenerate.
14465
14466 2013-04-16 Pedro Alves <palves@redhat.com>
14467
14468 * linux-low.h (struct lwp_info) <thread_known>: Move under
14469 the USE_THREAD_DB #ifdef.
14470
14471 2013-04-16 Pedro Alves <palves@redhat.com>
14472
14473 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14474 (linux-low.o): Delete rule.
14475 * linux-low.h: Always include "gdb_thread_db.h" instead of
14476 conditionally including thread_db.h.
14477 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14478 HAVE_THREAD_DB_H.
14479
14480 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14481
14482 * Makefile.in (install-only): Fix make install regression.
14483
14484 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14485
14486 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14487 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14488 installation.
14489 * gdbserver.1: Remove.
14490
14491 2013-03-22 Pedro Alves <palves@redhat.com>
14492
14493 * linux-low.c (handle_extended_wait): Don't call
14494 linux_enable_event_reporting.
14495
14496 2013-03-15 Tony Theodore <tonyt@logyst.com>
14497
14498 PR build/9098:
14499 * Makefile.in (SHELL): Use @SHELL@.
14500
14501 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14502
14503 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14504 compiler warning.
14505
14506 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14507
14508 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14509 Remove extraneous NULL element.
14510
14511 2013-03-13 Yao Qi <yao@codesourcery.com>
14512
14513 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14514 'V' block in trace frame.
14515
14516 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14517
14518 * target.h (struct target_ops): Add btrace ops.
14519 (target_supports_btrace): New macro.
14520 (target_enable_btrace): New macro.
14521 (target_disable_btrace): New macro.
14522 (target_read_btrace): New macro.
14523 * gdbthread.h (struct thread_info): Add btrace field.
14524 * server.c: Include btrace-common.h.
14525 (handle_btrace_general_set): New function.
14526 (handle_btrace_enable): New function.
14527 (handle_btrace_disable): New function.
14528 (handle_general_set): Call handle_btrace_general_set.
14529 (handle_qxfer_btrace): New function.
14530 (struct qxfer qxfer_packets[]): Add btrace entry.
14531 * inferiors.c (remove_thread): Disable btrace.
14532 * linux-low: Include linux-btrace.h.
14533 (linux_low_enable_btrace): New function.
14534 (linux_low_read_btrace): New function.
14535 (linux_target_ops): Add btrace ops.
14536 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14537 Add srv_linux_btrace=yes.
14538 (x86_64-*-linux*): Add linux-btrace.o.
14539 Add srv_linux_btrace=yes.
14540 * configure.ac: Define HAVE_LINUX_BTRACE.
14541 * config.in: Regenerated.
14542 * configure: Regenerated.
14543
14544 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14545
14546 * server.c (handle_qxfer): Preserve error message if -3 is
14547 returned.
14548 (qxfer): Document the -3 return value.
14549
14550 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14551
14552 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14553 (linux_btrace_h): New variable.
14554 (linux-btrace.o): New rule.
14555
14556 2013-03-08 Stan Shebs <stan@codesourcery.com>
14557 Hafiz Abid Qadeer <abidh@codesourcery.com>
14558
14559 * tracepoint.c (trace_buffer_size): New global.
14560 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14561 (init_trace_buffer): Change to one-argument function. Allocate
14562 trace buffer memory.
14563 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14564 handle QTBuffer:size packet.
14565 (cmd_bigqtbuffer_size): New function.
14566 (initialize_tracepoint): Call init_trace_buffer with
14567 DEFAULT_TRACE_BUFFER_SIZE.
14568 * server.c (handle_query): Add QTBuffer:size in the
14569 supported packets.
14570
14571 2013-03-07 Yao Qi <yao@codesourcery.com>
14572
14573 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14574 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14575 of -1.
14576 (cmd_qtsp): Adjust condition. Do post increment.
14577 Set cur_action and cur_step_action back to 0.
14578
14579 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14580
14581 PR server/15236
14582 * linux-low.c (linux_write_memory): Return early success if LEN is
14583 zero.
14584
14585 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14586
14587 * configure.srv: Add x86_64-*-cygwin* as target.
14588
14589 2013-02-28 Tom Tromey <tromey@redhat.com>
14590
14591 * configure.ac: Invoke AC_SYS_LARGEFILE.
14592 * configure, config.in: Rebuild.
14593
14594 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14595
14596 * win32-low.c: Throughout, fix format strings and casts of
14597 printf-like functions to avoid type related warnings on all
14598 platforms.
14599 (get_child_debug_event): Print dwDebugEventCode as hex since
14600 that's how it's usually documented.
14601
14602 2013-02-28 Yao Qi <yao@codesourcery.com>
14603
14604 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14605 pulongest.
14606
14607 2013-02-27 Jiong Wang <jiwang@tilera.com>
14608
14609 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14610 (reg-tilegx32.c): New rule.
14611 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14612 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14613 different register info initializer according to elf class.
14614 (init_registers_tilgx32): New function. The tilegx32 register info
14615 initializer.
14616 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14617 (tile_store_gregset): Likewise.
14618
14619 2013-02-27 Yao Qi <yao@codesourcery.com>
14620
14621 * server.c (process_point_options): Print debug message when
14622 debug_threads is true.
14623
14624 2013-02-26 Yao Qi <yao@codesourcery.com>
14625
14626 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14627
14628 2013-02-19 Pedro Alves <palves@redhat.com>
14629 Kai Tietz <ktietz@redhat.com>
14630
14631 PR gdb/15161
14632
14633 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14634 instead of strtoul to extract address from packet.
14635 (process_serial_event) <'z'>: Likewise.
14636
14637 2013-02-18 Yao Qi <yao@codesourcery.com>
14638
14639 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14640
14641 2013-02-14 Pedro Alves <palves@redhat.com>
14642
14643 Plug memory leak.
14644
14645 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14646 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14647
14648 2013-02-14 Pedro Alves <palves@redhat.com>
14649
14650 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14651
14652 2013-02-14 Pedro Alves <palves@redhat.com>
14653
14654 * tracepoint.c (save_string): Delete.
14655 (add_tracepoint_action): Use savestring instead of save_string.
14656
14657 2013-02-12 Pedro Alves <palves@redhat.com>
14658
14659 * linux-xtensa-low.c: Ditto.
14660 * xtensa-xtregs.c: Ditto.
14661
14662 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14663
14664 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14665 thread_db.
14666
14667 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14668
14669 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14670 aarch64_num_wp_regs and aarch64_num_bp_regs to
14671 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14672
14673 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14674
14675 * linux-aarch64-low.c (ps_get_thread_area): Replace
14676 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14677
14678 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14679 Marcus Shawcroft <marcus.shawcroft@arm.com>
14680 Nigel Stephens <nigel.stephens@arm.com>
14681 Yufeng Zhang <yufeng.zhang@arm.com>
14682
14683 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14684 (aarch64.c, aarch64-without-fpu.c): New targets.
14685 * configure.srv (aarch64*-*-linux*): New.
14686 * linux-aarch64-low.c: New file.
14687
14688 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14689
14690 * linux-low.c (handle_extended_wait, linux_create_inferior)
14691 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14692 (dequeue_one_deferred_signal, linux_resume_one_thread)
14693 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14694 (linux_tracefork_grandchild, linux_test_for_tracefork)
14695 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14696 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14697 where the argument is 0.
14698
14699 2013-01-25 Yao Qi <yao@codesourcery.com>
14700
14701 * event-loop.c: Include "queue.h".
14702 (gdb_event_p): New typedef.
14703 (struct gdb_event) <next_event>: Remove.
14704 (event_queue): Change to QUEUE(gdb_event_p).
14705 (async_queue_event): Remove.
14706 (gdb_event_xfree): New.
14707 (initialize_event_loop): New.
14708 (process_event): Use API from QUEUE.
14709 (wait_for_event): Likewise.
14710 * server.c (main): Call initialize_event_loop.
14711 * server.h (initialize_event_loop): Declare.
14712
14713 2013-01-18 Yao Qi <yao@codesourcery.com>
14714
14715 * ax.h (struct eval_agent_expr_context): New.
14716 (gdb_eval_agent_expr): Update declaration.
14717 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14718 TFRAME. Add new argument CTX.
14719 * server.h (struct eval_agent_expr_context): Declare.
14720 (agent_mem_read, agent_tsv_read): Update declaration.
14721 (agent_mem_read_string): Likewise.
14722 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14723 (add_traceframe_block): Add new argument TPOINT.
14724 Increase TPOINT->traceframe_usage.
14725 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14726 eval_tracepoint_agent_expr.
14727 (condition_true_at_tracepoint): Likewise.
14728 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14729 (agent_mem_read_string, agent_tsv_read): Likewise.
14730
14731 2013-01-16 Yao Qi <yao@codesourcery.com>
14732
14733 * linux-low.c (linux_resume_one_lwp): Don't check
14734 'lwp->bp_reinsert != 0'.
14735
14736 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14737 Pedro Alves <palves@redhat.com>
14738
14739 * lynx-low.c (ptrace_request_to_str): Define a temporary
14740 macro and use it to simplify this function's implementation.
14741
14742 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14743
14744 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14745 sets errno.
14746
14747 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14748
14749 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14750
14751 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14752
14753 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14754
14755 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14756
14757 * lynx-low.c (lynx_resume): Use the resume_info parameter
14758 to determine the ptid for the lynx_ptrace call, unless
14759 it is equal to minus_one_ptid, in which case we use the
14760 ptid of the current_inferior.
14761 (lynx_wait_1): After having received a thread create/exit
14762 event, resume the inferior's execution using the signaling
14763 thread's ptid, rather than the old ptid.
14764
14765 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14766
14767 * lynx-low.c (lynx_resume): Delete variable ret.
14768
14769 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14770
14771 * gdbreplay.c (gdbreplay_version): Update copyright year.
14772 * server.c (gdbserver_version): Likewise.
14773
14774 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14775
14776 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14777 new thread.
14778
14779 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14780
14781 * lynx-low.c (ptrace_request_to_str): Add handling for
14782 PTRACE_GETTRACESIG.
14783
14784 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14785
14786 * lynx-low.c (lynx_attach): Delete variable new_process.
14787
14788 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14789
14790 * lynx-low.c (lynx_create_inferior): Delete variable
14791 new_process.
14792
14793 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14794
14795 * lynx-low.c (ptrace_request_to_str): Do not handle
14796 PTRACE_GETTHREADLIST if this macro does not exist.
14797
14798 2012-12-15 Yao Qi <yao@codesourcery.com>
14799
14800 * Makefile.in (OBS): Add notif.o.
14801 * notif.c, notif.h: New.
14802 * server.c: Include "notif.h".
14803 (struct vstop_notif) <next>: Remove.
14804 <base>: New field.
14805 (queue_stop_reply): Update.
14806 (push_event, send_next_stop_reply): Remove.
14807 (discard_queued_stop_replies): Update.
14808 (notif_stop): New variable.
14809 (handle_v_stopped): Remove.
14810 (handle_v_requests): Don't call handle_v_stopped. Call
14811 handle_ack_notif instead.
14812 (queue_stop_reply_callback): Call notif_event_enque instead
14813 of queue_stop_reply.
14814 (handle_status): Don't call send_next_stop_reply, call
14815 notif_write_event instead.
14816 (kill_inferior_callback): Likewise.
14817 (detach_or_kill_inferior_callback): Likewise.
14818 (main): Call initialize_notif.
14819 (process_serial_event): Call QUEUE_is_empty.
14820 (handle_target_event): Call notif_push instead of push event.
14821 * server.h (push_event): Remove declaration.
14822
14823 2012-12-10 Tom Tromey <tromey@redhat.com>
14824
14825 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14826 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14827 macros.
14828 (.c.o): Rewrite.
14829 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14830 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14831 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14832 (amd64-linux-ipa.o, ax.o): Rewrite.
14833 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14834 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14835 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14836 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14837 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14838 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14839 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14840 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14841 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14842 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14843 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14844 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14845 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14846 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14847 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14848 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14849 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14850 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14851 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14852 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14853 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14854 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14855 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14856 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14857 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14858 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14859 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14860 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14861 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14862 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14863 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14864 (reg-tilegx.o): Remove.
14865 (all_object_files): New macro.
14866 Include .deps files.
14867 * aclocal.m4, configure: Rebuild.
14868 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14869 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14870 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14871
14872 2012-12-05 Tom Tromey <tromey@redhat.com>
14873
14874 PR gdb/14917:
14875 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14876
14877 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14878
14879 * configure.ac: Check for linux/perf_event.h.
14880 * config.in: Regenerated.
14881 * configure: Regenerated.
14882
14883 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14884
14885 * hostio.c (handle_readlink): Decrease buffer size
14886 parameter passed to readlink by one byte.
14887
14888 2012-11-26 Yao Qi <yao@codesourcery.com>
14889
14890 * configure.ac (build_warnings): Append '-Wempty-body'.
14891 * configure: Regenerated.
14892 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14893 body.
14894
14895 2012-11-15 Pierre Muller <muller@sourceware.org>
14896
14897 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14898 * config.in: Regenerate.
14899 * configure: Regenerate.
14900 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14901 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14902 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14903 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14904 header.
14905 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14906 instead of <sys/wait.h> header.
14907 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14908
14909 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14910
14911 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14912 (various make rules): Remove -DGDBSERVER
14913
14914 2012-11-09 Yao Qi <yao@codesourcery.com>
14915
14916 * spu-low.c (current_ptid): Move it to ..
14917 * gdbthread.h: ... here. New.
14918 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14919 * server.c (myresume, process_serial_event): Likewise.
14920 * thread-db.c (thread_db_find_new_threads): Likewise.
14921 * tracepoint.c (run_inferior_command): Likewise.
14922
14923 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14924
14925 * server.c (handle_search_memory_1): Include access length in
14926 warning message.
14927
14928 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14929
14930 * linux-crisv32-low.c: Fix compile errors.
14931
14932 2012-09-04 Yao Qi <yao@codesourcery.com>
14933
14934 * tracepoint.c (cmd_qtsv): Adjust debug message.
14935 Don't check CUR_TPOINT.
14936
14937 2012-08-28 Yao Qi <yao@codesourcery.com>
14938
14939 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14940 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14941 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14942 Remove declarations of xmalloc, xreallloc, xstrdup and
14943 freeargv.
14944 * Makefile.in (libiberty_h): New.
14945 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14946 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14947
14948 2012-08-23 Yao Qi <yao@codesourcery.com>
14949
14950 * server.h: Remove declaration of 'xsnprintf'.
14951
14952 2012-08-22 Keith Seitz <keiths@redhat.com>
14953
14954 * server.h: Include build-gnulib-gbserver/config.h.
14955 * gdbreplay.c: Likewise.
14956
14957 2012-08-08 Doug Evans <dje@google.com>
14958
14959 * Makefile.in (SFILES): Add gdb_vecs.c.
14960 (OBS): Add gdb_vecs.o.
14961 (gdb_vecs_h, host_defs_h): New variables.
14962 (thread-db.o): Add $(gdb_vecs_h) dependency.
14963 (gdb_vecs.o): New rule.
14964 * thread-db.c: #include "gdb_vecs.h".
14965 (thread_db_load_search): Use a vector to iterate over path elements.
14966 Handle text appearing after "$pdir".
14967
14968 * configure.ac: Add check for strstr.
14969 * config.in: Regenerate.
14970 * configure: Regenerate.
14971
14972 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14973
14974 * hostio.c (handle_pread): If pread fails, fall back to attempting
14975 lseek/read.
14976 (handle_pwrite): Likewise for pwrite.
14977
14978 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14979
14980 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14981 between unsupported TYPE and unimplementable ADDR/LEN combination.
14982 (arm_insert_point): Act on new return value.
14983
14984 2012-07-31 Pedro Alves <palves@redhat.com>
14985
14986 * server.c (process_point_options): Only skip tokens if we find
14987 one that is unrecognized. Don't treat 'X' specially while
14988 skipping unrecognized tokens.
14989
14990 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14991
14992 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14993 to 4-byte-align HW breakpoint addresses for Thumb.
14994
14995 2012-07-27 Yao Qi <yao@codesourcery.com>
14996
14997 PR remote/14161.
14998
14999 * server.h: Declare gdb_agent_about_to_close.
15000 * target.c (kill_inferior): Include "agent.h".
15001 New. Send command 'kill'.
15002 * target.h (kill_inferior): Removed macro.
15003 * tracepoint.c (gdb_agent_about_to_close): New.
15004 (gdb_agent_helper_thread): Handle command 'close'.
15005 Wait endlessly until the inferior stops.
15006 Install gdb_agent_remove_socket to atexit hook.
15007 (agent_socket_name): New static variable.
15008 (gdb_agent_socket_init): Replace local variable 'name' with
15009 'agent_socket_name'.
15010 (gdb_agent_remove_socket): New.
15011
15012 2012-07-27 Yao Qi <yao@codesourcery.com>
15013
15014 * server.c (process_point_options): Stop at 'X' when parsing.
15015
15016 2012-07-19 Michael Eager <eager@eagercon.com>
15017
15018 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15019 to hw_execute.
15020 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15021 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15022 hardware breakpoint.
15023
15024 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15025
15026 * gdbserver/linux-low.c (initialize_low): Call
15027 linux_ptrace_init_warnings.
15028
15029 2012-07-02 Doug Evans <dje@google.com>
15030
15031 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15032 pointer to int.
15033
15034 2012-07-02 Stan Shebs <stan@codesourcery.com>
15035
15036 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15037 (ax.o): Add it to build rule.
15038 (ax-ipa.o): Ditto.
15039 (OBS): Add format.o.
15040 (IPA_OBS): Add format.o.
15041 * server.c (handle_query): Claim support for breakpoint commands.
15042 (process_point_options): Add command case.
15043 (process_serial_event): Leave running if there are printfs in
15044 effect.
15045 * mem-break.h (any_persistent_commands): Declare.
15046 (add_breakpoint_commands): Declare.
15047 (gdb_no_commands_at_breakpoint): Declare.
15048 (run_breakpoint_commands): Declare.
15049 * mem-break.c (struct point_command_list): New struct.
15050 (struct breakpoint): New field command_list.
15051 (any_persistent_commands): New function.
15052 (add_commands_to_breakpoint): New function.
15053 (add_breakpoint_commands): New function.
15054 (gdb_no_commands_at_breakpoint): New function.
15055 (run_breakpoint_commands): New function.
15056 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15057 locally.
15058 * ax.c: Include format.h.
15059 (ax_printf): New function.
15060 (gdb_eval_agent_expr): Add printf opcode.
15061
15062 2012-06-13 Yao Qi <yao@codesourcery.com>
15063
15064 * server.c (start_inferior): Remove duplicated writes to fields
15065 'last_resume_kind' and 'last_status' of 'current_inferior'.
15066
15067 2012-06-12 Yao Qi <yao@codesourcery.com>
15068 Pedro Alves <palves@redhat.com>
15069
15070 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15071 comment.
15072 * server.c (handle_v_cont): Extend comment.
15073
15074 2012-06-11 Yao Qi <yao@codesourcery.com>
15075
15076 * linux-low.c (linux_attach): Add 'static'.
15077
15078 2012-06-06 Yao Qi <yao@codesourcery.com>
15079
15080 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15081
15082 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15083
15084 Fix gcc -flto compilation warning.
15085 * server.c (main): Make variable multi_mode and attach volatile.
15086
15087 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15088
15089 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15090 if the platform doesn't know about it.
15091
15092 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15093
15094 * Makefile.in (SFILES): Add linux-tile-low.c.
15095 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15096 * configure.srv: Handle tilegx-*-linux*.
15097 * linux-tile-low.c: New file.
15098
15099 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15100
15101 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15102
15103 2012-05-24 Pedro Alves <palves@redhat.com>
15104
15105 PR gdb/7205
15106
15107 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15108
15109 2012-05-24 Pedro Alves <palves@redhat.com>
15110
15111 PR gdb/7205
15112
15113 Replace target_signal with gdb_signal throughout.
15114
15115 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15116
15117 * linux-low.c (linux_store_registers): Avoid the copying sequence
15118 when no data has been retrieved by ptrace.
15119
15120 2012-05-22 Will Deacon <will.deacon@arm.com>
15121
15122 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15123 Include asm/ptrace.h.
15124 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15125 already defined.
15126
15127 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15128
15129 * linux-low.c (linux_store_registers): Don't re-retrieve data
15130 with ptrace that has already been obtained from /proc. Always
15131 copy any data retrieved with ptrace to the buffer supplied.
15132
15133 2012-05-11 Yao Qi <yao@codesourcery.com>
15134 Pedro Alves <palves@redhat.com>
15135
15136 * linux-low.c (enum stopping_threads_kind): New.
15137 (stopping_threads): Change type to `enum stopping_threads_kind'.
15138 (handle_extended_wait): If stopping and suspending threads, leave
15139 the new_lwp suspended too.
15140 (linux_wait_for_event): Adjust.
15141 (stop_all_lwps): Set `stopping_threads' to
15142 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15143 whether we're suspending threads or just stopping them. Assert no
15144 recursion happens.
15145
15146 2012-04-29 Yao Qi <yao@codesourcery.com>
15147
15148 * server.h: Move some code to ...
15149 * gdbthread.h: ... here. New.
15150 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15151 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15152 (nto-low.o, win32-low.o): Likewise.
15153 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15154 * regcache.c, remote-utils.c, server.c: Likewise.
15155 * target.c, tracepoint.c, win32-low.c: Likewise.
15156
15157 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15158
15159 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15160 (PTRACE_ARG4_TYPE): Likewise.
15161 (PTRACE_XFER_TYPE): Likewise.
15162 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15163 ptrace to PTRACE_ARG3_TYPE.
15164 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15165 (PTRACE_ARG4_TYPE): Likewise.
15166 (PTRACE_XFER_TYPE): Likewise.
15167 (linux_detach_one_lwp): Cast fourth argument of
15168 ptrace to long then PTRACE_ARG4_TYPE.
15169 (regsets_fetch_inferior_registers): Cast third argument of
15170 ptrace to long then PTRACE_ARG3_TYPE.
15171 (regsets_store_inferior_registers): Likewise.
15172
15173 2012-04-20 Pedro Alves <palves@redhat.com>
15174
15175 * configure: Regenerate.
15176
15177 2012-04-19 Pedro Alves <palves@redhat.com>
15178
15179 * Makefile.in (GNULIB_BUILDDIR): New.
15180 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15181 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15182 (all, install-only, uninstall, clean-info, all-lib, clean): No
15183 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15184 (maintainer-clean realclean distclean): Use subdir_do.
15185 (subdir_do): New.
15186 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15187 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15188 * acinclude.m4: Include acx_configure_dir.m4.
15189 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15190 calls. Call AC_PROG_RANLIB. Configure gnulib using
15191 ACX_CONFIGURE_DIR.
15192 (GNULIB): New.
15193 (GNULIB_STDINT_H): Adjust.
15194 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15195 * gdbreplay.c: Include build-gnulib/config.h.
15196 * server.h: Likewise.
15197 * aclocal.m4: Regenerate.
15198 * config.in: Regenerate.
15199 * configure: Regenerate.
15200
15201 2012-04-19 Pedro Alves <palves@redhat.com>
15202
15203 * Makefile.in (LIBGNU, INCGNU): Adjust.
15204 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15205 (all, install-only, uninstall, clean-info, all-lib, clean)
15206 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15207 * configure.ac: Adjust AC_OUTPUT output.
15208 * aclocal.m4: Regenerate.
15209 * configure: Regenerate.
15210
15211 2012-04-19 Pedro Alves <palves@redhat.com>
15212
15213 * Makefile.in (generated_files): New.
15214 (server_h): Remove the explicit dependency on config.h, and depend
15215 on $generated_files.
15216
15217 2012-04-19 Pedro Alves <palves@redhat.com>
15218
15219 * Makefile.in (INCGNU): Add -Ignulib.
15220
15221 2012-04-19 Pedro Alves <palves@redhat.com>
15222
15223 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15224 (INCGNU): ... this, and spell out -I here.
15225 (GNULIB_LIB): Rename to ...
15226 (LIBGNU): ... this.
15227 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15228
15229 2012-04-19 Pedro Alves <palves@redhat.com>
15230
15231 * config.in: Regenerate.
15232
15233 2012-04-19 Pedro Alves <palves@redhat.com>
15234
15235 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15236 * server.h (memmem): Remove declaration.
15237 * config.in: Regenerate.
15238 * configure: Regenerate.
15239
15240 2012-04-19 Yao Qi <yao@codesourcery.com>
15241
15242 * Makefile.in (SFILES): Add common/vec.c.
15243 (OBS): Add vec.o.
15244 (vec.o): New rule.
15245
15246 2012-04-19 Yao Qi <yao@codesourcery.com>
15247
15248 * remote-utils.c (prepare_resume_reply): Replace with macro
15249 target_core_of_thread.
15250 * server.c (handle_qxfer_threads_proper): Likewise.
15251 * target.h (traget_core_of_thread): New macro.
15252
15253 2012-04-18 Pedro Alves <palves@redhat.com>
15254
15255 * aclocal.m4: Regenerate.
15256 * configure: Regenerate.
15257
15258 2012-04-16 Yao Qi <yao@codesourcery.com>
15259
15260 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15261 duplicated on address.
15262
15263 2012-04-16 Yao Qi <yao@codesourcery.com>
15264
15265 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15266 (struct tracepoint_action_ops) <send>: New field.
15267 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15268 (agent_expr_send, x_tracepoint_action_send): New.
15269 (l_tracepoint_action_send): New.
15270 (cmd_qtdp): Download and install tracepoint
15271 according to `use_agent'.
15272 (run_inferior_command): Add one more parameter `len'.
15273 Update callers.
15274 (tracepoint_send_agent): New.
15275 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15276
15277 2012-04-16 Yao Qi <yao@codesourcery.com>
15278
15279 * tracepoint.c (download_tracepoints): Moved to ...
15280 (cmd_qtstart): ... here.
15281
15282 2012-04-14 Yao Qi <yao@codesourcery.com>
15283
15284 * tracepoint.c: Include inttypes.h.
15285 (struct collect_memory_action): Use sized types.
15286 (struct tracepoint): Likewise.
15287 (cmd_qtdp, stop_tracing): Update print specifiers.
15288 (cmd_qtp, response_tracepoint): Likewise.
15289 (collect_data_at_tracepoint): Likewise.
15290 (collect_data_at_step): Likewise.
15291
15292 2012-04-14 Yao Qi <yao@codesourcery.com>
15293
15294 Import gnulib module inttypes.
15295 * aclocal.m4, config.in, configure: Regenerated.
15296
15297 2012-04-14 Yao Qi <yao@codesourcery.com>
15298
15299 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15300 Makefile and config.status at last.
15301
15302 2012-04-13 Yao Qi <yao@codesourcery.com>
15303
15304 * tracepoint.c: Include stdint.h unconditionally.
15305
15306 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15307
15308 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15309 on BFD_HAVE_SYS_PROCFS_TYPE.
15310 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15311 * configure: Regenerate.
15312 * config.in: Likewise.
15313
15314 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15315
15316 * Makefile.in (clean): Also remove x32.c x32-linux.c
15317 x32-avx.c x32-avx-linux.c.
15318 (x32.o): New target.
15319 (x32.c): Likewise.
15320 (x32-linux.o): Likewise.
15321 (x32-linux.c): Likewise.
15322 (x32-avx.o): Likewise.
15323 (x32-avx.c): Likewise.
15324 (x32-avx-linux.o): Likewise.
15325 (x32-avx-linux.c): Likewise.
15326
15327 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15328 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15329 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15330 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15331 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15332 i386/x32-avx-linux.xml.
15333
15334 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15335 (init_registers_x32_avx_linux): Likwise.
15336 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15337 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15338
15339 2012-04-13 Pedro Alves <palves@redhat.com>
15340
15341 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15342 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15343 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15344 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15345 the sub-make.
15346
15347 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15348
15349 * linux-x86-low.c (compat_x32_clock_t): New.
15350 (compat_x32_siginfo_t): Likewise.
15351 (compat_x32_siginfo_from_siginfo): Likewise.
15352 (siginfo_from_compat_x32_siginfo): Likewise.
15353 (linux_is_elf64): Likewise.
15354 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15355 and siginfo_from_compat_x32_siginfo for x32.
15356 (x86_arch_setup): Set linux_is_elf64.
15357
15358 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15359
15360 PR gdb/13969
15361 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15362 e_machine field.
15363 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15364 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15365 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15366 compatible with process.
15367
15368 2012-04-12 Yao Qi <yao@codesourcery.com>
15369
15370 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15371 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15372 (install-only, install-info, clean): Handle sub dir gnulib.
15373 (all-lib, am--refresh): New targets.
15374 (memmem.o): Remove target.
15375 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15376 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15377 (AC_REPLACE_FUNCS): Remove memmem.
15378 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15379 (AC_OUTPUT): Generate Makefile in gnulib/.
15380 * aclocal.m4, config.in, configure: Regenerated.
15381
15382 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15383
15384 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15385
15386 2012-04-05 Pedro Alves <palves@redhat.com>
15387
15388 -Werror=strict-aliasing
15389
15390 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15391 pointer.
15392
15393 2012-04-04 Pedro Alves <palves@redhat.com>
15394
15395 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15396 (sparc_store_gregset_from_stack, sparc_store_gregset)
15397 (sparc_breakpoint_at): Fix formatting.
15398
15399 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15400
15401 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15402 are available.
15403 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15404 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15405 * config.in: Regenerate.
15406 * configure: Likewise.
15407
15408 2012-03-29 Pedro Alves <palves@redhat.com>
15409
15410 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15411 Correct ptrace arguments.
15412
15413 2012-03-28 Pedro Alves <palves@redhat.com>
15414
15415 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15416 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15417 (IA64_FR1_REGNUM): New defines.
15418 (ia64_fetch_register): New.
15419 (the_low_target): Install it.
15420 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15421 field.
15422 * linux-low.c (linux_fetch_registers): Try the
15423 the_low_target.fetch_register hook first.
15424
15425 * linux-arm-low.c (the_low_target): Adjust.
15426 * linux-bfin-low.c (the_low_target): Adjust.
15427 * linux-cris-low.c (the_low_target): Adjust.
15428 * linux-crisv32-low.c (the_low_target): Adjust.
15429 * linux-m32r-low.c (the_low_target): Adjust.
15430 * linux-m68k-low.c (the_low_target): Adjust.
15431 * linux-mips-low.c (the_low_target): Adjust.
15432 * linux-ppc-low.c (the_low_target): Adjust.
15433 * linux-s390-low.c (the_low_target): Adjust.
15434 * linux-sh-low.c (the_low_target): Adjust.
15435 * linux-sparc-low.c (the_low_target): Adjust.
15436 * linux-tic6x-low.c (the_low_target): Adjust.
15437 * linux-x86-low.c (the_low_target): Adjust.
15438 * linux-xtensa-low.c (the_low_target): Adjust.
15439
15440 2012-03-26 Pedro Alves <palves@redhat.com>
15441
15442 * server.c (handle_qxfer_libraries): Don't bail early if
15443 the_target->qxfer_libraries_svr4 is not NULL.
15444
15445 2012-03-26 Pedro Alves <palves@redhat.com>
15446
15447 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15448
15449 2012-03-23 Pedro Alves <palves@redhat.com>
15450
15451 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15452 "library-list-svr4" element's start tag when the the DSO list is
15453 empty.
15454
15455 2012-03-23 Pedro Alves <palves@redhat.com>
15456
15457 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15458 a variable whose type size is the same as the inferior's pointer
15459 size.
15460
15461 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15462
15463 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15464 struct siginfo.
15465 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15466 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15467 * linux-low.h: Include <signal.h>.
15468 (struct siginfo): Remove forward declaration.
15469 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15470 struct siginfo.
15471
15472 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15473
15474 * .gitignore: Ignore more files.
15475
15476 2012-03-19 Pedro Alves <palves@redhat.com>
15477 Jan Kratochvil <jan.kratochvil@redhat.com>
15478
15479 * server.c (cont_thread, general_thread): Add describing comments.
15480 (start_inferior): Clear `cont_thread'.
15481 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15482 of a process.
15483
15484 2012-03-15 Yao Qi <yao@codesourcery.com>
15485
15486 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15487 handling to ...
15488 (cmd_qtdp): ... here.
15489
15490 2012-03-15 Yao Qi <yao@codesourcery.com>
15491
15492 * tracepoint.c (struct tracepoint_action_ops): New.
15493 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15494 (m_tracepoint_action_download): New.
15495 (r_tracepoint_action_download): New.
15496 (x_tracepoint_action_download): New.
15497 (l_tracepoint_action_download): New.
15498 (add_tracepoint_action): Install `action->ops' according type.
15499 (download_tracepoint_1): Move code `download' function pointer
15500 of various tracepoint_action_ops.
15501
15502 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15503
15504 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15505 linux_ptrace_attach_warnings.
15506
15507 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15508
15509 * Makefile.in (linux-ptrace.o): New.
15510 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15511 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15512 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15513 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15514 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15515 of these targets.
15516 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15517
15518 2012-03-08 Yao Qi <yao@codesourcery.com>
15519 Pedro Alves <palves@redhat.com>
15520
15521 Fix PR server/13392.
15522 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15523 offset of JMP insn.
15524 * tracepoint.c (remove_tracepoint): New.
15525 (cmd_qtdp): Call remove_tracepoint when failed to install.
15526
15527 2012-03-07 Pedro Alves <palves@redhat.com>
15528
15529 * linux-low.c (get_detach_signal): New.
15530 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15531 Pass on pending signals to PTRACE_DETACH. Check the result of the
15532 ptrace call.
15533 * server.c (program_signals, program_signals_p): New.
15534 (handle_general_set): Handle QProgramSignals.
15535 * server.h (program_signals, program_signals_p): Declare.
15536
15537 2012-03-05 Pedro Alves <palves@redhat.com>
15538 Jan Kratochvil <jan.kratochvil@redhat.com>
15539
15540 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15541 New comment why.
15542
15543 2012-03-03 Yao Qi <yao@codesourcery.com>
15544
15545 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15546 agent_look_up_symbols.
15547
15548 2012-03-03 Yao Qi <yao@codesourcery.com>
15549
15550 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15551 (linux-x86-low.o): Likewise.
15552 * server.h: Remove in_process_agent_loaded.
15553 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15554 common/agent.c.
15555 Update callers.
15556
15557 2012-03-03 Yao Qi <yao@codesourcery.com>
15558
15559 * tracepoint.c (gdb_agent_capability): New global.
15560 (in_process_agent_loaded_ust): Renamed to
15561 `in_process_agent_supports_ust'.
15562 Update callers.
15563 (in_process_agent_supports_ust): Call agent_capability_check.
15564 (clear_installed_tracepoints): Assert that agent supports
15565 agent.
15566
15567 2012-03-03 Yao Qi <yao@codesourcery.com>
15568
15569 * linux-low.c (linux_supports_agent): New.
15570 (linux_target_ops): Initialize field `supports_agent' with
15571 linux_supports_agent.
15572 * target.h (struct target_ops) <supports_agent>: New.
15573 (target_supports_agent): New macro.
15574 * server.c (handle_general_set): Handle packet 'QAgent'.
15575 (handle_query): Send `QAgent+'.
15576 * Makefile.in (server.o): Depends on agent.h.
15577
15578 2012-03-03 Yao Qi <yao@codesourcery.com>
15579
15580 * Makefile.in (OBS): Add agent.o.
15581 Add new rule for agent.o.
15582 Track dependence of tracepoint.c on agent.h.
15583 * tracepoint.c (run_inferior_command_1):
15584 (run_inferior_command): Call agent_run_command.
15585 (gdb_ust_connect_sync_socket): Deleted. Move it to
15586 common/agent.c.
15587 (resume_thread, stop_thread): Likewise.
15588 (gdb_ust_socket_init): Renamed to ...
15589 (gdb_agent_socket_init): ... New.
15590 (gdb_ust_thread): Renamed to ...
15591 (gdb_agent_helper_thread): ... New.
15592 (gdb_ust_init): Move some code to ...
15593 (gdb_agent_init): ... here. New.
15594 [HAVE_UST]: Call gdb_ust_init.
15595 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15596 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15597 * config.in, configure: Regenerated.
15598
15599 2012-03-02 Pedro Alves <palves@redhat.com>
15600
15601 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15602 * linux-low.c (struct simple_pid_list): New.
15603 (stopped_pids): New a struct simple_pid_list pointer.
15604 (add_to_pid_list, pull_pid_from_list): New.
15605 (handle_extended_wait): Don't assume the first signal new children
15606 report is SIGSTOP. Adjust call to pull_pid_from_list.
15607 (linux_wait_for_lwp): Adjust.
15608
15609 2012-03-02 Yao Qi <yao@codesourcery.com>
15610
15611 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15612 debug log.
15613
15614 2012-03-02 Yao Qi <yao@codesourcery.com>
15615
15616 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15617 `stop_pc' and `tpoint'. Update caller.
15618
15619 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15620
15621 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15622 * linux-low.c (use_linux_regsets): New macro.
15623 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15624 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15625 (linux_register_in_regsets): New function.
15626 (usr_fetch_inferior_registers): Skip registers covered by
15627 regsets.
15628 (usr_store_inferior_registers): Likewise.
15629 (usr_fetch_inferior_registers): New macro.
15630 (usr_store_inferior_registers): Likewise.
15631 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15632 (linux_store_registers): Likewise.
15633 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15634 prototype.
15635 (init_registers_mips64_dsp_linux): Likewise.
15636 (init_registers_mips_linux): New macro.
15637 (init_registers_mips_dsp_linux): Likewise.
15638 (mips_dsp_num_regs): Likewise.
15639 (DSP_BASE, DSP_CONTROL): New fallback macros.
15640 (mips_base_regs): New macro.
15641 (mips_regmap): Use it. Fix the size.
15642 (mips_dsp_regmap): New variable.
15643 (mips_dsp_regset_bitmap): Likewise.
15644 (mips_arch_setup): New function.
15645 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15646 than mips_regmap.
15647 (mips_cannot_store_register): Likewise.
15648 (the_low_target): Update .arch_setup, .num_regs and .regmap
15649 initializers. Add .regset_bitmap initializer.
15650 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15651 initializer.
15652 * linux-bfin-low.c (the_low_target): Likewise.
15653 * linux-cris-low.c (the_low_target): Likewise.
15654 * linux-crisv32-low.c (the_low_target): Likewise.
15655 * linux-ia64-low.c (the_low_target): Likewise.
15656 * linux-m32r-low.c (the_low_target): Likewise.
15657 * linux-m68k-low.c (the_low_target): Likewise.
15658 * linux-ppc-low.c (the_low_target): Likewise.
15659 * linux-s390-low.c (the_low_target): Likewise.
15660 * linux-sh-low.c (the_low_target): Likewise.
15661 * linux-sparc-low.c (the_low_target): Likewise.
15662 * linux-tic6x-low.c (the_low_target): Likewise.
15663 * linux-x86-low.c (the_low_target): Likewise.
15664 * linux-xtensa-low.c (the_low_target): Likewise.
15665 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15666 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15667 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15668 srv_xmlfiles.
15669 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15670 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15671
15672 2012-02-29 Yao Qi <yao@codesourcery.com>
15673 Pedro Alves <palves@redhat.com>
15674
15675 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15676 `step_over_finished' is true.
15677
15678 2012-02-27 Pedro Alves <palves@redhat.com>
15679
15680 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15681 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15682
15683 2012-02-27 Pedro Alves <palves@redhat.com>
15684
15685 PR server/9684
15686 * linux-low.c (pid_is_stopped): New.
15687 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15688
15689 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15690
15691 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15692 of conditions.
15693
15694 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15695
15696 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15697
15698 2012-02-24 Luis Machado <lgustavo@codesourcery>
15699
15700 * server.c (handle_query): Advertise support for target-side
15701 breakpoint condition evaluation.
15702 (process_point_options): New function.
15703 (process_serial_event): When inserting a breakpoint, check for
15704 a target-side condition that should be evaluated.
15705
15706 * mem-break.c: Include regcache.h and ax.h.
15707 (point_cond_list_t): New data structure.
15708 (breakpoint) <cond_list>: New field.
15709 (find_gdb_breakpoint_at): Make non-static.
15710 (delete_gdb_breakpoint_at): Clear any target-side
15711 conditions.
15712 (clear_gdb_breakpoint_conditions): New function.
15713 (add_condition_to_breakpoint): Likewise.
15714 (add_breakpoint_condition): Likewise.
15715 (gdb_condition_true_at_breakpoint): Likewise.
15716 (gdb_breakpoint_here): Return result directly instead
15717 of going through a local variable.
15718
15719 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15720 (clear_gdb_breakpoint_conditions): Likewise.
15721 (add_breakpoint_condition): Likewise.
15722 (gdb_condition_true_at_breakpoint): Likewise.
15723
15724 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15725 (need_step_over_p): Take target-side breakpoint condition into
15726 consideration.
15727
15728 2012-02-24 Luis Machado <lgustavo@codesourcery>
15729
15730 * server.h: Include tracepoint.h.
15731 (agent_mem_read, agent_get_trace_state_variable_value,
15732 agent_set_trace_state_variable_value,
15733 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15734 get_set_tsv_func_addr): New prototypes.
15735
15736 * ax.h: New include file.
15737 * ax.c: New source file.
15738
15739 * tracepoint.c: Include ax.h.
15740 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15741 agent_expr, eval_result_type): Move to ax.h.
15742 (parse_agent_expr): Rename to ...
15743 (gdb_parse_agent_expr): ... this, make it non-static and move
15744 to ax.h.
15745 (unparse_agent_expr) Rename to ...
15746 (gdb_unparse_agent_expr): ... this, make it non-static and move
15747 to ax.h.
15748 (eval_agent_expr): Rename to ...
15749 (eval_tracepoint_agent_expr): ... this.
15750 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15751 forward declarations.
15752 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15753 (agent_get_trace_state_variable_value): New function.
15754 (agent_set_trace_state_variable_value): New function.
15755 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15756 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15757 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15758 (condition_true_at_tracepoint): Likewise.
15759 (parse_agent_expr): Rename to ...
15760 (gdb_parse_agent_expr): ... this and move to ax.c.
15761 (unparse_agent_expr): Rename to ...
15762 (gdb_unparse_agent_expr): ... this and move to ax.c.
15763 (gdb_agent_op_name): Move to ax.c.
15764 (eval_agent_expr): Rename to ...
15765 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15766 and move to ax.c.
15767 (eval_tracepoint_agent_expr): New function.
15768 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15769 non-static.
15770 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15771 ax.c.
15772 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15773 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15774 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15775 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15776 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15777 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15778 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15779 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15780 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15781 (compile_bytecodes): Remove forward declaration.
15782 (is_goto_target): Move to ax.c.
15783 (compile_bytecodes): Move to ax.c and call
15784 agent_get_trace_state_variable_value (...) and
15785 agent_set_trace_state_variable_value (...).
15786
15787 * Makefile.in: Update ax.c and IPA dependencies.
15788
15789 2012-02-24 Pedro Alves <palves@redhat.com>
15790
15791 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15792 (cmd_bigqtbuffer_circular): ... this. Only handle
15793 'QTBuffer:circular:'.
15794 (handle_tracepoint_general_set): Adjust.
15795
15796 2012-02-16 Yao Qi <yao@codesourcery.com>
15797
15798 * inferiors.c: Move code to ...
15799 * dll.c: .... here. New.
15800 * server.h: Declare clear_dlls.
15801 * Makefile.in (SFILES): Add dll.c.
15802 (OBS): Add dll.o
15803 (dll.o): New rule.
15804
15805 2012-02-11 Yao Qi <yao@codesourcery.com>
15806
15807 * server.c: (handle_monitor_command): Add a new parameter
15808 `own_buf'.
15809 (handle_query): Update caller.
15810
15811 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15812
15813 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15814 * configure, config.in: Regenerate.
15815 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15816 is not defined.
15817
15818 2012-02-02 Pedro Alves <palves@redhat.com>
15819
15820 Try SIGKILL first, then PTRACE_KILL.
15821 * linux-low.c (linux_kill_one_lwp): New.
15822 (linux_kill_one_lwp): Rename to ...
15823 (kill_one_lwp_callback): ... this. Use the new
15824 linux_kill_one_lwp.
15825
15826 2012-02-02 Pedro Alves <palves@redhat.com>
15827
15828 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15829 inferior.
15830
15831 2012-01-27 Pedro Alves <palves@redhat.com>
15832
15833 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15834 (elf_64_file_p): Make static.
15835 (linux_pid_exe_is_elf_64_file): New.
15836 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15837 Delete declarations.
15838 (linux_pid_exe_is_elf_64_file): Declare.
15839 * linux-x86-low.c (x86_arch_setup): Use
15840 linux_pid_exe_is_elf_64_file.
15841
15842 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15843
15844 * linux-low.c (linux_wait_for_event_1): Rename to ...
15845 (linux_wait_for_event): ... here and merge it with former
15846 linux_wait_for_event - new variable wait_ptid, use it.
15847 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15848
15849 2012-01-23 Pedro Alves <palves@redhat.com>
15850
15851 * server.c (main): Avoid yet another case of infinite loop while
15852 detaching/killing after a longjmp.
15853
15854 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15855
15856 Code cleanup.
15857 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15858
15859 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15860
15861 * hostio.c (handle_readlink): New function.
15862 (handle_vFile): Call it to handle "vFile:readlink" packets.
15863
15864 2012-01-20 Pedro Alves <palves@redhat.com>
15865 Ulrich Weigand <ulrich.weigand@linaro.org>
15866
15867 * server.c (handle_v_requests): Only support vAttach and vRun to
15868 start multiple processes when in extended protocol mode.
15869
15870 2012-01-17 Pedro Alves <palves@redhat.com>
15871
15872 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15873 memalign plus mprotect to allocate the scratch buffer.
15874
15875 2012-01-13 Pedro Alves <palves@redhat.com>
15876
15877 * server.c (attach_inferior): Clear `cont_thread'.
15878
15879 2012-01-13 Pedro Alves <palves@redhat.com>
15880
15881 * server.c (main): Avoid infinite loop while detaching/killing
15882 after a longjmp.
15883
15884 2012-01-09 Doug Evans <dje@google.com>
15885
15886 * server.c (start_inferior): Set last_ptid in --wrapper case.
15887
15888 2012-01-06 Yao Qi <yao@codesourcery.com>
15889
15890 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15891 defined.
15892 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15893
15894 2012-01-04 Yao Qi <yao@codesourcery.com>
15895
15896 * tracepoint.c (cmd_qtdp): Print debug message
15897 for static tracepoint.
15898
15899 2012-01-04 Yao Qi <yao@codesourcery.com>
15900
15901 * tracepoint.c (trace_vdebug): Differentiate debug message
15902 between gdbserver and IPA.
15903
15904 2012-01-03 Yao Qi <yao@codesourcery.com>
15905
15906 * tracepoint.c (tracepoint_was_hit): Don't collect for
15907 static tracepoint.
15908
15909 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15910
15911 * terminal.h: Reformat copyright header.
15912
15913 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15914
15915 * server.c (gdbserver_version): Update copyright year.
15916 * gdbreplay.c (gdbreplay_version): Likewise.
15917
15918 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15919
15920 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15921
15922 Revert:
15923 2011-12-18 Hui Zhu <teawater@gmail.com>
15924 * linux-low.c (linux_create_inferior): Save return value to ret.
15925
15926 2011-12-18 Hui Zhu <teawater@gmail.com>
15927
15928 * linux-low.c (linux_create_inferior): Save return value to ret.
15929
15930 2011-12-16 Doug Evans <dje@google.com>
15931
15932 * linux-low.c (linux_create_inferior): If stdio connection,
15933 redirect stdin from /dev/null, stdout to stderr.
15934 * remote-utils.c (remote_is_stdio): New static global.
15935 (remote_connection_is_stdio): New function.
15936 (remote_prepare): Handle stdio connection.
15937 (remote_open): Ditto.
15938 (remote_close): Don't close stdin for stdio connections.
15939 (read_prim,write_prim): New functions. Replace all calls to
15940 read/write to these.
15941 * server.c (main): Watch for "-" argument. Move call to
15942 remote_prepare before start_inferior.
15943 * server.h (STDIO_CONNECTION_NAME): New macro.
15944 (remote_connection_is_stdio): Declare.
15945
15946 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15947 in debugging output.
15948
15949 2011-12-15 Yao Qi <yao@codesourcery.com>
15950
15951 * tracepoint.c: Include sys/syscall.h.
15952 (gdb_ust_thread): Remove preprocessor conditional.
15953
15954 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15955
15956 * linux-low.c (linux_detach_one_lwp): Call
15957 the_low_target.prepare_to_resume before detaching.
15958
15959 2011-12-14 Yao Qi <yao@codesourcery.com>
15960
15961 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15962 of write.
15963
15964 2011-12-14 Yao Qi <yao@codesourcery.com>
15965
15966 * i386-low.c (i386_low_stopped_data_address): Initialize local
15967 variable `control'.
15968
15969 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15970
15971 PR remote/13492
15972
15973 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15974 DR_CONTROL unless necessary. Extend comments.
15975 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15976 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15977
15978 2011-12-13 Yao Qi <yao@codesourcery.com>
15979
15980 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15981 macros.
15982 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15983
15984 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15985
15986 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15987 Print new debug message for such case.
15988
15989 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15990
15991 Fix overlapping memcpy.
15992 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15993 the read_inferior_memory transfer.
15994 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15995 write_inferior_memory transfer.
15996 (set_fast_tracepoint_jump): New variable buf. Use it for the
15997 read_inferior_memory and write_inferior_memory transfers.
15998 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15999 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16000 Use it for the write_inferior_memory transfer.
16001 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16002 buffers.
16003
16004 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16005
16006 * linux-low.c (fetch_register, store_register): Make code
16007 consistent, fix formatting.
16008
16009 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16010
16011 * linux-low.c (usr_store_inferior_registers): Factor out code
16012 to handle individual registers into...
16013 (store_register): ... this new function.
16014
16015 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16016
16017 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16018 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16019 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16020 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16021 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16022 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16023 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16024 (srv_xmlfiles): Add new XML files.
16025
16026 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16027 and <sys/uio.h>.
16028 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16029 (init_registers_s390_linux32v1): Add prototype.
16030 (init_registers_s390_linux32v2): Likewise.
16031 (init_registers_s390_linux64v1): Likewise.
16032 (init_registers_s390_linux64v2): Likewise.
16033 (init_registers_s390x_linux64v1): Likewise.
16034 (init_registers_s390x_linux64v2): Likewise.
16035 (s390_num_regs): Increment to 52.
16036 (s390_regmap): Add orig_r2 register.
16037 (s390_num_regs_3264): Increment to 68.
16038 (s390_regmap_3264): Add orig_r2 register.
16039 (s390_collect_ptrace_register): Handle orig_r2 register.
16040 (s390_supply_ptrace_register): Likewise.
16041 (s390_fill_last_break): New function.
16042 (s390_store_last_break): Likewise.
16043 (s390_fill_system_call): New function.
16044 (s390_store_system_call): Likewise.
16045 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16046 register sets.
16047 (s390_check_regset): New function.
16048 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16049 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16050 Update target_regsets for available register sets.
16051
16052 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16053 Jan Kratochvil <jan.kratochvil@redhat.com>
16054
16055 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16056 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16057 New.
16058 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16059 * linux-low.h (struct process_info_private): New member r_debug.
16060 * server.c (handle_qxfer_libraries): Call
16061 the_target->qxfer_libraries_svr4.
16062 (handle_qxfer_libraries_svr4): New function.
16063 (qxfer_packets): New entry "libraries-svr4".
16064 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16065 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16066 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16067 PACKET_qXfer_libraries_svr4.
16068
16069 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16070
16071 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16072 PSW address/mask between 8-byte and 16-byte formats.
16073 (s390_supply_ptrace_register): Likewise.
16074 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16075 basic addressing mode bit.
16076
16077 2011-11-24 Stan Shebs <stan@codesourcery.com>
16078
16079 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16080
16081 2011-11-17 Stan Shebs <stan@codesourcery.com>
16082
16083 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16084 (tracing_start_time): New global.
16085 (tracing_stop_time): New global.
16086 (tracing_user_name): New global.
16087 (tracing_notes): New global.
16088 (tracing_stop_note): New global.
16089 (cmd_qtstart): Set traceframe_usage, start_time.
16090 (stop_tracing): Set stop_time.
16091 (cmd_qtstatus): Report additional status.
16092 (cmd_qtp): New function.
16093 (handle_tracepoint_query): Call it.
16094 (cmd_qtnotes): New function.
16095 (handle_tracepoint_general_set): Call it.
16096 (get_timestamp): Rename from tsv_get_timestamp.
16097
16098 2011-11-14 Stan Shebs <stan@codesourcery.com>
16099 Kwok Cheung Yeung <kcy@codesourcery.com>
16100
16101 * linux-x86-low.c (small_jump_insn): New.
16102 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16103 trampoline and error message, build a trampoline and issue a small
16104 jump instruction to it.
16105 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16106 trampoline and error message.
16107 (x86_get_min_fast_tracepoint_insn_len): New.
16108 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16109 * linux-low.h (struct linux_target_ops): Add arguments to
16110 install_fast_tracepoint_jump_pad operation, add new operation.
16111 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16112 arguments.
16113 (linux_get_min_fast_tracepoint_insn_len): New function.
16114 (linux_target_op): Add new operation.
16115 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16116 (gdb_trampoline_buffer_end): Ditto.
16117 (gdb_trampoline_buffer_error): Ditto.
16118 (struct ipa_sym_addresses): Add fields for new IPA variables.
16119 (symbol_list): Add entries for new IPA variables.
16120 (struct tracepoint): Add fields to hold the address range of the
16121 trampoline used by the tracepoint.
16122 (trampoline_buffer_head): New static variable.
16123 (trampoline_buffer_tail): Ditto.
16124 (claim_trampoline_space): New function.
16125 (have_fast_tracepoint_trampoline_buffer): New function.
16126 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16127 structure.
16128 (install_fast_tracepoint): Ditto, also add error buffer argument.
16129 (cmd_qtminftpilen): New function.
16130 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16131 (fast_tracepoint_from_trampoline_address): New function.
16132 (fast_tracepoint_collecting): Handle trampoline as part of jump
16133 pad space.
16134 (set_trampoline_buffer_space): New function.
16135 (initialize_tracepoint): Initialize new IPA variables.
16136 * target.h (struct target_ops): Add arguments to
16137 install_fast_tracepoint_jump_pad operation, add new
16138 get_min_fast_tracepoint_insn_len operation.
16139 (target_get_min_fast_tracepoint_insn_len): New.
16140 (install_fast_tracepoint_jump_pad): Add arguments.
16141 * server.h (IPA_BUFSIZ): Define.
16142 * linux-i386-ipa.c: Include extra header files.
16143 (initialize_fast_tracepoint_trampoline_buffer): New function.
16144 (initialize_low_tracepoint): Call it.
16145 * server.h (set_trampoline_buffer_space): Declare.
16146 (claim_trampoline_space): Ditto.
16147 (have_fast_tracepoint_trampoline_buffer): Ditto.
16148
16149 2011-11-14 Yao Qi <yao@codesourcery.com>
16150
16151 * server.c (handle_query): Handle InstallInTrace for qSupported.
16152 * tracepoint.c (add_tracepoint): Sort list.
16153 (install_tracepoint, download_tracepoint): New.
16154 (cmd_qtdp): Call them to install and download tracepoints.
16155 (sort_tracepoints): Removed.
16156 (cmd_qtstart): Update.
16157
16158 2011-11-14 Yao Qi <yao@codesourcery.com>
16159
16160 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16161 * mem-break.h: Declare.
16162 * tracepoint.c (cmd_qtstart): Move some code to ...
16163 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16164 New.
16165 (download_tracepoints): Move some code to ...
16166 (download_tracepoint_1): ... here. New.
16167
16168 2011-11-08 Yao Qi <yao@codesourcery.com>
16169
16170 * remote-utils.c (relocate_instruction): A comment fix.
16171
16172 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16173
16174 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16175 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16176 dr_status_mirror and dr_control_mirror from debug_reg_state.
16177 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16178 (i386_initial_stuff): Remove use of deleted globals.
16179 (i386_get_thread_context, i386_set_thread_context,
16180 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16181 from debug_reg_state.
16182
16183 2011-11-05 Yao Qi <yao@codesourcery.com>
16184
16185 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16186 address as TPOINT's.
16187
16188 2011-11-02 Stan Shebs <stan@codesourcery.com>
16189
16190 * tracepoint.c (agent_mem_read_string): New function.
16191 (eval_agent_expr): Call it for tracenz.
16192 * server.c (handle_query): Report support for tracenz.
16193
16194 2011-11-02 Yao Qi <yao@codesourcery.com>
16195
16196 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16197
16198 2011-11-02 Yao Qi <yao@codesourcery.com>
16199
16200 * target.h: Fix a typo in comment.
16201
16202 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16203
16204 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16205 clobber the breakpoints' shadows with fast tracepoint jumps.
16206 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16207 * target.c (write_inferior_memory): Also pass MYADDR down to
16208 check_mem_write.
16209
16210 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16211
16212 * configure.ac: Check support for personality routine.
16213 * configure: Regenerate.
16214 * config.in: Likewise.
16215 * linux-low.c: Include <sys/personality.h>.
16216 Define ADDR_NO_RANDOMIZE if necessary.
16217 (linux_create_inferior): Disable address space randomization when
16218 forking inferior, if requested.
16219 (linux_supports_disable_randomization): New function.
16220 (linux_target_ops): Install it.
16221 * server.h (disable_randomization): Declare.
16222 * server.c (disable_randomization): New global variable.
16223 (handle_general_set): Handle QDisableRandomization.
16224 (handle_query): Likewise for qSupported.
16225 (main): Support --disable-randomization and --no-disable-randomization
16226 command line arguments.
16227 * target.h (struct target_ops): Add supports_disable_randomization.
16228 (target_supports_disable_randomization): New macro.
16229
16230 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16231
16232 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16233 ifdef check.
16234 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16235 [!PT_GETDSBT] (target_loadmap): New definition.
16236 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16237 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16238 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16239 and PT_GETDSBT to LINUX_LOADMAP.
16240 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16241 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16242
16243 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16244
16245 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16246 (arm_linux_hwbp_cap): New static variable.
16247 (arm_linux_get_hwbp_cap): Replace by ...
16248 (arm_linux_init_hwbp_cap): ... this new function.
16249 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16250 (arm_linux_get_hw_watchpoint_count): Likewise.
16251 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16252 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16253 (arm_prepare_to_resume): Use perror_with_name instead of error.
16254
16255 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16256
16257 * linux-arm-low.c: Include <signal.h>.
16258 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16259 (struct arm_linux_hwbp_cap): New data type.
16260 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16261 (struct arm_linux_hw_breakpoint): New data type.
16262 (MAX_BPTS, MAX_WPTS): Define.
16263 (struct arch_process_info, struct arch_lwp_info): New data types.
16264 (arm_linux_get_hwbp_cap): New function.
16265 (arm_linux_get_hw_breakpoint_count): Likewise.
16266 (arm_linux_get_hw_watchpoint_count): Likewise.
16267 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16268 (arm_hwbp_control_initialize): Likewise.
16269 (arm_hwbp_control_is_enabled): Likewise.
16270 (arm_hwbp_control_is_initialized): Likewise.
16271 (arm_hwbp_control_disable): Likewise.
16272 (arm_linux_hw_breakpoint_equal): Likewise.
16273 (arm_linux_hw_point_initialize): Likewise.
16274 (struct update_registers_data): New data structure.
16275 (update_registers_callback: New function.
16276 (arm_insert_point): Likewise.
16277 (arm_remove_point): Likewise.
16278 (arm_stopped_by_watchpoint): Likewise.
16279 (arm_stopped_data_address): Likewise.
16280 (arm_new_process): Likewise.
16281 (arm_new_thread): Likewise.
16282 (arm_prepare_to_resume): Likewise.
16283 (the_low_target): Register arm_insert_point, arm_remove_point,
16284 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16285 arm_new_thread, and arm_prepare_to_resume.
16286
16287 2011-09-15 Stan Shebs <stan@codesourcery.com>
16288
16289 * server.h (struct emit_ops): Add compare-goto fields.
16290 * tracepoint.c (gdb_agent_op_sizes): New table.
16291 (emit_eq_goto): New function.
16292 (emit_ne_goto): New function.
16293 (emit_lt_goto): New function.
16294 (emit_le_goto): New function.
16295 (emit_gt_goto): New function.
16296 (emit_ge_goto): New function.
16297 (is_goto_target): New function.
16298 (compile_bytecodes): Recognize special cases of compare-goto
16299 combinations and call specialized emitters for them.
16300 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16301 (amd64_emit_ne_goto): New function.
16302 (amd64_emit_lt_goto): New function.
16303 (amd64_emit_le_goto): New function.
16304 (amd64_emit_gt_goto): New function.
16305 (amd64_emit_ge_goto): New function.
16306 (amd64_emit_ops): Add the new functions.
16307 (i386_emit_eq_goto): New function.
16308 (i386_emit_ne_goto): New function.
16309 (i386_emit_lt_goto): New function.
16310 (i386_emit_le_goto): New function.
16311 (i386_emit_gt_goto): New function.
16312 (i386_emit_ge_goto): New function.
16313 (i386_emit_ops): Add the new functions.
16314
16315 2011-09-08 Stan Shebs <stan@codesourcery.com>
16316
16317 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16318 (i386_emit_epilogue): Restore %ebx.
16319
16320 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16321
16322 * server.c (step_thread): Remove definition.
16323 (process_serial_event): Don't handle Hs.
16324 * server.h (step_thread): Remove declaration.
16325 * target.c (set_desired_inferior): Remove use of step_thread.
16326
16327 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16328
16329 * linux-low.c: Include linux-procfs.h.
16330 (linux_attach_lwp_1): Update comments.
16331 (linux_attach): Scan for existing threads when attaching to a
16332 process that is the tgid.
16333 * Makefile.in: Update dependencies.
16334
16335 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16336
16337 * configure.srv: Add linux-procfs.o dependencies.
16338
16339 2011-08-14 Yao Qi <yao@codesourcery.com>
16340
16341 * target.h (struct target_ops): Fix indent.
16342 * win32-low.c (win32_target_ops): Fix comment.
16343
16344 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16345 Yao Qi <yao@codesourcery.com>
16346
16347 * Makefile.in (clean): Remove tic6x-*.c files.
16348 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16349 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16350 (tic6x-c64xp-linux.c): Likewise.
16351 * configure.srv: Add support for tic6x-*-uclinux.
16352 * linux-tic6x-low.c: New.
16353 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16354
16355 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16356 Yao Qi <yao@codesourcery.com>
16357
16358 * target.h (struct target_ops): Add read_loadmap.
16359 * linux-low.c (struct target_loadseg): New type.
16360 (struct target_loadmap): New type.
16361 (linux_read_loadmap): New function.
16362 (linux_target_ops): Add linux_read_loadmap.
16363 * server.c (handle_query): Support qXfer:fdpic:read packet.
16364 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16365 to NULL.
16366
16367 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16368
16369 * win32-low.c: Include <stdint.h>.
16370
16371 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16372
16373 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16374 to the inferior here.
16375 (i386_remove_aligned_watchpoint): Ditto.
16376 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16377 fit part of the watchpoint in the debug registers.
16378 (i386_update_inferior_debug_regs): New.
16379 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16380 registers, and only update the inferior on success.
16381 (i386_low_remove_watchpoint): Ditto.
16382
16383 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16384
16385 * linux-low.c (compare_ints, unique, list_threads, show_process,
16386 linux_core_of_thread): Delete.
16387 (linux_target_ops): Change linux_core_of_thread to
16388 linux_common_core_of_thread.
16389 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16390 * utils.c (malloc_failure): Change type of argument.
16391 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16392 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16393 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16394 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16395 (IPA_OBJS): Add common-utils-ipa.o.
16396 (ptid_h, linux_osdata_h): New macros.
16397 (server_h): Add common/common-utils.h, common/xml-utils.h,
16398 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16399 common/ptid.h.
16400 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16401 ptid.o, buffer.o): New rules.
16402 (linux-low.o): Add common/linux-osdata.h as a dependency.
16403 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16404 * configure.ac: Add AC_HEADER_DIRENT check.
16405 * config.in: Regenerate.
16406 * configure: Regenerate.
16407 * remote-utils.c (xml_escape_text): Delete.
16408 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16409 buffer_xml_printf): Move to common/buffer.c.
16410 * server.c (main): Remove call to initialize_inferiors.
16411 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16412 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16413 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16414 internal_error, gdb_assert, gdb_assert_fail): Delete.
16415 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16416 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16417 common/buffer.h.
16418 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16419 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16420 initialize_inferiors): Delete.
16421
16422 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16423
16424 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16425 symbol error.
16426
16427 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16428
16429 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16430 assertion.
16431 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16432
16433 2011-05-26 Yao Qi <yao@codesourcery.com>
16434
16435 * Makefile.in (thread-db.o): Track dependence to
16436 common/gdb_thread_db.h.
16437 * thread-db.c: include gdb_thread_db.h from right place.
16438
16439 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16440
16441 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16442 __FILE__ and __LINE__ to internal_error.
16443
16444 2011-05-13 Doug Evans <dje@google.com>
16445
16446 * thread-db.c (try_thread_db_load_from_sdir): New function.
16447 (try_thread_db_load_from_dir): New function.
16448 (thread_db_load_search): Handle $sdir, ignore $pdir.
16449 Remove trying of system directories if search of
16450 libthread-db-search-path fails, that is now done via $sdir.
16451
16452 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16453
16454 * server.c (handle_query): Add EnableDisableTracepoints to the list
16455 of supported features.
16456 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16457 tracepoints.
16458 (cmd_qtenable_disable): New.
16459 (cmd_qtstart): Install tracepoints even if disabled.
16460 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16461 receiving a QTEnable or QTDisable packet.
16462 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16463 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16464 tracepoints.
16465 (gdb_probe): Skip data collection if static tracepoint is disabled.
16466
16467 2011-05-10 Doug Evans <dje@google.com>
16468
16469 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16470
16471 2011-05-04 Doug Evans <dje@google.com>
16472
16473 * linux-low.c (linux_join): Skip process lookup.
16474 * spu-low.c (spu_join): Ditto.
16475 * server.c (join_inferiors_callback): Delete.
16476 (process_serial_event): For 'D' packet (detach) call join_inferior
16477 directly.
16478
16479 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16480
16481 * README: Don't mention xscale*-*-linux*.
16482 * configure.srv (xscale*-*-linux*): Don't handle target.
16483
16484 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16485
16486 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16487 casting pointers.
16488 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16489 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16490 (i386_emit_void_call_2): Likewise.
16491
16492 2011-04-26 Yao Qi <yao@codesourcery.com>
16493
16494 * linux-low.c: Move common macros to linux-ptrace.h.
16495 Include linux-ptrace.h.
16496 * Makefile.in (linux_ptrace_h): New.
16497 (linux-low.o): Depends on linux-ptrace.h.
16498
16499 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16500
16501 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16502 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16503 (remote_prepare): New function with most of the TCP code from ...
16504 (remote_open): ... here. Detect PORT here unconditionally. Move also
16505 setting transport_is_reliable.
16506 * server.c (run_once): New variable.
16507 (gdbserver_usage): Document it.
16508 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16509 the first run if RUN_ONCE.
16510 * server.h (run_once, remote_prepare): New declarations.
16511
16512 2011-04-19 Tom Tromey <tromey@redhat.com>
16513
16514 * win32-low.c (handle_load_dll): Remove duplicate "the".
16515
16516 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16517
16518 Remove support for old Cygwin 1.5 versions.
16519 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16520 function to avoid warning.
16521 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16522 warning.
16523
16524 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16525
16526 * gdbserver/server.h (Macro _): Define it if not available.
16527
16528 2011-03-14 Michael Snyder <msnyder@vmware.com>
16529
16530 * hostio.c (handle_close): Remove unnecessary null test.
16531
16532 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16533
16534 * Makefile.in (maintainer-clean realclean distclean): Remove
16535 "make ... subdir_do" command.
16536
16537 2011-03-10 Michael Snyder <msnyder@vmware.com>
16538
16539 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16540
16541 * server.c (handle_v_run): Free alloced buffer on early return.
16542
16543 2011-03-09 Yao Qi <yao@codesourcery.com>
16544
16545 Revert:
16546 2011-03-04 Yao Qi <yao@codesourcery.com>
16547
16548 * Makefile.in: Remove GNU make feature --directory.
16549
16550 2011-03-05 Yao Qi <yao@codesourcery.com>
16551
16552 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16553 (subdir_do): New make target. Copied from gdb/Makefile.
16554 (maintainer-clean, realclean, distclean, clean): Call corresponding
16555 make targets in common/Makefile.
16556
16557 2011-02-11 Yao Qi <yao@codesourcery.com>
16558
16559 * configure.ac: Call AC_PROG_RANLIB.
16560 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16561 * configure: Regenerate.
16562
16563 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16564
16565 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16566
16567 2011-03-06 Yao Qi <yao@codesourcery.com>
16568
16569 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16570
16571 2011-03-05 Yao Qi <yao@codesourcery.com>
16572
16573 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16574 (subdir_do): New make target. Copied from gdb/Makefile.
16575 (maintainer-clean, realclean, distclean, clean): Call corresponding
16576 make targets in common/Makefile.
16577
16578 2011-03-04 Yao Qi <yao@codesourcery.com>
16579
16580 * Makefile.in: Remove GNU make feature --directory.
16581
16582 2011-03-04 Michael Snyder <msnyder@vmware.com>
16583
16584 * server.c (queue_stop_reply): Call xmalloc not malloc.
16585
16586 2011-03-02 Michael Snyder <msnyder@vmware.com>
16587
16588 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16589
16590 2011-02-28 Michael Snyder <msnyder@vmware.com>
16591
16592 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16593 (cmd_qtframe): Ditto.
16594 (cmd_qtbuffer): Ditto.
16595 (cmd_bigqtbuffer): Ditto.
16596
16597 * utils.c (decimal2str): Initialize 'width' to nine, then
16598 don't mess with it.
16599
16600 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16601
16602 * hostio.c (require_data): Free *data, not data.
16603
16604 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16605
16606 * hostio.c (require_data): Use free, not xfree.
16607
16608 2011-02-27 Michael Snyder <msnyder@vmware.com>
16609
16610 * server.c (handle_query): Discard unused value.
16611
16612 * hostio.c (require_data): Free malloc memory before returning
16613 error.
16614
16615 2011-02-26 Michael Snyder <msnyder@vmware.com>
16616
16617 * linux-low.c (list_threads): Call closedir for dirent.
16618
16619 2011-02-27 Michael Snyder <msnyder@vmware.com>
16620
16621 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16622 a case statement falls through.
16623
16624 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16625
16626 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16627 in comparison.
16628
16629 2011-02-26 Michael Snyder <msnyder@vmware.com>
16630
16631 * utils.c (decimal2str): Eliminate dead code and dead param.
16632 (pulongest): Drop dead param from call to decimal2str.
16633 (plongest): Ditto.
16634
16635 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16636
16637 Revert the following patch (not approved yet):
16638 2011-02-21 Hui Zhu <teawater@gmail.com>
16639 * tracepoint.c (tp_printf): New function.
16640 (eval_agent_expr): Handle gdb_agent_op_printf.
16641
16642 2011-02-21 Hui Zhu <teawater@gmail.com>
16643
16644 * tracepoint.c (tp_printf): New function.
16645 (eval_agent_expr): Handle gdb_agent_op_printf.
16646
16647 2011-02-18 Tom Tromey <tromey@redhat.com>
16648
16649 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16650 (tracepoint.o): Likewise.
16651 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16652 (gdb_agent_op_names): Likewise.
16653
16654 2011-02-18 Tom Tromey <tromey@redhat.com>
16655
16656 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16657 gdb_agent_op_rot>: New constants.
16658 (gdb_agent_op_names): Add pick and roll.
16659 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16660 cases.
16661
16662 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16663
16664 * aclocal.m4: Regenerated with aclocal-1.11.1.
16665
16666 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16667
16668 * server.c (handle_qxfer_traceframe_info): New.
16669 (qxfer_packets): Register "traceframe-info".
16670 (handle_query): Report support for qXfer:traceframe-info:read+.
16671 * tracepoint.c (match_blocktype): New.
16672 (traceframe_find_block_type): Rename to ...
16673 (traceframe_walk_blocks): ... this. Add callback filter argument,
16674 and use it.
16675 (traceframe_find_block_type): New, reimplemented on top of
16676 traceframe_walk_blocks.
16677 (build_traceframe_info_xml): New.
16678 (traceframe_read_info): New.
16679 * server.h (traceframe_read_info): Declare.
16680
16681 2011-02-11 Yao Qi <yao@codesourcery.com>
16682
16683 * configure.ac: Call AC_PROG_RANLIB.
16684 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16685 * configure: Regenerate.
16686
16687 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16688
16689 * server.c (gdb_read_memory): Change return semantics to allow
16690 partial transfers.
16691 (handle_search_memory_1): Adjust.
16692 (process_serial_event) <'m' packet>: Handle partial transfers.
16693 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16694
16695 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16696
16697 * regcache.c (init_register_cache): Initialize
16698 regcache->register_status.
16699 (free_register_cache): Release regcache->register_status.
16700 (regcache_cpy): Copy register_status.
16701 (registers_to_string): Print 'x's for unavailable registers.
16702 (supply_register): Mark the register's status valid or
16703 unavailable, depending on whether a buffer was passed in or not.
16704 (supply_register_zeroed): New.
16705 (supply_regblock): Mark the registers' status valid or
16706 unavailable, depending on whether a buffer was passed in or not.
16707 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16708 (struct regcache): New `register_status' field.
16709 (supply_register_zeroed): Declare.
16710 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16711 supply_register_zeroed, rather than passing a NULL buffer to
16712 supply_register.
16713 * tracepoint.c (fetch_traceframe_registers): Update comment.
16714
16715 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16716
16717 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16718 buffer explicit.
16719
16720 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16721
16722 * server.h (decode_xfer_write): Change prototype.
16723 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16724 and don't extract the annex here.
16725 * server.c (decode_xfer_read): Remove `annex' parameter,
16726 and don't extract the annex here.
16727 (decode_xfer): New.
16728 (struct qxfer): New.
16729 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16730 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16731 (handle_qxfer_statictrace): New functions, abstracted out from
16732 handle_query, and made to use the struct qxfer interface.
16733 (handle_threads_qxfer_proper): Rename to ...
16734 (handle_qxfer_threads_proper): ... this.
16735 (handle_threads_qxfer): Rename to ...
16736 (handle_qxfer_threads): ... this. Adjust.
16737 (qxfer_packets): New array.
16738 (handle_qxfer): New function.
16739 (handle_query): Use handle_qxfer.
16740
16741 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16742
16743 * gdbreplay.c: Shorten lines of >= 80 columns.
16744 * linux-low.c: Ditto.
16745 * linux-ppc-low.c: Ditto.
16746 * linux-s390-low.c: Ditto.
16747 * linux-sparc-low.c: Ditto.
16748 * linux-x86-low.c: Ditto.
16749 * linux-xtensa-low.c: Ditto.
16750 * mem-break.c: Ditto.
16751 * nto-low.c: Ditto.
16752 * regcache.h: Ditto.
16753 * remote-utils.c: Ditto.
16754 * server.c: Ditto.
16755 * server.h: Ditto.
16756 * thread-db.c: Ditto.
16757 * tracepoint.c: Ditto.
16758 * utils.c: Ditto.
16759 * win32-low.h: Ditto.
16760
16761 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16762
16763 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16764 update.
16765
16766 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16767
16768 * server.c (gdbserver_version): Update copyright year in version
16769 output.
16770 * gdbreplay.c (gdbreplay_version): Ditto.
16771
16772 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16773
16774 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16775 * linux-bfin-low.c: New file.
16776 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16777 PT_DATA_ADDR for BFIN targets.
16778 * Makefile.in (SFILES): Add linux-bfin-low.c.
16779 (clean): Remove reg-bfin.c.
16780 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16781 * README: Mention supported Blackfin targets.
16782
16783 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16784
16785 * .gitignore: New file.
16786
16787 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16788
16789 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16790
16791 2010-10-22 Jie Zhang <jie@codesourcery.com>
16792
16793 * Makefile.in: Add FLAGS_TO_PASS variable.
16794 (install): Remove dependency of install-only and recursively
16795 invoke make for install-only.
16796
16797 2010-10-04 Doug Evans <dje@google.com>
16798
16799 * Makefile.in (uninstall): Use $(DESTDIR).
16800
16801 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16802
16803 PR gdb/11842
16804
16805 * linux-x86-low.c (compat_siginfo_from_siginfo)
16806 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16807 si_code is < 0. Check for si_code == SI_TIMER before checking for
16808 si_code < 0.
16809
16810 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16811
16812 * lynx-i386-low.c: New file.
16813 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16814
16815 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16816
16817 * lynx-low.c (ptrace_request_to_str): Remove handling for
16818 request values that have been removed in LynxOS 5.x.
16819
16820 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16821
16822 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16823 <ptrace.h>
16824
16825 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16826
16827 * configure.ac: Add --enable-inprocess-agent option.
16828 * configure: Rebuilt.
16829
16830 2010-09-06 Yao Qi <yao@codesourcery.com>
16831
16832 * linux-low.c (linux_kill): Remove unused variable.
16833 (linux_stabilize_threads): Likewise.
16834 * server.c (start_inferior): Likewise.
16835 (queue_stop_reply_callback): Likewise.
16836 * tracepoint.c (do_action_at_tracepoint): Likewise.
16837
16838 2010-09-06 Yao Qi <yao@codesourcery.com>
16839
16840 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16841 on return.
16842
16843 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16844
16845 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16846
16847 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16848
16849 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16850 "$(IPA_DEPFILES)".
16851
16852 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16853
16854 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16855 gdbserver/lynx-ppc-low.c: New files.
16856 * Makefile.in (lynx_low_h): New variable.
16857 (lynx-low.o, lynx-ppc-low.o): New rules.
16858 * configure.ac: On LynxOS, link with -lnetinet.
16859 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16860 * configure: regenerate.
16861
16862 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16863
16864 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16865 * configure.ac: Add check for vasprintf and vsnprintf.
16866 * configure, config.in: Regenerate.
16867 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16868
16869 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16870
16871 * gdbreplay.c: Move include of alloca.h up, next to include of
16872 malloc.h.
16873 * server.h: Add include of malloc.h.
16874 * mem-break.c: Remove include of malloc.h.
16875 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16876
16877 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16878
16879 * Makefile.in (memmem.o): Build with -Wno-error.
16880
16881 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16882
16883 * utils.c (xsnprintf): Make non-static.
16884 * server.h: Add xsnprintf declaration.
16885 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16886 replace calls to snprintf by calls to xsnprintf throughout.
16887
16888 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16889
16890 * configure.ac: Add configure check for alloca.
16891 * configure, config.in: Regenerate.
16892 * server.h: Include alloca.h if it exists.
16893 * gdbreplay.c: Include alloca.h if it exists.
16894
16895 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16896
16897 * linux-low.c (__SIGRTMIN): Define if not already defined.
16898 (linux_create_inferior): Check for __ANDROID__ rather than
16899 __SIGRTMIN.
16900 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16901 are already deferred.
16902 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16903 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16904 stopped and already has a pending signal to report.
16905 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16906 a pending signal to report or is moving out of a jump pad.
16907 (linux_init_signals): Check for __ANDROID__ rather than
16908 __SIGRTMIN.
16909
16910 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16911
16912 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16913 debug_threads check. Avoid a linear search when not doing debug
16914 output.
16915
16916 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16917
16918 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16919 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16920 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16921 (process_event): Change local fd's type to gdb_fildes_t.
16922 (create_file_handler): Adjust prototype.
16923 (delete_file_handler): Adjust prototype.
16924 (handle_file_event): Adjust prototype. Use pfildes.
16925 (create_file_event): Adjsut prototype.
16926 * remote-utils.c (remote_desc, listen_desc): Change type to
16927 gdb_fildes_t.
16928 * server.h: New gdb_fildes_t typedef.
16929 [USE_WIN32API]: Include winsock2.h.
16930 (delete_file_handler, add_file_handler): Adjust prototypes.
16931 (pfildes): Declare.
16932 * utils.c (pfildes): New.
16933
16934 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16935
16936 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16937 * configure: Regenerate.
16938
16939 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16940
16941 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16942 (linux_done_accessing_memory): ... this.
16943 (linux_target_ops): Adjust.
16944 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16945 * nto-low.c (nto_target_ops): Adjust comment.
16946 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16947 * spu-low.c (spu_target_ops): Adjust comment.
16948 * target.h (target_ops): Rename unprepare_to_access_memory field
16949 to done_accessing_memory.
16950 (unprepare_to_access_memory): Rename to ...
16951 (done_accessing_memory): ... this.
16952
16953 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16954
16955 * linux-low.c (linux_prepare_to_access_memory): New.
16956 (linux_unprepare_to_access_memory): New.
16957 (linux_target_ops): Install them.
16958 * server.c (read_memory): Rename to ...
16959 (gdb_read_memory): ... this. Use
16960 prepare_to_access_memory/prepare_to_access_memory.
16961 (write_memory): Rename to ...
16962 (gdb_write_memory): ... this. Use
16963 prepare_to_access_memory/prepare_to_access_memory.
16964 (handle_search_memory_1): Adjust.
16965 (process_serial_event): Adjust.
16966 * target.h (struct target_ops): New fields
16967 prepare_to_access_memory and unprepare_to_access_memory.
16968 (prepare_to_access_memory, unprepare_to_access_memory): New.
16969 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16970 prepare_to_access_memory/prepare_to_access_memory.
16971 * nto-low.c (nto_target_ops): Adjust.
16972 * spu-low.c (spu_target_ops): Adjust.
16973 * win32-low.c (win32_target_ops): Adjust.
16974
16975 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16976
16977 * Makefile.in (WARN_CFLAGS): Get it from configure.
16978 (WERROR_CFLAGS): New.
16979 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16980 * configure.ac: Introduce --enable-werror, which adds -Werror to
16981 the compiler command line. Enabled by default. Disable with
16982 --disable-werror. Add -Wdeclaration-after-statement
16983 Wpointer-arith and -Wformat-nonliteral to warning flags.
16984 * configure: Regenerate.
16985
16986 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16987
16988 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16989
16990 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16991
16992 * gdbreplay.c (remote_error): New.
16993 (gdbchar): New.
16994 (expect): Use gdbchar. Check for error reading from GDB.
16995 Clarify sync error output.
16996 (play): Check for errors writing to GDB.
16997 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16998 * remote-utils.c (getpkt): Check for errors writing to the remote
16999 descriptor.
17000
17001 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17002
17003 * linux-low.c (linux_wait_1): Move non-debugging code out of
17004 `debug_threads' control.
17005
17006 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17007
17008 * linux-low.c (linux_wait_1): Don't set last_status here.
17009 * server.c (push_event, queue_stop_reply_callback): Assert we're
17010 not pushing a TARGET_WAITKIND_IGNORE event.
17011 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17012 (myresume, handle_target_event): Set the thread's last_resume_kind
17013 and last_status from the target returned status.
17014
17015 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17016
17017 PR threads/10729
17018
17019 * linux-x86-low.c (update_debug_registers_callback): New.
17020 (i386_dr_low_set_addr): Use it.
17021 (i386_dr_low_get_addr): New.
17022 (i386_dr_low_set_control): Use update_debug_registers_callback.
17023 (i386_dr_low_get_control): New.
17024 (i386_dr_low_get_status): Adjust.
17025 * linux-low.c (linux_stop_lwp): New.
17026 * linux-low.h (linux_stop_lwp): Declare.
17027
17028 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17029 argument instead of a i386_debug_reg_state.
17030 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17031 a i386_debug_reg_state.
17032 (i386_insert_aligned_watchpoint): Adjust.
17033 (i386_remove_aligned_watchpoint): Adjust.
17034 (i386_low_stopped_data_address): Read the debug registers from the
17035 inferior instead of from the mirrors.
17036 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17037 (i386_dr_low_get_addr): Declare.
17038 (i386_dr_low_get_control): Declare.
17039 (i386_dr_low_get_status): Change prototype.
17040
17041 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17042 (i386_dr_low_get_addr): New.
17043 (i386_dr_low_get_control): New.
17044 (i386_dr_low_get_status): Adjust prototype. Return
17045 dr_status_mirror.
17046 (i386_initial_stuff): Clear dr_status_mirror and
17047 dr_control_mirror.
17048 (i386_get_thread_context): Adjust.
17049 (i386_set_thread_context): Adjust.
17050 (i386_thread_added): Adjust.
17051
17052 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17053
17054 * linux-low.h (linux_thread_area): Delete declaration.
17055
17056 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17057
17058 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17059 after its termination.
17060
17061 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17062
17063 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17064 (gdb_wants_all_stopped): Delete.
17065 (linux_wait_1): Don't call them.
17066 * server.c (handle_v_cont): Tag all threads as want-stopped.
17067 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17068 stopped as "client-wants-stopped".
17069
17070 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17071
17072 * Makefile.in (signals_h): New.
17073 (server_h): Depend on it.
17074 (server.o): Don't depend on $(signals_def).
17075 (signals.o): Depend on $(signals_def).
17076
17077 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17078
17079 * Makefile.in (signals_def): New.
17080 (server_h): Append include/gdb/signals.h and signals_def.
17081 (server.o): Append signals_def.
17082
17083 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17084
17085 * server.c (handle_target_event): Use target_signal_to_host for
17086 resume_info.sig initialization.
17087 * target.h (struct thread_resume) <sig>: New comment.
17088
17089 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17090
17091 * server.c (handle_query): strcpy() the returned string from paddress()
17092 instead of sprintf().
17093 * utils.c (paddress): Return phex_nz().
17094
17095 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17096
17097 * server.c (handle_v_cont): Call mourn_inferior if process
17098 just exited.
17099 (myresume): Likewise.
17100
17101 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17102
17103 Static tracepoints, and integration with UST.
17104
17105 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17106 * mem-break.c (uninsert_all_breakpoints)
17107 (reinsert_all_breakpoints): New.
17108 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17109 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17110 (gdb_agent_ust_loaded, helper_thread_id)
17111 (gdb_agent_helper_thread_id): New macros.
17112 (struct ipa_sym_addresses): Add addr_ust_loaded,
17113 addr_helper_thread_id, addr_cmd_buf.
17114 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17115 (in_process_agent_loaded_ust): New.
17116 (write_e_ust_not_loaded): New.
17117 (maybe_write_ipa_ust_not_loaded): New.
17118 (struct collect_static_trace_data_action): New.
17119 (enum tracepoint_type) <static_tracepoint>: New.
17120 (struct tracepoint) <handle>: Mention static tracepoints.
17121 (struct static_tracepoint_ctx): New.
17122 (CMD_BUF_SIZE): New.
17123 (add_tracepoint_action): Handle static tracepoint actions.
17124 (unprobe_marker_at): New.
17125 (clear_installed_tracepoints): Handle static tracepoints.
17126 (cmd_qtdp): Handle static tracepoints.
17127 (probe_marker_at): New.
17128 (cmd_qtstart): Handle static tracepoints.
17129 (response_tracepoint): Handle static tracepoints.
17130 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17131 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17132 (get_context_regcache): Handle static tracepoints.
17133 (do_action_at_tracepoint): Handle static tracepoint actions.
17134 (traceframe_find_block_type): Handle static trace data blocks.
17135 (traceframe_read_sdata): New.
17136 (download_tracepoints): Download static tracepoint actions.
17137 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17138 (GDB_PROBE_NAME): New.
17139 (ust_ops): New.
17140 (GET_UST_SYM): New.
17141 (USTF): New.
17142 (dlsym_ust): New.
17143 (ust_marker_to_static_tracepoint): New.
17144 (gdb_probe): New.
17145 (collect_ust_data_at_tracepoint): New.
17146 (gdb_ust_probe): New.
17147 (UNIX_PATH_MAX, SOCK_DIR): New.
17148 (gdb_ust_connect_sync_socket): New.
17149 (resume_thread, stop_thread): New.
17150 (run_inferior_command): New.
17151 (init_named_socket): New.
17152 (gdb_ust_socket_init): New.
17153 (cstr_to_hexstr): New.
17154 (next_st): New.
17155 (first_marker, next_marker): New.
17156 (response_ust_marker): New.
17157 (cmd_qtfstm, cmd_qtsstm): New.
17158 (unprobe_marker_at, probe_marker_at): New.
17159 (cmd_qtstmat, gdb_ust_thread): New.
17160 (gdb_ust_init): New.
17161 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17162 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17163 (ST_REGENTRY): New.
17164 (x86_64_st_collect_regmap): New.
17165 (X86_64_NUM_ST_COLLECT_GREGS): New.
17166 (AMD64_RIP_REGNUM): New.
17167 (supply_static_tracepoint_registers): New.
17168 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17169 (ST_REGENTRY): New.
17170 (i386_st_collect_regmap): New.
17171 (i386_NUM_ST_COLLECT_GREGS): New.
17172 (supply_static_tracepoint_registers): New.
17173 * server.c (handle_query): Handle qXfer:statictrace:read.
17174 <qSupported>: Report support for StaticTracepoints, and
17175 qXfer:statictrace:read features.
17176 * server.h (traceframe_read_sdata)
17177 (supply_static_tracepoint_registers): Declare.
17178 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17179 (unpack_varlen_hex): Include in IPA build.
17180 * Makefile.in (ustlibs, ustinc): New.
17181 (IPA_OBJS): Add remote-utils-ipa.o.
17182 ($(IPA_LIB)): Link -ldl and -lpthread.
17183 (UST_CFLAGS): New.
17184 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17185 * config.in, configure: Regenerate.
17186
17187 2010-06-20 Ian Lance Taylor <iant@google.com>
17188 Pedro Alves <pedro@codesourcery.com>
17189
17190 * linux-x86-low.c (always_true): Delete.
17191 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17192 trying to fool the compiler with always_true.
17193
17194 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17195
17196 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17197 conditions in gdbserver.
17198
17199 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17200
17201 * spu-low.c (spu_read_memory): Wrap around local store limit.
17202 (spu_write_memory): Likewise.
17203
17204 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17205
17206 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17207 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17208 LONGEST uses.
17209 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17210 uses.
17211 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17212 uses with LONGEST uses.
17213
17214 2010-06-14 Stan Shebs <stan@codesourcery.com>
17215 Pedro Alves <pedro@codesourcery.com>
17216
17217 Bytecode compiler.
17218
17219 * linux-x86-low.c: Include limits.h.
17220 (add_insns): New.
17221 (always_true): New.
17222 (EMIT_ASM): New.
17223 (EMIT_ASM32): New.
17224 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17225 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17226 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17227 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17228 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17229 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17230 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17231 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17232 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17233 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17234 (amd64_emit_void_call_2): New.
17235 (amd64_emit_ops): New.
17236 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17237 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17238 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17239 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17240 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17241 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17242 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17243 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17244 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17245 (i386_emit_stack_adjust, i386_emit_int_call_1)
17246 (i386_emit_void_call_2): New.
17247 (i386_emit_ops): New.
17248 (x86_emit_ops): New.
17249 (the_low_target): Install x86_emit_ops.
17250 * server.h (struct emit_ops): New.
17251 (get_raw_reg_func_addr): Declare.
17252 (current_insn_ptr, emit_error): Declare.
17253 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17254 (set_trace_state_variable_value): New defines.
17255 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17256 addr_get_trace_state_variable_value and
17257 addr_set_trace_state_variable_value.
17258 (symbol_list): New fields for get_raw_reg,
17259 get_trace_state_variable_value and set_trace_state_variable_value.
17260 (condfn): New typedef.
17261 (struct tracepoint): New field `compiled_cond'.
17262 (do_action_at_tracepoint): Clear compiled_cond.
17263 (get_trace_state_variable_value, set_trace_state_variable_value):
17264 Export in the IPA.
17265 (condition_true_at_tracepoint): If there's a compiled condition,
17266 run that.
17267 (current_insn_ptr, emit_error): New globals.
17268 (struct bytecode_address): New.
17269 (get_raw_reg_func_addr): New.
17270 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17271 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17272 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17273 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17274 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17275 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17276 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17277 (compile_tracepoint_condition, compile_bytecodes): New.
17278 * target.h (emit_ops): Forward declare.
17279 (struct target_ops): New field emit_ops.
17280 (target_emit_ops): New.
17281 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17282 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17283 * linux-low.c (linux_emit_ops): New.
17284 (linux_target_ops): Install it.
17285 * linux-low.h (struct linux_target_ops): New field emit_ops.
17286
17287 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17288
17289 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17290 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17291
17292 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17293 Stan Shebs <stan@codesourcery.com>
17294
17295 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17296 (all): Depend on $(extra_libraries).
17297 (install-only): Install the IPA.
17298 (IPA_OBJS, IPA_LIB): New.
17299 (clean): Remove the IPA lib.
17300 (IPAGENT_CFLAGS): New.
17301 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17302 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17303 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17304 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17305 * configure.ac: Check for atomic builtins support in the compiler.
17306 (IPA_DEPFILES, extra_libraries): Define.
17307 * configure.srv (ipa_obj): Add description.
17308 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17309 (i[34567]86-*-linux*): Set ipa_obj.
17310 (x86_64-*-linux*): Set ipa_obj.
17311 * linux-low.c (stabilizing_threads): New.
17312 (supports_fast_tracepoints): New.
17313 (linux_detach): Stabilize threads before detaching.
17314 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17315 the lwp is either not stabilizing, or is moving out of a jump pad.
17316 (linux_fast_tracepoint_collecting): New.
17317 (maybe_move_out_of_jump_pad): New.
17318 (enqueue_one_deferred_signal): New.
17319 (dequeue_one_deferred_signal): New.
17320 (linux_wait_for_event_1): If moving out of a jump pad, defer
17321 pending signals to later.
17322 (linux_stabilize_threads): New.
17323 (linux_wait_1): Check if threads need moving out of jump pads, and
17324 do it if so.
17325 (stuck_in_jump_pad_callback): New.
17326 (move_out_of_jump_pad_callback): New.
17327 (lwp_running): New.
17328 (linux_resume_one_lwp): Handle moving out of jump pads.
17329 (linux_set_resume_request): Dequeue deferred signals.
17330 (need_step_over_p): Also step over fast tracepoint jumps.
17331 (start_step_over): Also uninsert fast tracepoint jumps.
17332 (finish_step_over): Also reinsert fast tracepoint jumps.
17333 (linux_install_fast_tracepoint_jump): New.
17334 (linux_target_ops): Install linux_stabilize_threads and
17335 linux_install_fast_tracepoint_jump_pad.
17336 * linux-low.h (linux_target_ops) <get_thread_area,
17337 install_fast_tracepoint_jump_pad>: New fields.
17338 (struct lwp_info) <collecting_fast_tracepoint,
17339 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17340 (linux_get_thread_area): Declare.
17341 * linux-x86-low.c (jump_insn): New.
17342 (x86_get_thread_area): New.
17343 (append_insns): New.
17344 (push_opcode): New.
17345 (amd64_install_fast_tracepoint_jump_pad): New.
17346 (i386_install_fast_tracepoint_jump_pad): New.
17347 (x86_install_fast_tracepoint_jump_pad): New.
17348 (the_low_target): Install x86_get_thread_area and
17349 x86_install_fast_tracepoint_jump_pad.
17350 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17351 (struct fast_tracepoint_jump): New.
17352 (fast_tracepoint_jump_insn): New.
17353 (fast_tracepoint_jump_shadow): New.
17354 (find_fast_tracepoint_jump_at): New.
17355 (fast_tracepoint_jump_here): New.
17356 (delete_fast_tracepoint_jump): New.
17357 (set_fast_tracepoint_jump): New.
17358 (uninsert_fast_tracepoint_jumps_at): New.
17359 (reinsert_fast_tracepoint_jumps_at): New.
17360 (set_breakpoint_at): Use write_inferior_memory.
17361 (uninsert_raw_breakpoint): Use write_inferior_memory.
17362 (check_mem_read): Mask out fast tracepoint jumps.
17363 (check_mem_write): Mask out fast tracepoint jumps.
17364 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17365 (set_fast_tracepoint_jump): Declare.
17366 (delete_fast_tracepoint_jump)
17367 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17368 (reinsert_fast_tracepoint_jumps_at): Declare.
17369 * regcache.c: Don't compile many functions when building the
17370 in-process agent library.
17371 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17372 the register buffer in the heap.
17373 (free_register_cache): If the register buffer isn't owned by the
17374 regcache, don't free it.
17375 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17376 pre-existing register caches.
17377 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17378 type.
17379 (convert_ascii_to_int): : Constify `from' parameter type.
17380 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17381 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17382 the needed buffer in-place.
17383 (relocate_instruction): New.
17384 * server.c (handle_query) <qSymbols>: If the target supports
17385 tracepoints, give it a chance of looking up symbols. Report
17386 support for fast tracepoints.
17387 (handle_status): Stabilize threads.
17388 (process_serial_event): Adjust.
17389 * server.h (struct fast_tracepoint_jump): Forward declare.
17390 (struct process_info) <fast_tracepoint_jumps>: New field.
17391 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17392 (decode_X_packet, decode_M_packet): Adjust.
17393 (relocate_instruction): Declare.
17394 (in_process_agent_loaded): Declare.
17395 (tracepoint_look_up_symbols): Declare.
17396 (struct fast_tpoint_collect_status): Declare.
17397 (fast_tracepoint_collecting): Declare.
17398 (force_unlock_trace_buffer): Declare.
17399 (handle_tracepoint_bkpts): Declare.
17400 (initialize_low_tracepoint)
17401 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17402 * target.h (struct target_ops) <stabilize_threads,
17403 install_fast_tracepoint_jump_pad>: New fields.
17404 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17405 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17406 [HAVE_STDINT_H]: Include stdint.h.
17407 (trace_debug_1): Rename to ...
17408 (trace_vdebug): ... this.
17409 (trace_debug): Rename to ...
17410 (trace_debug_1): ... this. Add `level' parameter.
17411 (trace_debug): New.
17412 (ATTR_USED, ATTR_NOINLINE): New.
17413 (IP_AGENT_EXPORT): New.
17414 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17415 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17416 (about_to_request_buffer_space, trace_buffer_is_full)
17417 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17418 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17419 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17420 (traceframe_write_count, traceframes_created)
17421 (trace_state_variables)
17422 New renaming defines.
17423 (struct ipa_sym_addresses): New.
17424 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17425 (symbol_list): New.
17426 (ipa_sym_addrs): New.
17427 (all_tracepoint_symbols_looked_up): New.
17428 (in_process_agent_loaded): New.
17429 (write_e_ipa_not_loaded): New.
17430 (maybe_write_ipa_not_loaded): New.
17431 (tracepoint_look_up_symbols): New.
17432 (debug_threads) [IN_PROCESS_AGENT]: New.
17433 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17434 (UNKNOWN_SIDE_EFFECTS): New.
17435 (stop_tracing): New.
17436 (flush_trace_buffer): New.
17437 (stop_tracing_bkpt): New.
17438 (flush_trace_buffer_bkpt): New.
17439 (read_inferior_integer): New.
17440 (read_inferior_uinteger): New.
17441 (read_inferior_data_pointer): New.
17442 (write_inferior_data_pointer): New.
17443 (write_inferior_integer): New.
17444 (write_inferior_uinteger): New.
17445 (struct collect_static_trace_data_action): Delete.
17446 (enum tracepoint_type): New.
17447 (struct tracepoint) <type>: New field `type'.
17448 <actions_str, step_actions, step_actions_str>: Only include in
17449 GDBserver.
17450 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17451 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17452 (tracepoints): Use IP_AGENT_EXPORT.
17453 (last_tracepoint): Don't include in the IPA.
17454 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17455 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17456 (alloced_trace_state_variables): New.
17457 (trace_state_variables): Use IP_AGENT_EXPORT.
17458 (traceframe_t): Delete unused variable.
17459 (circular_trace_buffer): Don't include in the IPA.
17460 (trace_buffer_start): Delete.
17461 (struct trace_buffer_control): New.
17462 (trace_buffer_free): Delete.
17463 (struct ipa_trace_buffer_control): New.
17464 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17465 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17466 New.
17467 (trace_buffer_ctrl): New.
17468 (TRACE_BUFFER_CTRL_CURR): New.
17469 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17470 Reimplement as macros.
17471 (trace_buffer_wrap): Delete.
17472 (traceframe_write_count, traceframe_read_count)
17473 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17474 (struct tracepoint_hit_ctx) <type>: New field.
17475 (struct fast_tracepoint_ctx): New.
17476 (memory_barrier): New.
17477 (cmpxchg): New.
17478 (record_tracepoint_error): Update atomically in the IPA.
17479 (clear_inferior_trace_buffer): New.
17480 (about_to_request_buffer_space): New.
17481 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17482 updating the same buffer.
17483 (add_tracepoint): Default the tracepoint's type to trap
17484 tracepoint, and orig_size to -1.
17485 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17486 internal variables.
17487 (create_trace_state_variable): New parameter `gdb'. Handle it.
17488 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17489 (cmd_qtdp): Handle fast tracepoints.
17490 (cmd_qtdv): Adjust.
17491 (max_jump_pad_size): New.
17492 (gdb_jump_pad_head): New.
17493 (get_jump_space_head): New.
17494 (claim_jump_space): New.
17495 (sort_tracepoints): New.
17496 (MAX_JUMP_SIZE): New.
17497 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17498 IPA.
17499 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17500 support. Upload fast traceframes, and delete internal IPA
17501 breakpoints.
17502 (stop_tracing_handler): New.
17503 (flush_trace_buffer_handler): New.
17504 (cmd_qtstop): Upload fast tracepoints.
17505 (response_tracepoint): Handle fast tracepoints.
17506 (tracepoint_finished_step): Upload fast traceframes. Set the
17507 tracepoint hit context's tracepoint type.
17508 (handle_tracepoint_bkpts): New.
17509 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17510 type. Add comment about fast tracepoints.
17511 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17512 non-existing action_str field.
17513 (get_context_regcache): Handle fast tracepoints.
17514 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17515 to the regcache.
17516 (fast_tracepoint_from_jump_pad_address): New.
17517 (fast_tracepoint_from_ipa_tpoint_address): New.
17518 (collecting_t): New.
17519 (force_unlock_trace_buffer): New.
17520 (fast_tracepoint_collecting): New.
17521 (collecting): New.
17522 (gdb_collect): New.
17523 (write_inferior_data_ptr): New.
17524 (target_tp_heap): New.
17525 (target_malloc): New.
17526 (download_agent_expr): New.
17527 (UALIGN): New.
17528 (download_tracepoints): New.
17529 (download_trace_state_variables): New.
17530 (upload_fast_traceframes): New.
17531 (IPA_FIRST_TRACEFRAME): New.
17532 (IPA_NEXT_TRACEFRAME_1): New.
17533 (IPA_NEXT_TRACEFRAME): New.
17534 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17535 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17536 (gdb_jump_pad_buffer_end): New.
17537 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17538 (initialize_tracepoint): Adjust.
17539 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17540 buffer. Initialize the low module.
17541 * utils.c (PREFIX, TOOLNAME): New.
17542 (malloc_failure): Use PREFIX.
17543 (error): In the IPA, an error causes an exit.
17544 (fatal, warning): Use PREFIX.
17545 (internal_error): Use TOOLNAME.
17546 (NUMCELLS): Increase to 10.
17547 * configure, config.in: Regenerate.
17548
17549 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17550
17551 * server.c (handle_query) <qSupported>: Do two passes over the
17552 qSupported string to avoid nesting strtok.
17553
17554 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17555
17556 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17557 (CDEPS): New.
17558 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17559 -Wl,--dynamic-list.
17560 * configure: Regenerate.
17561 * proc-service.list: New.
17562
17563 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17564
17565 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17566 New comment.
17567
17568 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17569
17570 * gdbreplay.c (remote_open): Check error return from socket() call by
17571 its equality to -1 not by it being negative.
17572 * remote-utils.c (remote_open): Likewise.
17573
17574 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17575
17576 * config.h: Regenerate.
17577
17578 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17579
17580 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17581 doesn't provide PTRACE_GET_THREAD_AREA.
17582
17583 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17584
17585 * linux-m68k-low.c: Include <asm/ptrace.h>
17586 (ps_get_thread_area): Implement.
17587
17588 2010-05-03 Doug Evans <dje@google.com>
17589
17590 * event-loop.c (struct callback_event): New struct.
17591 (callback_list): New global.
17592 (append_callback_event, delete_callback_event): New functions.
17593 (process_callback): New function.
17594 (start_event_loop): Call it.
17595 * remote-utils.c (NOT_SCHEDULED): Define.
17596 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17597 moved out of readchar.
17598 (readchar): Rewrite. Call reschedule before returning.
17599 (reset_readchar): New function.
17600 (remote_close): Call it.
17601 (process_remaining, reschedule): New functions.
17602 * server.h (callback_handler_func): New typedef.
17603 (append_callback_event, delete_callback_event): Declare.
17604
17605 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17606
17607 * proc-service.c (ps_pglobal_lookup): Use
17608 thread_db_look_up_one_symbol.
17609 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17610 parameter. Use it instead of all_symbols_looked_up.
17611 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17612 field.
17613 (all_symbols_looked_up): Don't declare.
17614 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17615 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17616 field.
17617 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17618 Set all_symbols_looked_up here.
17619 (thread_db_look_up_one_symbol): New.
17620 (thread_db_get_tls_address): Adjust.
17621 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17622 thread_db object on the heap, and tentatively set it in the
17623 process structure.
17624 (thread_db_init): Don't set all_symbols_looked_up here.
17625 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17626
17627 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17628
17629 * linux-low.c (linux_kill, linux_detach): Adjust.
17630 (status_pending_p_callback): Remove redundant statement. Check
17631 for !TARGET_WAITIKIND_IGNORE, instead of
17632 TARGET_WAITKIND_STOPPED.
17633 (handle_tracepoints): Make sure LWP is locked. Adjust.
17634 (linux_wait_for_event_1): Adjust.
17635 (linux_cancel_breakpoints): New.
17636 (unsuspend_one_lwp): New.
17637 (unsuspend_all_lwps): New.
17638 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17639 (send_sigstop_callback): Change return type to int, add new
17640 `except' parameter and handle it.
17641 (suspend_and_send_sigstop_callback): New.
17642 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17643 pass them down. If SUSPEND, also increment the lwp's suspend
17644 count.
17645 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17646 (need_step_over_p): Don't consider suspended LWPs.
17647 (start_step_over): Adjust.
17648 (proceed_one_lwp): Change return type to int, add new `except'
17649 parameter and handle it.
17650 (unsuspend_and_proceed_one_lwp): New.
17651 (proceed_all_lwps): Use find_inferior instead of
17652 for_each_inferior.
17653 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17654 also decrement the suspend count of LWPs. Pass `except' down,
17655 instead of hacking its suspend count.
17656 (linux_pause_all): Add `freeze' parameter. Adjust.
17657 (linux_unpause_all): New.
17658 (linux_target_ops): Install linux_unpause_all.
17659 * server.c (handle_status): Adjust.
17660 * target.h (struct target_ops): New fields `unpause_all' and
17661 `cancel_breakpoints'. Add new parameter to `pause_all'.
17662 (pause_all): Add new `freeze' parameter.
17663 (unpause_all): New.
17664 (cancel_breakpoints): New.
17665 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17666 cancel breakpoints.
17667 (cmd_qtstart): Pause threads.
17668 (stop_tracing): Pause threads, and cancel breakpoints.
17669 * win32-low.c (win32_target_ops): Adjust.
17670
17671 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17672
17673 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17674 the inferior right away from here...
17675 (linux_wait_1): ... to here, and adjust to check the thread's
17676 last_resume_kind instead of the lwp's step or stop_expected flags.
17677
17678 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17679
17680 * README: Use consistent `GDB' and `GDBserver' spellings.
17681
17682 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17683
17684 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17685 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17686 (linux_detach_one_lwp): Assume the lwp is stopped.
17687 (any_thread_of): Delete.
17688 (linux_detach): Stop all lwps here. Don't blindly delete all
17689 breakpoints.
17690 (delete_lwp_callback): New.
17691 (linux_mourn): Delete all lwps of the process that is gone.
17692 (linux_wait_1): Don't delete the last lwp of the process here.
17693 * mem-break.h (mark_breakpoints_out): Declare.
17694 * mem-break.c (mark_breakpoints_out): New.
17695 (free_all_breakpoints): Use it.
17696 * server.c (handle_target_event): If the process is gone, mark
17697 breakpoints out.
17698 * thread-db.c (struct thread_db) <create_bp>: New field.
17699 (thread_db_enable_reporting): Fix prototype. Store a thread event
17700 breakpoint reference in the thread_db struct.
17701 (thread_db_load_search): Clear the thread_db object.
17702 (try_thread_db_load_1): Ditto.
17703 (switch_to_process): New.
17704 (disable_thread_event_reporting): Use it.
17705 (remove_thread_event_breakpoints): New.
17706 (thread_db_detach, thread_db_mourn): Use it.
17707
17708 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17709
17710 * linux-low.c (linux_enable_event_reporting): New.
17711 (linux_wait_for_event_1, handle_extended_wait): Use it.
17712
17713 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17714
17715 * linux-low.c (linux_kill_one_lwp, linux_kill)
17716 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17717 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17718 SIGSTOP even if the LWP is stopped.
17719 (send_sigstop_callback): New.
17720 (stop_all_lwps): Use send_sigstop_callback instead.
17721 (linux_resume_one_thread): Adjust.
17722 (proceed_one_lwp): Still proceed an LWP that the client has
17723 requested to stop, if we haven't reported it as stopped yet. Make
17724 sure that LWPs the client want stopped, have a pending SIGSTOP.
17725
17726 2010-04-26 Doug Evans <dje@google.com>
17727
17728 * server.c (handle_general_set): Make static.
17729
17730 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17731 Print received char after testing for error/eof instead of before.
17732 (input_interrupt): Tweak comment.
17733
17734 2010-04-23 Doug Evans <dje@google.com>
17735
17736 * server.c (start_inferior): Print inferior argv if --debug.
17737
17738 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17739
17740 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17741 * nto-x86-low.c: Include server.h
17742
17743 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17744
17745 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17746 be consistent with other sources of this directory.
17747 (init_registers_amd64): Correct name of source file of this function
17748 in the comment.
17749
17750 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17751
17752 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17753 64-bit executables.
17754
17755 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17756
17757 * win32-i386-low.c: Add 64-bit support.
17758 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17759 (init_registers_amd64): Declare.
17760 (mappings): Add 64-bit version of array.
17761 (init_windows_x86): New function.
17762 (the_low_target): Change init_arch field to init_windows_x86.
17763
17764 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17765
17766 * win32-low.c: Adapt to support also 64-bit architecture.
17767 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17768 (get_image_name): Use SIZE_T type for local variable `done'.
17769 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17770 (toolhelp_get_dll_name): Idem.
17771 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17772 Use uintptr_t typecast to avoid warning.
17773 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17774 (handle_exception): Use phex_nz to avoid warning.
17775 (win32_wait): Remove unused local variable `process'.
17776
17777 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17778
17779 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17780 `amd64-avx.o'.
17781
17782 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17783
17784 * configure.ac: Use `ws2_32' library for srv_mingw.
17785 * configure: Regenerate.
17786 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17787 * remote-utils.c: Likewise.
17788
17789 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17790
17791 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17792 if __x86_64__ is defined.
17793
17794 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17795
17796 * configure: Regenerate.
17797
17798 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17799
17800 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17801 * target.h (target_ops): New get_tib_address field.
17802 * win32-low.h (win32_thread_info): Add thread_local_base field.
17803 * win32-low.c (child_add_thread): Add tlb argument.
17804 Set thread_local_base field to TLB.
17805 (get_child_debug_event): Adapt to child_add_thread change.
17806 (win32_get_tib_address): New function.
17807 (win32_target_ops): Set get_tib_address field to
17808 win32_get_tib_address.
17809 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17810
17811 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17812
17813 * linux-low.c (linux_mourn): Also remove the process.
17814 * server.c (handle_target_event): Don't remove the process here.
17815 * nto-low.c (nto_mourn): New.
17816 (nto_target_ops): Install it.
17817 * spu-low.c (spu_mourn): New.
17818 (spu_target_ops): Install it.
17819 * win32-low.c (win32_mourn): New.
17820 (win32_target_ops): Install it.
17821
17822 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17823
17824 * server.h (buffer_xml_printf): Remove redundant `;'.
17825
17826 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17827
17828 * regcache.c (set_register_cache): Invalidate regcaches before
17829 changing the register cache layout.
17830 (regcache_invalidate_one): Allow a NULL regcache.
17831 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17832 regcaches before changing the register cache layout or the target
17833 regsets.
17834
17835 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17836
17837 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17838 variable warning on Linux/x86-64.
17839
17840 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17841
17842 GDBserver disconnected tracing support.
17843
17844 * linux-low.c (linux_remove_process): Delete.
17845 (add_lwp): Don't set last_resume_kind here.
17846 (linux_kill): Use `mourn'.
17847 (linux_detach): Use `thread_db_detach', and `mourn'.
17848 (linux_mourn): New.
17849 (linux_attach_lwp_1): Adjust comment.
17850 (linux_attach): last_resume_kind moved the thread_info; adjust.
17851 (status_pending_p_callback): Adjust.
17852 (linux_wait_for_event_1): Adjust.
17853 (count_events_callback, select_singlestep_lwp_callback)
17854 (select_event_lwp_callback, cancel_breakpoints_callback)
17855 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17856 (proceed_one_lwp): Adjust.
17857 (linux_async): Add debug output.
17858 (linux_thread_stopped): New.
17859 (linux_pause_all): New.
17860 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17861 linux_pause_all.
17862 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17863 (thread_db_free): Delete declaration.
17864 (thread_db_detach, thread_db_mourn): Declare.
17865 * thread-db.c (thread_db_init): Use thread_db_mourn.
17866 (thread_db_free): Delete, split in two.
17867 (disable_thread_event_reporting): New.
17868 (thread_db_detach): New.
17869 (thread_db_mourn): New.
17870
17871 * server.h (struct thread_info) <last_resume_kind>: New field.
17872 <attached>: Add comment.
17873 <gdb_detached>: New field.
17874 (handler_func): Change return type to int.
17875 (handle_serial_event, handle_target_event): Ditto.
17876 (gdb_connected): Declare.
17877 (tracing): Delete.
17878 (disconnected_tracing): Declare.
17879 (stop_tracing): Declare.
17880
17881 * server.c (handle_query) <qSupported>: Report support for
17882 disconnected tracing.
17883 (queue_stop_reply_callback): Account for running threads.
17884 (gdb_wants_thread_stopped): New.
17885 (gdb_wants_all_threads_stopped): New.
17886 (gdb_reattached_process): New.
17887 (handle_status): Clear the `gdb_detached' flag of all processes.
17888 In all-stop, stop all threads.
17889 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17890 (process_serial_event): If the remote connection breaks, or if an
17891 exit was forced with "monitor exit", force an event loop exit.
17892 Handle disconnected tracing on detach.
17893 (handle_serial_event): Adjust.
17894 (handle_target_event): If GDB isn't connected, forward events back
17895 to the inferior, unless the last process exited, in which case,
17896 exit gdbserver. Adjust interface.
17897
17898 * remote-utils.c (remote_open): Don't block in accept. Instead
17899 register an event loop source on the listen socket file
17900 descriptor. Refactor bits into ...
17901 (listen_desc): ... this new global.
17902 (gdb_connected): ... this new function.
17903 (enable_async_notification): ... this new function.
17904 (handle_accept_event): ... this new function.
17905 (remote_close): Clear remote_desc.
17906
17907 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17908
17909 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17910 New fields.
17911 (mourn_inferior): Define.
17912 (target_process_qsupported): Avoid the dangling else problem.
17913 (thread_stopped): Define.
17914 (pause_all): Define.
17915 (target_waitstatus_to_string): Declare.
17916 * target.c (target_waitstatus_to_string): New.
17917
17918 * tracepoint.c (tracing): Make extern.
17919 (disconnected_tracing): New.
17920 (stop_tracing): Make extern. Handle tracing stops due to GDB
17921 disconnecting.
17922 (cmd_qtdisconnected): New.
17923 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17924 (handle_tracepoint_general_set): Handle QTDisconnected.
17925
17926 * event-loop.c (event_handler_func): Change return type to int.
17927 (process_event): Bail out if the event handler wants the event
17928 loop to stop.
17929 (handle_file_event): Ditto.
17930 (start_event_loop): Bail out if the event handler wants the event
17931 loop to stop.
17932
17933 * nto-low.c (nto_target_ops): Adjust.
17934 * spu-low.c (spu_wait): Don't remove the process here.
17935 (spu_target_ops): Adjust.
17936 * win32-low.c (win32_wait): Don't remove the process here.
17937 (win32_target_ops): Adjust.
17938
17939 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17940
17941 * regcache.c (realloc_register_cache): Invalidate inferior's
17942 regcache before recreating it.
17943
17944 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17945
17946 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17947
17948 2010-04-09 Stan Shebs <stan@codesourcery.com>
17949 Pedro Alves <pedro@codesourcery.com>
17950
17951 * server.h (LONGEST): New.
17952 (struct thread_info) <while_stepping>: New field.
17953 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17954 Declare.
17955 (initialize_tracepoint, handle_tracepoint_general_set)
17956 (handle_tracepoint_query, tracepoint_finished_step)
17957 (tracepoint_was_hit, release_while_stepping_state_list):
17958 (current_traceframe): Declare.
17959 * server.c (handle_general_set): Handle tracepoint packets.
17960 (read_memory): New.
17961 (write_memory): New.
17962 (handle_search_memory_1): Use read_memory.
17963 (handle_query): Report support for conditional tracepoints, trace
17964 state variables, and tracepoint sources. Handle tracepoint
17965 queries.
17966 (main): Initialize the tracepoints module.
17967 (process_serial_event): Handle traceframe reads/writes.
17968
17969 * linux-low.c (handle_tracepoints): New.
17970 (linux_wait_1): Call it.
17971 (linux_resume_one_lwp): Handle while-stepping.
17972 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17973 (linux_target_ops): Install them.
17974 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17975 New field.
17976 * linux-x86-low.c (x86_supports_tracepoints): New.
17977 (the_low_target). Install it.
17978
17979 * mem-break.h (delete_breakpoint): Declare.
17980 * mem-break.c (delete_breakpoint): Make external.
17981
17982 * target.h (struct target_ops): Add `supports_tracepoints',
17983 `read_pc', and `write_pc' fields.
17984 (target_supports_tracepoints): Define.
17985 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17986 (phex_nz): New.
17987
17988 * regcache.h (struct regcache) <registers_owned>: New field.
17989 (init_register_cache, regcache_cpy): Declare.
17990 (regcache_read_pc, regcache_write_pc): Declare.
17991 (register_cache_size): Declare.
17992 (supply_regblock): Declare.
17993 * regcache.c (init_register_cache): New.
17994 (new_register_cache): Use it.
17995 (regcache_cpy): New.
17996 (register_cache_size): New.
17997 (supply_regblock): New.
17998 (regcache_read_pc, regcache_write_pc): New.
17999
18000 * tracepoint.c: New.
18001
18002 * Makefile.in (OBS): Add tracepoint.o.
18003 (tracepoint.o): New rule.
18004
18005 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18006
18007 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18008 (i386-mmx.o): New.
18009 (i386-mmx.c): Likewise.
18010 (i386-mmx-linux.o): Likewise.
18011 (i386-mmx-linux.c): Likewise.
18012
18013 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18014 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18015 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18016 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18017
18018 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18019 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18020 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18021
18022 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18023
18024 * Makefile.in (clean): Updated.
18025 (i386-avx.o): New.
18026 (i386-avx.c): Likewise.
18027 (i386-avx-linux.o): Likewise.
18028 (i386-avx-linux.c): Likewise.
18029 (amd64-avx.o): Likewise.
18030 (amd64-avx.c): Likewise.
18031 (amd64-avx-linux.o): Likewise.
18032 (amd64-avx-linux.c): Likewise.
18033
18034 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18035 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18036 (srv_amd64_regobj): Add amd64-avx.o.
18037 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18038 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18039 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18040 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18041 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18042 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18043 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18044
18045 * i387-fp.c: Include "i386-xstate.h".
18046 (i387_xsave): New.
18047 (i387_cache_to_xsave): Likewise.
18048 (i387_xsave_to_cache): Likewise.
18049 (x86_xcr0): Likewise.
18050
18051 * i387-fp.h (i387_cache_to_xsave): Likewise.
18052 (i387_xsave_to_cache): Likewise.
18053 (x86_xcr0): Likewise.
18054
18055 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18056 * linux-crisv32-low.c (target_regsets): Likewise.
18057 * linux-m68k-low.c (target_regsets): Likewise.
18058 * linux-mips-low.c (target_regsets): Likewise.
18059 * linux-ppc-low.c (target_regsets): Likewise.
18060 * linux-s390-low.c (target_regsets): Likewise.
18061 * linux-sh-low.c (target_regsets): Likewise.
18062 * linux-sparc-low.c (target_regsets): Likewise.
18063 * linux-xtensa-low.c (target_regsets): Likewise.
18064
18065 * linux-low.c: Include <sys/uio.h>.
18066 (regsets_fetch_inferior_registers): Support nt_type.
18067 (regsets_store_inferior_registers): Likewise.
18068 (linux_process_qsupported): New.
18069 (linux_target_ops): Add linux_process_qsupported.
18070
18071 * linux-low.h (regset_info): Add nt_type.
18072 (linux_target_ops): Add process_qsupported.
18073
18074 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18075 and <sys/uio.h>.
18076 (init_registers_i386_avx_linux): New.
18077 (init_registers_amd64_avx_linux): Likewise.
18078 (xmltarget_i386_linux_no_xml): Likewise.
18079 (xmltarget_amd64_linux_no_xml): Likewise.
18080 (PTRACE_GETREGSET): Likewise.
18081 (PTRACE_SETREGSET): Likewise.
18082 (x86_fill_xstateregset): Likewise.
18083 (x86_store_xstateregset): Likewise.
18084 (use_xml): Likewise.
18085 (x86_linux_update_xmltarget): Likewise.
18086 (x86_linux_process_qsupported): Likewise.
18087 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18088 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18089 init_registers_i386_linux here. Call
18090 x86_linux_update_xmltarget.
18091 (the_low_target): Add x86_linux_process_qsupported.
18092
18093 * server.c (handle_query): Call target_process_qsupported.
18094
18095 * target.h (target_ops): Add process_qsupported.
18096 (target_process_qsupported): New.
18097
18098 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18099
18100 * inferiors.c (add_thread): Set last_status kind to
18101 TARGET_WAITKIND_IGNORE.
18102 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18103 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18104 (linux_wait_1): Move `thread' local definition to block that uses
18105 it. Don't NULL initialize `event_child'.
18106 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18107 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18108 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18109
18110 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18111
18112 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18113 an extended waitstatus, or by a watchpoint.
18114 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18115 thread was stepping or has been stopped by a watchpoint.
18116
18117 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18118
18119 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18120 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18121 of another, then delete the previous, and validate all
18122 breakpoints.
18123 (validate_inserted_breakpoint): New.
18124 (delete_disabled_breakpoints): New.
18125 (validate_breakpoints): New.
18126 (check_mem_read): Validate breakpoints before trusting their
18127 shadow. Delete disabled breakpoints.
18128 (check_mem_write): Validate breakpoints before trusting they
18129 should be inserted. Delete disabled breakpoints.
18130 * mem-break.h (validate_breakpoints):
18131 * server.c (handle_query): Validate breakpoints when we see a
18132 qSymbol query.
18133
18134 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18135
18136 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18137 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18138 if we could tell there's a GDB breakpoint at stop_pc.
18139 (need_step_over_p): Don't do a step over if we find a GDB
18140 breakpoint at the resume PC.
18141
18142 * mem-break.c (struct raw_breakpoint): New.
18143 (enum bkpt_type): New type `gdb_breakpoint'.
18144 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18145 fields. New field `raw'.
18146 (find_raw_breakpoint_at): New.
18147 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18148 breakpoint instead.
18149 (set_breakpoint_at): Adjust.
18150 (delete_raw_breakpoint): New.
18151 (release_breakpoint): New.
18152 (delete_breakpoint): Rename to...
18153 (delete_breakpoint_1): ... this. Add proc parameter. Use
18154 release_breakpoint. Return ENOENT.
18155 (delete_breakpoint): Reimplement.
18156 (find_breakpoint_at): Delete.
18157 (find_gdb_breakpoint_at): New.
18158 (delete_breakpoint_at): Delete.
18159 (set_gdb_breakpoint_at): New.
18160 (delete_gdb_breakpoint_at): New.
18161 (gdb_breakpoint_here): New.
18162 (set_reinsert_breakpoint): Use release_breakpoint.
18163 (uninsert_breakpoint): Rename to ...
18164 (uninsert_raw_breakpoint): ... this.
18165 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18166 (reinsert_raw_breakpoint): Change parameter type to
18167 raw_breakpoint.
18168 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18169 instead.
18170 (check_breakpoints): Adjust. Use release_breakpoint.
18171 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18172 (breakpoint_inserted_here): Ditto.
18173 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18174 Don't trust the breakpoint's shadow if it is not inserted.
18175 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18176 (delete_all_breakpoints): Adjust.
18177 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18178 use delete_breakpoint_1.
18179
18180 * mem-break.h (breakpoints_supported): Delete declaration.
18181 (set_gdb_breakpoint_at): Declare.
18182 (gdb_breakpoint_here): Declare.
18183 (delete_breakpoint_at): Delete.
18184 (delete_gdb_breakpoint_at): Declare.
18185
18186 * server.h (struct raw_breakpoint): Forward declare.
18187 (struct process_info): New field `raw_breakpoints'.
18188
18189 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18190 breakpoints.
18191
18192 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18193
18194 * linux-low.c (status_pending_p_callback): Fix comment.
18195 (linux_wait_for_event_1): Move most of the internal breakpoint
18196 handling from here...
18197 (linux_wait_1): ... to here.
18198 (count_events_callback): New.
18199 (select_singlestep_lwp_callback): New.
18200 (select_event_lwp_callback): New.
18201 (cancel_breakpoints_callback): New.
18202 (select_event_lwp): New.
18203 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18204 priority to all LWPs that have had events that should be reported
18205 to the client. Cancel breakpoints when about to reporting the
18206 event to the client, not while stopping lwps. No longer cancel
18207 finished single-steps here.
18208 (cancel_finished_single_step): Delete.
18209 (cancel_finished_single_steps): Delete.
18210
18211 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18212
18213 * mem-break.c (enum bkpt_type): New.
18214 (struct breakpoint): New field `type'.
18215 (set_breakpoint_at): Change return type to struct breakpoint
18216 pointer. Set type to `other_breakpoint' by default.
18217 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18218 in the breakpoint list.
18219 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18220 (reinsert_breakpoint): Rename to ...
18221 (reinsert_raw_breakpoint): ... this.
18222 (reinsert_breakpoints_at): Adjust.
18223 * mem-break.h (struct breakpoint): Declare.
18224 (set_breakpoint_at): Change return type to struct breakpoint
18225 pointer.
18226
18227 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18228
18229 * server.c (handle_query): Assign, not compare.
18230
18231 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18232
18233 Teach linux gdbserver to step-over-breakpoints.
18234
18235 * linux-low.c (can_hardware_single_step): New.
18236 (supports_breakpoints): New.
18237 (handle_extended_wait): If stopping threads, read the stop pc of
18238 the new cloned LWP.
18239 (get_pc): New.
18240 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18241 low target doesn't support retrieving the PC.
18242 (add_lwp): Set last_resume_kind to resume_continue.
18243 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18244 (linux_attach): Don't clear stop_expected. Set the lwp's
18245 last_resume_kind to resume_stop.
18246 (linux_detach_one_lwp): Don't check for removed breakpoints.
18247 (check_removed_breakpoint): Delete.
18248 (status_pending_p): Rename to ...
18249 (status_pending_p_callback): ... this. Don't check for removed
18250 breakpoints. Don't consider threads that are stopped from GDB's
18251 perspective.
18252 (linux_wait_for_lwp): Always read the stop_pc here.
18253 (cancel_breakpoint): New.
18254 (step_over_bkpt): New global.
18255 (linux_wait_for_event_1): Implement stepping over breakpoints.
18256 (gdb_wants_lwp_stopped): New.
18257 (gdb_wants_all_stopped): New.
18258 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18259 single-step traps here. Store the thread's last reported target
18260 wait status.
18261 (send_sigstop): Don't clear stop_expected. Always set it,
18262 instead.
18263 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18264 (cancel_finished_single_step): New.
18265 (cancel_finished_single_steps): New.
18266 (wait_for_sigstop): Don't cancel finished single-step traps here.
18267 (linux_resume_one_lwp): Don't check for removed breakpoints.
18268 Don't set `step' on non-hardware step archs.
18269 (linux_set_resume_request): Ignore resume_stop requests if already
18270 stopping or stopped. Set the lwp's last_resume_kind.
18271 (resume_status_pending_p): Don't check for removed breakpoints.
18272 (need_step_over_p): New.
18273 (start_step_over): New.
18274 (finish_step_over): New.
18275 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18276 requests. Clear the thread's last reported target waitstatus.
18277 Don't use the `suspended' flag. Don't consider pending breakpoints.
18278 (linux_resume): Start a step-over if necessary.
18279 (proceed_one_lwp): New.
18280 (proceed_all_lwps): New.
18281 (unstop_all_lwps): New.
18282 * linux-low.h (struct lwp_info): Rewrite comment for the
18283 `suspended' flag. Add the `stop_pc' field. Delete the
18284 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18285 Add `'last_resume_kind' and `need_step_over' fields.
18286 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18287 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18288 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18289 (set_raw_breakpoint_at): New.
18290 (set_breakpoint_at): Rewrite to use it.
18291 (reinsert_breakpoint_handler): Delete.
18292 (set_reinsert_breakpoint): New.
18293 (reinsert_breakpoint_by_bp): Delete.
18294 (delete_reinsert_breakpoints): New.
18295 (uninsert_breakpoint): Rewrite.
18296 (uninsert_breakpoints_at): New.
18297 (reinsert_breakpoint): Rewrite.
18298 (reinsert_breakpoints_at): New.
18299 (check_breakpoints): Rewrite.
18300 (breakpoint_here): New.
18301 (breakpoint_inserted_here): New.
18302 (check_mem_read): Adjust.
18303 * mem-break.h (breakpoints_supported, breakpoint_here)
18304 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18305 (reinsert_breakpoint_by_bp): Delete declaration.
18306 (delete_reinsert_breakpoints): Declare.
18307 (reinsert_breakpoint): Delete declaration.
18308 (reinsert_breakpoints_at): Declare.
18309 (uninsert_breakpoint): Delete declaration.
18310 (uninsert_breakpoints_at): Declare.
18311 (check_breakpoints): Adjust prototype.
18312 * server.h: Adjust include order.
18313 (struct thread_info): Declare here. Add a `last_status' field.
18314
18315 2010-03-23 Michael Snyder <msnyder@vmware.com>
18316
18317 * server.c (crc32): New function.
18318 (handle_query): Add handling for 'qCRC:' request.
18319
18320 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18321
18322 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18323 lwp had been stopped by a watchpoint.
18324
18325 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18326
18327 * server.h (internal_error): Declare.
18328 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18329 * utils.c (internal_error): New function.
18330
18331 2010-03-15 Andreas Schwab <schwab@redhat.com>
18332
18333 * configure.srv: Fix typo setting srv_regobj.
18334
18335 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18336
18337 * linux-low.c (fetch_register): Avoid passing a non string literal
18338 format to `error'.
18339 (usr_store_inferior_registers): Ditto.
18340
18341 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18342
18343 * linux-low.c (linux_write_memory): Bail out early if peeking
18344 memory failed.
18345
18346 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18347
18348 * linux-low.h (struct lwp_info): New fields
18349 `stopped_by_watchpoint' and `stopped_data_address'.
18350 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18351 here, and cache them in the lwp object.
18352 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18353 directly.
18354 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18355 field.
18356 (linux_stopped_by_watchpoint): Rewrite.
18357 (linux_stopped_data_address): Rewrite.
18358
18359 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18360
18361 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18362 switching the current inferior, not before.
18363
18364 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18365
18366 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18367 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18368 i386-linux.c and amd64-linux.c.
18369 (reg-i386.o): Removed.
18370 (reg-i386.c): Likewise.
18371 (reg-i386-linux.o): Likewise.
18372 (reg-i386-linux.c): Likewise.
18373 (reg-x86-64.o): Likewise.
18374 (reg-x86-64.c): Likewise.
18375 (reg-x86-64-linux.o): Likewise.
18376 (reg-x86-64-linux.c): Likewise.
18377 (i386.o): New.
18378 (i386.c): Likewise.
18379 (i386-linux.o): Likewise.
18380 (i386-linux.c): Likewise.
18381 (amd64.o): Likewise.
18382 (amd64.c): Likewise.
18383 (amd64-linux.o): Likewise.
18384 (amd64-linux.c): Likewise.
18385
18386 * configure.srv (srv_i386_regobj): New.
18387 (srv_i386_linux_regobj): Likewise.
18388 (srv_amd64_regobj): Likewise.
18389 (srv_amd64_linux_regobj): Likewise.
18390 (srv_i386_32bit_xmlfiles): Likewise.
18391 (srv_i386_64bit_xmlfiles): Likewise.
18392 (srv_i386_xmlfiles): Likewise.
18393 (srv_amd64_xmlfiles): Likewise.
18394 (srv_i386_linux_xmlfiles): Likewise.
18395 (srv_amd64_linux_xmlfiles): Likewise.
18396 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18397 srv_xmlfiles to $srv_i386_xmlfiles.
18398 (i[34567]86-*-mingw32ce*): Likewise.
18399 (i[34567]86-*-mingw*): Likewise.
18400 (i[34567]86-*-nto*): Likewise.
18401 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18402 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18403 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18404 (x86_64-*-linux*): Likewise.
18405
18406 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18407 (init_registers_amd64_linux): New.
18408 (x86_arch_setup): Replace init_registers_x86_64_linux with
18409 init_registers_amd64_linux.
18410
18411 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18412
18413 * configure.ac: Check for libdl. If it is not available link against
18414 static libthread_db.
18415 * configure: Regenerate.
18416
18417 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18418
18419 PR9605
18420
18421 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18422 handing a read watchpoint.
18423 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18424
18425 2010-02-12 Doug Evans <dje@google.com>
18426
18427 * linux-low.c (linux_supports_tracefork_flag): Document.
18428 (linux_look_up_symbols): Add comment.
18429
18430 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18431
18432 * regcache.c (supply_register): Clear regcache if buf is NULL.
18433
18434 2010-02-02 Nicolas Roche <roche@sourceware.org>
18435 Joel Brobecker <brobecker@adacore.com>
18436
18437 * inferiors.c (find_inferior): Add function documentation.
18438 (unloaded_dll): Handle the case where the unloaded dll has not
18439 been previously registered in the dll list.
18440
18441 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18442
18443 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18444 (thumb2_breakpoint): New.
18445 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18446
18447 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18448
18449 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18450 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18451 breakpoints.
18452
18453 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18454
18455 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18456
18457 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18458
18459 * linux-s390-low.c (s390_collect_ptrace_register)
18460 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18461
18462 2010-01-21 Doug Evans <dje@google.com>
18463
18464 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18465 (PTRACE_ARG4_TYPE): New macro.
18466 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18467 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18468 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18469 (usr_store_inferior_registers): Ditto.
18470 (linux_read_memory, linux_write_memory): Ditto.
18471 (linux_test_for_tracefork): Ditto.
18472
18473 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18474 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18475
18476 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18477
18478 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18479 target.
18480
18481 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18482
18483 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18484 prototype to take a regcache. Adjust.
18485
18486 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18487
18488 * regcache.h (struct thread_info): Forward declare.
18489 (struct regcache): New.
18490 (new_register_cache): Adjust prototype.
18491 (get_thread_regcache): Declare.
18492 (free_register_cache): Adjust prototype.
18493 (registers_to_string, registers_from_string): Ditto.
18494 (supply_register, supply_register_by_name, collect_register)
18495 (collect_register_as_string, collect_register_by_name): Ditto.
18496 * regcache.c (struct inferior_regcache_data): Delete.
18497 (get_regcache): Rename to ...
18498 (get_thread_regcache): ... this. Adjust. Switch inferior before
18499 fetching registers.
18500 (regcache_invalidate_one): Adjust.
18501 (regcache_invalidate): Fix prototype.
18502 (new_register_cache): Return the new register cache.
18503 (free_register_cache): Change prototype.
18504 (realloc_register_cache): Adjust.
18505 (registers_to_string): Change prototype to take a regcache. Adjust.
18506 (registers_from_string): Ditto.
18507 (register_data): Ditto.
18508 (supply_register): Ditto.
18509 (supply_register_by_name): Ditto.
18510 (collect_register): Ditto.
18511 (collect_register_as_string): Ditto.
18512 (collect_register_by_name): Ditto.
18513 * server.c (process_serial_event): Adjust.
18514 * linux-low.h (regset_fill_func, regset_store_func): Change
18515 prototype.
18516 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18517 Change prototype.
18518 * linux-low.c (get_stop_pc): Adjust.
18519 (check_removed_breakpoint): Adjust.
18520 (linux_wait_for_event): Adjust.
18521 (linux_resume_one_lwp): Adjust.
18522 (fetch_register): Add regcache parameter. Adjust.
18523 (usr_store_inferior_registers): Ditto.
18524 (regsets_fetch_inferior_registers): Ditto.
18525 (regsets_store_inferior_registers): Ditto.
18526 (linux_fetch_registers, linux_store_registers): Ditto.
18527 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18528 regcache. Adjust.
18529 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18530 Ditto.
18531 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18532 prototype to take a regcache.
18533 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18534 * remote-utils.c (convert_ascii_to_int, outreg)
18535 (prepare_resume_reply): Change prototype to take a regcache.
18536 Adjust.
18537 * target.h (struct target_ops) <fetch_registers, store_registers>:
18538 Change prototype to take a regcache.
18539 (fetch_inferior_registers, store_inferior_registers): Change
18540 prototype to take a regcache. Adjust.
18541 * proc-service.c (ps_lgetregs): Adjust.
18542 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18543 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18544 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18545 take a regcache. Adjust.
18546 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18547 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18548 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18549 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18550 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18551 (cris_cannot_fetch_register):
18552 (cris_breakpoint_at): Change prototype to take a regcache.
18553 Adjust.
18554 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18555 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18556 to take a regcache. Adjust.
18557 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18558 Adjust.
18559 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18560 take a regcache. Adjust.
18561 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18562 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18563 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18564 * linux-mips-low.c (mips_get_pc):
18565 (mips_set_pc): Change prototype to take a regcache. Adjust.
18566 (mips_reinsert_addr): Adjust.
18567 (mips_collect_register): Change prototype to take a regcache.
18568 Adjust.
18569 (mips_supply_register):
18570 (mips_collect_register_32bit, mips_supply_register_32bit)
18571 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18572 (mips_store_fpregset): Ditto.
18573 * linux-ppc-low.c (ppc_supply_ptrace_register)
18574 (ppc_supply_ptrace_register): Ditto.
18575 (parse_spufs_run): Adjust.
18576 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18577 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18578 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18579 take a regcache. Adjust.
18580 * linux-s390-low.c (s390_collect_ptrace_register)
18581 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18582 (s390_set_pc): Change prototype to take a regcache. Adjust.
18583 (s390_arch_setup): Adjust.
18584 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18585 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18586 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18587 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18588 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18589 regcache. Adjust.
18590 (sparc_breakpoint_at): Adjust.
18591 * linux-xtensa-low.c (xtensa_fill_gregset):
18592 (xtensa_store_gregset):
18593 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18594 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18595 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18596 prototype to take a regcache. Adjust.
18597 * win32-arm-low.c (arm_fetch_inferior_register)
18598 (arm_store_inferior_register): Change prototype to take a
18599 regcache. Adjust.
18600 * win32-i386-low.c (i386_fetch_inferior_register)
18601 (i386_store_inferior_register): Change prototype to take a
18602 regcache. Adjust.
18603 * win32-low.c (child_fetch_inferior_registers)
18604 (child_store_inferior_registers): Change prototype to take a
18605 regcache. Adjust.
18606 (win32_wait): Adjust.
18607 (win32_fetch_inferior_registers): Change prototype to take a
18608 regcache. Adjust.
18609 (win32_store_inferior_registers): Adjust.
18610 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18611 store_inferior_register>: Change prototype to take a regcache.
18612
18613 2010-01-20 Doug Evans <dje@google.com>
18614
18615 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18616 #ifdef.
18617 (linux_wait_for_event1, linux_init_signals): Ditto.
18618 (W_STOPCODE): Provide definition if missing.
18619
18620 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18621
18622 * linux-low.c (linux_core_of_thread): New.
18623 (compare_ints, show_process, list_threads): New.
18624 (linux_qxfer_osdata): Report threads and cores.
18625 (linux_target_op): Register linux_core_of_thread.
18626 * remote-utils.c (prepare_resume_reply): Report the core.
18627 (buffer_xml_printf): Support %d specifier.
18628 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18629 New.
18630 (handle_query): Handle qXfer:threads. Announce availability
18631 thereof.
18632 * target.h (struct target_ops): New field core_of_thread.
18633
18634 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18635
18636 * Makefile.in (clean): Remove new generated files.
18637 (reg-s390.o, reg-s390.c): Remove rules.
18638 (reg-s390x.o, reg-s390x.c): Likewise.
18639 (s390-linux32.o, s390-linux32.c): Add rules.
18640 (s390-linux64.o, s390-linux64.c): Likewise.
18641 (s390x-linux64.o, s390x-linux64.c): Likewise.
18642 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18643 * linux-s390-low.c: Include <elf.h>.
18644 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18645 (init_registers_s390): Remove prototype.
18646 (init_registers_s390x): Likewise.
18647 (init_registers_s390_linux32): Add prototype.
18648 (init_registers_s390_linux64): Likewise.
18649 (init_registers_s390x_linux64): Likewise.
18650 (s390_num_regs_3264): New define.
18651 (s390_regmap_3264): New global variable.
18652 (s390_cannot_fetch_register): Remove obsolete check.
18653 (s390_cannot_store_register): Likewise.
18654 (s390_collect_ptrace_register): Handle upper/lower register halves.
18655 (s390_supply_ptrace_register): Likewise.
18656 (s390_fill_gregset): Update to register number changes.
18657 (s390_get_hwcap): New routine.
18658 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18659 Install appropriate regmap and register set.
18660
18661 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18662
18663 * server.c (gdbserver_version): Update copyright year to 2010.
18664 * gdbreplay.c (gdbreplay_version): Likewise.
18665
18666 2009-12-28 Doug Evans <dje@google.com>
18667
18668 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18669 elf/external.h. Include <elf.h> instead but only if necessary.
18670
18671 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18672
18673 * linux-low.c (linux_remove_process): Remove `detaching'
18674 parameter. Don't release/detach from thread_db here.
18675 (linux_kill): Release/detach from thread_db here, ...
18676 (linux_detach): ... and here, before actually detaching.
18677 (linux_wait_1): ... and here, when a process exits.
18678 * thread-db.c (any_thread_of): New.
18679 (thread_db_free): Switch the current inferior to a thread of the
18680 passed in process.
18681
18682 2009-12-21 Doug Evans <dje@google.com>
18683
18684 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18685
18686 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18687 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18688 warning ifndef __NR_tkill. Move setting of errno there too.
18689 Delete unnecessary resetting of errno after syscall.
18690 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18691
18692 * configure.ac: Check for dladdr.
18693 * config.in: Regenerate.
18694 * configure: Regenerate.
18695 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18696 (try_thread_db_load): Update.
18697
18698 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18699
18700 2009-12-18 Doug Evans <dje@google.com>
18701
18702 * event-loop.c: Include unistd.h if it exists.
18703
18704 * linux-low.c (my_waitpid): Move definition away from being in
18705 between linux_tracefork_child/linux_test_for_tracefork.
18706
18707 * gdb_proc_service.h (psaddr_t): Fix type.
18708 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18709 signature to match glibc.
18710
18711 2009-12-16 Doug Evans <dje@google.com>
18712
18713 * linux-low.c (linux_read_memory): Fix argument to read.
18714
18715 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18716
18717 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18718 events, don't leave current_inferior pointing at null.
18719
18720 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18721
18722 * win32-low.c (LOG): Delete.
18723 (OUTMSG): Output to stderr.
18724 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18725 on compile time LOG macro.
18726 (win32_wait): Fix debug output.
18727
18728 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18729
18730 * win32-low.c (win32_add_one_solib): If the dll name is
18731 "ntdll.dll", prepend the system directory to the dll path.
18732
18733 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18734
18735 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18736
18737 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18738 Vladimir Prus <vladimir@codesourcery.com>
18739
18740 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18741 * configure.ac: Check for __mcoldfire__ and set
18742 gdb_cv_m68k_is_coldfire.
18743 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18744 reg-cf.o and reg-m68k.o.
18745 * configure: Regenerated.
18746
18747 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18748
18749 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18750 Pass it to thread_db_free.
18751 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18752 proper `detaching' argument to linux_remove_process.
18753 * linux-low.h (thread_db_free): Add `detaching' parameter.
18754 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18755 to thread_db_free.
18756 (thread_db_free): Add `detaching' parameter. Only
18757 call td_ta_clear_event if detaching from process.
18758
18759 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18760
18761 * thread-db.c (thread_db_free): Fix typo.
18762
18763 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18764
18765 PR gdb/10838
18766 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18767
18768 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18769
18770 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18771 with an i686 compiler.
18772 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18773 needed.
18774 * configure: Rebuilt.
18775
18776 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18777
18778 PR gdb/10783
18779
18780 * server.c (handle_search_memory_1): Correct read_addr initialization
18781 in loop for searching subsequent chunks.
18782
18783 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18784
18785 * configure.ac: New --with-libthread-db option.
18786 * thread-db.c: Allow direct dependence on libthread_db.
18787 (thread_db_free): Adjust.
18788 * config.in: Regenerate.
18789 * configure: Likewise.
18790
18791 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18792
18793 PR gdb/10757
18794 * thread-db.c (attach_thread): New function.
18795 (maybe_attach_thread): Return success/failure.
18796 (find_new_threads_callback): Adjust.
18797 (thread_db_find_new_threads): Loop until no new threads.
18798
18799 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18800
18801 * proc-service.c (ps_lgetregs): Formatting.
18802
18803 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18804
18805 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18806 * configure.ac: Adjust.
18807 * linux-low.h (struct process_info_private): Move members to struct
18808 thread_db.
18809 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18810 * linux-low.c (linux_remove_process): Adjust.
18811 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18812 * server.c (handle_query): Move code ...
18813 (handle_monitor_command): ... here. New function.
18814 * target.h (struct target_ops): New member.
18815 * thread-db.c (struct thread_db): New.
18816 (libthread_db_search_path): New variable.
18817 (thread_db_create_event, thread_db_enable_reporting)
18818 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18819 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18820 (try_thread_db_load_1, dladdr_to_soname): New functions.
18821 (try_thread_db_load, thread_db_load_search): New functions.
18822 (thread_db_init): Search for libthread_db.
18823 (thread_db_free): New function.
18824 (thread_db_handle_monitor_command): Likewise.
18825 * config.in: Regenerate.
18826 * configure: Regenerate.
18827
18828 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18829
18830 * spu-low.c (spu_kill): Wait for inferior to terminate.
18831 Call clear_inferiors.
18832 (spu_detach): Call clear_inferiors.
18833
18834 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18835
18836 * aclocal.m4: Regenerate.
18837 * config.in: Likewise.
18838 * configure: Likewise.
18839
18840 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18841
18842 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18843 (parse_spufs_run): New function.
18844 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18845 (ppc_breakpoint_at): Handle SPU breakpoints.
18846
18847 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18848
18849 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18850 (SPUFS_MAGIC): Define.
18851 (spu_enumerate_spu_ids): New function.
18852 (linux_qxfer_spu): New function.
18853 (linux_target_ops): Install linux_qxfer_spu.
18854
18855 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18856
18857 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18858 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18859 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18860 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18861 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18862 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18863 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18864 (init_registers_powerpc_cell32l): Add prototype.
18865 (init_registers_powerpc_cell64l): Likewise.
18866 (ppc_arch_setup): Detect Cell/B.E. architecture.
18867
18868 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18869
18870 * Makefile.in (datarootdir): New variable.
18871
18872 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18873
18874 * linux-low.c (linux_write_memory): Update debugging output.
18875 * Makefile.in (clean): Add new descriptions.
18876 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18877 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18878 * configure.srv: Add new files for arm*-*-linux*.
18879 * linux-arm-low.c: Add new declarations.
18880 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18881 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18882 (HWCAP_VFPv3D16): New.
18883 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18884 instead of __IWMMXT__.
18885 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18886 (arm_arch_setup): New.
18887 (target_regsets): Remove #ifdef. Add VFP regset.
18888 (the_low_target): Use arm_arch_setup.
18889
18890 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18891
18892 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18893 the main thread again.
18894
18895 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18896
18897 Adding Neutrino gdbserver.
18898 * configure: Regenerated.
18899 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18900 * configure.srv (i[34567]86-*-nto*): New target.
18901 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18902 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18903 (nto_comctrl) [__QNX__]: New function.
18904 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18905
18906 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18907
18908 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18909 srv_tgtobj.
18910
18911 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18912 Pedro Alves <pedro@codesourcery.com>
18913
18914 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18915 don't support CONTEXT_EXTENDED_REGISTERS.
18916 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18917 (the_low_target): Install them.
18918 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18919 failing with ERROR_PIPE_NOT_CONNECTED.
18920
18921 2009-06-30 Doug Evans <dje@google.com>
18922 Pierre Muller <muller@ics.u-strasbg.fr>
18923
18924 Add h/w watchpoint support to x86-linux, win32-i386.
18925 * Makefile.in (SFILES): Add i386-low.c
18926 (i386_low_h): Define.
18927 (i386-low.o): Add dependencies.
18928 (linux-x86-low.o): Add i386-low.h dependency.
18929 (win32-i386-low.o): Ditto.
18930 * i386-low.c: New file.
18931 * i386-low.h: New file.
18932 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18933 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18934 * linux-low.c (linux_add_process): Initialize arch_private.
18935 (linux_remove_process): Free arch_private.
18936 (add_lwp): Initialize arch_private.
18937 (delete_lwp): Free arch_private.
18938 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18939 provided.
18940 * linux-low.h (process_info_private): New member arch_private.
18941 (lwp_info): New member arch_private.
18942 (linux_target_ops): New members new_process, new_thread,
18943 prepare_to_resume.
18944 (ptid_of): New macro.
18945 * linux-x86-low.c: Include stddef.h, i386-low.h.
18946 (arch_process_info): New struct.
18947 (arch_lwp_info): New struct.
18948 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18949 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18950 (i386_dr_low_get_status): New function.
18951 (x86_insert_point, x86_remove_point): New functions.
18952 (x86_stopped_by_watchpoint): New function.
18953 (x86_stopped_data_address): New function.
18954 (x86_linux_new_process, x86_linux_new_thread): New functions.
18955 (x86_linux_prepare_to_resume): New function.
18956 (the_low_target): Add entries for insert_point, remove_point,
18957 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18958 prepare_to_resume.
18959 * server.c (debug_hw_points): New global.
18960 (monitor_show_help): Document set debug-hw-points.
18961 (handle_query): Process "set debug-hw-points".
18962 * server.h (debug_hw_points): Declare.
18963 (paddress): Declare.
18964 * utils.c (NUMCELLS, CELLSIZE): New macros.
18965 (get_sell, xsnprintf, paddress): New functions.
18966 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18967 remove_point, stopped_by_watchpoint, stopped_data_address.
18968 * win32-i386-low.c: Include i386-low.h.
18969 (debug_reg_state): Replaces dr.
18970 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18971 (i386_dr_low_get_status): New function.
18972 (i386_insert_point, i386_remove_point): New functions.
18973 (i386_stopped_by_watchpoint): New function.
18974 (i386_stopped_data_address): New function.
18975 (i386_initial_stuff): Update.
18976 (get_thread_context,set_thread_context,i386_thread_added): Update.
18977 (the_low_target): Add entries for insert_point,
18978 remove_point, stopped_by_watchpoint, stopped_data_address.
18979 * win32-low.c (win32_insert_watchpoint): New function.
18980 (win32_remove_watchpoint): New function.
18981 (win32_stopped_by_watchpoint): New function.
18982 (win32_stopped_data_address): New function.
18983 (win32_target_ops): Add entries for insert_watchpoint,
18984 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18985 * win32-low.h (win32_target_ops): New members insert_point,
18986 remove_point, stopped_by_watchpoint, stopped_data_address.
18987
18988 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18989
18990 * server.c (process_serial_event): Re-return unsupported, not
18991 error, if the type isn't recognized. Re-allow supporting only
18992 insert or remove packets. Also call require_running for
18993 breakpoints. Add missing break statement to default case. Tidy.
18994 * target.h (struct target_ops): Rename insert_watchpoint to
18995 insert_point, and remove_watchpoint to remove_point.
18996
18997 * linux-low.h (struct linux_target_ops): Likewise.
18998 * linux-low.c (linux_insert_watchpoint): Rename to ...
18999 (linux_insert_point): ... this. Adjust.
19000 (linux_remove_watchpoint): Rename to ...
19001 (linux_remove_point): ... this. Adjust.
19002 (linux_target_ops): Adjust.
19003 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19004 (cris_insert_point): ... this.
19005 (cris_remove_watchpoint): Rename to ...
19006 (cris_remove_point): ... this.
19007 (the_low_target): Adjust.
19008
19009 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19010
19011 * server.c (handle_v_kill): Pass signal_pid to
19012 kill_inferior if multi_process is zero.
19013
19014 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19015
19016 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19017 * target.h (target_ops): Comment for *_watchpoint to make it clear
19018 the functions can get types '0' and '1'.
19019
19020 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19021
19022 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19023 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19024 * regcache.c (get_regcache): Likewise.
19025 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19026 * win32-low.c (child_fetch_inferior_registers): Remove check for
19027 regno 0.
19028
19029 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19030 Pedro Alves <pedro@codesourcery.com>
19031
19032 * target.h (struct target_ops) <supports_multi_process>: New
19033 callback.
19034 (target_supports_multi_process): New.
19035 * server.c (handle_query): Even if GDB reports support, only
19036 enable multi-process if the target also supports it. Report
19037 multi-process support only if the target backend supports it.
19038 * linux-low.c (linux_supports_multi_process): New function.
19039 (linux_target_ops): Install it as target_supports_multi_process
19040 callback.
19041
19042 2009-05-24 Doug Evans <dje@google.com>
19043
19044 Global renaming of find_thread_pid to find_thread_ptid.
19045 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19046 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19047 All callers updated.
19048
19049 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19050 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19051 directly.
19052
19053 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19054 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19055 (linux_resume_one_lwp): Ditto.
19056
19057 2009-05-23 Doug Evans <dje@google.com>
19058
19059 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19060 from struct inferior_list_entry * to struct lwp_info *.
19061 All callers updated.
19062
19063 2009-05-13 Doug Evans <dje@google.com>
19064
19065 * linux-x86-low.c: Don't include assert.h.
19066 (x86_siginfo_fixup): Use fatal, not assert.
19067 (x86_arch_setup): Fix comment.
19068
19069 2009-05-12 Doug Evans <dje@google.com>
19070
19071 Biarch support for i386/amd64 gdbserver.
19072 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19073 Add linux-x86-low.c.
19074 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19075 (linux-x86-low.o): Add.
19076 * linux-x86-64-low.c: Delete.
19077 * linux-i386-low.c: Delete.
19078 * linux-x86-low.c: New file.
19079 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19080 linux-x86-low.o.
19081 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19082 linux-x86-low.o.
19083 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19084 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19085 (linux_child_pid_to_exec_file): New function.
19086 (elf_64_header_p, elf_64_file_p): New functions.
19087 (siginfo_fixup): New function.
19088 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19089 give target a chance to convert layout.
19090 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19091 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19092
19093 2009-05-07 Doug Evans <dje@google.com>
19094
19095 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19096 (regsets_store_inferior_registers): Ditto.
19097
19098 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19099
19100 PR server/10048
19101
19102 * linux-low.c (must_set_ptrace_flags): Delete.
19103 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19104 of the global.
19105 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19106 `lwp->must_set_ptrace_flags' instead.
19107 (linux_wait_for_event_1): Set ptrace options here.
19108 (linux_wait_1): ... not here.
19109
19110 2009-04-30 Doug Evans <dje@google.com>
19111
19112 * inferiors.c (started_inferior_callback): New function.
19113 (attached_inferior_callback): New function.
19114 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19115 * server.c (print_started_pid, print_attached_pid): New functions.
19116 (detach_or_kill_for_exit): New function.
19117 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19118 * server.h (have_started_inferiors_p): Declare.
19119 (have_attached_inferiors_p): Declare.
19120
19121 * inferiors.c (remove_process): Fix memory leak, free process.
19122 * linux-low.c (linux_remove_process): New function.
19123 (linux_kill): Call it instead of remove_process.
19124 (linux_detach, linux_wait_1): Ditto.
19125
19126 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19127
19128 * configure.srv: Add x86 Windows CE target.
19129
19130 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19131
19132 * inferiors.c (get_thread_process): Make global.
19133 * server.h (get_thread_process): Add prototype.
19134 * thread-db.c (find_one_thread): Use get_thread_process
19135 instead of current_process.
19136 (thread_db_get_tls_address): Do not crash if called when
19137 thread layer is not yet initialized.
19138
19139 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19140
19141 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19142 * spu-low.c (current_tid): Rename to ...
19143 (current_ptid): ... this.
19144 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19145 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19146 ptid_get_lwp (current_ptid) instead of current_tid.
19147 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19148 instead of current_tid. Use find_process_pid to verify pid
19149 argument is valid. Pass proper argument to remove_process.
19150 (spu_thread_alive): Compare current_ptid instead of current_tid.
19151 (spu_resume): Likewise.
19152
19153 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19154
19155 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19156 variable.
19157
19158 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19159
19160 Implement the multiprocess extensions, and add linux multiprocess
19161 support.
19162
19163 * server.h (ULONGEST): Declare.
19164 (struct ptid, ptid_t): New.
19165 (minus_one_ptid, null_ptid): Declare.
19166 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19167 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19168 (struct inferior_list_entry): Change `id' type from unsigned from
19169 to ptid_t.
19170 (struct sym_cache, struct breakpoint, struct
19171 process_info_private): Forward declare.
19172 (struct process_info): Declare.
19173 (current_process): Declare.
19174 (all_processes): Declare.
19175 (initialize_inferiors): Declare.
19176 (add_thread): Adjust to use ptid_t.
19177 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19178 (add_process, remove_process, find_thread_pid): Declare.
19179 (find_inferior_id): Adjust to use ptid_t.
19180 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19181 (multi_process): Declare.
19182 (push_event): Adjust to use ptid_t.
19183 (read_ptid, write_ptid): Declare.
19184 (prepare_resume_reply): Adjust to use ptid_t.
19185 (clear_symbol_cache): Declare.
19186 * inferiors.c (all_processes): New.
19187 (null_ptid, minus_one_ptid): New.
19188 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19189 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19190 (add_thread): Change unsigned long to ptid. Remove gdb_id
19191 parameter. Adjust.
19192 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19193 (gdb_id_to_thread): Rename to ...
19194 (find_thread_pid): ... this. Change unsigned long to ptid.
19195 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19196 (loaded_dll, pull_pid_from_list): Adjust.
19197 (add_process, remove_process, find_process_pid)
19198 (get_thread_process, current_process, initialize_inferiors): New.
19199 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19200 (struct target_waitstatus) <related_pid>: Ditto.
19201 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19202 return type to int.
19203 (struct target_ops) <join>: Add `pid' argument.
19204 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19205 (struct target_ops) <wait>: Add `ptid' field. Change return type
19206 to ptid.
19207 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19208 (mywait): Add `ptid' argument. Change return type to ptid_t.
19209 (target_pid_to_str): Declare.
19210 * target.c (set_desired_inferior): Adjust to use ptids.
19211 (mywait): Add new `ptid' argument. Adjust.
19212 (target_pid_to_str): New.
19213 * mem-break.h (free_all_breakpoints): Declare.
19214 * mem-break.c (breakpoints): Delelete.
19215 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19216 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19217 to use per-process breakpoint list.
19218 (free_all_breakpoints): New.
19219 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19220 (symbol_cache, all_symbols_looked_up): Delete.
19221 (hexchars): New.
19222 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19223 read_ptid): New.
19224 (prepare_resume_reply): Change ptid argument's type from unsigned
19225 long to ptid_t. Adjust. Implement W;process and X;process.
19226 (free_sym_cache, clear_symbol_cache): New.
19227 (look_up_one_symbol): Adjust to per-process symbol cache. *
19228 * server.c (cont_thread, general_thread, step_thread): Change type
19229 to ptid_t.
19230 (attached): Delete.
19231 (multi_process): New.
19232 (last_ptid): Change type to ptid_t.
19233 (struct vstop_notif) <ptid>: Change type to ptid_t.
19234 (queue_stop_reply, push_event): Change `ptid' argument's type to
19235 ptid_t.
19236 (discard_queued_stop_replies): Add `pid' argument.
19237 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19238 changes. Don't reference the `attached' global.
19239 (attach_inferior): Adjust to mywait interface changes.
19240 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19241 features. Handle and report "multiprocess+". Handle
19242 "qAttached:PID".
19243 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19244 changes.
19245 (handle_v_kill): New.
19246 (handle_v_stopped): Adjust to use target_pid_to_str.
19247 (handle_v_requests): Allow multiple attaches and runs when
19248 multiprocess extensions are in effect. Handle "vKill".
19249 (myresume): Adjust to use ptids.
19250 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19251 (handle_status): Adjust to discard_queued_stop_replies interface
19252 change.
19253 (first_thread_of, kill_inferior_callback)
19254 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19255 (main): Call initialize_inferiors. Adjust to use ptids, killing
19256 and detaching from all inferiors. Handle multiprocess packet
19257 variants.
19258 * linux-low.h: Include gdb_proc_service.h.
19259 (struct process_info_private): New.
19260 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19261 <lwpid_of>: Use ptid_get_lwp.
19262 (get_lwp_thread): Adjust.
19263 (struct lwp_info): Add `dead' member.
19264 (find_lwp_pid): Declare.
19265 * linux-low.c (thread_db_active): Delete.
19266 (new_inferior): Adjust comment.
19267 (inferior_pid): Delete.
19268 (linux_add_process): New.
19269 (handle_extended_wait): Adjust.
19270 (add_lwp): Change unsigned long to ptid.
19271 (linux_create_inferior): Add process to processes table. Adjust
19272 to use ptids. Don't set new_inferior here.
19273 (linux_attach_lwp): Rename to ...
19274 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19275 it. Adjust to use ptids.
19276 (linux_attach_lwp): New.
19277 (linux_attach): Add process to processes table. Don't set
19278 new_inferior here.
19279 (struct counter): New.
19280 (second_thread_of_pid_p, last_thread_of_process_p): New.
19281 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19282 multiple processes.
19283 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19284 processes. Remove process from process table.
19285 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19286 to multiple processes.
19287 (any_thread_of): New.
19288 (linux_detach): Add `pid' argument, and handle it. Remove process
19289 from processes table.
19290 (linux_join): Add `pid' argument. Handle it.
19291 (linux_thread_alive): Change unsighed long argument to ptid_t.
19292 Consider dead lwps as not being alive.
19293 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19294 threads we're not interested in.
19295 (same_lwp, find_lwp_pid): New.
19296 (linux_wait_for_lwp): Change `pid' argument's type from int to
19297 ptid_t. Adjust.
19298 (linux_wait_for_event): Rename to ...
19299 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19300 from int to ptid_t. Adjust.
19301 (linux_wait_for_event): New.
19302 (linux_wait_1): Add `ptid' argument. Change return type to
19303 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19304 that exit from the process table.
19305 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19306 Adjust.
19307 (mark_lwp_dead): New.
19308 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19309 stopping all threads, mark its main lwp as dead.
19310 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19311 ptids.
19312 (fetch_register, usr_store_inferior_registers)
19313 (regsets_fetch_inferior_registers)
19314 (regsets_store_inferior_registers, linux_read_memory)
19315 (linux_write_memory): Inline `inferior_pid'.
19316 (linux_look_up_symbols): Adjust to use per-process
19317 `thread_db_active'.
19318 (linux_request_interrupt): Adjust to use ptids.
19319 (linux_read_auxv): Inline `inferior_pid'.
19320 (initialize_low): Don't reference thread_db_active.
19321 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19322 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19323 (ps_getpid): Return the pid of the current inferior.
19324 * thread-db.c (proc_handle, thread_agent): Delete.
19325 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19326 per-process data.
19327 (find_one_thread): Change argument type to ptid_t. Adjust to
19328 per-process data.
19329 (maybe_attach_thread): Adjust to per-process data and ptids.
19330 (thread_db_find_new_threads): Ditto.
19331 (thread_db_init): Ditto.
19332 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19333 processes table. Adjust to use ptids.
19334 (spu_kill, spu_detach): Adjust interface. Remove process from
19335 processes table.
19336 (spu_join, spu_thread_alive): Adjust interface.
19337 (spu_wait): Adjust interface. Remove process from processes
19338 table. Adjust to use ptids.
19339 * win32-low.c (current_inferior_tid): Delete.
19340 (current_inferior_ptid): New.
19341 (debug_event_ptid): New.
19342 (thread_rec): Take a ptid. Adjust.
19343 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19344 (child_delete_thread): Ditto.
19345 (do_initial_child_stuff): Add `attached' argument. Add process to
19346 processes table.
19347 (child_fetch_inferior_registers, child_store_inferior_registers):
19348 Adjust.
19349 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19350 (win32_attach): Pass 1 to do_initial_child_stuff.
19351 (win32_kill): Adjust interface. Remove process from processes
19352 table.
19353 (win32_detach): Ditto.
19354 (win32_join): Adjust interface.
19355 (win32_thread_alive): Take a ptid.
19356 (win32_resume): Adjust to use ptids.
19357 (get_child_debug_event): Ditto.
19358 (win32_wait): Adjust interface. Remove exiting process from
19359 processes table.
19360
19361 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19362
19363 Non-stop mode support.
19364
19365 * server.h (non_stop): Declare.
19366 (gdb_client_data, handler_func): Declare.
19367 (delete_file_handler, add_file_handler, start_event_loop):
19368 Declare.
19369 (handle_serial_event, handle_target_event, push_event)
19370 (putpkt_notif): Declare.
19371 * target.h (enum resume_kind): New.
19372 (struct thread_resume): Replace `step' field by `kind' field.
19373 (TARGET_WNOHANG): Define.
19374 (struct target_ops) <wait>: Add `options' argument.
19375 <supports_non_stop, async, start_non_stop>: New fields.
19376 (target_supports_non_stop, target_async): New.
19377 (start_non_stop): Declare.
19378 (mywait): Add `options' argument.
19379 * target.c (mywait): Add `options' argument. Print child exit
19380 notifications here.
19381 (start_non_stop): New.
19382 * server.c (non_stop, own_buf, mem_buf): New globals.
19383 (struct vstop_notif): New.
19384 (notif_queue): New global.
19385 (queue_stop_reply, push_event, discard_queued_stop_replies)
19386 (send_next_stop_reply): New.
19387 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19388 interface changes.
19389 (attach_inferior): In non-stop mode, don't wait for the target
19390 here.
19391 (handle_general_set): Handle QNonStop.
19392 (handle_query): When handling qC, return the current general
19393 thread, instead of the first thread of the list.
19394 (handle_query): If the backend supports non-stop mode, include
19395 QNonStop+ in the qSupported query response.
19396 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19397 and non-stop mode.
19398 (handle_v_attach, handle_v_run): Handle non-stop mode.
19399 (handle_v_stopped): New.
19400 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19401 (myresume): Adjust to use resume_kind. Handle non-stop.
19402 (queue_stop_reply_callback): New.
19403 (handle_status): Handle non-stop mode.
19404 (main): Clear non_stop flag on reconnection. Use the event-loop.
19405 Refactor serial protocol handling from here ...
19406 (process_serial_event): ... to this new function. When GDB
19407 selects any thread, select one here. In non-stop mode, wait until
19408 GDB acks all pending events before exiting.
19409 (handle_serial_event, handle_target_event): New.
19410 * remote-utils.c (remote_open): Install remote_desc in the event
19411 loop.
19412 (remote_close): Remove remote_desc from the event loop.
19413 (putpkt_binary): Rename to...
19414 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19415 (putpkt_binary): New as wrapper around putpkt_binary_1.
19416 (putpkt_notif): New.
19417 (prepare_resume_reply): In non-stop mode, don't change the
19418 general_thread.
19419 * event-loop.c: New.
19420 * Makefile.in (OBJ): Add event-loop.o.
19421 (event-loop.o): New rule.
19422
19423 * linux-low.h (pid_of): Moved here.
19424 (lwpid_of): New.
19425 (get_lwp_thread): Use lwpid_of.
19426 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19427 * linux-low.c (pid_of): Delete.
19428 (inferior_pid): Use lwpid_of.
19429 (linux_event_pipe): New.
19430 (target_is_async_p): New.
19431 (delete_lwp): New.
19432 (handle_extended_wait): Use lwpid_of.
19433 (add_lwp): Don't set lwpid field.
19434 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19435 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19436 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19437 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19438 first. Adjust to linux_wait_for_event interface changes. Use
19439 lwpid_of.
19440 (linux_detach): Don't delete the main lwp here.
19441 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19442 (status_pending_p): Don't consider explicitly suspended lwps.
19443 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19444 pointer. Add OPTIONS argument. Change return type to int. Use
19445 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19446 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19447 pointer. Add status pointer argument. Return a pid instead of a
19448 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19449 changes. In non-stop mode, don't switch to a random thread.
19450 (linux_wait): Rename to...
19451 (linux_wait_1): ... this. Add target_options argument, and handle
19452 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19453 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19454 clean exit and signal exit code. Don't stop all threads in
19455 non-stop mode. In all-stop mode, only stop all threads when
19456 reporting a stop to GDB. Handle explicit thread stop requests.
19457 (async_file_flush, async_file_mark): New.
19458 (linux_wait): New.
19459 (send_sigstop): Use lwpid_of.
19460 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19461 interface changes. In non-stop mode, don't switch to a random
19462 thread.
19463 (linux_resume_one_lwp): Use lwpid_of.
19464 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19465 (linux_resume_one_thread): ... this. Handle resume_stop. In
19466 non-stop mode, don't look for pending flag in all threads.
19467 (resume_status_pending_p): Don't consider explicitly suspended
19468 threads.
19469 (my_waitpid): Reimplement. Emulate __WALL.
19470 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19471 Use lwpid_of.
19472 (sigchld_handler, linux_supports_non_stop, linux_async)
19473 (linux_start_non_stop): New.
19474 (linux_target_ops): Register linux_supports_non_stop, linux_async
19475 and linux_start_non_stop.
19476 (initialize_low): Install SIGCHLD handler.
19477 * thread-db.c (thread_db_create_event, find_one_thread)
19478 (thread_db_get_tls_address): Use lwpid_of.
19479 * win32-low.c (win32_detach): Adjust to use resume_kind.
19480 (win32_wait): Add `options' argument.
19481 * spu-low.c (spu_resume): Adjust to use resume_kind.
19482 (spu_wait): Add `options' argument.
19483
19484 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19485
19486 Decouple target code from remote protocol.
19487
19488 * target.h (enum target_waitkind): New.
19489 (struct target_waitstatus): New.
19490 (struct target_ops) <wait>: Return an unsigned long. Take a
19491 target_waitstatus pointer instead of a char pointer.
19492 (mywait): Likewise.
19493 * target.c (mywait): Change prototype to return an unsigned long.
19494 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19495 * server.h (thread_from_wait, old_thread_from_wait): Delete
19496 declarations.
19497 (prepare_resume_reply): Change prototype to take a
19498 target_waitstatus.
19499 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19500 (last_status, last_ptid): New.
19501 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19502 pid instead of a signal.
19503 (attach_inferior): Remove "status" and "signal" parameters.
19504 Adjust.
19505 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19506 not as an address.
19507 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19508 (handle_v_requests, myresume): Remove "status" and "signal"
19509 parameters. Adjust.
19510 (handle_status): New.
19511 (main): Delete local `status'. Adjust.
19512 * remote-utils.c: Include target.h.
19513 (prepare_resume_reply): Change prototype to take a
19514 target_waitstatus. Adjust.
19515
19516 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19517 interface.
19518 * spu-low.c (spu_wait): Adjust.
19519 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19520 Delete.
19521 (win32_wait): Adjust.
19522
19523 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19524
19525 * target.h (struct thread_resume): Delete leave_stopped member.
19526 (struct target_ops): Add a `n' argument to the `resume' callback.
19527 * server.c (start_inferior): Adjust.
19528 (handle_v_cont, myresume): Adjust.
19529 * linux-low.c (check_removed_breakpoint): Adjust to resume
19530 interface change, and to removed leave_stopped field.
19531 (resume_ptr): Delete.
19532 (struct thread_resume_array): New.
19533 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19534 resume interface change.
19535 (linux_continue_one_thread, linux_queue_one_thread)
19536 (resume_status_pending_p): Check if the resume field is NULL
19537 instead of checking the leave_stopped member.
19538 (linux_resume): Adjust to the target resume interface change.
19539 * spu-low.c (spu_resume): Adjust to the target resume interface
19540 change.
19541 * win32-low.c (win32_detach, win32_resume): Ditto.
19542
19543 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19544
19545 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19546 flag.
19547 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19548 pending.
19549 (linux_continue_one_thread): Only preserve the stepping flag if
19550 there's a pending breakpoint.
19551
19552 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19553
19554 * server.c (main): After the inferior having exited, call
19555 remote_close before exiting gdbserver.
19556
19557 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19558
19559 Fix size of FPSCR in Power 7 processors.
19560 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19561 (PPC_FEATURE_HAS_DFP): New #define.
19562 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19563 size of the FPSCR.
19564
19565 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19566
19567 * server.c (handle_query) Whitespace and formatting.
19568
19569 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19570
19571 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19572 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19573 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19574 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19575 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19576 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19577 Makefile.in, configure.ac: Fix whitespace throughout.
19578 * configure: Regenerate.
19579
19580 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19581
19582 * inferiors.c (find_inferior): Make it safe for the callback
19583 function to delete the currently iterated inferior.
19584
19585 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19586
19587 * Makefile.in (linuw_low_h): Move higher.
19588 (thread-db.o): Depend on $(linux_low_h).
19589
19590 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19591
19592 Rename "process" to "lwp" throughout.
19593
19594 * linux-low.c (all_processes): Rename to...
19595 (all_lwps): ... this.
19596 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19597 (add_process): Rename to ...
19598 (add_lwp): ... this. Adjust.
19599 (linux_create_inferior): Adjust.
19600 (linux_attach_lwp): Adjust.
19601 (linux_attach): Adjust.
19602 (linux_kill_one_process): Rename to ...
19603 (linux_kill_one_lwp): ... this. Adjust.
19604 (linux_kill): Adjust.
19605 (linux_detach_one_process): Rename to ...
19606 (linux_detach_one_lwp): ... this. Adjust.
19607 (linux_detach): Adjust.
19608 (check_removed_breakpoint): Adjust.
19609 (status_pending_p): Adjust.
19610 (linux_wait_for_process): Rename to ...
19611 (linux_wait_for_lwp): ... this. Adjust.
19612 (linux_wait_for_event): Adjust.
19613 (send_sigstop): Adjust.
19614 (wait_for_sigstop): Adjust.
19615 (stop_all_processes): Rename to ...
19616 (stop_all_lwps): ... this.
19617 (linux_resume_one_process): Rename to ...
19618 (linux_resume_one_lwp): ... this. Adjust.
19619 (linux_set_resume_request, linux_continue_one_thread)
19620 (linux_queue_one_thread, resume_status_pending_p)
19621 (usr_store_inferior_registers, regsets_store_inferior_registers)
19622 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19623 Adjust.
19624 * linux-low.h (get_process): Rename to ...
19625 (get_lwp): ... this. Adjust.
19626 (get_thread_process): Rename to ...
19627 (get_thread_lwp): ... this. Adjust.
19628 (get_process_thread): Rename to ...
19629 (get_lwp_thread): ... this. Adjust.
19630 (struct process_info): Rename to ...
19631 (struct lwp_info): ... this.
19632 (all_processes): Rename to ...
19633 (all_lwps): ... this.
19634 * proc-service.c (ps_lgetregs): Adjust.
19635 * thread-db.c (thread_db_create_event, find_one_thread)
19636 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19637
19638 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19639
19640 * server.c (handle_query): Handle "qAttached".
19641
19642 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19643
19644 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19645 GPLv3, update license URL.
19646
19647 2009-03-01 Doug Evans <dje@google.com>
19648
19649 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19650 (server_h): Add gdb_signals.h.
19651 (signals.o): Update.
19652 * server.h (target_signal_from_host,target_signal_to_host_p)
19653 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19654
19655 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19656
19657 * remote-utils.c (getpkt): Also generate remote-debug
19658 information if noack_mode is set.
19659
19660 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19661
19662 * server.c (handle_query): Report qXfer:siginfo:read and
19663 qXfer:siginfo:write as supported and handle them.
19664 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19665 * linux-low.c (linux_xfer_siginfo): New.
19666 (linux_target_ops): Set it.
19667
19668 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19669
19670 * server.c (gdbserver_usage): Mention --remote-debug.
19671 (main): Accept '--remote-debug' switch.
19672
19673 2009-01-18 Doug Evans <dje@google.com>
19674
19675 * regcache.c (new_register_cache): No need to check result of xcalloc.
19676 * server.c (handle_search_memory): Back out calls to xmalloc,
19677 result is checked and error is returned to user upon failure.
19678 (handle_query): Ditto. Add more checks for result of malloc.
19679 (handle_v_cont): Check result of malloc, report error back to
19680 user upon failure.
19681 (handle_v_run): Ditto. Call freeargv.
19682 * server.h (freeargv): Declare.
19683 * utils.c (freeargv): New fn.
19684
19685 2009-01-15 Doug Evans <dje@google.com>
19686
19687 * gdbreplay.c (perror_with_name): Make arg const char *.
19688 * server.h (target_signal_to_name): Make return type const char *.
19689 * thread-db.c (thread_db_err_str): Make return type const char *.
19690 * utils.c (perror_with_name): Make arg const char *.
19691
19692 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19693
19694 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19695 when handling a EXIT_PROCESS_DEBUG_EVENT.
19696
19697 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19698
19699 * gdbreplay.c (gdbreplay_version): Update copyright year.
19700 * server.c (gdbserver_version): Likewise.
19701
19702 2009-01-05 Doug Evans <dje@google.com>
19703
19704 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19705 (handle_extended_wait): Improve comment.
19706
19707 2008-12-13 Doug Evans <dje@google.com>
19708
19709 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19710 * server.h (ATTR_MALLOC): New macro.
19711 (xmalloc,xcalloc,xstrdup): Declare.
19712 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19713 * inferiors.c: Ditto.
19714 * linux-low.c: Ditto.
19715 * mem-break.c: Ditto.
19716 * regcache.c: Ditto.
19717 * remote-utils.c: Ditto.
19718 * server.c: Ditto.
19719 * target.c: Ditto.
19720 * win32-low.c: Ditto.
19721
19722 2008-12-12 Doug Evans <dje@google.com>
19723
19724 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19725 in debugging printf.
19726
19727 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19728
19729 2008-12-09 Doug Evans <dje@google.com>
19730
19731 * linux-low.h (struct process_info): Delete member tid, unused.
19732 * thread-db.c (find_one_thread): Update.
19733 (maybe_attach_thread): Update.
19734
19735 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19736
19737 * target.h (struct target_ops): Add qxfer_osdata member.
19738 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19739 and dirent.h.
19740 (linux_qxfer_osdata): New functions.
19741 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19742 callback.
19743 * server.c (handle_query): Handle "qXfer:osdata:read:".
19744 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19745 (buffer_xml_printf): New functions.
19746 * server.h (struct buffer): New.
19747 (buffer_grow_str, buffer_grow_str0): New macros.
19748 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19749 (buffer_xml_printf): Declare.
19750
19751 2008-11-24 Doug Evans <dje@google.com>
19752
19753 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19754
19755 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19756
19757 * server.c (handle_v_run): Always use the supplied argument list.
19758
19759 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19760
19761 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19762 (xtensa_regmap_table): Add entry for scompare1.
19763
19764 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19765
19766 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19767 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19768 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19769 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19770 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19771 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19772 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19773 XML target descriptions.
19774 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19775 when inferior is running on an ISA 2.05 or later processor. Add
19776 special case to return offset for full 64-bit slot of FPSCR when
19777 in 32-bits.
19778
19779 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19780
19781 * Makefile.in (SFILES, clean): Added sparc64 files.
19782 (reg-sparc64.o, reg-sparc64.c): New.
19783 * configure.srv (sparc*-*-linux*): New configuration.
19784 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19785 syscall arguments for SPARC.
19786 (regsets_store_inferior_registers): Likewise.
19787 * linux-sparc-low.c: New file.
19788
19789 2008-10-21 Doug Evans <dje@google.com>
19790
19791 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19792 (READLINE_DIR,READLINE_DEP): Delete.
19793 (INTERNAL_CFLAGS): Update.
19794 (LINTFLAGS): Update.
19795
19796 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19797
19798 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19799 whole argv from the last run, not just argv[0].
19800
19801 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19802
19803 * regcache.c (new_register_cache): Return NULL if the register
19804 cache size isn't known yet.
19805 (free_register_cache): Avoid dereferencing a NULL regcache.
19806
19807 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19808
19809 * configure.srv: Merge MIPS and MIPS64.
19810
19811 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19812
19813 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19814
19815 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19816
19817 * Makefile.in: Add required vsx dependencies.
19818
19819 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19820 Declare init_registers_powerpc_vsx32l.
19821 Declare init_registers_powerpc_vsx64l.
19822 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19823 (ppc_arch_setup): Check for VSX in hwcap.
19824 (ppc_fill_vsxregset): New function.
19825 (ppc_store_vsxregset): New function.
19826 Add new VSX entry in regset_info target_regsets.
19827
19828 * configure.srv: Add new VSX dependencies.
19829
19830 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19831
19832 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19833 (remote_open): Set or clear transport_is_reliable.
19834 (putpkt_binary): Don't expect acks in noack mode.
19835 (getpkt): Don't send ack/nac in noack mode.
19836 * server.c (handle_general_set): Handle QStartNoAckMode.
19837 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19838 qSupported.
19839 (main): Reset noack_mode on every connection.
19840 * server.h (noack_mode): Declare.
19841
19842 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19843
19844 * Makefile.in (GDBREPLAY_OBS): New variable.
19845 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19846
19847 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19848 Daniel Jacobowitz <dan@codesourcery.com>
19849
19850 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19851 (usr_store_inferior_registers): Likewise.
19852 (regsets_store_inferior_registers): Likewise.
19853
19854 2008-07-31 Rolf Jansen <rj@surtec.com>
19855 Pedro Alves <pedro@codesourcery.com>
19856
19857 * configure.ac: Check for memmem declaration.
19858 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19859 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19860 (disable_packet_qfThreadInfo): Unconditionally compile.
19861 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19862 * configure, config.in: Regenerate.
19863
19864 2008-07-28 Doug Kwan <dougkwan@google.com>
19865
19866 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19867 (linux_write_memory): Remove declaration of errno.
19868
19869 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19870
19871 * linux-low.c (handle_extended_wait): Do not use "status"
19872 variable uninitialized.
19873
19874 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19875
19876 * server.c (handle_v_attach): Inhibit reporting dll changes.
19877
19878 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19879
19880 * remote-utils.c (prepare_resume_reply): If requested, don't
19881 output "thread:TID" in the T stop reply.
19882
19883 * server.c (disable_packet_vCont, disable_packet_Tthread)
19884 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19885 (handle_query): If requested, disable support for qC, qfThreadInfo
19886 and qsThreadInfo.
19887 (handle_v_requests): If requested, disable support for vCont.
19888 (gdbserver_show_disableable): New.
19889 (main): Handle --disable-packet and --disable-packet=LIST.
19890
19891 * server.h (disable_packet_vCont, disable_packet_Tthread)
19892 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19893
19894 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19895
19896 * server.c (gdbserver_usage): Mention --version.
19897
19898 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19899
19900 * Makefile.in (gdbreplay.o): New rule.
19901
19902 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19903
19904 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19905 message, not gdbserver.
19906
19907 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19908 Nathan Sidwell <nathan@codesourcery.com>
19909 Joseph Myers <joseph@codesourcery.com>
19910
19911 * acinclude.m4: Include ../../config/acx.m4.
19912 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19913 * configure, config.in: Regenerate.
19914 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19915 * server.c (gdbserver_version): Print PKGVERSION.
19916 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19917 (main): Adjust gdbserver_usage calls.
19918 * gdbreplay.c (version, host_name): Add declarations.
19919 (gdbreplay_version, gdbreplay_usage): New.
19920 (main): Accept --version and --help options.
19921
19922 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19923
19924 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19925 (arm_breakpoint_at): Handle Thumb.
19926 (the_low_target): Add comment.
19927
19928 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19929
19930 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19931
19932 2008-05-09 Doug Evans <dje@google.com>
19933
19934 * server.h (decode_search_memory_packet): Declare.
19935 * remote-utils.c (decode_search_memory_packet): New fn.
19936 * server.c (handle_search_memory_1): New fn.
19937 (handle_search_memory): New fn.
19938 (handle_query): Process qSearch:memory packets.
19939
19940 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19941
19942 * regcache.c (registers_length): Remove.
19943 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19944 full register packet.
19945 * regcache.h (registers_length): Remove prototype.
19946 * server.h (PBUFSIZ): Define to 16384.
19947
19948 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19949
19950 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19951 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19952 powerpc-64l.o, and powerpc-altivec64l.o.
19953 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19954 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19955 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19956 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19957 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19958 to srv_xmlfiles.
19959
19960 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19961 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19962 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19963 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19964 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19965 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19966 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19967 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19968 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19969 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19970 (clean): Update.
19971
19972 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19973 (init_registers_powerpc_32l): ... this new prototype.
19974 (init_registers_powerpc_32): Remove, replace by ...
19975 (init_registers_powerpc_altivec32l): ... this new prototype.
19976 (init_registers_powerpc_e500): Remove, replace by ...
19977 (init_registers_powerpc_e500l): ... this new prototype.
19978 (init_registers_ppc64): Remove, replace by ...
19979 (init_registers_powerpc_64l): ... this new prototype.
19980 (init_registers_powerpc_64): Remove, replace by ...
19981 (init_registers_powerpc_altivec64l): ... this new prototype.
19982 (ppc_num_regs): Set to 73.
19983 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19984 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19985 (ppc_cannot_store_register): Handle orig_r3 and trap.
19986 (ppc_arch_setup): Update init_registers_... calls.
19987 (ppc_fill_gregset): Handle orig_r3 and trap.
19988
19989 * inferiors.c (clear_inferiors): Reset current_inferior.
19990
19991 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19992
19993 * acinclude.m4: Add override.m4.
19994 * configure: Regenerate.
19995
19996 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19997
19998 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19999 initial call to init_register_ppc64.
20000
20001 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20002
20003 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20004 single powerpc*-*-linux* case.
20005 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20006
20007 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20008
20009 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20010 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20011 from reg_xmlfiles.
20012 * linux-ppc-low.c: Include <elf.h>.
20013 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20014 (ppc_hwcap): New global variable.
20015 (ppc_regmap): Remove __SPE__ #ifdef sections.
20016 (ppc_regmap_e500): New global variable.
20017 (ppc_cannot_store_register): Update __SPE__ special case.
20018 (ppc_get_hwcap): New function.
20019 (ppc_arch_setup): Use it to determine whether inferior supports
20020 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20021 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20022 Do not access registers if target does not support AltiVec.
20023 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20024 Do not access registers if target does not support SPE.
20025 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20026
20027 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20028
20029 * linux-low.c (disabled_regsets, num_regsets): New.
20030 (use_regsets_p): Delete.
20031 (linux_wait_for_process): Clear disabled_regsets.
20032 (regsets_fetch_inferior_registers): Check and set it.
20033 (regsets_store_inferior_registers): Likewise.
20034 (linux_fetch_registers, linux_store_registers): Do not use
20035 use_regsets_p.
20036 (initialize_low): Allocate disabled_regsets.
20037
20038 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20039
20040 * Makefile.in (LIBOBJS): New.
20041 (OBS): Use LIBOBJS.
20042 (memmem.o): New rule.
20043 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20044 * configure: Regenerated.
20045
20046 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20047
20048 * server.c (handle_query): Never return "unsupported" for
20049 qXfer:features:read queries.
20050
20051 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20052
20053 * server.c (get_features_xml): Fix inverted condition.
20054 (handle_query): Always support qXfer:feature:read.
20055
20056 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20057
20058 * server.c (wrapper_argv): New.
20059 (start_inferior): Handle wrapper_argv. If set, expect an extra
20060 trap.
20061 (gdbserver_usage): Document --wrapper.
20062 (main): Parse --wrapper.
20063
20064 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20065
20066 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20067 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20068 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20069 (ppc_set_pc): Likewise.
20070 (ppc_arch_setup): New function.
20071 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20072 of collect_register.
20073 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20074
20075 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20076
20077 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20078 instead of linux-ppc64-low.o.
20079 * linux-ppc64-low.c: Remove file.
20080 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20081 (linux-ppc64-low.o): Remove rule.
20082
20083 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20084 (init_registers_powerpc_64): Likewise.
20085 (ppc_regmap): Conditionally define depending on __powerpc64__.
20086 (ppc_cannot_store_register): Do not special-case "fpscr" when
20087 compiled on __powerpc64__.
20088 (ppc_collect_ptrace_register): New function.
20089 (ppc_supply_ptrace_register): New function.
20090 (ppc_breakpoint): Change type to "unsigned int".
20091 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20092 (the_low_target): Conditionally provide initializers for the
20093 arch_setup member depending on __powerpc64__. Install
20094 collect_ptrace_register and supply_ptrace_register members.
20095
20096 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20097
20098 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20099 * server.c (gdbserver_xmltarget): Define.
20100 (get_features_xml): Use it to replace "target.xml" and arch_string.
20101
20102 * configure.srv: Remove srv_xmltarget. Add XML files that were
20103 mentioned there to srv_xmlfiles instead. Remove conditional tests
20104 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20105 srv_xmlfiles and srv_regobj to include all possible choices.
20106 * configure.ac (srv_xmltarget): Remove.
20107 (srv_xmlfiles): Do not add "target.xml".
20108 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20109 checks for supplementary target information.
20110 * configure: Regenerate.
20111 * Makefile.in (XML_TARGET): Remove.
20112 (target.xml): Remove rule.
20113 (clean): Do not clean up target.xml.
20114 (.PRECIOUS): Do not mention target.xml.
20115
20116 * target.h (struct target_ops): Remove arch_string member.
20117 * linux-low.c (linux_arch_string): Remove.
20118 (linux_target_ops): Remove arch_string initializer.
20119 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20120 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20121 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20122 * spu-low.c (spu_arch_string): Remove.
20123 (spu_target_ops): Remove arch_string initializer.
20124 * win32-low.c (win32_arch_string): Remove.
20125 (win32_target_ops): Remove arch_string initializer.
20126 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20127 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20128 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20129
20130 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20131
20132 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20133 by collect_ptrace_register and supply_ptrace_register hooks.
20134 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20135 instead of checking for the_low_target.left_pad_xfer.
20136 (usr_store_inferior_registers): Use collect_ptrace_register callback
20137 instead of checking for the_low_target.left_pad_xfer.
20138
20139 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20140 (s390_supply_ptrace_register): Likewise.
20141 (s390_fill_gregset): Call s390_collect_ptrace_register.
20142 (the_low_target): Update.
20143
20144 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20145 (ppc_supply_ptrace_register): Likewise.
20146 (the_low_target): Update.
20147
20148 * linux-i386-low.c (the_low_target): Update.
20149 * linux-x86-64-low.c (the_low_target): Update.
20150
20151 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20152
20153 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20154 reg-s390.o and reg-s390x.o.
20155
20156 * linux-low.c (new_inferior): New global variable.
20157 (linux_create_inferior, linux_attach): Set it.
20158 (linux_wait_for_process): Call the_low_target.arch_setup after the
20159 target has stopped for the first time.
20160 (initialize_low): Do not call the_low_target.arch_setup.
20161
20162 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20163 (s390_set_pc): Likewise.
20164 (s390_arch_setup): New function.
20165 (the_low_target): Use s390_arch_setup as arch_setup routine.
20166
20167 * regcache.c (realloc_register_cache): New function.
20168 (set_register_cache): Call it for each existing regcache.
20169
20170 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20171
20172 * server.h (init_registers): Remove prototype.
20173
20174 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20175 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20176 instead of init_registers ().
20177 * linux-arm-low.c (init_registers_arm): Add prototype.
20178 (init_registers_arm_with_iwmmxt): Likewise.
20179 (the_low_target): Add initializer for arch_setup field.
20180 * linux-cris-low.c (init_registers_cris): Add prototype.
20181 (the_low_target): Add initializer for arch_setup field.
20182 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20183 (the_low_target): Add initializer for arch_setup field.
20184 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20185 (the_low_target): Add initializer for arch_setup field.
20186 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20187 (the_low_target): Add initializer for arch_setup field.
20188 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20189 (the_low_target): Add initializer for arch_setup field.
20190 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20191 (the_low_target): Add initializer for arch_setup field.
20192 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20193 (init_registers_mips64_linux): Likewise.
20194 (the_low_target): Add initializer for arch_setup field.
20195 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20196 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20197 (the_low_target): Add initializer for arch_setup field.
20198 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20199 (init_registers_powerpc_64): Likewise.
20200 (the_low_target): Add initializer for arch_setup field.
20201 * linux-s390-low.c (init_registers_s390): Add prototype.
20202 (init_registers_s390x): Likewise.
20203 (the_low_target): Add initializer for arch_setup field.
20204 * linux-sh-low.c (init_registers_sh): Add prototype.
20205 (the_low_target): Add initializer for arch_setup field.
20206 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20207 (the_low_target): Add initializer for arch_setup field.
20208 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20209 (the_low_target): Add initializer for arch_setup field.
20210
20211 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20212 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20213 instead of init_registers ().
20214 * win32-arm-low.c (init_registers_arm): Add prototype.
20215 (the_low_target): Add initializer for arch_setup field.
20216 * win32-i386-low.c (init_registers_i386): Add prototype.
20217 (the_low_target): Add initializer for arch_setup field.
20218
20219 * spu-low.c (init_registers_spu): Add prototype.
20220 (initialize_low): Call initialie_registers_spu () instead of
20221 initialize_registers ().
20222
20223 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20224
20225 * server.c (handle_v_requests): When handling the vRun and vAttach
20226 packets, if already debugging a process, don't kill it. Return an
20227 error instead.
20228
20229 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20230
20231 * server.c (handle_query): Correct length check.
20232
20233 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20234
20235 * win32-low.c (do_initial_child_stuff): Add process handle
20236 parameter. Set current_process_handle and current_process_id from the
20237 parameters. Clear globals.
20238 (win32_create_inferior): Don't set current_process_handle and
20239 current_process_id here. Instead pass them on the call to
20240 do_initial_child_stuff.
20241 (win32_attach): Likewise.
20242 (win32_clear_inferiors): New.
20243 (win32_kill): Don't close the current process handle or the
20244 current thread handle here. Instead call win32_clear_inferiors.
20245 (win32_detach): Don't open a new handle to the process. Call
20246 win32_clear_inferiors.
20247 (win32_join): Don't rely on current_process_handle; open a new
20248 handle using the process id.
20249 (win32_wait): Call win32_clear_inferiors when the inferior process
20250 has exited.
20251
20252 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20253
20254 * server.c (monitor_show_help): Add "exit".
20255
20256 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20257
20258 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20259 (clean): Add reg-xtensa.c.
20260 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20261 * configure.srv (xtensa*-*-linux*) New target.
20262 * linux-xtensa-low.c: New.
20263 * xtensa-xtregs.c: New.
20264
20265 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20266
20267 * hostio.c: Don't include errno.h.
20268 (errno_to_fileio_errno): Move to hostio-errno.
20269 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20270 error number outputting to the target->hostio_last_error callback.
20271 (hostio_packet_error): Use FILEIO_EINVAL directly.
20272 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20273 calls to hostio_error.
20274 * hostio-errno.c: New.
20275 * server.h (hostio_last_error_from_errno): Declare.
20276 * target.h (target_ops): Add hostio_last_error member.
20277 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20278 as hostio_last_error handler.
20279 * spu-low.c (spu_target_ops): Likewise.
20280 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20281 (wince_hostio_last_error): New functions.
20282 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20283 as hostio_last_error handler.
20284 (win32_target_ops) [!_WIN32_WCE]: Register
20285 hostio_last_error_from_errno as hostio_last_error handler.
20286 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20287 (hostio-errno.o): New rule.
20288 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20289 * configure.srv (srv_hostio_err_objs): New variable. Default to
20290 hostio-errno.o.
20291 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20292 * configure: Regenerate.
20293
20294 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20295
20296 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20297 (linux_kill, linux_detach): Clean up the process list.
20298 * remote-utils.c (remote_open): Improve port number parsing.
20299 (putpkt_binary, input_interrupt): Only send interrupts if the target
20300 is running.
20301 * server.c (extended_protocol): Make static.
20302 (attached): Define earlier.
20303 (exit_requested, response_needed, program_argv): New variables.
20304 (target_running): New.
20305 (start_inferior): Clear attached here.
20306 (attach_inferior): Set attached here.
20307 (require_running): Define.
20308 (handle_query): Use require_running and target_running. Implement
20309 "monitor exit".
20310 (handle_v_attach, handle_v_run): New.
20311 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20312 (gdbserver_usage): Update.
20313 (main): Redo argument parsing. Handle --debug and --multi. Handle
20314 --attach along with other options or after the port. Save
20315 program_argv. Support no initial program. Resynchronize
20316 communication with GDB after an error. Handle "monitor exit".
20317 Use require_running and target_running. Always allow the extended
20318 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20319 restart in extended mode.
20320 * README: Refer to the GDB manual. Update --attach usage.
20321
20322 2007-12-20 Andreas Schwab <schwab@suse.de>
20323
20324 * linux-low.c (STACK_SIZE): Define.
20325 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20326 (linux_test_for_tracefork): Likewise.
20327
20328 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20329
20330 * linux-low.c (linux_wait_for_event): Update messages. Do not
20331 reinsert auto-delete breakpoints.
20332 * mem-break.c (struct breakpoint): Change return type of handler to
20333 int.
20334 (set_breakpoint_at): Update handler type.
20335 (reinsert_breakpoint_handler): Return 1 instead of calling
20336 delete_breakpoint.
20337 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20338 setting a new one.
20339 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20340 * mem-break.h (set_breakpoint_at): Update handler type.
20341 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20342 * win32-low.c (auto_delete_breakpoint): New.
20343 (get_child_debug_event): Use it.
20344
20345 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20346
20347 * configure.ac: Check for pread and pwrite.
20348 * hostio.c (handle_pread): Fall back to lseek and read.
20349 (handle_pwrite): Fall back to lseek and write.
20350 * config.in, configure: Regenerated.
20351
20352 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20353
20354 * server.c (myresume): Add own_buf argument.
20355 (main): Update calls.
20356
20357 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20358
20359 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20360 * remote-utils.c (remote_open): Do not call disable_async_io.
20361 (block_async_io): Delete.
20362 (unblock_async_io): Make static.
20363 (initialize_async_io): New.
20364 * server.c (handle_v_cont): Handle async I/O here.
20365 (myresume): Likewise. Move other common resume tasks here...
20366 (main): ... from here. Call initialize_async_io. Disable async
20367 I/O before the main loop.
20368 * server.h (initialize_async_io): Declare.
20369 (block_async_io, unblock_async_io): Delete prototypes.
20370 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20371
20372 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20373
20374 * remote-utils.c (readchar): Allow binary data in received messages.
20375
20376 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20377
20378 * win32-low.c (attaching): New global.
20379 (win32_create_inferior): Clear the `attaching' global.
20380 (win32_attach): Set the `attaching' global.
20381 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20382 attaching. Only set a breakpoint at the entry point if not
20383 attaching.
20384
20385 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20386
20387 * server.c (main): Don't report dll events on the initial
20388 connection on attaches.
20389
20390 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20391
20392 * server.c (main): Relax numerical bases supported for the pid of
20393 the --attach command line argument.
20394
20395 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20396
20397 * win32-low.c (win32_attach): Call OpenProcess before
20398 DebugActiveProcess, not after. Add last error output to error
20399 call.
20400
20401 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20402
20403 * win32-low.c (win32_get_thread_context)
20404 (win32_set_thread_context): New functions.
20405 (thread_rec): Use win32_get_thread_context.
20406 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20407 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20408 field.
20409
20410 2007-12-03 Leo Zayas
20411 Pedro Alves <pedro_alves@portugalmail.pt>
20412
20413 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20414 global variables.
20415 (child_add_thread): Minor cleanup.
20416 (child_continue): Resume artificially suspended threads before
20417 calling ContinueDebugEvent.
20418 (suspend_one_thread): New.
20419 (fake_breakpoint_event): New.
20420 (get_child_debug_event): Change return type to int. Check here if
20421 gdb sent an interrupt request. If a soft interrupt was requested,
20422 fake a breakpoint event. Return 0 if there is no event to handle,
20423 and 1 otherwise.
20424 (win32_wait): Don't check here if gdb sent an interrupt request.
20425 Ensure there is a valid event to handle.
20426 (win32_request_interrupt): Add soft interruption method as last
20427 resort.
20428
20429 2007-12-03 Leo Zayas
20430 Pedro Alves <pedro_alves@portugalmail.pt>
20431
20432 * win32-low.h (win32_thread_info): Add descriptions to the
20433 structure members. Replace `suspend_count' counter by a
20434 `suspended' flag.
20435 * win32-low.c (thread_rec): Update condition of when to get the
20436 context from the inferior. Rely on ContextFlags being set if it
20437 has already been retrieved. Only suspend the inferior thread if
20438 we haven't already. Warn if that fails.
20439 (continue_one_thread): s/suspend_count/suspended/. Only call
20440 ResumeThread once. Warn if that fails.
20441
20442 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20443
20444 * win32-low.c (win32_wait): Don't read from the inferior when it
20445 has already exited.
20446
20447 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20448
20449 * Makefile.in (win32_low_h): New variable.
20450 (win32-low.o): Add dependency on $(win32_low_h).
20451 (win32-arm-low.o, win32-i386-low.o): New rules.
20452
20453 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20454
20455 * hostio.c: Correct copyright year.
20456
20457 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20458
20459 * Makefile.in (OBS): Add hostio.o.
20460 (hostio.o): New rule.
20461 * server.h (handle_vFile): Declare.
20462 * hostio.c: New file.
20463 * server.c (handle_v_requests): Take packet_len and new_packet_len
20464 for binary packets. Call handle_vFile.
20465 (main): Update call to handle_v_requests.
20466
20467 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20468
20469 * linux-low.c: Include <sched.h>.
20470
20471 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20472
20473 * linux-low.c (linux_tracefork_grandchild): New.
20474 (linux_tracefork_child): Use clone.
20475 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20476
20477 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20478
20479 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20480
20481 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20482
20483 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20484
20485 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20486
20487 * inferiors.c (change_inferior_id): Delete.
20488 (add_pid_to_list, pull_pid_from_list): New.
20489 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20490 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20491 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20492 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20493 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20494 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20495 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20496 (using_threads): Always set to 1.
20497 (handle_extended_wait): New.
20498 (add_process): Do not set TID.
20499 (linux_create_inferior): Set must_set_ptrace_flags.
20500 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20501 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20502 (linux_thread_alive): Rename TID argument to LWPID.
20503 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20504 (linux_wait_for_event): Do not use TID or check using_threads. Update
20505 call to dead_thread_notify. Call handle_extended_wait.
20506 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20507 (send_sigstop): Delete sigstop_sent.
20508 (wait_for_sigstop): Avoid TID.
20509 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20510 (linux_test_for_tracefork): New.
20511 (linux_lookup_signals): Use thread_db_active and
20512 linux_supports_tracefork_flag.
20513 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20514 * linux-low.h (get_process_thread): Avoid TID.
20515 (struct process_ifo): Move thread_known and tid to the end. Remove
20516 sigstop_sent.
20517 (linux_attach_lwp, thread_db_init): Update prototypes.
20518 * server.h (change_inferior_id): Delete prototype.
20519 (add_pid_to_list, pull_pid_from_list): New prototypes.
20520 * thread-db.c (thread_db_use_events): New.
20521 (find_first_thread): Rename to...
20522 (find_one_thread): ...this. Update callers and messages. Do not
20523 call fatal. Check thread_db_use_events. Do not call
20524 change_inferior_id or new_thread_notify.
20525 (maybe_attach_thread): Update. Do not call new_thread_notify.
20526 (thread_db_init): Set thread_db_use_events. Check use_events.
20527 * utils.c (fatal, warning): Correct message prefix.
20528
20529 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20530
20531 * Makefile.in (clean): Remove new files.
20532 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20533 (powerpc-64.o, powerpc-64.c): New rules.
20534 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20535 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20536 with SPE.
20537 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20538 SPE targets.
20539 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20540 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20541 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20542 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20543 (target_regsets): Add AltiVec and SPE register sets.
20544 * configure.ac: Check for AltiVec and SPE.
20545 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20546 (ppc_fill_vrregset, ppc_store_vrregset): New.
20547 (target_regsets): Add AltiVec register set.
20548 * configure: Regenerated.
20549
20550 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20551
20552 * linux-low.c (O_LARGEFILE): Define.
20553 (linux_read_memory): Use /proc/PID/mem.
20554 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20555 * configure, config.in: Regenerated.
20556
20557 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20558
20559 * linux-low.c (linux_wait_for_event): Do not pass signals while
20560 single-stepping.
20561
20562 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20563
20564 * win32-low.c (create_process): New.
20565 (win32_create_inferior): Use create_process instead of
20566 CreateProcess. If create_process failed retry appending an ".exe"
20567 suffix. Store the GetLastError result immediatelly after
20568 create_process calls and use it on the call to error.
20569
20570 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20571
20572 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20573
20574 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20575
20576 * configure.ac: Switch license to GPLv3.
20577
20578 2007-08-01 Michael Snyder <msnyder@access-company.com>
20579
20580 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20581
20582 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20583
20584 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20585 typedef.
20586 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20587 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20588 CloseToolhelp32Snapshot.
20589 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20590 CloseToolhelp32Snapshot.
20591
20592 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20593
20594 * server.c (main): Check for inferior exit before main loop.
20595
20596 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20597
20598 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20599 instead of on tmp_desc.
20600
20601 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20602 Daniel Jacobowitz <dan@codesourcery.com>
20603
20604 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20605 (add_thread): Minor cleanups.
20606 (clear_inferiors): Move lower in the file. Clear the DLL
20607 list.
20608 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20609 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20610 (xml_escape_text): New.
20611 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20612 for qSupported.
20613 (handle_v_cont): Report errors.
20614 (gdbserver_version): Update.
20615 (main): Correct size of own_buf. Do not report initial DLL events.
20616 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20617 (unloaded_dll, xml_escape_text): New.
20618 * win32-low.c (enum target_waitkind): Update comments.
20619 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20620 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20621 (win32_EnumProcessModules, win32_GetModuleInformation)
20622 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20623 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20624 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20625 (win32_Module32First, win32_Module32Next, load_toolhelp)
20626 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20627 (get_child_debug_event): Handle DLL events.
20628 (win32_wait): Likewise.
20629
20630 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20631
20632 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20633 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20634
20635 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20636
20637 * win32-low.c (handle_output_debug_string): Ignore event if not
20638 waiting.
20639
20640 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20641
20642 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20643
20644 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20645
20646 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20647
20648 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20649
20650 * inferiors.c (change_inferior_id): Add comment.
20651 * linux-low.c (check_removed_breakpoint): Add an early
20652 prototype. Improve debug output.
20653 (linux_attach): Doc update.
20654 (linux_detach_one_process, linux_detach): Clean up before releasing
20655 each process.
20656 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20657 * linux-low.h (struct process_info): Doc improvement.
20658 * mem-break.c (delete_all_breakpoints): New.
20659 * mem-break.h (delete_all_breakpoints): New prototype.
20660 * thread-db.c (find_first_thread): New.
20661 (thread_db_create_event): Call it instead of
20662 thread_db_find_new_threads. Clean up unused variables.
20663 (maybe_attach_thread): Remove first thread handling.
20664 (thread_db_find_new_threads): Use find_first_thread.
20665 (thread_db_get_tls_address): Likewise.
20666
20667 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20668
20669 * thread-db.c (thread_db_find_new_threads): Add prototype.
20670 (thread_db_create_event): Check for the main thread before adding
20671 a new thread.
20672 (maybe_attach_thread): Only enable event reporting if TID == 0.
20673 (thread_db_get_tls_address): Check for new threads.
20674
20675 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20676
20677 * linux-low.c (linux_create_inferior): Try execv before execvp.
20678 * spu-low.c (spu_create_inferior): Likewise.
20679
20680 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20681
20682 * linux-low.c (linux_create_inferior): Change execv to execvp.
20683 * spu-low.c (spu_create_inferior): Likewies.
20684
20685 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20686
20687 * Makefile.in (clean): Clean new files instead of deleted ones.
20688 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20689 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20690 rules.
20691 * configure.srv: Specify XML files and new regformats for MIPS and
20692 MIPS64 GNU/Linux.
20693 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20694 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20695 an entry for the restart register.
20696 (mips_cannot_fetch_register, mips_cannot_store_register)
20697 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20698 register names to match the XML descriptions.
20699 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20700 restart register instead of $0.
20701
20702 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20703 Markus Deuling <deuling@de.ibm.com>
20704
20705 * remote-utils.c (decode_xfer_write): New function.
20706 * server.h (decode_xfer_write): Add prototype.
20707 * server.c (handle_query): Add PACKET_LEN argument. Support
20708 qXfer:spu:read and qXfer:spu:write packets.
20709 (main): Pass packet_len to handle_query.
20710 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20711 * target.h (target_ops): Add qxfer_spu.
20712
20713 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20714
20715 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20716 accessing non-seekable spufs files.
20717
20718 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20719
20720 * server.c (handle_query): Add reply for qC packet.
20721
20722 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20723 Leo Zayas <lerele@champenstudios@com>
20724
20725 * server.h (check_remote_input_interrupt_request): New function.
20726 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20727 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20728 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20729 (check_remote_input_interrupt_request): New function.
20730 * server.h (check_remote_input_interrupt_request): Declare.
20731 * win32-low.c (winapi_DebugBreakProcess,
20732 winapi_GenerateConsoleCtrlEvent): New typedefs.
20733 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20734 to 250 ms.
20735 (win32_wait): Check for remote interrupt request
20736 with check_remote_input_interrupt_request.
20737 (win32_request_interrupt): New function.
20738 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20739
20740 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20741
20742 * win32-low.c (debug_registers_changed,
20743 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20744 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20745 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20746 (thread_rec): Get context using the low target.
20747 (child_add_thread): Call thread_added on the low target,
20748 which does the same thing.
20749 (regptr): Delete.
20750 (do_initial_child_stuff): Remove debug registers references.
20751 Set context using the low target. Resume threads after
20752 setting the contexts.
20753 (child_continue): Remove dead variable. Remove debug
20754 registers references.
20755 (child_fetch_inferior_registers): Go through the low target.
20756 (do_child_store_inferior_registers): Remove.
20757 (child_store_inferior_registers): Go through the low target.
20758 (win32_resume): Remove debug registers references.
20759 Set context using the low target.
20760 (handle_exception): Change return type to void. Don't record
20761 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20762 first chance exception.
20763 (get_child_debug_event): Change return type to void. Remove
20764 goto loop. Always return after waiting for debug event.
20765 (win32_wait): Convert to switch statement. Handle spurious
20766 events.
20767
20768 * win32-i386-low.c (debug_registers_changed,
20769 debug_registers_used): New.
20770 (initial_stuff): Rename to ...
20771 (i386_initial_stuff): ... this. Clear debug registers
20772 state variables.
20773 (store_debug_registers): Delete.
20774 (i386_get_thread_context): New.
20775 (load_debug_registers): Delete.
20776 (i386_set_thread_context): New.
20777 (i386_thread_added): New.
20778 (single_step): Rename to ...
20779 (i386_single_step): ... this.
20780 (do_fetch_inferior_registers): Rename to ...
20781 (i386_fetch_inferior_register): ... this.
20782 (i386_store_inferior_register): New.
20783 (the_low_target): Adapt to new interface.
20784
20785 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20786 (arm_get_thread_context): New.
20787 (arm_set_thread_context): New.
20788 (regptr): New.
20789 (do_fetch_inferior_registers): Rename to ...
20790 (arm_fetch_inferior_register): ... this.
20791 (arm_store_inferior_register): New.
20792 (arm_wince_breakpoint): Reimplement as unsigned long.
20793 (arm_wince_breakpoint_len): Define.
20794 (the_low_target): Adapt to new interface.
20795
20796 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20797 load_debug_registers. Add get_thread_context, set_thread_context,
20798 thread_added and store_inferior_register. Rename
20799 fetch_inferior_registers to fetch_inferior_register.
20800 (regptr): Remove declaration.
20801
20802 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20803
20804 * linux-low.c (linux_detach): Change return type to int. Return 0.
20805 * spu-low.c (spu_detach): Likewise.
20806
20807 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20808
20809 * target.h (target_ops): Change return type of detach to int.
20810 Add join.
20811 (join_inferior): New.
20812 * server.c (main): Don't skip detach support on mingw32.
20813 If the inferior doesn't support detaching return error.
20814 Call join_inferior instead of using waitpid.
20815 * linux-low.c (linux_join): New.
20816 (linux_target_op): Add linux_join.
20817 * spu-low.c (spu_join): New.
20818 (spu_target_ops): Add spu_join.
20819 * win32-low.c (win32_detach): Adapt to new interface.
20820 Reopen current_process_handle before detaching. Issue a child
20821 resume before detaching.
20822 (win32_join): New.
20823 (win32_target_op): Add win32_join.
20824
20825 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20826
20827 * win32-low.c (win32-attach): Fix return value.
20828 * target.h (target_ops): Describe ATTACH return values.
20829
20830 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20831
20832 * win32-low.c (GETPROCADDRESS): Define.
20833 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20834 (winapi_DebugSetProcessKillOnExit): Likewise.
20835 (win32_create_inferior): Force usage of ansi CreateProcessA.
20836 (win32_attach): Use GETPROCADDRESS.
20837 (win32_detach): Likewise.
20838
20839 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20840
20841 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20842
20843 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20844
20845 * win32-low.c: Commit leftover changes from 2007-03-29.
20846
20847 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20848
20849 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20850 fields short instead of int. Add explicit padding.
20851 (i387_cache_to_fsave): Remove unnecessary casts.
20852 (i387_fsave_to_cache): Doc fix.
20853 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20854
20855 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20856
20857 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20858 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20859
20860 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20861
20862 * configure.srv (arm*-*-mingw32ce*): Move near the other
20863 arm targets.
20864
20865 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20866
20867 * configure.ac: Add errno checking.
20868 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20869 sys/file.h and malloc.h.
20870 (AC_CHECK_DECLS): Add perror.
20871 (srv_mingwce): Handle.
20872 * configure.srv (i[34567]86-*-cygwin*): Add
20873 win32-i386-low.o to srv_tgtobj.
20874 (i[34567]86-*-mingw*): Likewise.
20875 (arm*-*-mingw32ce*): Add case.
20876 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20877 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20878 [__MINGW32CE__] (strerror): New function.
20879 [__MINGW32CE__] (errno): Define to GetLastError.
20880 [__MINGW32CE__] (COUNTOF): New macro.
20881 (remote_open): Remove extra close call.
20882 * mem-break.c (delete_breakpoint_at): New function.
20883 * mem-break.h (delete_breakpoint_at): Declare.
20884 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20885 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20886 [USE_WIN32API] (read, write): Add char* casts.
20887 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20888 * server.h: Include wincecompat.h on Windows CE.
20889 [HAVE_ERRNO_H]: Check.
20890 (perror): Declare if not declared.
20891 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20892 (perror_with_name): Remove errno declaration.
20893 * wincecompat.h: New.
20894 * wincecompat.c: New.
20895 * win32-low.h: New.
20896 * win32-arm-low.c: New.
20897 * win32-i386-low.c: New.
20898 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20899 (OUTMSG2): Make it safe.
20900 (_T): New macro.
20901 (COUNTOF): New macro.
20902 (NUM_REGS): Get it from the low target.
20903 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20904 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20905 (thread_rec): Let low target handle debug registers.
20906 (child_add_thread): Likewise.
20907 (child_init_thread_list): Likewise.
20908 (continue_one_thread): Likewise.
20909 (regptr): New.
20910 (do_child_fetch_inferior_registers): Move to ...
20911 * win32-i386-low.c: ... here, and rename to ...
20912 (do_fetch_inferior_registers): ... this.
20913 * win32-low.c (child_fetch_inferior_registers):
20914 Go through the low target.
20915 (do_child_store_inferior_registers): Use regptr.
20916 (strwinerror): New function.
20917 (win32_create_inferior): Handle Windows CE.
20918 Use strwinerror instead of strerror on Windows error
20919 codes. Add program to the error output.
20920 Don't close the main thread handle on Windows CE.
20921 (win32_attach): Use coredll.dll on Windows CE.
20922 (win32_kill): Close current process and current
20923 thread handles.
20924 (win32_detach): Use coredll.dll on Windows CE.
20925 (win32_resume): Let low target handle debug registers, and
20926 step request.
20927 (handle_exception): Add/Remove initial breakpoint. Avoid
20928 non-existant WSTOPSIG on Windows CE.
20929 (win32_read_inferior_memory): Cast to remove warning.
20930 (win32_arch_string): Go through the low target.
20931 (initialize_low): Call set_breakpoint_data with the low
20932 target's breakpoint.
20933 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20934 FOP_REGNUM, mappings): Move to ...
20935 * win32-i386-low.c: ... here.
20936 * win32-low.c (win32_thread_info): Move to ...
20937 * win32-low.h: ... here.
20938 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20939 win32-arm-low.c and wincecompat.c.
20940 (all:): Add $EXEEXT.
20941 (install-only:): Likewise.
20942 (gdbserver:): Likewise.
20943 (gdbreplay:): Likewise.
20944 * config.in: Regenerate.
20945 * configure: Regenerate.
20946
20947 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20948
20949 * win32-low.c: Rename typedef thread_info to
20950 win32_thread_info throughout.
20951
20952 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20953
20954 * win32-i386-low.c: Rename to ...
20955 * win32-low.c: ... this.
20956 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20957 * Makefile.in: Likewise.
20958
20959 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20960
20961 * remote-utils.c (monitor_output): Constify msg parameter.
20962 * server.h (monitor_output): Likewise.
20963 * win32-i386-low.c (handle_output_debug_string): New.
20964 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20965 handle_output_debug_string.
20966 (get_child_debug_event): Likewise.
20967
20968 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20969
20970 * server.c (main): Correct strtoul check.
20971
20972 2007-03-27 Jon Ringle <jon@ringle.org>
20973
20974 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20975
20976 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20977
20978 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20979
20980 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20981
20982 * terminal.h: Check HAVE_SGTTY_H.
20983
20984 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20985
20986 * remote-utils.c (remote_open): Print out the assigned port number.
20987
20988 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20989
20990 * remote-utils.c (monitor_output): New function.
20991 * server.c (debug_threads): Define here.
20992 (monitor_show_help): New function.
20993 (handle_query): Handle qRcmd.
20994 (main): Do not handle 'd' packet.
20995 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20996 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20997 of debug_threads.
20998
20999 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21000
21001 * Makefile.in (EXEEXT): New.
21002 (clean): Use $(EXEEXT).
21003
21004 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21005
21006 * target.h (target_ops): Rename send_signal to request_interrupt,
21007 and remove enum target_signal parameter.
21008 * linux-low.c (linux_request_interrupt): Rename from
21009 linux_send_signal, and always send SIGINT.
21010 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21011 and always send SIGINT.
21012 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21013 of send_signal.
21014 (input_interrupt): Likewise.
21015
21016 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21017
21018 * server.c (get_features_xml): Check if target implemented
21019 arch_string.
21020 * win32-i386-low.c (win32_arch_string): New.
21021 (win32_target_ops): Add win32_arch_string as arch_string member.
21022
21023 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21024
21025 * spu-low.c (spu_arch_string): New.
21026 (spu_target_ops): Add spu_arch_string.
21027
21028 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21029
21030 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21031 * configure.ac: Do not check for terminal.h.
21032 * configure, config.in: Regenerated.
21033
21034 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21035
21036 * Makefile.in (OBS): Add $(XML_BUILTIN).
21037 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21038 (clean): Update.
21039 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21040 (arm-with-iwmmxt.c): New.
21041 * config.in, configure: Regenerate.
21042 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21043 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21044 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21045 (arm*-*-linux*): Add iWMMXt and regset support.
21046 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21047 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21048 (arm_store_wmmxregset, target_regsets): New.
21049 * server.c (get_features_xml): Take annex argument. Check builtin
21050 XML documents.
21051 (handle_query): Handle multiple annexes.
21052
21053 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21054
21055 * remote-utils.c [USE_WIN32API] (read, write): Define.
21056 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21057 write.
21058
21059 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21060
21061 * linux-i386-low.c (the_low_target): Set arch_string.
21062 * linux-x86-64-low.c (the_low_target): Likewise.
21063 * linux-low.c (linux_arch_string): New.
21064 (linux_target_ops): Add it.
21065 * linux-low.h (struct linux_target_ops): Add arch_string.
21066 * server.c (write_qxfer_response): Use const void * for DATA.
21067 (get_features_xml): New.
21068 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21069 * target.h (struct target_ops): Add arch_string method.
21070
21071 2007-01-03 Denis Pilat <denis.pilat@st.com>
21072 Daniel Jacobowitz <dan@codesourcery.com>
21073
21074 * linux-low.c (linux_kill): Handle being called with no threads.
21075 * win32-i386-low.c (win32_kill): Likewise.
21076 (get_child_debug_event): Clear current_process_handle.
21077
21078 2006-12-30 Denis PILAT <denis.pilat@st.com>
21079 Daniel Jacobowitz <dan@codesourcery.com>
21080
21081 * remote-utils.c (remote_open): Check the type of specified
21082 serial port devices before opening them.
21083 * server.c (main): Kill the inferior if an error occurs during
21084 the first remote_open.
21085
21086 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21087
21088 * README: Update supported targets.
21089
21090 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21091
21092 * Makefile.in (clean): Remove reg-mips64.c.
21093 (reg-mips64.c, reg-mips64.o): New rules.
21094 * configure.srv: Handle mips64. Include regset support for mips.
21095 * linux-mips-low.c (union mips_register): New.
21096 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21097 (mips_breakpoint, mips_breakpoint_at): Use int.
21098 (mips_collect_register, mips_supply_register)
21099 (mips_collect_register_32bit, mips_supply_register_32bit)
21100 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21101 (mips_store_fpregset, target_regsets): New.
21102 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21103
21104 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21105
21106 * configure.srv: Add target "spu*-*-*".
21107 * Makefile.in (clean): Remove reg-spu.c.
21108 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21109 * spu-low.c: New file.
21110
21111 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21112
21113 * configure.ac: Correct td_thr_tls_get_addr test.
21114 * configure: Regenerated.
21115
21116 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21117
21118 * linux-low.c (linux_wait_for_event): Reformat. Use the
21119 pass_signals array.
21120 * remote-utils.c (decode_address_to_semicolon): New.
21121 * server.c (pass_signals, handle_general_set): New.
21122 (handle_query): Mention QPassSignals for qSupported.
21123 (main): Call handle_general_set.
21124 * server.h (pass_signals, decode_address_to_semicolon): New.
21125
21126 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21127
21128 * server.c (handle_query): Correct error handling for read_auxv.
21129
21130 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21131
21132 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21133 and srv_linux_thread_db to yes.
21134 * linux-s390-low.c (s390_fill_gregset): New function.
21135 (target_regsets): Define data structure.
21136
21137 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21138
21139 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21140 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21141 * config.in, configure: Regenerated.
21142 * inferiors.c (gdb_id_to_thread): New function.
21143 (gdb_id_to_thread_id): Use it.
21144 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21145 * linux-low.h (struct process_info): Add th member.
21146 (thread_db_get_tls_address): New prototype.
21147 * remote-utils.c (decode_address): Make non-static.
21148 * server.c (handle_query): Handle qGetTLSAddr.
21149 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21150 * target.h (struct target_ops): Add get_tls_address.
21151 * thread-db.c (maybe_attach_thread): Save the thread handle.
21152 (thread_db_get_tls_address): New.
21153
21154 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21155
21156 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21157 (linux_resume_one_process): Take a siginfo_t *. Update all
21158 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21159 (struct pending_signals): Add a siginfo_t.
21160 (linux_wait_for_process): Always set last_status.
21161 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21162 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21163 * linux-low.h (struct process_info): Add last_status.
21164
21165 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21166
21167 * remote-utils.c (try_rle): New function.
21168 (putpkt_binary): Use it.
21169
21170 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21171
21172 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21173 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21174 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21175 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21176 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21177 point registers.
21178
21179 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21180
21181 * server.c (terminal_fd): New variable.
21182 (old_foreground_pgrp): Likewise.
21183 (restore_old_foreground_pgrp): New function.
21184 (start_inferior): Record the terminal file descriptor in terminal_fd
21185 and its original foreground group in old_foreground_pgrp. Register
21186 restore_old_foreground_pgrp with atexit().
21187
21188 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21189
21190 * server.c (handle_query): Correct qPart to qXfer.
21191
21192 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21193
21194 * configure.ac: Check for more headers which are missing on
21195 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21196 * configure.srv: Add Cygwin and mingw32.
21197 * remote-utils.c: Don't include headers unconditionally which
21198 are missing on mingw32. Include <winsock.h> for mingw32.
21199 (remote_open): Adjust for mingw32 support. Flush
21200 standard error after writing to it.
21201 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21202 (unblock_async_io, enable_async_io, disable_async_io)
21203 (readchar, getpkt): Update for Winsock support.
21204 (prepare_resume_reply): Expect a protocol signal number.
21205 * server.c: Disable <sys/wait.h> on mingw32.
21206 (start_inferior): Adjust for mingw32 support. Flush
21207 standard error after writing to it.
21208 (attach_inferior): Likewise. Use protocol signal
21209 numbers.
21210 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21211 and names.
21212 * win32-i386-low.c: New file.
21213 * Makefile.in (XM_CLIBS): Set.
21214 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21215 (win32-i386-low.o): New dependency rule.
21216 * linux-low.c (linux_wait): Use target signal numbers.
21217 * target.h (struct target_ops): Doc fix.
21218 * server.h (target_signal_to_name): New prototype.
21219 * gdbreplay.c: Don't include headers unconditionally which
21220 are missing on mingw32. Include <winsock.h> for mingw32.
21221 (remote_close, remote_open): Adjust for Winsock support.
21222 * configure, config.in: Regenerated.
21223
21224 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21225
21226 * server.c (decode_xfer_read, write_qxfer_response): New.
21227 (handle_query): Take a packet length argument. Handle
21228 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21229 the qSupported response.
21230 (main): Update call to handle_query.
21231
21232 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21233
21234 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21235 (putpkt_binary): Renamed from putpkt and adjusted for binary
21236 data.
21237 (putpkt): New wrapper for putpkt_binary.
21238 (readchar): Don't mask off the high bit.
21239 (decode_X_packet): New function.
21240 * server.c (main): Call putpkt_binary if a handler sets the packet
21241 length. Save the length of the incoming packet. Handle 'X'.
21242 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21243
21244 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21245
21246 * server.c (handle_query): Handle qSupported.
21247
21248 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21249
21250 * remote-utils.c (all_symbols_looked_up): New variable.
21251 (look_up_one_symbol): Check it.
21252 * server.h (look_up_one_symbol): New declaration.
21253 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21254
21255 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21256
21257 * Makefile.in (linux-arm-low.o): Update dependencies.
21258 * linux-arm-low.c: Include "gdb_proc_service.h".
21259 (PTRACE_GET_THREAD_AREA): Define.
21260 (ps_get_thread_area): New function.
21261
21262 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21263
21264 * configure.srv (m68k*-*-uclinux*): New target.
21265 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21266 (linux_resume_one_process): Remove extraneous cast.
21267 (linux_read_offsets): New.
21268 (linux_target_op): Add linux_read_offsets on mmuless systems.
21269 * server.c (handle_query): Add qOffsets logic.
21270 * target.h (struct target_ops): Add read_offsets.
21271
21272 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21273
21274 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21275 (PTRACE_GET_THREAD_AREA): Define.
21276 (ps_get_thread_area): New function.
21277 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21278 (linux-x86-64-low.o): Update.
21279
21280 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21281
21282 * configure.ac: Remove checks for prfpregset_t.
21283 * gdb_proc_service.h: New file.
21284 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21285 new "gdb_proc_service.h".
21286 * proc-service.c: Likewise.
21287 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21288 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21289 * Makefile.in (gdb_proc_service_h): Updated.
21290 * configure, config.in: Regenerated.
21291
21292 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21293
21294 * remote-utils.c (prepare_resume_reply): Move declaration
21295 of gdb_id_from_wait to the top of the block.
21296
21297 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21298
21299 * linux-low.c (regsets_store_inferior_registers): Read the regset
21300 from the target before filling it.
21301
21302 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21303
21304 * server.c (attach_inferior): Return SIGTRAP for a successful
21305 attach.
21306
21307 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21308
21309 * Makefile.in (OBS): Add version.o.
21310 (STAGESTUFF): Delete.
21311 (version.o): Add dependencies.
21312 (version.c): Replace rule.
21313 (clean): Remove version.c.
21314 * server.c (gdbserver_version): New.
21315 (gdbserver_usage): Use printf.
21316 (main): Handle --version and --help.
21317 * server.h (version, host_name): Add declarations.
21318
21319 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21320
21321 * linux-arm-low.c:
21322 * linux-arm-low.c:
21323 * inferiors.c:
21324 * i387-fp.h:
21325 * i387-fp.c:
21326 * gdbreplay.c:
21327 * regcache.c:
21328 * proc-service.c:
21329 * mem-break.h:
21330 * mem-break.c:
21331 * linux-x86-64-low.c:
21332 * linux-sh-low.c:
21333 * linux-s390-low.c:
21334 * linux-ppc64-low.c:
21335 * linux-ppc-low.c:
21336 * linux-mips-low.c:
21337 * linux-m68k-low.c:
21338 * linux-m32r-low.c:
21339 * linux-low.h:
21340 * linux-low.c:
21341 * linux-ia64-low.c:
21342 * linux-i386-low.c:
21343 * linux-crisv32-low.c:
21344 * thread-db.c:
21345 * terminal.h:
21346 * target.h:
21347 * target.c:
21348 * server.h:
21349 * server.c:
21350 * remote-utils.c:
21351 * regcache.h:
21352 * utils.c:
21353 * Makefile.in:
21354 * configure.ac:
21355 * gdbserver.1: Add (C) after Copyright. Update the FSF
21356 address.
21357
21358 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21359
21360 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21361 (arm_breakpoint_at): Recognize both breakpoints.
21362 (the_low_target): Use the correct breakpoint instruction.
21363
21364 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21365
21366 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21367 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21368 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21369 (the_low_target): Update.
21370
21371 2005-10-25 Andreas Schwab <schwab@suse.de>
21372
21373 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21374
21375 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21376 (ia64_num_regs): Reduce to 462.
21377
21378 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21379
21380 * acinclude.m4: Correct quoting.
21381 * aclocal.m4: Regenerated.
21382
21383 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21384 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21385 (thread_db_init): Call thread_db_err_str.
21386 * configure.ac: Check for TD_VERSION.
21387 * config.in, configure: Regenerated.
21388
21389 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21390
21391 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21392
21393 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21394
21395 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21396 is not available. Define HAVE_PTRACE_GETREGS if it is.
21397 * config.in, configure: Regenerated.
21398 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21399 * linux-i386-low.c, linux-m68k-low.c: Update to use
21400 HAVE_PTRACE_GETREGS.
21401 * linux-low.c (regsets_fetch_inferior_registers)
21402 (regsets_store_inferior_registers): Only return 0 if we processed
21403 GENERAL_REGS.
21404 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21405 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21406
21407 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21408
21409 * inferiors.c (struct thread_info): Add gdb_id.
21410 (add_thread): Add gdb_id argument.
21411 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21412 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21413 calls to add_thread.
21414 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21415 * server.c (handle_query): Use thread_to_gdb_id.
21416 (handle_v_cont, main): Use gdb_id_to_thread_id.
21417 * server.h (add_thread): Update prototype.
21418 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21419 prototypes.
21420
21421 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21422
21423 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21424 left-padded registers.
21425 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21426 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21427
21428 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21429
21430 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21431 * configure: Regenerate.
21432 * config.in: Regenerate.
21433 * server.h (NEED_DECLARATION_STRERROR):
21434 Replace with !HAVE_DECL_STRERROR.
21435
21436 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21437
21438 * linux-low.c (linux_wait, linux_send_signal): Don't test
21439 an unsigned long variable for > 0 if it could be MAX_ULONG.
21440 * server.c (myresume): Likewise.
21441 * target.c (set_desired_inferior): Likewise.
21442
21443 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21444
21445 * configure.ac: Simplify and improve check for socklen_t.
21446 * configure, config.in: Regenerate.
21447
21448 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21449
21450 * acconfig.h: Remove.
21451 * configure.ac: Add a test for socklen_t. Use three-argument
21452 AC_DEFINE throughout.
21453 * config.in: Regenerated using autoheader 2.59.
21454 * configure: Regenerated.
21455
21456 * gdbreplay.c (socklen_t): Provide a default.
21457 (remote_open): Use socklen_t.
21458 * remote-utils.c (socklen_t): Provide a default.
21459 (remote_open): Use socklen_t.
21460 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21461 unsigned char.
21462
21463 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21464 char for buffers.
21465 * linux-low.c (linux_read_memory, linux_write_memory)
21466 (linux_read_auxv): Likewise.
21467 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21468 (check_mem_write): Likewise.
21469 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21470 Likewise.
21471 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21472 (registers_from_string, register_data): Likewise.
21473 * server.c (handle_query, main): Likewise.
21474 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21475 (decode_M_packet): Likewise.
21476 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21477 * target.h (struct target_ops): Update read_memory, write_memory,
21478 and read_auxv.
21479 (read_inferior_memory, write_inferior_memory): Update.
21480 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21481 to unsigned char *.
21482 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21483 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21484 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21485 linux-s390-low.c, linux-sh-low.c: Update for changes in
21486 read_inferior_memory and the_low_target->breakpoint.
21487
21488 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21489
21490 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21491 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21492 * configure.srv: Add powerpc64-*-linux*.
21493 * linux-ppc64-low.c: New file.
21494
21495 2005-05-23 Orjan Friberg <orjanf@axis.com>
21496
21497 * linux-cris-low.c: New file with support for CRIS.
21498 * linux-crisv32-low.c: Ditto for CRISv32.
21499 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21500 (clean): Add reg-cris.c and reg-crisv32.c.
21501 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21502 reg-crisv32.o, and reg-crisv32.c to make rules.
21503 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21504 recognized targets.
21505
21506 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21507
21508 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21509 of sizeof (PTRACE_XFER_TYPE).
21510 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21511
21512 2005-05-12 Orjan Friberg <orjanf@axis.com>
21513
21514 * target.h (struct target_ops): Add insert_watchpoint,
21515 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21516 pointers for hardware watchpoint support.
21517 * linux-low.h (struct linux_target_ops): Ditto.
21518 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21519 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21520 to linux_target_ops.
21521 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21522 reply packet.
21523 * server.c (main): Recognize 'Z' and 'z' packets.
21524
21525 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21526
21527 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21528 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21529 (the_low_target): Add new members.
21530
21531 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21532
21533 * proc-service.c (ps_lgetregs): Search all_processes instead of
21534 all_threads.
21535
21536 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21537
21538 * server.c (start_inferior): Change return type to int.
21539 (attach_inferior): Change sigptr to int *.
21540 (handle_v_cont, handle_v_requests): Change signal to int *.
21541 (main): Change signal to int.
21542
21543 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21544
21545 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21546 * configure.srv: Add m32r*-*-linux*.
21547 * linux-m32r-low.c: New file.
21548
21549 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21550
21551 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21552
21553 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21554
21555 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21556 Take unsigned long arguments for PIDs.
21557 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21558 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21559 (wait_for_sigstop, linux_resume_one_process)
21560 (regsets_fetch_inferior_registers, linux_send_signal)
21561 (linux_read_auxv): Likewise. Update the types of variables holding
21562 PIDs. Update format string specifiers.
21563 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21564 * remote-utils.c (prepare_resume_reply): Likewise.
21565 * server.c (cont_thread, general_thread, step_thread)
21566 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21567 unsigned long.
21568 (handle_query): Update format specifiers.
21569 (handle_v_cont, main): Use strtoul for thread IDs.
21570 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21571 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21572 (general_thread, step_thread, thread_from_wait)
21573 (old_thread_from_wait): Update.
21574 * target.h (struct thread_resume): Use unsigned long for THREAD.
21575 (struct target_ops): Use unsigned long for arguments to attach and
21576 thread_alive.
21577
21578 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21579
21580 * acinclude.m4: Include bfd/bfd.m4 directly.
21581 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21582 <agriffis@toolchain.org>.
21583 * aclocal.m4, configure: Regenerated.
21584
21585 2005-01-07 Andrew Cagney <cagney@gnu.org>
21586
21587 * configure.ac: Rename configure.in, require autoconf 2.59.
21588 * configure: Re-generate.
21589
21590 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21591
21592 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21593 LIBS when finished.
21594 * aclocal.m4: Regenerated.
21595 * configure: Regenerated.
21596
21597 2004-11-21 Andreas Schwab <schwab@suse.de>
21598
21599 * linux-m68k-low.c (m68k_num_gregs): Define.
21600 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21601 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21602 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21603 (m68k_breakpoint_at): New. Add to the_low_target.
21604
21605 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21606 srv_linux_thread_db to yes.
21607
21608 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21609
21610 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21611 (ARCH_SET_FS): Likewise.
21612 (ARCH_GET_FS): Likewise.
21613 (ARCH_GET_GS): Likewise.
21614
21615 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21616
21617 * linux-i386-low.c (ps_get_thread_area): New.
21618 * linux-x86-64-low.c (ps_get_thread_area): New.
21619 * linux-low.c: Include <sys/syscall.h>.
21620 (linux_kill_one_process): Don't kill the first thread here.
21621 (linux_kill): Kill the first thread here.
21622 (kill_lwp): New function.
21623 (send_sigstop, linux_send_signal): Use it.
21624 * proc-service.c: Clean up #ifdefs.
21625 (fpregset_info): Delete.
21626 (ps_lgetregs): Update and enable implementation.
21627 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21628 implementations.
21629 * remote-utils.c (struct sym_cache, symbol_cache): New.
21630 (input_interrupt): Print a clearer message.
21631 (async_io_enabled): New variable.
21632 (enable_async_io, disable_async_io): Use it. Update comments.
21633 (look_up_one_symbol): Use the symbol cache.
21634 * thread-db.c (thread_db_look_up_symbols): New function.
21635 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21636
21637 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21638
21639 * configure.in: Test for -rdynamic.
21640 * configure: Regenerated.
21641 * Makefile (INTERNAL_LDFLAGS): New.
21642 (gdbserver, gdbreplay): Use it.
21643
21644 2004-09-02 Andrew Cagney <cagney@gnu.org>
21645
21646 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21647
21648 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21649
21650 * linux-low.c (linux_wait): Clear all_processes list also.
21651
21652 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21653
21654 * linux-low.c: Include <errno.h>. Remove extern declaration of
21655 errno.
21656
21657 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21658
21659 * gdbreplay.c, server.h, utils.c: Update copyright years.
21660
21661 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21662
21663 * server.c (main): Print child status or termination signal from
21664 variable 'signal', not 'sig'.
21665
21666 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21667
21668 * linux-low.c (linux_read_memory): Change return type to
21669 int. Check for and return error from ptrace().
21670 * target.c (read_inferior_memory): Change return type to int. Pass
21671 back return status from the_target->read_memory().
21672 * target.h (struct target_ops): Adapt *read_memory() prototype.
21673 Update comment.
21674 (read_inferior_memory): Adapt prototype.
21675 * server.c (main): Return an error packet if
21676 read_inferior_memory() returns an error.
21677
21678 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21679
21680 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21681 Unify with other clean targets.
21682
21683 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21684
21685 * server.c (handle_v_cont): Call set_desired_inferior.
21686
21687 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21688
21689 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21690
21691 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21692
21693 * linux-low.c (linux_wait): Unblock async I/O.
21694 (linux_resume): Block and enable async I/O.
21695 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21696 * server.h (block_async_io, unblock_async_io): Add prototypes.
21697
21698 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21699
21700 * remote-utils.c (remote_open): Print a status notice after
21701 opening a TCP port.
21702 * server.c (attach_inferior): Print a status notice after
21703 attaching.
21704
21705 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21706
21707 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21708
21709 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21710
21711 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21712 error packet.
21713 * server.c, target.h: Update copyright years.
21714
21715 2004-02-25 Roland McGrath <roland@redhat.com>
21716
21717 * target.h (struct target_ops): New member `read_auxv'.
21718 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21719 * linux-low.c (linux_read_auxv): New function.
21720 (linux_target_ops): Initialize `read_auxv' member to that.
21721
21722 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21723
21724 Committed by Jim Blandy <jimb@redhat.com>.
21725
21726 * linux-s390-low.c (s390_num_regs): Update.
21727 (s390_regmap): Remove control registers. Use __s390x__ predefine
21728 instead of GPR_SIZE to distiguish s390 and s390x targets.
21729
21730 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21731
21732 * linux-low.c: Update copyright year.
21733 (check_removed_breakpoint): Clear pending_is_breakpoint.
21734 (linux_set_resume_request, linux_queue_one_thread)
21735 (resume_status_pending_p): New functions.
21736 (linux_continue_one_thread): Use process->resume.
21737 (linux_resume): Only resume threads if there are no pending events.
21738 * linux-low.h (struct process_info): Add resume request
21739 pointer.
21740
21741 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21742
21743 * regcache.c (new_register_cache): Clear the allocated register
21744 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21745
21746 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21747
21748 * linux-low.c (linux_resume): Take a struct thread_resume *
21749 argument.
21750 (linux_wait): Update call.
21751 (resume_ptr): New static variable.
21752 (linux_continue_one_thread): Renamed from
21753 linux_continue_one_process. Use resume_ptr.
21754 (linux_resume): Use linux_continue_one_thread.
21755 * server.c (handle_v_cont, handle_v_requests): New functions.
21756 (myresume): New function.
21757 (main): Handle 'v' case.
21758 * target.h (struct thread_resume): New type.
21759 (struct target_ops): Change argument of "resume" to struct
21760 thread_resume *.
21761 (myresume): Delete macro.
21762
21763 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21764
21765 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21766 (uninstall): Support DESTDIR.
21767
21768 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21769
21770 * configure.srv: Add xscale*linux copy of arm*linux entry.
21771
21772 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21773
21774 * linux-arm-low.c (arm_reinsert_addr): New function.
21775 (the_low_target): Add arm_reinsert_addr.
21776
21777 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21778
21779 * mem-break.c: Remove whitespace at end of file.
21780
21781 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21782
21783 * configure.in: Check whether we need to prototype strerror.
21784 * server.h: Optionally prototype strerror.
21785 * gdbreplay.c (perror_with_name): Use strerror.
21786 * linux-low.c (linux_attach_lwp): Use strerror.
21787 * utils.c (perror_with_name): Use strerror.
21788 * config.in, configure: Regenerated.
21789
21790 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21791
21792 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21793 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21794
21795 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21796
21797 * Makefile.in (SFILES): Update.
21798 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21799 low-sun3.c: Remove files.
21800
21801 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21802
21803 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21804 (linux_detach_one_process, linux_detach): New functions.
21805 (linux_target_ops): Add linux_detach.
21806 * server.c (main): Handle 'D' packet.
21807 * target.h (struct target_ops): Add "detach" member.
21808 (detach_inferior): Define.
21809
21810 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21811
21812 From Kelley Cook <kelleycook@wideopenwest.com>:
21813 * configure.srv: Accept i[34567]86 variants.
21814
21815 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21816
21817 * linux-low.c (linux_wait_for_event): Correct comment typos.
21818 (linux_resume_one_process): Call check_removed_breakpoint.
21819 (linux_send_signal): New function.
21820 (linux_target_ops): Add linux_send_signal.
21821 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21822 of kill.
21823 * target.h (struct target_ops): Add send_signal.
21824
21825 2003-05-29 Jim Blandy <jimb@redhat.com>
21826
21827 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21828 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21829 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21830 away part of the register's value.
21831
21832 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21833
21834 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21835 (linux_wait_for_event, linux_init_signals): Likewise.
21836
21837 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21838
21839 * configure.in: Check for stdlib.h.
21840 * configure: Regenerated.
21841 * config.in: Regenerated.
21842
21843 2003-01-04 Andreas Schwab <schwab@suse.de>
21844
21845 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21846
21847 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21848
21849 * Makefile.in: Remove obsolete code.
21850
21851 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21852
21853 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21854 defined(PT_FPR0_HI).
21855
21856 2002-11-17 Stuart Hughes <seh@zee2.com>
21857
21858 * linux-arm-low.c (arm_num_regs): Increase.
21859 (arm_regmap): Include status register.
21860
21861 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21862
21863 * linux-low.c (register_addr): Remove incorrect -1 check.
21864
21865 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21866
21867 * linux-low.c (linux_create_inferior): Call setpgid. Return
21868 the new PID.
21869 (unstopped_p, linux_signal_pid): Remove.
21870 (linux_target_ops): Remove linux_signal_pid.
21871 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21872 global instead of target method.
21873 * target.h (struct target_ops): Remove signal_pid. Update comment
21874 for create_inferior.
21875 * server.c (signal_pid): New variable.
21876 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21877 gdbserver. Set the child to be the foreground process group.
21878 (attach_inferior): Set signal_pid.
21879
21880 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21881
21882 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21883
21884 2002-08-20 Jim Blandy <jimb@redhat.com>
21885
21886 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21887 default for this.
21888
21889 2002-08-01 Andrew Cagney <cagney@redhat.com>
21890
21891 * Makefile.in: Make chill references obsolete.
21892
21893 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21894
21895 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21896 * configure: Regenerate.
21897 * config.in: Regenerate.
21898
21899 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21900
21901 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21902 (perror_with_name, remote_close, remote_open, expect, play): Static.
21903
21904 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21905
21906 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21907 byte offsets instead of an array of indexes.
21908 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21909
21910 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21911
21912 * regcache.c: Add comment.
21913
21914 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21915
21916 * thread-db.c: New file.
21917 * proc-service.c: New file.
21918 * acinclude.m4: New file.
21919 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21920 proc-service.o, and thread-db.o.
21921 (linux-low.o): Add USE_THREAD_DB.
21922 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21923 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21924 * aclocal.m4: Regenerated.
21925 * config.in: Regenerated.
21926 * configure: Regenerated.
21927 * configure.in: Check for proc_service.h, sys/procfs.h,
21928 thread_db.h, and linux/elf.h headrs.
21929 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21930 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21931 Check for -lthread_db and thread support.
21932 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21933 PowerPC, and SuperH.
21934 * i387-fp.c: Constify arguments.
21935 * i387-fp.h: Likewise.
21936 * inferiors.c: (struct thread_info): Renamed from
21937 `struct inferior_info'. Remove PID member. Use generic inferior
21938 list header. All uses updated.
21939 (inferiors, signal_pid): Removed.
21940 (all_threads): New variable.
21941 (get_thread): Define.
21942 (add_inferior_to_list): New function.
21943 (for_each_inferior): New function.
21944 (change_inferior_id): New function.
21945 (add_inferior): Removed.
21946 (remove_inferior): New function.
21947 (add_thread): New function.
21948 (free_one_thread): New function.
21949 (remove_thread): New function.
21950 (clear_inferiors): Use for_each_inferior and free_one_thread.
21951 (find_inferior): New function.
21952 (find_inferior_id): New function.
21953 (inferior_target_data): Update argument type.
21954 (set_inferior_target_data): Likewise.
21955 (inferior_regcache_data): Likewise.
21956 (set_inferior_regcache_data): Likewise.
21957 * linux-low.c (linux_bp_reinsert): Remove.
21958 (all_processes, stopping_threads, using_thrads)
21959 (struct pending_signals, debug_threads, pid_of): New.
21960 (inferior_pid): Replace with macro.
21961 (struct inferior_linux_data): Remove.
21962 (get_stop_pc, add_process): New functions.
21963 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21964 Use add_process and add_thread.
21965 (linux_attach_lwp): New function, based on old linux_attach. Use
21966 add_process and add_thread. Set stop_expected for new threads.
21967 (linux_attach): New function.
21968 (linux_kill_one_process): New function.
21969 (linux_kill): Kill all LWPs.
21970 (linux_thread_alive): Use find_inferior_id.
21971 (check_removed_breakpoints, status_pending_p): New functions.
21972 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21973 Update. Use WNOHANG. Wait for cloned processes also. Update process
21974 struct for the found process.
21975 (linux_wait_for_event): New function.
21976 (linux_wait): Use it. Support LWPs.
21977 (send_sigstop, wait_for_sigstop, stop_all_processes)
21978 (linux_resume_one_process, linux_continue_one_process): New functions.
21979 (linux_resume): Support LWPs.
21980 (REGISTER_RAW_SIZE): Remove.
21981 (fetch_register): Use register_size instead. Call supply_register.
21982 (usr_store_inferior_registers): Likewise. Call collect_register.
21983 Fix recursive case.
21984 (regsets_fetch_inferior_registers): Improve error message.
21985 (regsets_store_inferior_registers): Add debugging.
21986 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21987 (unstopped_p, linux_signal_pid): New functions.
21988 (linux_target_ops): Add linux_signal_pid.
21989 (linux_init_signals): New function.
21990 (initialize_low): Call it. Initialize using_threads.
21991 * regcache.c (inferior_regcache_data): Add valid
21992 flag.
21993 (get_regcache): Fetch registers lazily. Add fetch argument
21994 and update all callers.
21995 (regcache_invalidate_one, regcache_invalidate): New
21996 functions.
21997 (new_register_cache): Renamed from create_register_cache.
21998 Return the new regcache.
21999 (free_register_cache): Change argument to a void *.
22000 (registers_to_string, registers_from_string): Call get_regcache
22001 with fetch flag set.
22002 (register_data): Make static. Pass fetch flag to get_regcache.
22003 (supply_register): Call get_regcache with fetch flag clear.
22004 (collect_register): Call get_regcache with fetch flag set.
22005 (collect_register_as_string): New function.
22006 * regcache.h: Update.
22007 * remote-utils.c (putpkt): Flush after debug output and use
22008 stderr.
22009 Handle input interrupts while waiting for an ACK.
22010 (input_interrupt): Use signal_pid method.
22011 (getpkt): Flush after debug output and use stderr.
22012 (outreg): Use collect_register_as_string.
22013 (new_thread_notify, dead_thread_notify): New functions.
22014 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22015 and general_thread.
22016 (look_up_one_symbol): Flush after debug output.
22017 * server.c (step_thread, server_waiting): New variables.
22018 (start_inferior): Don't use signal_pid. Update call to mywait.
22019 (attach_inferior): Update call to mywait.
22020 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22021 (main): Don't fetch/store registers explicitly. Use
22022 set_desired_inferior. Support proposed ``Hs'' packet. Update
22023 calls to mywait.
22024 * server.h: Update.
22025 (struct inferior_list, struct_inferior_list_entry): New.
22026 * target.c (set_desired_inferior): New.
22027 (write_inferior_memory): Constify.
22028 (mywait): New function.
22029 * target.h: Update.
22030 (struct target_ops): New signal_pid method.
22031 (mywait): Removed macro, added prototype.
22032
22033 * linux-low.h (regset_func): Removed.
22034 (regset_fill_func, regset_store_func): New.
22035 (enum regset_type): New.
22036 (struct regset_info): Add type field. Use new operation types.
22037 (struct linux_target_ops): stop_pc renamed to get_pc.
22038 Add decr_pc_after_break and breakpoint_at.
22039 (get_process, get_thread_proess, get_process_thread)
22040 (strut process_info, all_processes, linux_attach_lwp)
22041 (thread_db_init): New.
22042
22043 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22044 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22045 (the_low_target): Add new members.
22046 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22047 (i386_store_fpxregset): Constify.
22048 (target_regsets): Add new kind identifier.
22049 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22050 (i386_set_pc): Add debugging.
22051 (i386_breakpoint_at): New function.
22052 (the_low_target): Add new members.
22053 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22054 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22055 (mips_breakpoint_at): New.
22056 (the_low_target): Add new members.
22057 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22058 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22059 (the_low_target): Add new members.
22060 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22061 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22062 (the_low_target): Add new members.
22063 * linux-x86-64-low.c (target_regsets): Add new kind
22064 identifier.
22065
22066 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22067
22068 From Martin Pool <mbp@samba.org>:
22069 * server.c (gdbserver_usage): New function.
22070 (main): Call it.
22071
22072 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22073
22074 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22075 stop_at -> stop_pc.
22076
22077 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22078
22079 * Makefile.in: Remove obsolete code.
22080
22081 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22082
22083 * linux-low.c (regsets_fetch_inferior_registers),
22084 (regsets_store_inferior_registers): Removed cast to int from
22085 ptrace() calls.
22086 * regcache.h: Added declaration of struct inferior_info.
22087
22088 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22089
22090 * inferiors.c (struct inferior_info): Add regcache_data.
22091 (add_inferior): Call create_register_cache.
22092 (clear_inferiors): Call free_register_cache.
22093 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22094 * regcache.c (struct inferior_regcache_data): New.
22095 (registers): Remove.
22096 (get_regcache): New function.
22097 (create_register_cache, free_register_cache): New functions.
22098 (set_register_cache): Don't initialize the register cache here.
22099 (registers_to_string, registers_from_string, register_data): Call
22100 get_regcache.
22101 * regcache.h: Add prototypes.
22102 * server.h: Likewise.
22103
22104 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22105
22106 * mem-break.c: New file.
22107 * mem-break.h: New file.
22108 * Makefile.in: Add mem-break.o rule; update server.h
22109 dependencies.
22110 * inferiors.c (struct inferior_info): Add target_data
22111 member.
22112 (clear_inferiors): Free target_data member if set.
22113 (inferior_target_data, set_inferior_target_data): New functions.
22114 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22115 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22116 * linux-low.c (linux_bp_reinsert): New variable.
22117 (struct inferior_linux_data): New.
22118 (linux_create_inferior): Use set_inferior_target_data.
22119 (linux_attach): Likewise. Call add_inferior.
22120 (linux_wait_for_one_inferior): New function.
22121 (linux_wait): Call it.
22122 (linux_write_memory): Add const.
22123 (initialize_low): Call set_breakpoint_data.
22124 * linux-low.h (struct linux_target_ops): Add breakpoint
22125 handling members.
22126 * server.c (attach_inferior): Remove extra add_inferior
22127 call.
22128 * server.h: Include mem-break.h. Update inferior.c
22129 prototypes.
22130 * target.c (read_inferior_memory)
22131 (write_inferior_memory): New functions.
22132 * target.h (read_inferior_memory)
22133 (write_inferior_memory): Change macros to prototypes.
22134 (struct target_ops): Update comments. Add const to write_memory
22135 definition.
22136
22137 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22138
22139 * linux-low.c (usr_store_inferior_registers): Support
22140 registers which are allowed to fail to store.
22141 * linux-low.h (linux_target_ops): Likewise.
22142 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22143 (ppc_cannot_store_register): FPSCR may not be storable.
22144
22145 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22146
22147 * server.h: Include <string.h> if HAVE_STRING_H.
22148 * ChangeLog: Correct paths in last ChangeLog entry.
22149
22150 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22151
22152 * linux-low.h: Remove obsolete prototypes.
22153 (struct linux_target_ops): New.
22154 (extern the_low_target): New.
22155 * linux-low.c (num_regs, regmap): Remove declarations.
22156 (register_addr): Use the_low_target explicitly.
22157 (fetch_register): Likewise.
22158 (usr_fetch_inferior_registers): Likewise.
22159 (usr_store_inferior_registers): Likewise.
22160 * linux-arm-low.c (num_regs): Remove.
22161 (arm_num_regs): Define.
22162 (arm_regmap): Renamed from regmap, made static.
22163 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22164 made static.
22165 (arm_cannot_store_register): Renamed from cannot_store_register,
22166 made static.
22167 (the_low_target): New.
22168 * linux-i386-low.c (num_regs): Remove.
22169 (i386_num_regs): Define.
22170 (i386_regmap): Renamed from regmap, made static.
22171 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22172 made static.
22173 (i386_cannot_store_register): Renamed from cannot_store_register,
22174 made static.
22175 (the_low_target): New.
22176 * linux-ia64-low.c (num_regs): Remove.
22177 (ia64_num_regs): Define.
22178 (ia64_regmap): Renamed from regmap, made static.
22179 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22180 made static.
22181 (ia64_cannot_store_register): Renamed from cannot_store_register,
22182 made static.
22183 (the_low_target): New.
22184 * linux-m68k-low.c (num_regs): Remove.
22185 (m68k_num_regs): Define.
22186 (m68k_regmap): Renamed from regmap, made static.
22187 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22188 made static.
22189 (m68k_cannot_store_register): Renamed from cannot_store_register,
22190 made static.
22191 (the_low_target): New.
22192 * linux-mips-low.c (num_regs): Remove.
22193 (mips_num_regs): Define.
22194 (mips_regmap): Renamed from regmap, made static.
22195 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22196 made static.
22197 (mips_cannot_store_register): Renamed from cannot_store_register,
22198 made static.
22199 (the_low_target): New.
22200 * linux-ppc-low.c (num_regs): Remove.
22201 (ppc_num_regs): Define.
22202 (ppc_regmap): Renamed from regmap, made static.
22203 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22204 made static.
22205 (ppc_cannot_store_register): Renamed from cannot_store_register,
22206 made static.
22207 (the_low_target): New.
22208 * linux-s390-low.c (num_regs): Remove.
22209 (s390_num_regs): Define.
22210 (s390_regmap): Renamed from regmap, made static.
22211 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22212 made static.
22213 (s390_cannot_store_register): Renamed from cannot_store_register,
22214 made static.
22215 (the_low_target): New.
22216 * linux-sh-low.c (num_regs): Remove.
22217 (sh_num_regs): Define.
22218 (sh_regmap): Renamed from regmap, made static.
22219 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22220 made static.
22221 (sh_cannot_store_register): Renamed from cannot_store_register,
22222 made static.
22223 (the_low_target): New.
22224 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22225 (the_low_target): New.
22226
22227 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22228
22229 * Makefile.in: Add stamp-h target.
22230 * configure.in: Create stamp-h.
22231 * configure: Regenerated.
22232
22233 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22234
22235 * inferiors.c: New file.
22236 * target.c: New file.
22237 * target.h: New file.
22238 * Makefile.in: Add target.o and inferiors.o. Update
22239 dependencies.
22240 * linux-low.c (inferior_pid): New static variable,
22241 moved from server.c.
22242 (linux_create_inferior): Renamed from create_inferior.
22243 Call add_inferior. Return 0 on success instead of a PID.
22244 (linux_attach): Renamed from myattach.
22245 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22246 (linux_thread_alive): Renamed from mythread_alive.
22247 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22248 child dies.
22249 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22250 (regsets_store_inferior_registers): Correct error message.
22251 Add missing ``return 0''.
22252 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22253 (linux_store_registers): Renamed from store_inferior_registers.
22254 (linux_read_memory): Renamed from read_inferior_memory.
22255 (linux_write_memory): Renamed from write_inferior_memory.
22256 (linux_target_ops): New structure.
22257 (initialize_low): Call set_target_ops ().
22258 * remote-utils.c (unhexify): New function.
22259 (hexify): New function.
22260 (input_interrupt): Send signals to ``signal_pid''.
22261 * server.c (inferior_pid): Remove.
22262 (start_inferior): Update create_inferior call.
22263 (attach_inferior): Call add_inferior.
22264 (handle_query): New function.
22265 (main): Call handle_query for `q' packets.
22266 * server.h: Include "target.h". Remove obsolete prototypes.
22267 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22268
22269 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22270
22271 * Makefile.in: Add WARN_CFLAGS. Update configury
22272 dependencies.
22273 * configure.in: Check for <string.h>
22274 * configure: Regenerate.
22275 * config.in: Regenerate.
22276 * gdbreplay.c: Include needed system headers.
22277 (remote_open): Remove strchr prototype.
22278 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22279 * regcache.c (supply_register): Change buf argument to const void *.
22280 (supply_register_by_name): Likewise.
22281 (collect_register): Change buf argument to void *.
22282 (collect_register_by_name): Likewise.
22283 * regcache.h: Add missing prototypes.
22284 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22285 * server.c (handle_query): New function.
22286 (attached): New static variable, moved out of main.
22287 (main): Quiet longjmp clobber warnings.
22288 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22289 * utils.c (error): Remove NORETURN.
22290 (fatal): Likewise.
This page took 0.594889 seconds and 4 git commands to generate.